[Libreoffice] [REVIEW] fix for fdo#39850 and fdo#39820: update range names and database ranges in formula cells
ooo at erack.de
Tue Aug 16 06:33:54 PDT 2011
On Tuesday, 2011-08-16 08:07:20 +0200, Markus Mohrhard wrote:
> this patch might be a bit to big for 3-4, but who knows:
First thing that caught my eye: using toAsciiUpperCase() (or any other
ASCII method) on anything that the user inputs as names is a no-no as it
doesn't handle Unicode. Use ScGlobal::pCharClass->upper() instead.
The change to the ScFormulaCell ctor apparently unconditionally tries to
adjust name tokens, this is completely unnecessary in most situations
and should be triggered only if the sheets of new and old position
Before looping with pCode->GetNext...() it needs a pCode->Reset() first.
In ScTable::CopyToClip() all local range names are copied if none exist
yet on the target. Best would be if only names used by the formulas to
be copied would be copied if not already there, which adjustRangeName
attempts to do. So in CopyToClip initialize
pTable->mpRangeName = new ScRangeName;
Btw, please use 'r' prefix for parameters passed as reference, so
rNewDoc instead of aNewDoc, and please "const as const can", for example
it should be const ScDocument* pOldDoc
Apart from that, I'm currently somewhat handicapped with equipment and
can't check if the change really does what it is supposed to do.
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
Size: 198 bytes
Desc: not available
More information about the LibreOffice