diff options
author | Eike Rathke <erack@redhat.com> | 2013-12-03 22:07:00 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-12-03 22:20:05 +0100 |
commit | 90102d0832b2bc173b09188604aa311f17c19bbe (patch) | |
tree | 75d50524db09a1a5a6d3011a7717981e1806c9b1 /sc/source/core/data | |
parent | 5df95fc776ff5a92402a55d27b110df6ca906662 (diff) |
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
(cherry picked from commit bfd1909c87d0d645f1bbb74a142172ecc15100e8)
Diffstat (limited to 'sc/source/core/data')
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 6144c09fae14..1451f0248600 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -991,6 +991,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; @@ -1041,6 +1046,8 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress ) SetDirtyVar(); pDocument->PutInFormulaTree(this); } + else if (bWasInFormulaTree) + pDocument->PutInFormulaTree(this); } |