summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-08-22 23:33:14 -0400
committerMichael Meeks <michael.meeks@suse.com>2012-08-23 09:05:57 +0100
commit0ee1609ddc04f01e7398fab08d74529c301600e6 (patch)
tree9d0ec173849ebd1d620ab472f652c025f5224a7f
parent257a5fb833c2c03a3a82b19b9ab5a7cb3b5848ef (diff)
fdo#53929: Pivot table uses case insensitive string comparison.
Change-Id: I65fa22ceeba37a15b70fe41b1dee26f1dde7d759 Signed-off-by: Michael Meeks <michael.meeks@suse.com>
-rw-r--r--sc/source/core/data/dpcache.cxx4
-rw-r--r--sc/source/core/data/dpitemdata.cxx5
2 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index a11db558b799..f1e45318cb7e 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -282,7 +282,7 @@ struct EqualByValue : std::binary_function<Bucket, Bucket, bool>
{
bool operator() (const Bucket& left, const Bucket& right) const
{
- return left.maValue == right.maValue;
+ return left.maValue.IsCaseInsEqual(right.maValue);
}
};
@@ -338,7 +338,7 @@ void processBuckets(std::vector<Bucket>& aBuckets, ScDPCache::Field& rField)
it->mnOrderIndex = nCurIndex;
for (++it; it != itEnd; ++it)
{
- if (aPrev != it->maValue)
+ if (!aPrev.IsCaseInsEqual(it->maValue))
++nCurIndex;
it->mnOrderIndex = nCurIndex;
diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx
index 1641572f087e..bb228949fb35 100644
--- a/sc/source/core/data/dpitemdata.cxx
+++ b/sc/source/core/data/dpitemdata.cxx
@@ -210,8 +210,9 @@ bool ScDPItemData::IsCaseInsEqual(const ScDPItemData& r) const
;
}
- if (mbStringInterned && r.mbStringInterned)
- return mpString == r.mpString;
+ if (mbStringInterned && r.mbStringInterned && mpString == r.mpString)
+ // Fast equality check for interned strings.
+ return true;
return ScGlobal::GetpTransliteration()->isEqual(GetString(), r.GetString());
}