summaryrefslogtreecommitdiff
path: root/svl/source/items
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-11 15:50:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-11 15:51:54 +0200
commitabd8e76453038f51ad9d5b1bfeaef592e1271ee5 (patch)
tree656bbb2f73ef517f805e77e3a41856339d7a5944 /svl/source/items
parent0816b00d06eceee3e601177bce1c61e367bbabee (diff)
-Werror,-Wtautological-undefined-compare
("reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true") Change-Id: I41660cb5e9a14a5c0694259f0244c789ce3d4753
Diffstat (limited to 'svl/source/items')
-rw-r--r--svl/source/items/itempool.cxx8
-rw-r--r--svl/source/items/itemset.cxx15
-rw-r--r--svl/source/items/poolio.cxx13
3 files changed, 0 insertions, 36 deletions
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 92cfb622efea..32a20b31eea5 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -636,10 +636,6 @@ void SfxItemPool::ResetPoolDefaultItem( sal_uInt16 nWhichId )
const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
- DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
- 0 != &((const SfxSetItem&)rItem).GetItemSet(),
- "SetItem without ItemSet" );
-
if ( 0 == nWhich )
nWhich = rItem.Which();
@@ -792,10 +788,6 @@ void SfxPoolItemArray_Impl::ReHash()
void SfxItemPool::Remove( const SfxPoolItem& rItem )
{
- DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
- 0 != &((const SfxSetItem&)rItem).GetItemSet(),
- "SetItem without ItemSet" );
-
SFX_ASSERT( !IsPoolDefaultItem(&rItem), rItem.Which(),
"where's the Pool Default coming from here?" );
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 8b3dc0a0976f..964c8afc188f 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -482,12 +482,6 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich,
if (ppItem)
{
- #ifdef DBG_UTIL
- const SfxPoolItem *pItem = *ppFnd;
- DBG_ASSERT( !pItem->ISA(SfxSetItem) ||
- 0 != &((const SfxSetItem*)pItem)->GetItemSet(),
- "SetItem without ItemSet" );
- #endif
*ppItem = *ppFnd;
}
return SFX_ITEM_SET;
@@ -512,9 +506,6 @@ bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem** ppItem) const
const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
- DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
- 0 != &((const SfxSetItem&)rItem).GetItemSet(),
- "SetItem without ItemSet" );
if ( !nWhich )
return 0; //FIXME: Only because of Outliner bug
@@ -936,9 +927,6 @@ const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, bool bSrchInParent) const
}
#ifdef DBG_UTIL
const SfxPoolItem *pItem = *ppFnd;
- DBG_ASSERT( !pItem->ISA(SfxSetItem) ||
- 0 != &((const SfxSetItem*)pItem)->GetItemSet(),
- "SetItem without ItemSet" );
if ( pItem->ISA(SfxVoidItem) || !pItem->Which() )
DBG_WARNING( "SFX_WARNING: Getting disabled Item" );
#endif
@@ -958,9 +946,6 @@ const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, bool bSrchInParent) const
// Get the Default from the Pool and return
SFX_ASSERT(_pPool, nWhich, "no Pool, but status is ambiguous");
const SfxPoolItem *pItem = &_pPool->GetDefaultItem( nWhich );
- DBG_ASSERT( !pItem->ISA(SfxSetItem) ||
- 0 != &((const SfxSetItem*)pItem)->GetItemSet(),
- "SetItem without ItemSet" );
return *pItem;
}
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index c1cd7b16c7cf..661fd376b989 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -326,13 +326,6 @@ void SfxItemPool::LoadCompleted()
{
if (*ppHtArr)
{
- #ifdef DBG_UTIL
- const SfxPoolItem &rItem = **ppHtArr;
- DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
- 0 != &((const SfxSetItem&)rItem).GetItemSet(),
- "SetItem without ItemSet" );
- #endif
-
if ( !ReleaseRef( **ppHtArr, 1 ) )
DELETEZ( *ppHtArr );
}
@@ -488,13 +481,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
for( size_t n = (*itrItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
- #ifdef DBG_UTIL
- const SfxPoolItem &rItem = **ppHtArr;
- DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
- 0 != &((const SfxSetItem&)rItem).GetItemSet(),
- "SetItem without ItemSet" );
DBG_WARNING( "loading non-empty ItemPool" );
- #endif
AddRef( **ppHtArr, 1 );
}