summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-14 16:57:52 -0400
committerAndras Timar <andras.timar@collabora.com>2014-04-16 17:07:22 +0200
commit1aebd02561cfe397800329edcfd3a393c952ccd6 (patch)
tree8128bdeb0d78901125a2421b14e6c1ba4c128833 /include
parentf1384b44c7673578459c3898f987e04ef36e67a8 (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.hxx18
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.