[Libreoffice] [REVIEW] fix for fdo#37319: don't write invalid references to odf files

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Aug 9 13:56:43 PDT 2011


Hello Eike, Kohei,

2011/8/9 Kohei Yoshida <kohei.yoshida at gmail.com>

> On Tue, 2011-08-09 at 05:04 +0200, Markus Mohrhard wrote:
> > Hello,
> >
> > this patch removes entries like #REF! A1:A3 for named ranges when the
> > sheet referenced by the named range is no longer there. I implemented
> > Regina's first suggestion because I don't see a way to implement the
> > other version with our current formula api.
> >
> > All in all this should be quite a save fix since I only added checks
> > that the ScTokenArray contains no error and that the reference is
> > valid.
>
> So..., I feel a bit uneasy modifying this for 3.4.
>
> First of all, there is a likelihood that the said invalid formula syntax
> may be affecting other areas where the formula expressions are written,
> and fixing just for the export of named expressions may not fix the core
> cause.
>

True. I'll have a look at some other problems too.


> Also, as Eike hinted, modifying the export code would also affect our
> ability to import the expression that we generate.  We need to check
> that, and if need be, fix it there as well.
>

The import works quite well. It shows #Ref! as reference which should be
quite fine.


> In addition to that, even after fixing the import to adopt to the new
> grammar rule, we'll need to be able to import the old, invalid syntax
> since there are documents out there that contain expressions written
> that way.
>

I did not change the import filter. This feature is already implemented
because [#Ref!] seems to be a valid expression whereas the old expression
was not.

>
> Given all this, I would feel a little more comfortable nailing this on
> master the right way, and *then* see if the change is safe enough to be
> backported to the 3.4 branch.
>

No problem with this. I'll push it to master with some other clean-up soon.

Regards, Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110809/34525c8a/attachment.htm>


More information about the LibreOffice mailing list