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

Kohei Yoshida kohei.yoshida at gmail.com
Tue Aug 9 08:17:50 PDT 2011


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.

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.

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.

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.

Just my opinion.

Kohei



More information about the LibreOffice mailing list