From 03725013b64e74473e1a9e925b24927e7e61d412 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 17 Jan 2014 17:05:29 +0100 Subject: bool improvements Change-Id: Ic46fa46c200b94e2e6c5a073ba89b9aae5c14542 --- svx/source/items/SmartTagItem.cxx | 4 +--- svx/source/items/clipfmtitem.cxx | 2 +- svx/source/items/customshapeitem.cxx | 2 +- svx/source/items/galleryitem.cxx | 4 +--- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'svx/source/items') diff --git a/svx/source/items/SmartTagItem.cxx b/svx/source/items/SmartTagItem.cxx index 3fd891d7fad3..03dede7fa335 100644 --- a/svx/source/items/SmartTagItem.cxx +++ b/svx/source/items/SmartTagItem.cxx @@ -72,15 +72,13 @@ bool SvxSmartTagItem::operator==( const SfxPoolItem& rAttr ) const const SvxSmartTagItem& rItem = static_cast(rAttr); - int bRet = maActionComponentsSequence == rItem.maActionComponentsSequence && + return maActionComponentsSequence == rItem.maActionComponentsSequence && maActionIndicesSequence == rItem.maActionIndicesSequence && maStringKeyMaps == rItem.maStringKeyMaps && mxRange == rItem.mxRange && mxController == rItem.mxController && maApplicationName == rItem.maApplicationName && maRangeText == rItem.maRangeText; - - return bRet; } // ----------------------------------------------------------------------- diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index 47537c0a4232..fe978749b5c2 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -102,7 +102,7 @@ bool SvxClipboardFmtItem::operator==( const SfxPoolItem& rComp ) const for( sal_uInt16 n = 0, nEnd = rCmp.pImpl->aFmtNms.size(); n < nEnd; ++n ) { if( pImpl->aFmtIds[ n ] != rCmp.pImpl->aFmtIds[ n ] || - ( pImpl->aFmtNms.is_null(n) ^ rCmp.pImpl->aFmtNms.is_null(n) ) || + ( pImpl->aFmtNms.is_null(n) != rCmp.pImpl->aFmtNms.is_null(n) ) || ( !pImpl->aFmtNms.is_null(n) && pImpl->aFmtNms[n] != rCmp.pImpl->aFmtNms[n] ) ) { nRet = 0; diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx index ab67dd275267..25bea99cf298 100644 --- a/svx/source/items/customshapeitem.cxx +++ b/svx/source/items/customshapeitem.cxx @@ -233,7 +233,7 @@ SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( SvStream& /*rIn*/, sal_u } bool SdrCustomShapeGeometryItem::operator==( const SfxPoolItem& rCmp ) const { - int bRet = SfxPoolItem::operator==( rCmp ); + bool bRet = SfxPoolItem::operator==( rCmp ); if ( bRet ) bRet = ((SdrCustomShapeGeometryItem&)rCmp).aPropSeq == aPropSeq; return bRet; diff --git a/svx/source/items/galleryitem.cxx b/svx/source/items/galleryitem.cxx index b626e1a9eaf1..3b94645e4a4f 100644 --- a/svx/source/items/galleryitem.cxx +++ b/svx/source/items/galleryitem.cxx @@ -132,12 +132,10 @@ bool SvxGalleryItem::operator==( const SfxPoolItem& rAttr ) const const SvxGalleryItem& rItem = static_cast(rAttr); - int bRet = m_nType == rItem.m_nType && + return m_nType == rItem.m_nType && m_aURL == rItem.m_aURL && m_xDrawing == rItem.m_xDrawing && m_xGraphic == rItem.m_xGraphic; - - return bRet; } SfxPoolItem* SvxGalleryItem::Clone( SfxItemPool * ) const -- cgit v1.2.3