Re: [sc-dev] Absurd behaviour while displaying values in a range of cells

2010-07-06 Thread rashi dhing
So I did pore over the various functions of the ScInterpreter like GetNewMat
and PushMatrix etc.
Apart from being extremely complicated, I still really didn't understand
where the result matrix
was being set/put into the spreadsheet. I did create a matrix but now I
don't know how to
print the values onto the sheet. PushMatrix pushes the matrix onto the stack
but that
does not serve my purpose !!

-Rashi



On Wed, Jun 16, 2010 at 7:08 PM, Eike Rathke e...@openoffice.org wrote:

 Hi rashi,

 On Friday, 2010-06-04 14:10:31 +0300, rashi dhing wrote:

  Hi Eike, Could you tell me why modifying the spreadsheet while
  interpreting
  a function is not the right approach

 That could modify cells that are still to be interpreted, even for the
 same formula the modifying function is part of, or cells that were
 already interpreted for some formula but then would deliver a different
 result in another step. It's like biting the hand that feeds you..

  and what is the workaround or the right approach ?

 See Niklas' answer about returning an array.

  Eike

 --
  OOo/SO Calc core developer. Number formatter stricken i18n
 transpositionizer.
  SunSign   0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
  OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
  Please don't send personal mail to the e...@sun.com account, which I use
 for
  mailing lists only and don't read from outside Sun. Use er...@sun.comthanks.




-- 
 Happiness makes up in height for what it lacks in length. (Robert Frost)


Re: [sc-dev] Absurd behaviour while displaying values in a range of cells

2010-07-06 Thread Eike Rathke
Hi rashi,

On Tuesday, 2010-07-06 12:40:35 +0300, rashi dhing wrote:

 So I did pore over the various functions of the ScInterpreter like GetNewMat
 and PushMatrix etc.
 Apart from being extremely complicated, I still really didn't understand
 where the result matrix
 was being set/put into the spreadsheet.

The result matrix is stored at the top left cell of a matrix formula
range, if there is any (e.g. created by having selected an area and
entered the formula using Ctrl+Enter), respectively at the formula cell.
So if the entire matrix result is to be displayed you, or the user, need
to create a matrix formula range of at least the same size. In the UI
that is done automatically if no range was selected, e.g. entering the
formula =MUNIT(2) and terminating the input with Ctrl+Enter instead of
Enter creates a 2x2 matrix formula range.

 I did create a matrix but now I don't know how to print the values
 onto the sheet. PushMatrix pushes the matrix onto the stack but that
 does not serve my purpose !!

What is your purpose then? So far I thought you created a spreadsheet
function that delivers an array/matrix result. If the final result of
a formula was a matrix on the interpreter's stack, that matrix result is
stored at the formula cell for display purposes or further evaluation.
It's nothing you should have to care about.

  Eike

-- 
 OOo Calc core developer. Number formatter stricken i18n transpositionizer.
 Signature key 0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Oracle: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to the e...@sun.com account, which I use for
 mailing lists only and don't read from outside Oracle. Use er...@sun.com 
Thanks.


pgpBJ2uBnG08X.pgp
Description: PGP signature


Re: [sc-dev] Absurd behaviour while displaying values in a range of cells

2010-07-06 Thread rashi dhing
Hi Eike,

So does this mean that if I create a matrix formula range and call
PushMatrix,
I will have the result displayed on the sheet ?

Thanks,

Rashi

On Tue, Jul 6, 2010 at 2:22 PM, Eike Rathke e...@openoffice.org wrote:

 Hi rashi,

 On Tuesday, 2010-07-06 12:40:35 +0300, rashi dhing wrote:

  So I did pore over the various functions of the ScInterpreter like
 GetNewMat
  and PushMatrix etc.
  Apart from being extremely complicated, I still really didn't understand
  where the result matrix
  was being set/put into the spreadsheet.

 The result matrix is stored at the top left cell of a matrix formula
 range, if there is any (e.g. created by having selected an area and
 entered the formula using Ctrl+Enter), respectively at the formula cell.
 So if the entire matrix result is to be displayed you, or the user, need
 to create a matrix formula range of at least the same size. In the UI
 that is done automatically if no range was selected, e.g. entering the
 formula =MUNIT(2) and terminating the input with Ctrl+Enter instead of
 Enter creates a 2x2 matrix formula range.

  I did create a matrix but now I don't know how to print the values
  onto the sheet. PushMatrix pushes the matrix onto the stack but that
  does not serve my purpose !!

 What is your purpose then? So far I thought you created a spreadsheet
 function that delivers an array/matrix result. If the final result of
 a formula was a matrix on the interpreter's stack, that matrix result is
 stored at the formula cell for display purposes or further evaluation.
 It's nothing you should have to care about.

  Eike

 --
  OOo Calc core developer. Number formatter stricken i18n transpositionizer.
  Signature key 0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8
 D412
  OpenOffice.org Engineering at Oracle: http://blogs.sun.com/GullFOSS
  Please don't send personal mail to the e...@sun.com account, which I use
 for
  mailing lists only and don't read from outside Oracle. Use 
 er...@sun.comthanks.



Re: [sc-dev] Include file error

2010-07-06 Thread Daniel Rentz

rashi dhing schrieb:

This is probably a very basic question but I am getting a compile error
while trying to include the
interpre.hxx  in my module which happens to be located in a new directory
in the sc/source/ui  path.
How can I resolve this ?


There are several existing locations for header files:

sc/inc for usage in entire sc
sc/source/core/inc for headers local to core
sc/source/ui/inc for headers local to ui
sc/source/filter/inc for headers local to filter

Also, headers will be searched in the current directory, so, if you have 
abc.hxx and abc.cxx files in the same directory, and in abc.cxx there is 
code like

  #include abc.hxx
the header file should be found too.

How do you include the header file?


Regards
Daniel

-
To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org
For additional commands, e-mail: dev-h...@sc.openoffice.org