[GSOC] Using cached formula results during ODS import
Daniel Bankston
daniel.dev.libreoffice at gmail.com
Wed Jul 4 00:00:16 PDT 2012
Hi, Markus and Kohei,
I having trouble trying to think of a way to prevent ScFormulaCells from
being set dirty without my hackish ScDocument libreoffice-generated-doc
flag.
During the import of the functions.ods unit test file, ScFormulaCells
are set dirty at three different times in three different ways.
1) ScMyTables::SetMatrix() uses a call chain down to
ScFormulaCell::SetMatColsRows() which sets the ScFormulaCell dirty.
2) ScDocument::CompileXML() uses a SetDirty call chain.
3) ScDocShell::AfterXMLLoading() eventually calls ScFormulaCell::Notify
which sets the ScFormulaCell to dirty.
I MAY be able to do something about 1; I'm not sure yet.
I can probably stop 2 from setting dirty since it is only used in import.
I don't see anyway to change 3 since ScFormulaCell::Notify() is so
widely used.
Backtraces for 1, 2, and 3 are attached.
I know Markus said we are trying to get away from flags like
ScDocument's IsImportingXML, but if I slightly modify the order of
things in ScDocShell::AfterXMLLoading(), I think I can check if
IsImportingXML is set to stop ScFormulaCell::SetDirty() from actually
setting the cell dirty. That would solve 1, 2, and 3, and it would
prevent me from adding my own ScDocument libreoffice-generated-doc flag.
What do you guys think?
Respectfully,
Daniel Bankston
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bt1.log
Type: text/x-log
Size: 10997 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120704/9f47ac9e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bt2.log
Type: text/x-log
Size: 6848 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120704/9f47ac9e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bt3.log
Type: text/x-log
Size: 6374 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120704/9f47ac9e/attachment-0002.bin>
More information about the LibreOffice
mailing list