include/svl/itemset.hxx | 2 +- svl/source/items/itemset.cxx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit 352fc0ae2866eb0b222d90d51299c05222af8df5 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Feb 5 21:02:38 2014 +0100 SfxItemSet::operator == should return bool ...and need not be virtual Change-Id: I8cf38c4942526c6ca66595fdc3297be750ec09a0 diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index 26ba3f3..7157ecf 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -143,7 +143,7 @@ public: const SfxItemPool *pRefPool = 0 ); virtual SvStream & Store( SvStream &, bool bDirect = false ) const; - virtual int operator==(const SfxItemSet &) const; + bool operator==(const SfxItemSet &) const; }; inline void SfxItemSet::SetParent( const SfxItemSet* pNew ) diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index e4155cc..268af38 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1627,7 +1627,7 @@ SvStream &SfxItemSet::Load // ----------------------------------------------------------------------- -int SfxItemSet::operator==(const SfxItemSet &rCmp) const +bool SfxItemSet::operator==(const SfxItemSet &rCmp) const { DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet); DBG_CHKOBJ(&rCmp, SfxItemSet, DbgCheckItemSet); @@ -1636,13 +1636,13 @@ int SfxItemSet::operator==(const SfxItemSet &rCmp) const if ( _pParent != rCmp._pParent || _pPool != rCmp._pPool || Count() != rCmp.Count() ) - return sal_False; + return false; // Ranges durchzaehlen lassen dauert laenger, muss aber auch gleich sein sal_uInt16 nCount1 = TotalCount(); sal_uInt16 nCount2 = rCmp.TotalCount(); if ( nCount1 != nCount2 ) - return sal_False; + return false; // sind die Ranges selbst ungleich? for ( sal_uInt16 nRange = 0; _pWhichRanges[nRange]; nRange += 2 ) @@ -1664,15 +1664,15 @@ int SfxItemSet::operator==(const SfxItemSet &rCmp) const ( !pItem1 || IsInvalidItem(pItem1) || ( _pPool->IsItemFlag(*pItem1, SFX_ITEM_POOLABLE) && *pItem1 != *pItem2 ) ) ) ) - return sal_False; + return false; } - return sal_True; + return true; } // Pointer alle gleich? if ( 0 == memcmp( _aItems, rCmp._aItems, nCount1 * sizeof(_aItems[0]) ) ) - return sal_True; + return true; // dann werden wir wohl alle einzeln vergleichen muessen const SfxPoolItem **ppItem1 = (const SfxPoolItem**) _aItems; @@ -1686,13 +1686,13 @@ int SfxItemSet::operator==(const SfxItemSet &rCmp) const ( IsInvalidItem(*ppItem1) || IsInvalidItem(*ppItem2) ) || ( _pPool->IsItemFlag(**ppItem1, SFX_ITEM_POOLABLE) ) || **ppItem1 != **ppItem2 ) ) - return sal_False; + return false; ++ppItem1; ++ppItem2; } - return sal_True; + return true; } // ----------------------------------------------------------------------- _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits