From 3662061633f5651ad7f01543a3ce8807cdd966fe Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Fri, 18 Nov 2016 21:57:42 +0100
Subject: editeng: assert SfxPoolItem::operator==

Change-Id: Ia6c6f4f5af1e3a803b464ab410558984c3861a65
---
 editeng/source/items/flditem.cxx         |  2 +-
 editeng/source/items/frmitems.cxx        | 24 ++++++++++++------------
 editeng/source/items/optitems.cxx        |  4 ++--
 editeng/source/items/paraitem.cxx        | 12 ++++++------
 editeng/source/items/textitem.cxx        | 18 +++++++++---------
 editeng/source/items/writingmodeitem.cxx |  2 +-
 sfx2/source/config/evntconf.cxx          |  2 +-
 sfx2/source/doc/zoomitem.cxx             |  2 +-
 8 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 11309d4a0521..30e742b0a79d 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -340,7 +340,7 @@ SvStream& SvxFieldItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) co
 
 bool SvxFieldItem::operator==( const SfxPoolItem& rItem ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" );
+    assert(SfxPoolItem::operator==(rItem));
 
     const SvxFieldData* pOtherFld = static_cast<const SvxFieldItem&>(rItem).GetField();
     if( pField == pOtherFld )
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index dc659e9a5f6b..501dd71f4880 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -307,7 +307,7 @@ SvxSizeItem::SvxSizeItem( const sal_uInt16 nId ) :
 
 bool SvxSizeItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     return ( aSize == static_cast<const SvxSizeItem&>( rAttr ).GetSize() );
 }
@@ -569,7 +569,7 @@ void SvxLRSpaceItem::AdjustLeft()
 
 bool SvxLRSpaceItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxLRSpaceItem& rOther = static_cast<const SvxLRSpaceItem&>(rAttr);
 
@@ -953,7 +953,7 @@ bool SvxULSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 
 bool SvxULSpaceItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxULSpaceItem& rSpaceItem = static_cast<const SvxULSpaceItem&>( rAttr );
     return ( nUpper == rSpaceItem.nUpper &&
@@ -1177,7 +1177,7 @@ bool SvxOpaqueItem::GetPresentation
 
 bool SvxProtectItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxProtectItem& rItem = static_cast<const SvxProtectItem&>(rAttr);
     return ( bCntnt == rItem.bCntnt &&
@@ -1402,7 +1402,7 @@ bool SvxShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 
 bool SvxShadowItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxShadowItem& rItem = static_cast<const SvxShadowItem&>(rAttr);
     return ( ( aShadowColor == rItem.aShadowColor ) &&
@@ -1650,7 +1650,7 @@ inline bool CmpBrdLn( const SvxBorderLine* pBrd1, const SvxBorderLine* pBrd2 )
 
 bool SvxBoxItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(rAttr);
     return (
@@ -2545,9 +2545,9 @@ SvxBoxInfoItem &SvxBoxInfoItem::operator=( const SvxBoxInfoItem& rCpy )
 
 bool SvxBoxInfoItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    const SvxBoxInfoItem& rBoxInfo = static_cast<const SvxBoxInfoItem&>(rAttr);
+    assert(SfxPoolItem::operator==(rAttr));
 
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    const SvxBoxInfoItem& rBoxInfo = static_cast<const SvxBoxInfoItem&>(rAttr);
 
     return (   mbEnableHor               == rBoxInfo.mbEnableHor
             && mbEnableVer               == rBoxInfo.mbEnableVer
@@ -2919,7 +2919,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 
 bool SvxFormatBreakItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     return GetValue() == static_cast<const SvxFormatBreakItem&>( rAttr ).GetValue();
 }
@@ -3105,7 +3105,7 @@ SvxLineItem& SvxLineItem::operator=( const SvxLineItem& rLine )
 
 bool SvxLineItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     return CmpBrdLn( pLine, static_cast<const SvxLineItem&>(rAttr).GetLine() );
 }
@@ -3716,7 +3716,7 @@ SvxBrushItem& SvxBrushItem::operator=(SvxBrushItem&& rItem)
 
 bool SvxBrushItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxBrushItem& rCmp = static_cast<const SvxBrushItem&>(rAttr);
     bool bEqual = ( aColor == rCmp.aColor && eGraphicPos == rCmp.eGraphicPos &&
@@ -4059,7 +4059,7 @@ SvxFrameDirectionItem::~SvxFrameDirectionItem()
 
 bool SvxFrameDirectionItem::operator==( const SfxPoolItem& rCmp ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rCmp), "unequal types" );
+    assert(SfxPoolItem::operator==(rCmp));
 
     return GetValue() == static_cast<const SvxFrameDirectionItem&>(rCmp).GetValue();
 }
diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx
index 8d89d2333bd4..f4ab203bab5c 100644
--- a/editeng/source/items/optitems.cxx
+++ b/editeng/source/items/optitems.cxx
@@ -71,7 +71,7 @@ SfxPoolItem* SfxSpellCheckItem::Clone( SfxItemPool* ) const
 
 bool SfxSpellCheckItem::operator==( const SfxPoolItem& rItem ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rItem), "unequal types" );
+    assert(SfxPoolItem::operator==(rItem));
     return ( xSpellCheck == static_cast<const SfxSpellCheckItem&>( rItem ).GetXSpellChecker() );
 }
 
@@ -97,7 +97,7 @@ SfxHyphenRegionItem::SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem ) :
 
 bool SfxHyphenRegionItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     return ( ( static_cast<const SfxHyphenRegionItem&>( rAttr ).nMinLead == nMinLead ) &&
              ( static_cast<const SfxHyphenRegionItem&>( rAttr ).nMinTrail == nMinTrail ) );
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 26bb5d003360..130dfaaeebfe 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -91,7 +91,7 @@ SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 nId
 
 bool SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxLineSpacingItem& rLineSpace = static_cast<const SvxLineSpacingItem&>(rAttr);
     return
@@ -344,7 +344,7 @@ SvxAdjustItem::SvxAdjustItem(const SvxAdjust eAdjst, const sal_uInt16 nId )
 
 bool SvxAdjustItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxAdjustItem& rItem = static_cast<const SvxAdjustItem&>(rAttr);
     return GetAdjust() == rItem.GetAdjust() &&
@@ -683,7 +683,7 @@ bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 
 bool SvxHyphenZoneItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxHyphenZoneItem& rItem = static_cast<const SvxHyphenZoneItem&>(rAttr);
     return ( rItem.bHyphen == bHyphen
@@ -1005,7 +1005,7 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 
 bool SvxTabStopItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxTabStopItem& rTSI = static_cast<const SvxTabStopItem&>(rAttr);
 
@@ -1237,7 +1237,7 @@ bool SvxPageModelItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
 
 bool SvxPageModelItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     return SfxStringItem::operator==(rAttr) &&
            bAuto == static_cast<const SvxPageModelItem&>( rAttr ).bAuto;
@@ -1464,7 +1464,7 @@ bool SvxParaVertAlignItem::PutValue( const css::uno::Any& rVal,
 
 bool SvxParaVertAlignItem::operator==( const SfxPoolItem& rItem ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+    assert(SfxPoolItem::operator==(rItem));
     return SfxUInt16Item::operator==( rItem );
 }
 
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index ffe4848cb76f..1e01793795cf 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -171,7 +171,7 @@ SfxPoolItem* SvxFontListItem::Clone( SfxItemPool* ) const
 
 bool SvxFontListItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     return( pFontList == static_cast<const SvxFontListItem&>(rAttr).pFontList );
 }
@@ -326,7 +326,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId)
 
 bool SvxFontItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxFontItem& rItem = static_cast<const SvxFontItem&>(rAttr);
 
@@ -773,7 +773,7 @@ SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
 
 bool SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+    assert(SfxPoolItem::operator==(rItem));
     return GetHeight() == static_cast<const SvxFontHeightItem&>(rItem).GetHeight() &&
             GetProp() == static_cast<const SvxFontHeightItem&>(rItem).GetProp() &&
             GetPropUnit() == static_cast<const SvxFontHeightItem&>(rItem).GetPropUnit();
@@ -1146,7 +1146,7 @@ SfxPoolItem* SvxFontWidthItem::Create( SvStream& rStrm,
 
 bool SvxFontWidthItem::operator==( const SfxPoolItem& rItem ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+    assert(SfxPoolItem::operator==(rItem));
     return GetWidth() == static_cast<const SvxFontWidthItem&>(rItem).GetWidth() &&
             GetProp() == static_cast<const SvxFontWidthItem&>(rItem).GetProp();
 }
@@ -1347,7 +1347,7 @@ bool SvxTextLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 
 bool SvxTextLineItem::operator==( const SfxPoolItem& rItem ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+    assert(SfxPoolItem::operator==(rItem));
     return SfxEnumItem::operator==( rItem ) &&
            GetColor() == static_cast<const SvxTextLineItem&>(rItem).GetColor();
 }
@@ -1871,7 +1871,7 @@ sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) const
 
 bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     return  mColor == static_cast<const SvxColorItem&>( rAttr ).mColor;
 }
@@ -2203,7 +2203,7 @@ SvxEscapementItem::SvxEscapementItem( const short _nEsc,
 
 bool SvxEscapementItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     return( nEsc  == static_cast<const SvxEscapementItem&>(rAttr).nEsc &&
             nProp == static_cast<const SvxEscapementItem&>(rAttr).nProp );
@@ -2760,7 +2760,7 @@ SvxTwoLinesItem::~SvxTwoLinesItem()
 
 bool SvxTwoLinesItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "not equal attribute types" );
+    assert(SfxPoolItem::operator==(rAttr));
     return bOn == static_cast<const SvxTwoLinesItem&>(rAttr).bOn &&
            cStartBracket == static_cast<const SvxTwoLinesItem&>(rAttr).cStartBracket &&
            cEndBracket == static_cast<const SvxTwoLinesItem&>(rAttr).cEndBracket;
@@ -2979,7 +2979,7 @@ bool SvxCharRotateItem::PutValue( const css::uno::Any& rVal,
 
 bool SvxCharRotateItem::operator==( const SfxPoolItem& rItem ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+    assert(SfxPoolItem::operator==(rItem));
     return SfxUInt16Item::operator==( rItem ) &&
            IsFitToLine() == static_cast<const SvxCharRotateItem&>(rItem).IsFitToLine();
 }
diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx
index 50e4b35ddf47..85387f9072a0 100644
--- a/editeng/source/items/writingmodeitem.cxx
+++ b/editeng/source/items/writingmodeitem.cxx
@@ -38,7 +38,7 @@ SvxWritingModeItem::~SvxWritingModeItem()
 
 bool SvxWritingModeItem::operator==( const SfxPoolItem& rCmp ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rCmp), "unequal types" );
+    assert(SfxPoolItem::operator==(rCmp));
 
     return GetValue() == static_cast<const SvxWritingModeItem&>(rCmp).GetValue();
 }
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index e7bea262ed20..3b45707eb1ea 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -71,7 +71,7 @@ void SfxEventNamesList::DelDtor()
 
 bool SfxEventNamesItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SfxEventNamesList& rOwn = aEventsList;
     const SfxEventNamesList& rOther = static_cast<const SfxEventNamesItem&>( rAttr ).aEventsList;
diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx
index da35e86a9ab2..c71405547eb1 100644
--- a/sfx2/source/doc/zoomitem.cxx
+++ b/sfx2/source/doc/zoomitem.cxx
@@ -90,7 +90,7 @@ SvStream& SvxZoomItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) con
 
 bool SvxZoomItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+    assert(SfxPoolItem::operator==(rAttr));
 
     const SvxZoomItem& rItem = static_cast<const SvxZoomItem&>(rAttr);
 
-- 
cgit