summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-11 00:43:18 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-04-11 00:44:55 -0400
commit66c6a3bfc9cd89c562107d3d369b3d82bae94d68 (patch)
treeb29f13b194a13825b9815edac712dc6c7d6b8858
parentbdc8d5f9e712fce35098352b8c1d9028f4095d8c (diff)
fdo#77300: Don't re-compile formulas when the hybrid formula is not there.
Change-Id: I9b0f8d031fec08bb8d92333ff67074fdc739e034
-rw-r--r--sc/source/core/data/column4.cxx19
1 files changed, 11 insertions, 8 deletions
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();
+ }
}
}
};