diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-14 16:57:52 -0400 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-04-15 15:45:10 +0000 |
commit | 1f87e2e837b4e35b909bf68ccdd3cefd84253940 (patch) | |
tree | 1da1e58474a8bff4a8ccf4210fd9ccc6ac389bac /include | |
parent | ccb606beb5b516dc1308b4a8343f941f22acb1e6 (diff) |
fdo#76294: Properly intern string literals in formula on xls import.
(cherry picked from commit b09426b83c12b0cd27cd909602251cb076ffa4ba)
(cherry picked from commit 625c595fc30d2e6153735dc2ed2359ff4f8a1e3a)
(cherry picked from commit 6bb7fa8df523d3ae7b9945009fb1034f28cb0a0a)
Conflicts:
formula/source/core/api/token.cxx
include/formula/tokenarray.hxx
sc/source/filter/excel/excform.cxx
sc/source/filter/excel/excform8.cxx
sc/source/filter/excel/frmbase.cxx
sc/source/filter/inc/XclImpChangeTrack.hxx
sc/source/filter/inc/lotform.hxx
sc/source/filter/inc/qproform.hxx
sc/source/filter/lotus/lotform.cxx
sc/source/filter/lotus/lotimpop.cxx
sc/source/filter/lotus/op.cxx
reportdesign/source/ui/inc/Formula.hxx
Change-Id: Icf962a4363887f323da6d2bdf935a027df3319fa
Reviewed-on: https://gerrit.libreoffice.org/9008
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/formula/tokenarray.hxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index a479c10ad842..3c6e12a59afc 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -28,6 +28,13 @@ #include <boost/unordered_set.hpp> +namespace svl { + +class SharedString; +class SharedStringPool; + +} + namespace formula { @@ -197,14 +204,18 @@ public: Derived classes must overload it when they want to support derived classes from FormulaToken. @return true when an error occurs */ - virtual bool AddFormulaToken(const com::sun::star::sheet::FormulaToken& _aToken, ExternalReferenceHelper* _pRef = NULL); + virtual bool AddFormulaToken( + const css::sheet::FormulaToken& rToken, svl::SharedStringPool& rSPool, + ExternalReferenceHelper* pExtRef ); /** fill the array with the tokens from the sequence. It calls AddFormulaToken for each token in the list. @param _aSequence the token to add @return true when an error occurs */ - bool Fill(const com::sun::star::uno::Sequence< com::sun::star::sheet::FormulaToken >& _aSequence, ExternalReferenceHelper* _pRef = NULL); + bool Fill( + const css::uno::Sequence<css::sheet::FormulaToken>& rSequence, + svl::SharedStringPool& rSPool, ExternalReferenceHelper* pExtRef ); /** * Do some checking based on the individual tokens. For now, we use this @@ -213,8 +224,7 @@ public: virtual void CheckToken( const FormulaToken& t ); FormulaToken* AddToken( const FormulaToken& ); - FormulaToken* AddString( const sal_Unicode* pStr ); - FormulaToken* AddString( const OUString& rStr ); + FormulaToken* AddString( const svl::SharedString& rStr ); FormulaToken* AddDouble( double fVal ); FormulaToken* AddExternal( const sal_Unicode* pStr ); /** Xcl import may play dirty tricks with OpCode!=ocExternal. |