svx: assert SfxPoolItem::operator==
Change-Id: I7a5898f0dffb4d25b6e1bb916b3c6b36374f9912
This commit is contained in:
@@ -293,7 +293,7 @@ SfxPoolItem* SvxChartColorTableItem::Clone( SfxItemPool * ) const
|
|||||||
|
|
||||||
bool SvxChartColorTableItem::operator==( const SfxPoolItem& rAttr ) 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 ));
|
const SvxChartColorTableItem * rCTItem( dynamic_cast<const SvxChartColorTableItem * >( & rAttr ));
|
||||||
if( rCTItem )
|
if( rCTItem )
|
||||||
|
@@ -86,7 +86,7 @@ SfxPoolItem* SvxGridItem::Clone( SfxItemPool* ) const
|
|||||||
|
|
||||||
bool SvxGridItem::operator==( const SfxPoolItem& rAttr ) 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);
|
const SvxGridItem& rItem = static_cast<const SvxGridItem&>(rAttr);
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
bool FmInterfaceItem::operator==( const SfxPoolItem& rAttr ) const
|
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;
|
return xInterface == static_cast<const FmInterfaceItem&>(rAttr).xInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -73,7 +73,7 @@ bool SvxSmartTagItem::PutValue( const uno::Any& /*rVal*/, sal_uInt8 /* nMemberId
|
|||||||
|
|
||||||
bool SvxSmartTagItem::operator==( const SfxPoolItem& rAttr ) const
|
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);
|
const SvxSmartTagItem& rItem = static_cast<const SvxSmartTagItem&>(rAttr);
|
||||||
|
|
||||||
|
@@ -248,7 +248,7 @@ bool SvxMarginItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxMarginItem::operator==( const SfxPoolItem& rItem ) const
|
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 ) &&
|
return ( ( nLeftMargin == static_cast<const SvxMarginItem&>(rItem).nLeftMargin ) &&
|
||||||
( nTopMargin == static_cast<const SvxMarginItem&>(rItem).nTopMargin ) &&
|
( nTopMargin == static_cast<const SvxMarginItem&>(rItem).nTopMargin ) &&
|
||||||
|
@@ -64,7 +64,7 @@ bool SvxColorListItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxColorListItem::operator==( const SfxPoolItem& rItem ) const
|
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;
|
return static_cast<const SvxColorListItem&>(rItem).pColorList == pColorList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ bool SvxGradientListItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxGradientListItem::operator==( const SfxPoolItem& rItem ) const
|
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;
|
return static_cast<const SvxGradientListItem&>(rItem).pGradientList == pGradientList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ bool SvxHatchListItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxHatchListItem::operator==( const SfxPoolItem& rItem ) const
|
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;
|
return static_cast<const SvxHatchListItem&>(rItem).pHatchList == pHatchList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ bool SvxBitmapListItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxBitmapListItem::operator==( const SfxPoolItem& rItem ) const
|
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;
|
return static_cast<const SvxBitmapListItem&>(rItem).pBitmapList == pBitmapList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,7 +257,7 @@ bool SvxPatternListItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxPatternListItem::operator==( const SfxPoolItem& rItem ) const
|
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;
|
return static_cast<const SvxPatternListItem&>(rItem).pPatternList == pPatternList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@ bool SvxDashListItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxDashListItem::operator==( const SfxPoolItem& rItem ) const
|
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;
|
return static_cast<const SvxDashListItem&>(rItem).pDashList == pDashList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +340,7 @@ bool SvxLineEndListItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxLineEndListItem::operator==( const SfxPoolItem& rItem ) const
|
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;
|
return static_cast<const SvxLineEndListItem&>(rItem).pLineEndList == pLineEndList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -47,7 +47,7 @@ SvxB3DVectorItem::SvxB3DVectorItem( const SvxB3DVectorItem& rItem ) :
|
|||||||
|
|
||||||
bool SvxB3DVectorItem::operator==( const SfxPoolItem &rItem ) const
|
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;
|
return static_cast<const SvxB3DVectorItem&>(rItem).aVal == aVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -123,7 +123,7 @@ bool SvxGalleryItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /* nMemberId
|
|||||||
|
|
||||||
bool SvxGalleryItem::operator==( const SfxPoolItem& rAttr ) const
|
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);
|
const SvxGalleryItem& rItem = static_cast<const SvxGalleryItem&>(rAttr);
|
||||||
|
|
||||||
|
@@ -42,7 +42,8 @@ SvxGrfCrop::~SvxGrfCrop()
|
|||||||
|
|
||||||
bool SvxGrfCrop::operator==( const SfxPoolItem& rAttr ) const
|
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);
|
const SvxGrfCrop& rCrop = static_cast<const SvxGrfCrop&>(rAttr);
|
||||||
return nLeft == rCrop.GetLeft() &&
|
return nLeft == rCrop.GetLeft() &&
|
||||||
nRight == rCrop.GetRight() &&
|
nRight == rCrop.GetRight() &&
|
||||||
|
@@ -230,7 +230,7 @@ SfxPoolItem* SvxHyperlinkItem::Clone( SfxItemPool* ) const
|
|||||||
|
|
||||||
bool SvxHyperlinkItem::operator==( const SfxPoolItem& rAttr ) 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);
|
const SvxHyperlinkItem& rItem = static_cast<const SvxHyperlinkItem&>(rAttr);
|
||||||
|
|
||||||
|
@@ -120,7 +120,7 @@ bool SvxNumberInfoItem::GetPresentation
|
|||||||
|
|
||||||
bool SvxNumberInfoItem::operator==( const SfxPoolItem& rItem ) const
|
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);
|
const SvxNumberInfoItem& rOther = static_cast<const SvxNumberInfoItem&>(rItem);
|
||||||
|
|
||||||
|
@@ -63,7 +63,7 @@ SfxPoolItem* SvxPageItem::Clone( SfxItemPool * ) const
|
|||||||
// Test for equality
|
// Test for equality
|
||||||
bool SvxPageItem::operator==( const SfxPoolItem& rAttr ) const
|
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);
|
const SvxPageItem& rItem = static_cast<const SvxPageItem&>(rAttr);
|
||||||
return ( eNumType == rItem.eNumType &&
|
return ( eNumType == rItem.eNumType &&
|
||||||
bLandscape == rItem.bLandscape &&
|
bLandscape == rItem.bLandscape &&
|
||||||
|
@@ -77,7 +77,7 @@ SvStream& SvxViewLayoutItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
|
|||||||
|
|
||||||
bool SvxViewLayoutItem::operator==( const SfxPoolItem& rAttr ) const
|
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);
|
const SvxViewLayoutItem& rItem = static_cast<const SvxViewLayoutItem&>(rAttr);
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ SvStream& SvxZoomSliderItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
|
|||||||
|
|
||||||
bool SvxZoomSliderItem::operator==( const SfxPoolItem& rAttr ) const
|
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);
|
const SvxZoomSliderItem& rItem = static_cast<const SvxZoomSliderItem&>(rAttr);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user