diff options
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/cell.hxx | 5 | ||||
-rw-r--r-- | sc/inc/compiler.hxx | 4 | ||||
-rw-r--r-- | sc/inc/formularesult.hxx | 2 | ||||
-rw-r--r-- | sc/inc/token.hxx | 4 |
4 files changed, 13 insertions, 2 deletions
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx index ee040a280014..716b76f4113c 100644 --- a/sc/inc/cell.hxx +++ b/sc/inc/cell.hxx @@ -493,6 +493,11 @@ public: const formula::FormulaGrammar::Grammar eGrammar ) { aResult.SetHybridFormula( r); eTempGrammar = eGrammar; } + void SetResultMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ) + { + aResult.SetMatrix(nCols, nRows, pMat, pUL); + } + /** For import only: set a double result. Use this instead of SetHybridDouble() if there is no (temporary) formula string because the formula is present as a token array, as it diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 4aa393d82ea6..d40d26166deb 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -320,7 +320,7 @@ private: sal_Unicode cSymbol[MAXSTRLEN]; // current Symbol String aFormula; // formula source code xub_StrLen nSrcPos; // tokenizer position (source code) - ScRawTokenRef pRawToken; + mutable ScRawTokenRef pRawToken; const CharClass* pCharClass; // which character classification is used for parseAnyToken sal_uInt16 mnPredetectedReference; // reference when reading ODF, 0 (none), 1 (single) or 2 (double) @@ -386,7 +386,7 @@ public: // Check if it is a valid english function name bool IsEnglishSymbol( const String& rName ); - bool IsErrorConstant( const String& ); + bool IsErrorConstant( const String& ) const; //! _either_ CompileForFAP _or_ AutoCorrection, _not_ both // #i101512# SetCompileForFAP is in formula::FormulaCompiler diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx index c4f281fabb0c..2128636816b6 100644 --- a/sc/inc/formularesult.hxx +++ b/sc/inc/formularesult.hxx @@ -179,6 +179,8 @@ public: SetHybridFormula() for formula string to be compiled later. */ SC_DLLPUBLIC void SetHybridFormula( const String & rFormula ); + SC_DLLPUBLIC void SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ); + /** Get the const ScMatrixFormulaCellToken* if token is of that type, else NULL. */ const ScMatrixFormulaCellToken* GetMatrixFormulaCellToken() const; diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index c8c87829860a..e08db6cb440c 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -350,6 +350,10 @@ private: SCROW nRows; SCCOL nCols; public: + ScMatrixFormulaCellToken( SCCOL nC, SCROW nR, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ) : + ScMatrixCellResultToken(pMat, pUL), + nRows(nR), nCols(nC) {} + ScMatrixFormulaCellToken( SCCOL nC, SCROW nR ) : ScMatrixCellResultToken( NULL, NULL ), nRows( nR ), nCols( nC ) {} |