diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2017-11-21 17:26:43 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-11-22 22:04:25 +0100 |
commit | 7ced0f88e0af360d5b47b320b9dd23b692d8d1ad (patch) | |
tree | 3412312d8648461808a7f609ce4de9b52a538549 /sc | |
parent | dbe27473220cef519afde0a0acc67845bab596c8 (diff) |
Don't re-create the interpreter context for each row.
Change-Id: I272c9dc09806d47add26866f517e6ea07282c35f
Reviewed-on: https://gerrit.libreoffice.org/45087
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index f6565e732086..b8b1ef1a79a8 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -175,6 +175,9 @@ public: double fNan; rtl::math::setNan(&fNan); ScTokenArray aCode2; + + ScInterpreterContext aContext(mrDoc, mpFormatter); + for (SCROW i = mnIdx; i <= mnLastIdx; ++i, maBatchTopPos.IncRow()) { formula::FormulaTokenArrayPlainIterator aIter(mrCode); @@ -298,7 +301,6 @@ public: ScCompiler aComp(&mrDoc, maBatchTopPos, aCode2); aComp.CompileTokenArray(); - ScInterpreterContext aContext(mrDoc, mpFormatter); ScInterpreter aInterpreter(pDest, &mrDoc, aContext, maBatchTopPos, aCode2); aInterpreter.Interpret(); mrResults[i] = aInterpreter.GetResultToken(); |