summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/compiler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/compiler.cxx')
-rw-r--r--sc/source/core/tool/compiler.cxx36
1 files changed, 36 insertions, 0 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index dcb676e4a001..4a1bbd723570 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -68,6 +68,7 @@
#include "formulaparserpool.hxx"
#include "tokenarray.hxx"
#include "scmatrix.hxx"
+#include <tokenstringcontext.hxx>
using namespace formula;
using namespace ::com::sun::star;
@@ -1529,6 +1530,24 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
static const ConventionXL_R1C1 ConvXL_R1C1;
const ScCompiler::Convention * const ScCompiler::pConvXL_R1C1 = &ConvXL_R1C1;
+ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos, ScTokenArray& rArr ) :
+ FormulaCompiler(rArr),
+ pDoc(rCxt.getDoc()),
+ aPos(rPos),
+ mpFormatter(pDoc->GetFormatTable()),
+ pCharClass(ScGlobal::pCharClass),
+ mnPredetectedReference(0),
+ mnRangeOpPosInSymbol(-1),
+ pConv(GetRefConvention(FormulaGrammar::CONV_OOO)),
+ meExtendedErrorDetection(EXTENDED_ERROR_DETECTION_NONE),
+ mbCloseBrackets(true),
+ mbRewind(false),
+ maTabNames(rCxt.getTabNames())
+{
+ nMaxTab = pDoc ? pDoc->GetTableCount() - 1 : 0;
+ SetGrammar(rCxt.getGrammar());
+}
+
ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos,ScTokenArray& rArr)
: FormulaCompiler(rArr),
pDoc( pDocument ),
@@ -1555,6 +1574,23 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos,ScTokenArra
}
}
+ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos ) :
+ pDoc(rCxt.getDoc()),
+ aPos(rPos),
+ mpFormatter(pDoc ? pDoc->GetFormatTable() : NULL),
+ pCharClass(ScGlobal::pCharClass),
+ mnPredetectedReference(0),
+ mnRangeOpPosInSymbol(-1),
+ pConv(GetRefConvention(FormulaGrammar::CONV_OOO)),
+ meExtendedErrorDetection(EXTENDED_ERROR_DETECTION_NONE),
+ mbCloseBrackets(true),
+ mbRewind(false),
+ maTabNames(rCxt.getTabNames())
+{
+ nMaxTab = pDoc ? pDoc->GetTableCount() - 1 : 0;
+ SetGrammar(rCxt.getGrammar());
+}
+
ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos)
:
pDoc( pDocument ),