[Libreoffice-commits] .: sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 22 20:34:28 PDT 2012
sc/source/core/data/dpcache.cxx | 4 ++--
sc/source/core/data/dpitemdata.cxx | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 1afd1e5ca8872253c491af76c70397fb9e00f900
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Aug 22 23:33:14 2012 -0400
fdo#53929: Pivot table uses case insensitive string comparison.
Change-Id: I65fa22ceeba37a15b70fe41b1dee26f1dde7d759
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index fa2b1ef..c94b542 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 1641572..bb22894 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());
}
More information about the Libreoffice-commits
mailing list