summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/formulabuffer.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-12 14:43:41 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-12 18:51:38 -0500
commit177c0adede9ba4b34aa3f4a80cf7021e327c9d20 (patch)
treec5516dcffacb1f3c0cc087e1ef5671b9ff6f23c7 /sc/source/filter/oox/formulabuffer.cxx
parenta621bdb0aad19a3a5ee4ff7089fca7cfe0ba1467 (diff)
Reduce the amount of RPM token generation.
Change-Id: I03941690114b17d8ab63cfb9b1b23a2ff1741b10
Diffstat (limited to 'sc/source/filter/oox/formulabuffer.cxx')
-rw-r--r--sc/source/filter/oox/formulabuffer.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index 4bdb6ae7a5ca..6f0c99168cb6 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -135,7 +135,10 @@ void applySharedFormulas(
aComp.SetGrammar(formula::FormulaGrammar::GRAM_ENGLISH_XL_OOX);
ScTokenArray* pArray = aComp.CompileString(rTokenStr);
if (pArray)
+ {
+ aComp.CompileTokenArray(); // Generate RPN tokens.
aGroups.set(nId, pArray);
+ }
}
}
@@ -222,6 +225,7 @@ void applyCellFormulas(
if (!pCode)
continue;
+ aCompiler.CompileTokenArray(); // Generate RPN tokens.
ScFormulaCell* pCell = new ScFormulaCell(&rDoc.getDoc(), aPos, pCode);
rDoc.setFormulaCell(aPos, pCell);
rCache.store(aPos, pCell);