[Libreoffice] [REVIEW] fix for fdo#39850 and fdo#39820: update range names and database ranges in formula cells

Eike Rathke ooo at erack.de
Wed Aug 17 05:14:18 PDT 2011


Hi Markus,

On Wednesday, 2011-08-17 07:23:42 +0200, Markus Mohrhard wrote:

> That was my intention. My idea was that we should create a global range name
> as default and not a local range name that points to the same cell. But
> after a talk to Kohei and your impression it seems that this is counter
> intuitive, so I'll change it.

Yes, if one has a sheet local name and copies the sheet or parts thereof
s/he expects the same structure.


> > In a dbgutil build the shell displays
> > Error: FormulaToken::SetIndex: virtual dummy called From File
> > /lo/core/formula/source/core/api/token.cxx at Line 212
> 
> Can it be that a debug build does not include the dgbutil messages?

Yes, that is independent from each other.


> > Apparently the FormulaToken used is not a FormulaIndexToken.
> >
> 
> Oh. I should not only override SetByte but also SetIndex. In calc all
> formula tokens are derived from ScToken which is derived from FormulaToken
> and not from FormulaIndexToken. I should no longer finish patchs after
> learning.c

Maybe that's due to some confusion when ScToken is actually used instead
of the types provided in formula/*. The general formula/* implementation
handles everything that doesn't need to access the document model or
know about application details, ScToken derivates implement spreadsheet
specific parts that need to know about addressing and such or use Calc
data types.

Actually the new ScNameToken implemented would belong to formula/*
instead, but there is already FormulaIndexToken, which also now has
changes for local/global names, so ScNameToken is superfluous and can be
removed. ScRawToken::CreateToken() needs to be changed back to return
a FormulaIndexToken.


> I think best is that I add a unit test before I push any further
> modifications in this area.

Always good.

  Eike

-- 
 PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.
 Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110817/314af280/attachment-0001.pgp>


More information about the LibreOffice mailing list