Hi Kohei,

On Tue, Feb 22, 2005 at 23:00:11 -0500, Kohei Yoshida wrote:

> I'm trying to understand the mechanism of cell referencing, and
> somehow the two classes ScToken and ScTokeArray seem to be playing a
> major role in this.

Absolutely, yes.

> I have only read a fraction of the relevant code, but it seems to me
> that when a formula cell object references another cell that
> references another cell that references (...) another cell, instances
> of ScToken which are daisy-chained together keep track of their
> reference relationship, and another object of ScTokenArray manages
> them.
> 
> Is this understanding correct, or am I totally off?

Not sure if I understood correctly what you meant by "daisy-chained" and
"another object of ScTokenArray manages them". I'll try to put it in
a few words how things work:

- Each ScFormulaCell has a pointer to one ScTokenArray.
- A ScTokenArray contains all ScToken types that represent the formula
  and are necessary to interpret the formula, amongst them are
  ScSingleRefToken and ScDoubleRefToken that are cell references.
- The cell references are relative offsets and/or absolute positions
  that point into the document by sheet/column/row numbers addresses.
- Using the address a cell is retrieved at that position, which may be
  another ScFormulaCell, which in turn is interpreted using the
  ScTokenArray it is pointing to.

Does this help, or am I off track now?

  Eike

-- 
 OOo/SO Calc core developer. Number formatter bedevilled I18N transpositionizer.
 GnuPG key 0x293C05FD:  997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to