diff options
author | Eike Rathke <erack@redhat.com> | 2015-12-15 17:44:30 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-12-15 18:25:57 +0100 |
commit | 4ede95a90dc299ab2026285ba8baa95b63454cc2 (patch) | |
tree | 29ada12e769f35b33e7a53ed43003f926155071c /include | |
parent | c4f6cd2848c60969043aa3d1804e138669a6f14a (diff) |
Resolves: tdf#95440 SharedString are interned per document, re-intern
... if literal strings are copied with formula expression tokens.
Change-Id: I13526907bb6c2c605c6ed9584fa6e3f2b18623b8
(cherry picked from commit dad412e07f805a53ad73ce2e80d187a70c77e8de)
Diffstat (limited to 'include')
-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() |