From 66c6a3bfc9cd89c562107d3d369b3d82bae94d68 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 11 Apr 2014 00:43:18 -0400 Subject: fdo#77300: Don't re-compile formulas when the hybrid formula is not there. Change-Id: I9b0f8d031fec08bb8d92333ff67074fdc739e034 --- sc/source/core/data/column4.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'sc') diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index c6581240b7fb..7d87177cddfe 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -661,16 +661,19 @@ public: ScFormulaCell* pCell = rEntry.mpCell; OUString aFormula = pCell->GetHybridFormula(); - // Create token array from formula string. - ScCompiler aComp(mrCompileFormulaCxt, pCell->aPos); - ScTokenArray* pNewCode = aComp.CompileString(aFormula); + if (!aFormula.isEmpty()) + { + // Create token array from formula string. + ScCompiler aComp(mrCompileFormulaCxt, pCell->aPos); + ScTokenArray* pNewCode = aComp.CompileString(aFormula); - // Generate RPN tokens. - ScCompiler aComp2(mpDoc, pCell->aPos, *pNewCode); - aComp2.CompileTokenArray(); + // Generate RPN tokens. + ScCompiler aComp2(mpDoc, pCell->aPos, *pNewCode); + aComp2.CompileTokenArray(); - pCell->SetCode(pNewCode); - pCell->SetDirty(); + pCell->SetCode(pNewCode); + pCell->SetDirty(); + } } } }; -- cgit