diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-09 12:37:30 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-09 12:37:30 -0500 |
commit | 1bb7875f275d95a0a764df5d8d6954b7e8841152 (patch) | |
tree | b19762ed18ad8aa5e668917ea8991e9d42a2a228 /sc | |
parent | 5e9d811ab8a1c0481c67e3d4589e0a16fb781120 (diff) |
Correct equality check & disable Dump() for normal build.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/dpitemdata.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpitemdata.cxx | 13 |
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()); } |