Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello David,

I think the original version should be safe. Our formula api can't deal with
broken documents during import especially the oox import can't deal with
errors of any kinds in formulas. But a broken document won't create a crash
only a #Name entry in the cell that is not correct.

I know that this situation is not ideal but we can't change the formula api
at the moment.

Regards, Markus

2011/7/19 David Tardon <dtardon@redhat.com>

On Tue, Jul 19, 2011 at 04:29:32PM +0530, Muthu Subramanian K wrote:
Hi,

+        if( maCurrCell.mnSharedId >= 0 )
+        {
+            Reference< XFormulaTokens > xTokens( maCurrCell.mxCell,
UNO_QUERY_THROW );
+            ExtCellFormulaContext aContext( *this, xTokens,
maCurrCell.maAddress );
+            getSharedFormulas().setSharedFormulaCell( aContext,
maCurrCell.mnSharedId );
+        }

This may cause problems with (broken) documents with cells that have
type different from shared but contain si attribute. I am giving my +1
on the condition that

+        if( maCurrCell.mnSharedId >= 0 )

is changed to

+        if( maCurrCell.mnFormulaType == XML_shared &&
maCurrCell.mnSharedId >= 0 )

(or that someone convinces me the scenario I described cannot happen :)

D.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.