[REVIEW 3-5] Fix for a crasher during copy-n-paste from Excel.
erack at redhat.com
Mon Feb 13 12:16:01 PST 2012
On Monday, 2012-02-13 12:40:11 -0500, Kohei Yoshida wrote:
> Attached change (not yet committed to master) will fix a crasher bug
> which is one of the bugs reported in
> It originally comes from
I could not reproduce a crash in master as of commit
39bfd6c0bcce78a13eda4566741be3ae06152cb1 from Feb-10
May it be that the original document has to be opened in Excel and the
cells copied&pasted from there into Calc? I find it strange that the bug
report mentions ScDocument::InsertTableOp() being called.
> There were several ways to think this as far as I could see. I've
> settled with the attached change because the ScFormulaCell code
> appears to assume that we always have a non-NULL pCode instance beyond
> its construction.
Hmm.. yes, but ...
> The problem happened when calc was not able to
> compile the formula string for whatever reason, in which case pCode
> would remain NULL after the Compile is called in one of its
That would be strange, an ScTokenArray is always returned by
ScCompiler::CompileString(). So unless (the ugly one-liner)
if ( pDocument->IsClipOrUndo() ) return;
was hit there should always be a pCode. Which in turn pops up the
question why pCode would be accessed in a clipboard document if it
If we really always need a pCode it might be better to check at that
return place instead of the ctor. Still I'm not convinced that this is
the real cause.
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the LibreOffice