diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-29 19:53:42 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-09 11:13:28 -0500 |
commit | 98b4beebce3720c55ff3302a43d482db8adbc6fe (patch) | |
tree | a8b3e3045ba67b6db5b018553107b200d469ec1f /sc/source/core/data/dpitemdata.cxx | |
parent | 244a9ef6047b47a65990dd15665ea483240cc563 (diff) |
Date field is now determined outside of ScDPItemData.
Diffstat (limited to 'sc/source/core/data/dpitemdata.cxx')
-rw-r--r-- | sc/source/core/data/dpitemdata.cxx | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx index d6595710a44b..1b7368bf82e6 100644 --- a/sc/source/core/data/dpitemdata.cxx +++ b/sc/source/core/data/dpitemdata.cxx @@ -94,9 +94,7 @@ bool ScDPItemData::operator==( const ScDPItemData& r ) const { if ( IsValue() ) { - if ( IsDate() != r.IsDate() ) - return false; - else if ( r.IsValue() ) + if ( r.IsValue() ) return rtl::math::approxEqual( mfValue, r.mfValue ); else return false; @@ -114,19 +112,7 @@ sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA, if ( rA.IsValue() ) { if ( rB.IsValue() ) - { - if ( rtl::math::approxEqual( rA.mfValue, rB.mfValue ) ) - { - if ( rA.IsDate() == rB.IsDate() ) - return 0; - else - return rA.IsDate() ? 1: -1; - } - else if ( rA.mfValue < rB.mfValue ) - return -1; - else - return 1; - } + return rA.mfValue < rB.mfValue ? -1 : 1; else return -1; // values first } @@ -178,17 +164,6 @@ bool ScDPItemData::HasStringData() const return IsHasData()&&!IsHasErr()&&!IsValue(); } -bool ScDPItemData::IsDate() const -{ - return !!(mbFlag&MK_DATE); -} - -void ScDPItemData::SetDate( bool b ) -{ - b ? ( mbFlag |= MK_DATE ) : ( mbFlag &= ~MK_DATE ); -} - - ScDPItemDataPool::ScDPItemDataPool() { } |