summaryrefslogtreecommitdiff
path: root/sc/inc/token.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-01-09 11:17:09 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-01-09 11:29:50 -0500
commitb6fbc8642928893ca608a35b802032cfe42e40bb (patch)
treed7b1c0185c1fcfcdee133e9375f65ea45665c2e8 /sc/inc/token.hxx
parentb7d0dd5252bdec31fcc925037aa7916b9fffeca7 (diff)
fdo#58539: Correctly set cached matrix formula result.
During the import, a cached matrix value only has an empty matrix of correct geometry, plus the token type of the top-left cell. The rest of the elements are imported as hybrid values. For now, this seems to do the trick. In the future we may want to change it to fully populate the matrix cache value during the import, and skip setting the hybrid values for the non-top-left elements. This commit also make several other trivial changes: * Mark pRawToken mutable so that we can mark those IsFoo() methods const. * Move the ScCompiler instance from static instance to member of ScXMLImport. Since we don't need the instance to persist once the import is over, this is more appropriate. Change-Id: I1abde03c0fcd91b02ef4dbf8b5526f7965eaf19c
Diffstat (limited to 'sc/inc/token.hxx')
-rw-r--r--sc/inc/token.hxx4
1 files changed, 4 insertions, 0 deletions
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 ) {}