diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-22 23:33:14 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-22 23:33:14 -0400 |
commit | 1afd1e5ca8872253c491af76c70397fb9e00f900 (patch) | |
tree | 28c3d480c1db3abfd8afd74b6998e03b19797842 | |
parent | 44dcb37bf9339611559743f35a93dd674227b357 (diff) |
fdo#53929: Pivot table uses case insensitive string comparison.
Change-Id: I65fa22ceeba37a15b70fe41b1dee26f1dde7d759
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/dpitemdata.cxx | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index fa2b1efbaf0f..c94b5423a473 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -195,7 +195,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); } }; @@ -251,7 +251,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()); } |