diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-14 16:57:52 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-14 17:00:40 -0400 |
commit | b09426b83c12b0cd27cd909602251cb076ffa4ba (patch) | |
tree | 1accd4e5214b123084c0bb9e2a3dd639b52232bf /sc/source/core/data/conditio.cxx | |
parent | 2da75ceaca3907694b4021d3d63a63375ce37ac6 (diff) |
fdo#76294: Properly intern string literals in formula on xls import.
Change-Id: Ib3a442cbb68c23294762561f2911101a087a795e
Diffstat (limited to 'sc/source/core/data/conditio.cxx')
-rw-r--r-- | sc/source/core/data/conditio.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 7bb2f4596ec7..8ad386a47fcc 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -40,7 +40,8 @@ #include "editutil.hxx" #include "tokenarray.hxx" #include "refupdatecontext.hxx" -#include "svl/sharedstring.hxx" +#include <svl/sharedstring.hxx> +#include <svl/sharedstringpool.hxx> using namespace formula; @@ -1306,7 +1307,10 @@ ScTokenArray* ScConditionEntry::CreateTokenArry( sal_uInt16 nIndex ) const { pRet = new ScTokenArray(); if (bIsStr1) - pRet->AddString( aStrVal1 ); + { + svl::SharedStringPool& rSPool = mpDoc->GetSharedStringPool(); + pRet->AddString(rSPool.intern(aStrVal1)); + } else pRet->AddDouble( nVal1 ); } @@ -1319,7 +1323,10 @@ ScTokenArray* ScConditionEntry::CreateTokenArry( sal_uInt16 nIndex ) const { pRet = new ScTokenArray(); if (bIsStr2) - pRet->AddString( aStrVal2 ); + { + svl::SharedStringPool& rSPool = mpDoc->GetSharedStringPool(); + pRet->AddString(rSPool.intern(aStrVal2)); + } else pRet->AddDouble( nVal2 ); } |