svx: assert SfxPoolItem::operator==

Change-Id: I7a5898f0dffb4d25b6e1bb916b3c6b36374f9912
This commit is contained in:
Michael Stahl
2016-11-18 21:30:35 +01:00
parent e599212990
commit 70840f4675
14 changed files with 21 additions and 20 deletions

View File

@@ -293,7 +293,7 @@ SfxPoolItem* SvxChartColorTableItem::Clone( SfxItemPool * ) const
bool SvxChartColorTableItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "SvxChartColorTableItem::operator== : types differ" );
assert(SfxPoolItem::operator==(rAttr));
const SvxChartColorTableItem * rCTItem( dynamic_cast<const SvxChartColorTableItem * >( & rAttr ));
if( rCTItem )

View File

@@ -86,7 +86,7 @@ SfxPoolItem* SvxGridItem::Clone( SfxItemPool* ) const
bool SvxGridItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "different types ");
assert(SfxPoolItem::operator==(rAttr));
const SvxGridItem& rItem = static_cast<const SvxGridItem&>(rAttr);

View File

@@ -28,7 +28,7 @@
bool FmInterfaceItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
assert(SfxPoolItem::operator==(rAttr));
return xInterface == static_cast<const FmInterfaceItem&>(rAttr).xInterface;
}

View File

@@ -73,7 +73,7 @@ bool SvxSmartTagItem::PutValue( const uno::Any& /*rVal*/, sal_uInt8 /* nMemberId
bool SvxSmartTagItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
assert(SfxPoolItem::operator==(rAttr));
const SvxSmartTagItem& rItem = static_cast<const SvxSmartTagItem&>(rAttr);

View File

@@ -248,7 +248,7 @@ bool SvxMarginItem::GetPresentation
bool SvxMarginItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return ( ( nLeftMargin == static_cast<const SvxMarginItem&>(rItem).nLeftMargin ) &&
( nTopMargin == static_cast<const SvxMarginItem&>(rItem).nTopMargin ) &&

View File

@@ -64,7 +64,7 @@ bool SvxColorListItem::GetPresentation
bool SvxColorListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return static_cast<const SvxColorListItem&>(rItem).pColorList == pColorList;
}
@@ -127,7 +127,7 @@ bool SvxGradientListItem::GetPresentation
bool SvxGradientListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return static_cast<const SvxGradientListItem&>(rItem).pGradientList == pGradientList;
}
@@ -174,7 +174,7 @@ bool SvxHatchListItem::GetPresentation
bool SvxHatchListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return static_cast<const SvxHatchListItem&>(rItem).pHatchList == pHatchList;
}
@@ -216,7 +216,7 @@ bool SvxBitmapListItem::GetPresentation
bool SvxBitmapListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return static_cast<const SvxBitmapListItem&>(rItem).pBitmapList == pBitmapList;
}
@@ -257,7 +257,7 @@ bool SvxPatternListItem::GetPresentation
bool SvxPatternListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return static_cast<const SvxPatternListItem&>(rItem).pPatternList == pPatternList;
}
@@ -299,7 +299,7 @@ bool SvxDashListItem::GetPresentation
bool SvxDashListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return static_cast<const SvxDashListItem&>(rItem).pDashList == pDashList;
}
@@ -340,7 +340,7 @@ bool SvxLineEndListItem::GetPresentation
bool SvxLineEndListItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return static_cast<const SvxLineEndListItem&>(rItem).pLineEndList == pLineEndList;
}

View File

@@ -47,7 +47,7 @@ SvxB3DVectorItem::SvxB3DVectorItem( const SvxB3DVectorItem& rItem ) :
bool SvxB3DVectorItem::operator==( const SfxPoolItem &rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
assert(SfxPoolItem::operator==(rItem));
return static_cast<const SvxB3DVectorItem&>(rItem).aVal == aVal;
}

View File

@@ -123,7 +123,7 @@ bool SvxGalleryItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /* nMemberId
bool SvxGalleryItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
assert(SfxPoolItem::operator==(rAttr));
const SvxGalleryItem& rItem = static_cast<const SvxGalleryItem&>(rAttr);

View File

@@ -42,7 +42,8 @@ SvxGrfCrop::~SvxGrfCrop()
bool SvxGrfCrop::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "not equal attributes" );
assert(SfxPoolItem::operator==(rAttr));
const SvxGrfCrop& rCrop = static_cast<const SvxGrfCrop&>(rAttr);
return nLeft == rCrop.GetLeft() &&
nRight == rCrop.GetRight() &&

View File

@@ -230,7 +230,7 @@ SfxPoolItem* SvxHyperlinkItem::Clone( SfxItemPool* ) const
bool SvxHyperlinkItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
assert(SfxPoolItem::operator==(rAttr));
const SvxHyperlinkItem& rItem = static_cast<const SvxHyperlinkItem&>(rAttr);

View File

@@ -120,7 +120,7 @@ bool SvxNumberInfoItem::GetPresentation
bool SvxNumberInfoItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" );
assert(SfxPoolItem::operator==(rItem));
const SvxNumberInfoItem& rOther = static_cast<const SvxNumberInfoItem&>(rItem);

View File

@@ -63,7 +63,7 @@ SfxPoolItem* SvxPageItem::Clone( SfxItemPool * ) const
// Test for equality
bool SvxPageItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
assert(SfxPoolItem::operator==(rAttr));
const SvxPageItem& rItem = static_cast<const SvxPageItem&>(rAttr);
return ( eNumType == rItem.eNumType &&
bLandscape == rItem.bLandscape &&

View File

@@ -77,7 +77,7 @@ SvStream& SvxViewLayoutItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
bool SvxViewLayoutItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
assert(SfxPoolItem::operator==(rAttr));
const SvxViewLayoutItem& rItem = static_cast<const SvxViewLayoutItem&>(rAttr);

View File

@@ -74,7 +74,7 @@ SvStream& SvxZoomSliderItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
bool SvxZoomSliderItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
assert(SfxPoolItem::operator==(rAttr));
const SvxZoomSliderItem& rItem = static_cast<const SvxZoomSliderItem&>(rAttr);