summaryrefslogtreecommitdiff
path: root/sc/inc/compiler.hxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-05-10 13:44:35 +0200
committerLuboš Luňák <l.lunak@collabora.com>2018-05-14 17:32:48 +0200
commita9a0601e2af539ab8feed76279181339393ae633 (patch)
treea6f9e9d44ea912858fb669ad344491e28c455b50 /sc/inc/compiler.hxx
parent6154d04d90b7b4f68e6c3629bf0c6306ef64a937 (diff)
use optional ScInterpreterContext if possible
Avoids assertion with threaded cell computations for tdf#100811/2. Change-Id: I2dc0fd80595ccec1824c8675fc97cfc763b88659 Reviewed-on: https://gerrit.libreoffice.org/54080 Reviewed-by: Dennis Francis <dennis.francis@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/inc/compiler.hxx')
-rw-r--r--sc/inc/compiler.hxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index c99b3c934ee6..c569c84b9c6c 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -82,6 +82,7 @@ class ScDocument;
class ScMatrix;
class ScRangeData;
class ScTokenArray;
+struct ScInterpreterContext;
namespace sc {
@@ -331,21 +332,24 @@ private:
static void InitCharClassEnglish();
public:
- ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos );
+ ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos, const ScInterpreterContext* pContext = nullptr );
/** If eGrammar == GRAM_UNSPECIFIED then the grammar of pDocument is used,
if pDocument==nullptr then GRAM_DEFAULT.
*/
ScCompiler( ScDocument* pDocument, const ScAddress&,
- formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_UNSPECIFIED );
+ formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_UNSPECIFIED,
+ const ScInterpreterContext* pContext = nullptr );
- ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos, ScTokenArray& rArr );
+ ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos, ScTokenArray& rArr,
+ const ScInterpreterContext* pContext = nullptr );
/** If eGrammar == GRAM_UNSPECIFIED then the grammar of pDocument is used,
if pDocument==nullptr then GRAM_DEFAULT.
*/
ScCompiler( ScDocument* pDocument, const ScAddress&, ScTokenArray& rArr,
- formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_UNSPECIFIED );
+ formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_UNSPECIFIED,
+ const ScInterpreterContext* pContext = nullptr );
virtual ~ScCompiler() override;