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

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Aug 16 22:23:42 PDT 2011


Hello Eike,

2011/8/17 Eike Rathke <ooo at erack.de>

> Hi Markus,
>
> With your latest commit 74070a021389534b9e791980bd33ede45be9fd81 copying
> to another sheet within the same document to me doesn't work as
> expected:
>
> On Sheet1 on cell B3 define a sheet local range name AAA for that cell
> ($Sheet1.$B$3). In cell B3 enter value 1, in cell B4 enter formula =AAA
> result is 1. Copy cells B3 and B4 to clipboard and paste on Sheet2 at
> position C4. Change C4 to 2, C5 remains with result 1. Open the name
> dialog and see now a global name AAA pointing to $Sheet1.$B$3
> (additionally to AAA local to Sheet1).
>

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.

>
> I'd expect a name AAA local to Sheet2 pointing to $Sheet2.$C$4 and the
> formula in Sheet2.C5 using that name and the result should be 2.
>
> 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?


>
> 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

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

Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110817/5a80a033/attachment.htm>


More information about the LibreOffice mailing list