diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-11-18 22:00:11 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-11-18 22:21:55 +0100 |
commit | 2345e4657001d6239b6408e14ee49518a2036b13 (patch) | |
tree | 0dded8a61e12da52718a0cbbe4e501c10427a63f /sd | |
parent | editeng: assert SfxPoolItem::operator== (diff) | |
download | core-2345e4657001d6239b6408e14ee49518a2036b13.tar.gz core-2345e4657001d6239b6408e14ee49518a2036b13.zip |
sd: assert SfxPoolItem::operator==
Remove the defensive programming here.
Change-Id: I27e89fe6e28ee3c0c2821083d825859d10f79bb0
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/app/optsitem.cxx | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index f360981b715e..b13b7ec456df 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -304,9 +304,8 @@ SfxPoolItem* SdOptionsLayoutItem::Clone( SfxItemPool* ) const bool SdOptionsLayoutItem::operator==( const SfxPoolItem& rAttr ) const { - const bool bSameType = SfxPoolItem::operator==( rAttr ); - DBG_ASSERT( bSameType, "SdOptionsLayoutItem::operator==(), different pool item type!" ); - return bSameType && ( maOptionsLayout == static_cast< const SdOptionsLayoutItem& >( rAttr ).maOptionsLayout ); + assert(SfxPoolItem::operator==(rAttr)); + return maOptionsLayout == static_cast<const SdOptionsLayoutItem&>(rAttr).maOptionsLayout; } void SdOptionsLayoutItem::SetOptions( SdOptions* pOpts ) const @@ -393,9 +392,8 @@ SfxPoolItem* SdOptionsContentsItem::Clone( SfxItemPool* ) const bool SdOptionsContentsItem::operator==( const SfxPoolItem& rAttr ) const { - const bool bSameType = SfxPoolItem::operator==(rAttr); - DBG_ASSERT( bSameType, "SdOptionsContentsItem::operator==(), different pool item type!" ); - return bSameType && ( maOptionsContents == static_cast<const SdOptionsContentsItem&>( rAttr ).maOptionsContents ); + assert(SfxPoolItem::operator==(rAttr)); + return maOptionsContents == static_cast<const SdOptionsContentsItem&>(rAttr).maOptionsContents; } /************************************************************************* @@ -703,9 +701,8 @@ SfxPoolItem* SdOptionsMiscItem::Clone( SfxItemPool* ) const bool SdOptionsMiscItem::operator==( const SfxPoolItem& rAttr ) const { - const bool bSameType = SfxPoolItem::operator==(rAttr); - DBG_ASSERT( bSameType, "SdOptionsMiscItem::operator==(), different pool item type!" ); - return bSameType && ( maOptionsMisc == static_cast< const SdOptionsMiscItem& >(rAttr).maOptionsMisc ); + assert(SfxPoolItem::operator==(rAttr)); + return maOptionsMisc == static_cast<const SdOptionsMiscItem&>(rAttr).maOptionsMisc; } void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const @@ -889,9 +886,8 @@ SfxPoolItem* SdOptionsSnapItem::Clone( SfxItemPool* ) const bool SdOptionsSnapItem::operator==( const SfxPoolItem& rAttr ) const { - const bool bSameType = SfxPoolItem::operator==(rAttr); - DBG_ASSERT( bSameType, "SdOptionsSnapItem::operator==(), different pool item type!" ); - return bSameType && ( maOptionsSnap == static_cast< const SdOptionsSnapItem& >(rAttr).maOptionsSnap ); + assert(SfxPoolItem::operator==(rAttr)); + return maOptionsSnap == static_cast<const SdOptionsSnapItem&>(rAttr).maOptionsSnap; } void SdOptionsSnapItem::SetOptions( SdOptions* pOpts ) const @@ -1343,9 +1339,8 @@ SfxPoolItem* SdOptionsPrintItem::Clone( SfxItemPool* ) const bool SdOptionsPrintItem::operator==( const SfxPoolItem& rAttr ) const { - const bool bSameType = SfxPoolItem::operator==(rAttr); - DBG_ASSERT( bSameType, "SdOptionsPrintItem::operator==(), different pool item type!" ); - return bSameType && ( maOptionsPrint == static_cast< const SdOptionsPrintItem& >( rAttr ).maOptionsPrint ); + assert(SfxPoolItem::operator==(rAttr)); + return maOptionsPrint == static_cast<const SdOptionsPrintItem&>(rAttr).maOptionsPrint; } void SdOptionsPrintItem::SetOptions( SdOptions* pOpts ) const |