summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-03-09 12:37:30 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-09 12:37:30 -0500
commit1bb7875f275d95a0a764df5d8d6954b7e8841152 (patch)
treeb19762ed18ad8aa5e668917ea8991e9d42a2a228
parentApparently nobody uses Hash() anymore. (diff)
downloadcore-1bb7875f275d95a0a764df5d8d6954b7e8841152.tar.gz
core-1bb7875f275d95a0a764df5d8d6954b7e8841152.zip
Correct equality check & disable Dump() for normal build.
-rw-r--r--sc/inc/dpitemdata.hxx2
-rw-r--r--sc/source/core/data/dpitemdata.cxx13
2 files changed, 12 insertions, 3 deletions
diff --git a/sc/inc/dpitemdata.hxx b/sc/inc/dpitemdata.hxx
index 4aac20ca7605..3e09d8952767 100644
--- a/sc/inc/dpitemdata.hxx
+++ b/sc/inc/dpitemdata.hxx
@@ -40,7 +40,7 @@
#include <boost/unordered_map.hpp>
-#define DEBUG_DP_ITEM_DATA 1
+#define DEBUG_DP_ITEM_DATA 0
class ScDocument;
diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx
index f0ac5d58e09f..2870a5c784b1 100644
--- a/sc/source/core/data/dpitemdata.cxx
+++ b/sc/source/core/data/dpitemdata.cxx
@@ -186,8 +186,17 @@ bool ScDPItemData::IsCaseInsEqual(const ScDPItemData& r) const
if (meType != r.meType)
return false;
- if (meType == Value)
- return rtl::math::approxEqual(mfValue, r.mfValue);
+ switch (meType)
+ {
+ case Value:
+ case RangeStart:
+ return rtl::math::approxEqual(mfValue, r.mfValue);
+ case GroupValue:
+ return maGroupValue.mnGroupType == r.maGroupValue.mnGroupType &&
+ maGroupValue.mnValue == r.maGroupValue.mnValue;
+ default:
+ ;
+ }
return ScGlobal::GetpTransliteration()->isEqual(GetString(), r.GetString());
}