diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 17:01:52 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 17:11:51 +0100 |
commit | d1043892df97078546bf9c5ac697bcb65b457cc9 (patch) | |
tree | 0219c41b945daaf4ce8e4b6c40b2c2b33a4c9536 /svl/source | |
parent | 02f72c32cf5e33e28d2b2d63d887c8a429ec2a45 (diff) |
SfxPoolItem::operator ==, != should return bool
...and SfxEnumItemInterface::HasBoolValue, too.
Change-Id: Ia032e3d35a4c3b4c1efdc515ca36e466be03fc0a
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/items/cenumitm.cxx | 6 | ||||
-rw-r--r-- | svl/source/items/cintitem.cxx | 8 | ||||
-rw-r--r-- | svl/source/items/cntwall.cxx | 9 | ||||
-rw-r--r-- | svl/source/items/ctypeitm.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/custritm.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/flagitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/globalnameitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/grabbagitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/ilstitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/imageitm.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/intitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/lckbitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/macitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/poolitem.cxx | 6 | ||||
-rw-r--r-- | svl/source/items/ptitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/rectitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/rngitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/sitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/slstitm.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/srchitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/szitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/visitem.cxx | 2 |
22 files changed, 33 insertions, 36 deletions
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index 1fb59d5363ee..341697aa2478 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -34,7 +34,7 @@ DBG_NAME(SfxEnumItemInterface) TYPEINIT1(SfxEnumItemInterface, SfxPoolItem) // virtual -int SfxEnumItemInterface::operator ==(const SfxPoolItem & rItem) const +bool SfxEnumItemInterface::operator ==(const SfxPoolItem & rItem) const { SFX_ASSERT(SfxPoolItem::operator ==(rItem), Which(), "unequal type"); return GetEnumValue() @@ -103,7 +103,7 @@ sal_Bool SfxEnumItemInterface::IsEnabled(sal_uInt16) const } // virtual -int SfxEnumItemInterface::HasBoolValue() const +bool SfxEnumItemInterface::HasBoolValue() const { return false; } @@ -175,7 +175,7 @@ SfxBoolItem::SfxBoolItem(sal_uInt16 const nWhich, SvStream & rStream) } // virtual -int SfxBoolItem::operator ==(const SfxPoolItem & rItem) const +bool SfxBoolItem::operator ==(const SfxPoolItem & rItem) const { DBG_ASSERT(rItem.ISA(SfxBoolItem), "SfxBoolItem::operator ==(): Bad type"); diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx index 5cdf1fb45c2e..779e60a4726e 100644 --- a/svl/source/items/cintitem.cxx +++ b/svl/source/items/cintitem.cxx @@ -30,7 +30,7 @@ DBG_NAME(CntByteItem) TYPEINIT1_AUTOFACTORY(CntByteItem, SfxPoolItem); // virtual -int CntByteItem::operator ==(const SfxPoolItem & rItem) const +bool CntByteItem::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(CntByteItem, 0); DBG_ASSERT(rItem.ISA(CntByteItem), @@ -146,7 +146,7 @@ CntUInt16Item::CntUInt16Item(sal_uInt16 which, SvStream & rStream) : } // virtual -int CntUInt16Item::operator ==(const SfxPoolItem & rItem) const +bool CntUInt16Item::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(CntUInt16Item, 0); DBG_ASSERT(rItem.ISA(CntUInt16Item), @@ -264,7 +264,7 @@ CntInt32Item::CntInt32Item(sal_uInt16 which, SvStream & rStream) : } // virtual -int CntInt32Item::operator ==(const SfxPoolItem & rItem) const +bool CntInt32Item::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(CntInt32Item, 0); DBG_ASSERT(rItem.ISA(CntInt32Item), @@ -381,7 +381,7 @@ CntUInt32Item::CntUInt32Item(sal_uInt16 which, SvStream & rStream) : } // virtual -int CntUInt32Item::operator ==(const SfxPoolItem & rItem) const +bool CntUInt32Item::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(CntUInt32Item, 0); DBG_ASSERT(rItem.ISA(CntUInt32Item), diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx index b0e0e82db244..731394df8a42 100644 --- a/svl/source/items/cntwall.cxx +++ b/svl/source/items/cntwall.cxx @@ -89,18 +89,15 @@ CntWallpaperItem::~CntWallpaperItem() } // ----------------------------------------------------------------------- -int CntWallpaperItem::operator==( const SfxPoolItem& rItem ) const +bool CntWallpaperItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); const CntWallpaperItem& rWallItem = (const CntWallpaperItem&)rItem; - if( ( rWallItem._nStyle == _nStyle ) && + return ( rWallItem._nStyle == _nStyle ) && ( rWallItem._nColor == _nColor ) && - ( rWallItem._aURL == _aURL ) ) - return sal_True; - else - return sal_False; + ( rWallItem._aURL == _aURL ); } // virtual diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx index 19164d99b17a..48509dbf9fb7 100644 --- a/svl/source/items/ctypeitm.cxx +++ b/svl/source/items/ctypeitm.cxx @@ -93,7 +93,7 @@ SvStream & CntContentTypeItem::Store(SvStream & rStream, sal_uInt16) const } // virtual -int CntContentTypeItem::operator==( const SfxPoolItem& rOrig ) const +bool CntContentTypeItem::operator==( const SfxPoolItem& rOrig ) const { const CntContentTypeItem& rOther = (const CntContentTypeItem&)rOrig; diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx index ebbba99427ac..04ed1b59117a 100644 --- a/svl/source/items/custritm.cxx +++ b/svl/source/items/custritm.cxx @@ -32,7 +32,7 @@ DBG_NAME(CntUnencodedStringItem) TYPEINIT1_AUTOFACTORY(CntUnencodedStringItem, SfxPoolItem) // virtual -int CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const +bool CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(CntUnencodedStringItem, 0); DBG_ASSERT(rItem.ISA(CntUnencodedStringItem), diff --git a/svl/source/items/flagitem.cxx b/svl/source/items/flagitem.cxx index 1e5253aeeebe..a730c5ce7445 100644 --- a/svl/source/items/flagitem.cxx +++ b/svl/source/items/flagitem.cxx @@ -104,7 +104,7 @@ SfxPoolItem* SfxFlagItem::Create(SvStream &, sal_uInt16) const // ----------------------------------------------------------------------- -int SfxFlagItem::operator==( const SfxPoolItem& rItem ) const +bool SfxFlagItem::operator==( const SfxPoolItem& rItem ) const { DBG_CHKTHIS(SfxFlagItem, 0); DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); diff --git a/svl/source/items/globalnameitem.cxx b/svl/source/items/globalnameitem.cxx index 6dbe174c4878..50000b7c7750 100644 --- a/svl/source/items/globalnameitem.cxx +++ b/svl/source/items/globalnameitem.cxx @@ -56,7 +56,7 @@ SfxGlobalNameItem::~SfxGlobalNameItem() // ----------------------------------------------------------------------- -int SfxGlobalNameItem::operator==( const SfxPoolItem& rItem ) const +bool SfxGlobalNameItem::operator==( const SfxPoolItem& rItem ) const { return ((SfxGlobalNameItem&)rItem).m_aName == m_aName; } diff --git a/svl/source/items/grabbagitem.cxx b/svl/source/items/grabbagitem.cxx index 1c6072055e2a..d9415abd2c72 100644 --- a/svl/source/items/grabbagitem.cxx +++ b/svl/source/items/grabbagitem.cxx @@ -52,7 +52,7 @@ const std::map<OUString, uno::Any>& SfxGrabBagItem::GetGrabBag() const return m_aMap; } -int SfxGrabBagItem::operator==(const SfxPoolItem& rItem) const +bool SfxGrabBagItem::operator==(const SfxPoolItem& rItem) const { SfxGrabBagItem* pItem = (SfxGrabBagItem*)&rItem; diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx index e9b94fdba65d..53d4bb730449 100644 --- a/svl/source/items/ilstitem.cxx +++ b/svl/source/items/ilstitem.cxx @@ -56,7 +56,7 @@ SfxIntegerListItem::~SfxIntegerListItem() { } -int SfxIntegerListItem::operator==( const SfxPoolItem& rPoolItem ) const +bool SfxIntegerListItem::operator==( const SfxPoolItem& rPoolItem ) const { if ( !rPoolItem.ISA( SfxIntegerListItem ) ) return sal_False; diff --git a/svl/source/items/imageitm.cxx b/svl/source/items/imageitm.cxx index deb5a7368a84..99487fa2d8da 100644 --- a/svl/source/items/imageitm.cxx +++ b/svl/source/items/imageitm.cxx @@ -28,7 +28,7 @@ struct SfxImageItem_Impl OUString aURL; long nAngle; bool bMirrored; - int operator == ( const SfxImageItem_Impl& rOther ) const + bool operator == ( const SfxImageItem_Impl& rOther ) const { return nAngle == rOther.nAngle && bMirrored == rOther.bMirrored; } }; @@ -59,7 +59,7 @@ SfxPoolItem* SfxImageItem::Clone( SfxItemPool* ) const } -int SfxImageItem::operator==( const SfxPoolItem& rItem ) const +bool SfxImageItem::operator==( const SfxPoolItem& rItem ) const { return( ((SfxImageItem&) rItem).GetValue() == GetValue() && (*pImp == *(((SfxImageItem&)rItem).pImp) ) ); } diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx index bd4e4af7bf1f..37d4df9b6881 100644 --- a/svl/source/items/intitem.cxx +++ b/svl/source/items/intitem.cxx @@ -56,7 +56,7 @@ SfxInt16Item::SfxInt16Item(sal_uInt16 which, SvStream & rStream): } // virtual -int SfxInt16Item::operator ==(const SfxPoolItem & rItem) const +bool SfxInt16Item::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(SfxInt16Item, 0); DBG_ASSERT(SfxPoolItem::operator ==(rItem), "unequal type"); diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx index 1563c375f9f8..b2655095936c 100644 --- a/svl/source/items/lckbitem.cxx +++ b/svl/source/items/lckbitem.cxx @@ -60,7 +60,7 @@ SfxLockBytesItem::~SfxLockBytesItem() // ----------------------------------------------------------------------- -int SfxLockBytesItem::operator==( const SfxPoolItem& rItem ) const +bool SfxLockBytesItem::operator==( const SfxPoolItem& rItem ) const { return ((SfxLockBytesItem&)rItem)._xVal == _xVal; } diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx index a84ca7afa7b3..d1d4b5147471 100644 --- a/svl/source/items/macitem.cxx +++ b/svl/source/items/macitem.cxx @@ -192,7 +192,7 @@ sal_Bool SvxMacroTableDtor::Erase(sal_uInt16 nEvent) // ----------------------------------------------------------------------- -int SvxMacroItem::operator==( const SfxPoolItem& rAttr ) const +bool SvxMacroItem::operator==( const SfxPoolItem& rAttr ) const { DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" ); diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 3147c5c5e84d..530b8dfb2c3b 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -148,7 +148,7 @@ int SfxPoolItem::Compare( const SfxPoolItem& rWith, const IntlWrapper& ) const } // ------------------------------------------------------------------------ -int SfxPoolItem::operator==( const SfxPoolItem& rCmp ) const +bool SfxPoolItem::operator==( const SfxPoolItem& rCmp ) const { DBG_CHKTHIS(SfxPoolItem, 0); return rCmp.Type() == Type(); @@ -274,7 +274,7 @@ SfxVoidItem::SfxVoidItem( const SfxVoidItem& rCopy): } // ------------------------------------------------------------------------ -int SfxVoidItem::operator==( const SfxPoolItem& +bool SfxVoidItem::operator==( const SfxPoolItem& #ifdef DBG_UTIL rCmp #endif @@ -282,7 +282,7 @@ rCmp { DBG_CHKTHIS(SfxVoidItem, 0); DBG_ASSERT( SfxPoolItem::operator==( rCmp ), "unequal type" ); - return sal_True; + return true; } // ------------------------------------------------------------------------ diff --git a/svl/source/items/ptitem.cxx b/svl/source/items/ptitem.cxx index 956a20330b39..52d2688f81da 100644 --- a/svl/source/items/ptitem.cxx +++ b/svl/source/items/ptitem.cxx @@ -81,7 +81,7 @@ SfxItemPresentation SfxPointItem::GetPresentation // ----------------------------------------------------------------------- -int SfxPointItem::operator==( const SfxPoolItem& rItem ) const +bool SfxPointItem::operator==( const SfxPoolItem& rItem ) const { DBG_CHKTHIS(SfxPointItem, 0); DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); diff --git a/svl/source/items/rectitem.cxx b/svl/source/items/rectitem.cxx index dcd5974056a0..a1e0e6206f7c 100644 --- a/svl/source/items/rectitem.cxx +++ b/svl/source/items/rectitem.cxx @@ -81,7 +81,7 @@ SfxItemPresentation SfxRectangleItem::GetPresentation // ----------------------------------------------------------------------- -int SfxRectangleItem::operator==( const SfxPoolItem& rItem ) const +bool SfxRectangleItem::operator==( const SfxPoolItem& rItem ) const { DBG_CHKTHIS(SfxRectangleItem, 0); DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx index 0fd983300d47..db2bc0c86cd1 100644 --- a/svl/source/items/rngitem.cxx +++ b/svl/source/items/rngitem.cxx @@ -77,7 +77,7 @@ SfxItemPresentation SfxRangeItem::GetPresentation // ----------------------------------------------------------------------- -int SfxRangeItem::operator==( const SfxPoolItem& rItem ) const +bool SfxRangeItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); SfxRangeItem* pT = (SfxRangeItem*)&rItem; @@ -146,7 +146,7 @@ SfxUShortRangesItem::~SfxUShortRangesItem() } -int SfxUShortRangesItem::operator==( const SfxPoolItem &rItem ) const +bool SfxUShortRangesItem::operator==( const SfxPoolItem &rItem ) const { const SfxUShortRangesItem &rOther = (const SfxUShortRangesItem&) rItem; if ( !_pRanges && !rOther._pRanges ) diff --git a/svl/source/items/sitem.cxx b/svl/source/items/sitem.cxx index 28e16926f37f..bdb1128217b1 100644 --- a/svl/source/items/sitem.cxx +++ b/svl/source/items/sitem.cxx @@ -64,7 +64,7 @@ SfxSetItem::~SfxSetItem() // -------------------------------------------------------------------------- -int SfxSetItem::operator==( const SfxPoolItem& rCmp) const +bool SfxSetItem::operator==( const SfxPoolItem& rCmp) const { DBG_CHKTHIS(SfxSetItem, 0); DBG_ASSERT( SfxPoolItem::operator==( rCmp ), "unequal type" ); diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx index 7b6e9a094329..01a8768ce241 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -133,7 +133,7 @@ const std::vector<OUString>& SfxStringListItem::GetList () const } -int SfxStringListItem::operator==( const SfxPoolItem& rItem ) const +bool SfxStringListItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index 78b91d373f32..3db3d80c5845 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -238,7 +238,7 @@ static bool operator == ( const SearchOptions& rItem1, const SearchOptions& rIte } -int SvxSearchItem::operator==( const SfxPoolItem& rItem ) const +bool SvxSearchItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" ); const SvxSearchItem &rSItem = (SvxSearchItem &) rItem; diff --git a/svl/source/items/szitem.cxx b/svl/source/items/szitem.cxx index 78f1ada2059e..5fb184d510d5 100644 --- a/svl/source/items/szitem.cxx +++ b/svl/source/items/szitem.cxx @@ -77,7 +77,7 @@ SfxItemPresentation SfxSizeItem::GetPresentation // ----------------------------------------------------------------------- -int SfxSizeItem::operator==( const SfxPoolItem& rItem ) const +bool SfxSizeItem::operator==( const SfxPoolItem& rItem ) const { DBG_CHKTHIS(SfxSizeItem, 0); DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx index bcfceffdaa0d..4bf43b3bb9e2 100644 --- a/svl/source/items/visitem.cxx +++ b/svl/source/items/visitem.cxx @@ -39,7 +39,7 @@ SfxVisibilityItem::SfxVisibilityItem(sal_uInt16 which, SvStream & rStream): } // virtual -int SfxVisibilityItem::operator ==(const SfxPoolItem & rItem) const +bool SfxVisibilityItem::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(SfxVisibilityItem, 0); DBG_ASSERT(SfxPoolItem::operator ==(rItem), "unequal type"); |