Hi Markus, On Tuesday, 2011-08-16 16:25:22 +0200, Markus Mohrhard wrote:
> > 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. > > I think I inherite it from some other places that use range names. So then > we need to check for all other places too and adjust them accordingly. Yes please. > > 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 > > differ. > > No it's not that easy. If we have the same sheet and two different > documents, we need to adjust too. And we can't simply check that the > ScDocument instances are different because they will always be. Either we > have a pointer to the original ScDocument instance in the copy document or > we must always adjust our range names. I used the second approach because I > didn't like the other approach. So at least compare document instances and sheets and if both are identical don't do the adjustment, which I think is the most used scenario when copying cells. Sounds plausible? Btw, how well does this all cope with undo/redo? Eike -- PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication. Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
pgpR934zWvnnG.pgp
Description: PGP signature
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice