summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-05-18 14:17:05 +0200
committerEike Rathke <erack@redhat.com>2017-05-18 15:02:50 +0200
commit47a0e1554add5cc10c068275697108a663cd7a9a (patch)
tree247a3efc376a0688ee7da1ec021a043d8b3df6cd /sc/inc
parent730622df7c0e97917c3c0d53b1ec03691d0afb74 (diff)
Always set a grammar when constructing ScCompiler
Otherwise mxSymbols is null, which is rather unexpected as the past has shown, see commit 63843a97262ccfa38d838a9cbbc3faadba8290a6 Change-Id: Id4c13a5f50e711513a71a7d6cd6f87b4112b1f1d
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/compiler.hxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 7f3f30e798aa..cfd5affb0b8f 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -335,11 +335,19 @@ private:
public:
ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos );
- ScCompiler( ScDocument* pDocument, const ScAddress&);
+ /** 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 );
ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos, ScTokenArray& rArr );
- ScCompiler( ScDocument* pDocument, const ScAddress&,ScTokenArray& rArr);
+ /** 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 );
virtual ~ScCompiler() override;