summaryrefslogtreecommitdiff
path: root/sc/source/core/data/conditio.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-14 16:57:52 -0400
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-04-15 15:45:10 +0000
commit1f87e2e837b4e35b909bf68ccdd3cefd84253940 (patch)
tree1da1e58474a8bff4a8ccf4210fd9ccc6ac389bac /sc/source/core/data/conditio.cxx
parentccb606beb5b516dc1308b4a8343f941f22acb1e6 (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 'sc/source/core/data/conditio.cxx')
-rw-r--r--sc/source/core/data/conditio.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 1a9f8698f760..ae5e098f899d 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 );
}