summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-29 15:35:28 +0200
committerOliver Specht <oliver.specht@cib.de>2015-10-01 08:32:26 +0000
commit85f93697defd9a812a0cda0bc4e9364e28c0339e (patch)
tree0c43827cda0e18b03c3d28599b696bcab3a8069a /svl
parentc1e0a697a70872ef1b6deaf5222538899554221b (diff)
tdf#94559: third step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in oox, reportdesign, svl, svtools, svx, tools Change-Id: I1f85ff92267a0668eba625fa61b4f07feb8f3d4e Reviewed-on: https://gerrit.libreoffice.org/19002 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/cenumitm.cxx2
-rw-r--r--svl/source/items/cintitem.cxx8
-rw-r--r--svl/source/items/custritm.cxx2
-rw-r--r--svl/source/items/ilstitem.cxx2
-rw-r--r--svl/source/items/itempool.cxx4
-rw-r--r--svl/source/items/itemset.cxx2
-rw-r--r--svl/source/items/poolio.cxx10
7 files changed, 15 insertions, 15 deletions
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx
index d7e88a905d99..595c80e5790b 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -159,7 +159,7 @@ SfxBoolItem::SfxBoolItem(sal_uInt16 const nWhich, SvStream & rStream)
// virtual
bool SfxBoolItem::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(SfxBoolItem),
+ DBG_ASSERT(dynamic_cast<const SfxBoolItem*>( &rItem ) != nullptr,
"SfxBoolItem::operator ==(): Bad type");
return m_bValue == static_cast< SfxBoolItem const * >(&rItem)->m_bValue;
}
diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx
index 24fb8c755ca6..f7a1a7a77eb1 100644
--- a/svl/source/items/cintitem.cxx
+++ b/svl/source/items/cintitem.cxx
@@ -27,7 +27,7 @@ TYPEINIT1_AUTOFACTORY(CntByteItem, SfxPoolItem);
// virtual
bool CntByteItem::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntByteItem),
+ DBG_ASSERT(dynamic_cast<const CntByteItem*>( &rItem ) != nullptr,
"CntByteItem::operator ==(): Bad type");
return m_nValue == (static_cast< const CntByteItem * >(&rItem))->m_nValue;
}
@@ -98,7 +98,7 @@ CntUInt16Item::CntUInt16Item(sal_uInt16 which, SvStream & rStream) :
// virtual
bool CntUInt16Item::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntUInt16Item),
+ DBG_ASSERT(dynamic_cast< const CntUInt16Item* >(&rItem) != nullptr,
"CntUInt16Item::operator ==(): Bad type");
return m_nValue == (static_cast< const CntUInt16Item * >(&rItem))->
m_nValue;
@@ -169,7 +169,7 @@ CntInt32Item::CntInt32Item(sal_uInt16 which, SvStream & rStream)
// virtual
bool CntInt32Item::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntInt32Item),
+ DBG_ASSERT(dynamic_cast< const CntInt32Item*>(&rItem) != nullptr,
"CntInt32Item::operator ==(): Bad type");
return m_nValue == (static_cast< const CntInt32Item * >(&rItem))->
m_nValue;
@@ -239,7 +239,7 @@ CntUInt32Item::CntUInt32Item(sal_uInt16 which, SvStream & rStream) :
// virtual
bool CntUInt32Item::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntUInt32Item),
+ DBG_ASSERT(dynamic_cast< const CntUInt32Item* >(&rItem) != nullptr,
"CntUInt32Item::operator ==(): Bad type");
return m_nValue == (static_cast< const CntUInt32Item * >(&rItem))->
m_nValue;
diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx
index 1182ae576adc..3b97df923d64 100644
--- a/svl/source/items/custritm.cxx
+++ b/svl/source/items/custritm.cxx
@@ -29,7 +29,7 @@ TYPEINIT1_AUTOFACTORY(CntUnencodedStringItem, SfxPoolItem)
// virtual
bool CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntUnencodedStringItem),
+ DBG_ASSERT(dynamic_cast<const CntUnencodedStringItem*>( &rItem ) != nullptr,
"CntUnencodedStringItem::operator ==(): Bad type");
return m_aValue
== (static_cast< const CntUnencodedStringItem * >(&rItem))->
diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx
index 140e3b857314..36680c4ccff2 100644
--- a/svl/source/items/ilstitem.cxx
+++ b/svl/source/items/ilstitem.cxx
@@ -58,7 +58,7 @@ SfxIntegerListItem::~SfxIntegerListItem()
bool SfxIntegerListItem::operator==( const SfxPoolItem& rPoolItem ) const
{
- if ( !rPoolItem.ISA( SfxIntegerListItem ) )
+ if ( dynamic_cast< const SfxIntegerListItem* >( &rPoolItem) == nullptr )
return false;
const SfxIntegerListItem rItem = static_cast<const SfxIntegerListItem&>(rPoolItem);
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 909c6508bfaf..ae8c7d35d932 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -530,7 +530,7 @@ void SfxItemPool::Delete()
// *ppStaticDefaultItem could've already been deleted in a class derived
// from SfxItemPool
// This causes chaos in Itempool!
- if ( *ppStaticDefaultItem && (*ppStaticDefaultItem)->ISA(SfxSetItem) )
+ if ( *ppStaticDefaultItem && dynamic_cast< const SfxSetItem* >(*ppStaticDefaultItem) != nullptr )
{
if ( *itrItemArr )
{
@@ -743,7 +743,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
pNewItem->SetWhich(nWhich);
#ifdef DBG_UTIL
SFX_ASSERT( rItem.Type() == pNewItem->Type(), nWhich, "unequal types in Put(): no Clone()?" )
- if ( !rItem.ISA(SfxSetItem) )
+ if ( !dynamic_cast<const SfxSetItem*>( &rItem ) != nullptr )
{
SFX_ASSERT( !IsItemFlag(nWhich, SfxItemPoolFlags::POOLABLE) ||
rItem == *pNewItem,
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index e6961c4649f9..c9e251239cb2 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -531,7 +531,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
}
}
SFX_ASSERT( !m_pPool->IsItemFlag(nWhich, SfxItemPoolFlags::POOLABLE) ||
- rItem.ISA(SfxSetItem) || **ppFnd == rItem,
+ dynamic_cast<const SfxSetItem*>( &rItem ) != nullptr || **ppFnd == rItem,
nWhich, "putted Item unequal" );
return *ppFnd;
}
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 619f9ca321ed..85e7b13c31d4 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -197,7 +197,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// ! Poolable is not even saved in the Pool
// And itemsets/plain-items depending on the round
if ( *itrArr && IsItemFlag(**ppDefItem, SfxItemPoolFlags::POOLABLE) &&
- pImp->bInSetItem == (bool) (*ppDefItem)->ISA(SfxSetItem) )
+ pImp->bInSetItem == (dynamic_cast< const SfxSetItem* >(*ppDefItem) != nullptr) )
{
// Own signature, global WhichId and ItemVersion
sal_uInt16 nSlotId = GetSlotId( (*ppDefItem)->Which(), false );
@@ -232,7 +232,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
else
break;
#ifdef DBG_UTIL_MI
- if ( !pItem->ISA(SfxSetItem) )
+ if ( dynamic_cast<const SfxSetItem*>( pItem ) == nullptr )
{
sal_uLong nMark = rStream.Tell();
rStream.Seek( nItemStartPos + sizeof(sal_uInt16) );
@@ -646,7 +646,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// SfxSetItems could contain Items from secondary Pools
SfxPoolItem *pDefItem = *(pImp->ppStaticDefaults + nIndex);
- pImp->bInSetItem = pDefItem->ISA(SfxSetItem);
+ pImp->bInSetItem = dynamic_cast<const SfxSetItem*>( pDefItem ) != nullptr;
if ( !bSecondaryLoaded && pImp->mpSecondary && pImp->bInSetItem )
{
// Seek to end of own Pool
@@ -1162,7 +1162,7 @@ bool SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
if ( 0 == ( pPool = pPool->pImp->mpSecondary ) )
return false;
- DBG_ASSERT( !pImp->bInSetItem || !rItem.ISA(SfxSetItem),
+ DBG_ASSERT( !pImp->bInSetItem || dynamic_cast<const SfxSetItem*>( &rItem ) == nullptr,
"SetItem contains ItemSet with SetItem" );
sal_uInt16 nSlotId = pPool->GetSlotId( rItem.Which() );
@@ -1226,7 +1226,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
nWhich = pRefPool->GetNewWhich( nWhich ); // Map WhichId to new version
DBG_ASSERT( !nWhich || !pImp->bInSetItem ||
- !pRefPool->pImp->ppStaticDefaults[pRefPool->GetIndex_Impl(nWhich)]->ISA(SfxSetItem),
+ dynamic_cast<const SfxSetItem*>( pRefPool->pImp->ppStaticDefaults[pRefPool->GetIndex_Impl(nWhich)] ) == nullptr,
"loading SetItem in ItemSet of SetItem" );
// Are we loading via surrogate?