[Libreoffice] [REVIEW] Fix for formula reference breakage during file save.

Kohei Yoshida kyoshida at novell.com
Mon Mar 7 20:13:11 PST 2011

Hi there,

I'd like to backport a fix from master to the libreoffice-3-3.  The
patch is attached, which is a cleaned up version of 


The patch would likely not apply cleanly due to some BOOL to bool
conversions I've been doing on master, but that's trivial to fix.

This fixes the bug reported here


Here is some background on this.  When Calc opens an existing ODS
document, it stores the original XML contents, and re-uses it on export
for unmodified documents.  During editing, Calc invalidates the XML
streams of modified sheets, and that info is used to determine whether
to use the cached XML content or re-generate a new XML content from the

The bug was that, when the reference of a cell on Sheet A is updated due
to the relocation of the referenced cell on Sheet B, Calc would
invalidate Sheet B but not Sheet A.  So it re-uses the old XML stream
for Sheet A which removes the reference update that's just been done on
Sheet A.

The solution is to properly identify cells whose references have been
updated after moving the referenced cell, and invalidates the sheets
they are on.

Review would be appreciated.


Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida at novell.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sheet-stream-validity-fix.patch
Type: text/x-patch
Size: 10814 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110307/2e7c5145/attachment.bin>

More information about the LibreOffice mailing list