diff options
author | Eike Rathke <erack@redhat.com> | 2015-12-15 17:44:30 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-12-15 17:50:21 +0100 |
commit | dad412e07f805a53ad73ce2e80d187a70c77e8de (patch) | |
tree | d8c03dfea6ff07a8c0928e2449bdfea9141a2060 /include/formula | |
parent | 07004a7e9cd8b44f8cb4ff8f30180b06d9c325c3 (diff) |
Resolves: tdf#95440 SharedString are interned per document, re-intern
... if literal strings are copied with formula expression tokens.
Change-Id: I13526907bb6c2c605c6ed9584fa6e3f2b18623b8
Diffstat (limited to 'include/formula')
-rw-r--r-- | include/formula/token.hxx | 3 | ||||
-rw-r--r-- | include/formula/tokenarray.hxx | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/formula/token.hxx b/include/formula/token.hxx index f2a93b6cccd1..618168ecb34b 100644 --- a/include/formula/token.hxx +++ b/include/formula/token.hxx @@ -151,6 +151,7 @@ public: virtual double GetDouble() const; virtual double& GetDoubleAsReference(); virtual svl::SharedString GetString() const; + virtual void SetString( const svl::SharedString& rStr ); virtual sal_uInt16 GetIndex() const; virtual void SetIndex( sal_uInt16 n ); virtual bool IsGlobal() const; @@ -283,6 +284,7 @@ public: virtual FormulaToken* Clone() const override; virtual svl::SharedString GetString() const override; + virtual void SetString( const svl::SharedString& rStr ) override; virtual bool operator==( const FormulaToken& rToken ) const override; DECL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaStringToken ) @@ -300,6 +302,7 @@ public: virtual FormulaToken* Clone() const override; virtual svl::SharedString GetString() const override; + virtual void SetString( const svl::SharedString& rStr ) override; virtual bool operator==( const FormulaToken& rToken ) const override; }; diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index 0f303ac3a1e3..6dcbcfc442d6 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -309,6 +309,9 @@ public: /** Determines if this formula may be followed by a reference. */ bool MayReferenceFollow(); + + /** Re-intern SharedString in case the SharedStringPool differs. */ + void ReinternStrings( svl::SharedStringPool& rPool ); }; inline OpCode FormulaTokenArray::GetOuterFuncOpCode() |