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

Eike Rathke ooo at erack.de
Wed Aug 10 04:53:14 PDT 2011


Hi,

On Wednesday, 2011-08-10 01:30:06 -0400, Kohei Yoshida wrote:

> $Sheet1.$A$1+$#REF!.$A$2
> 
> When you save this document at this point, what gets saved is
> 
> table:expression="[$Sheet1.$A$1]+[$#REF!.$A$2]"
> 
> The bug reported in fdo#37391 says that as of ODF 1.2 you must write
> 
> table:expression="[$Sheet1.$A$1]+[#REF!]"
> 
> when one of sheet, column and row gets invalidated.
> 
> Since this expression is generated directly from ScCompiler, it's likely
> affecting other areas where the formula expressions are generated from
> ScCompiler on export.  And the right fix probably needs to be made
> inside the formula compiler code too.

Indeed, the right place for this would be in
ConventionOOO_A1::MakeRefStrImpl() if bODF==true and any of the ref
parts IsTabDeleted()/IsColDeleted()/IsRowDeleted() is true.

For loading, ScCompiler::IsPredetectedReference() looks like it already
accepts a single "#REF!" string.

  Eike

-- 
 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
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110810/78a68411/attachment.pgp>


More information about the LibreOffice mailing list