diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-09 11:17:09 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-09 11:29:50 -0500 |
commit | b6fbc8642928893ca608a35b802032cfe42e40bb (patch) | |
tree | d7b1c0185c1fcfcdee133e9375f65ea45665c2e8 /formula/inc | |
parent | b7d0dd5252bdec31fcc925037aa7916b9fffeca7 (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 'formula/inc')
-rw-r--r-- | formula/inc/formula/FormulaCompiler.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/formula/inc/formula/FormulaCompiler.hxx b/formula/inc/formula/FormulaCompiler.hxx index ce4157dae9c9..85295b244cb4 100644 --- a/formula/inc/formula/FormulaCompiler.hxx +++ b/formula/inc/formula/FormulaCompiler.hxx @@ -212,6 +212,8 @@ public: */ OpCode GetEnglishOpCode( const String& rName ) const; + sal_uInt16 GetErrorConstant( const String& rName ) const; + void SetCompileForFAP( bool bVal ) { bCompileForFAP = bVal; bIgnoreErrors = bVal; } @@ -265,7 +267,6 @@ protected: virtual void CreateStringFromIndex(rtl::OUStringBuffer& rBuffer,FormulaToken* pTokenP); virtual void LocalizeString( String& rName ); // modify rName - input: exact name - sal_uInt16 GetErrorConstant( const String& rName ); void AppendErrorConstant( rtl::OUStringBuffer& rBuffer, sal_uInt16 nError ); bool GetToken(); |