sc/source/core/data/formulacell.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit bfd1909c87d0d645f1bbb74a142172ecc15100e8 Author: Eike Rathke <er...@redhat.com> Date: Tue Dec 3 22:07:00 2013 +0100 remove and reinsert formula cell from/to tree during CompileXML ... to keep the count updated, which actually silences the dbgutil warning of ScDocument::RemoveFromFormulaTree() when loading .ods Change-Id: I8453d688ca673a47fee15c84478262e1da53e408 diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 8c3471e..c15710f 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -989,6 +989,11 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress ) return ; } + // Compilation changes RPN count, remove and reinsert to FormulaTree if it + // was in to update its count. + bool bWasInFormulaTree = pDocument->IsInFormulaTree( this); + if (bWasInFormulaTree) + pDocument->RemoveFromFormulaTree( this); ScCompiler aComp( pDocument, aPos, *pCode); aComp.SetGrammar(eTempGrammar); OUString aFormula, aFormulaNmsp; @@ -1039,6 +1044,8 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress ) SetDirtyVar(); pDocument->PutInFormulaTree(this); } + else if (bWasInFormulaTree) + pDocument->PutInFormulaTree(this); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits