Hello David,<br><br>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.<br>
<br>I know that this situation is not ideal but we can't change the formula api at the moment. <br><br>Regards, Markus<br><br><div class="gmail_quote">2011/7/19 David Tardon <span dir="ltr"><<a href="mailto:dtardon@redhat.com" target="_blank">dtardon@redhat.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jul 19, 2011 at 04:29:32PM +0530, Muthu Subramanian K wrote:<br>
> Hi,<br>
><br>
> + if( maCurrCell.mnSharedId >= 0 )<br>
> + {<br>
> + Reference< XFormulaTokens > xTokens( maCurrCell.mxCell, UNO_QUERY_THROW );<br>
> + ExtCellFormulaContext aContext( *this, xTokens, maCurrCell.maAddress );<br>
> + getSharedFormulas().setSharedFormulaCell( aContext, maCurrCell.mnSharedId );<br>
> + }<br>
<br>
This may cause problems with (broken) documents with cells that have<br>
type different from shared but contain si attribute. I am giving my +1<br>
on the condition that<br>
<br>
+ if( maCurrCell.mnSharedId >= 0 )<br>
<br>
is changed to<br>
<br>
+ if( maCurrCell.mnFormulaType == XML_shared && maCurrCell.mnSharedId >= 0 )<br>
<br>
(or that someone convinces me the scenario I described cannot happen :)<br>
<br>
D.<br>
_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org" target="_blank">LibreOffice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
</blockquote></div><br>