summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxobj.cxx
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-28 11:42:43 +0200
committerOliver Specht <oliver.specht@cib.de>2015-09-29 12:26:20 +0000
commitd3c7c9ea81ee7c617f8cee5b645621088aea215b (patch)
tree116b8534291360181d80a53554c930caf186f15e /basic/source/sbx/sbxobj.cxx
parent2bce2365e7d411c1673e709eb1abc89da9f651dc (diff)
tdf#94559: first step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in avmedia, basctl, basic, cui, dbaccess, vcl,xmloff Change-Id: If4496762e82e896b6fbc362e6626502703c245f5 Reviewed-on: https://gerrit.libreoffice.org/18905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'basic/source/sbx/sbxobj.cxx')
-rw-r--r--basic/source/sbx/sbxobj.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index c38737dea8ef..4b1499944ffa 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -292,7 +292,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
bool SbxObject::Call( const OUString& rName, SbxArray* pParam )
{
SbxVariable* pMeth = FindQualified( rName, SbxCLASS_DONTCARE);
- if( pMeth && pMeth->ISA(SbxMethod) )
+ if( pMeth && 0 != dynamic_cast<const SbxMethod*>( pMeth) )
{
// FindQualified() might have struck already!
if( pParam )
@@ -385,7 +385,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
return NULL;
}
// Collections may contain objects of the same name
- if( !( ct == SbxCLASS_OBJECT && ISA(SbxCollection) ) )
+ if( !( ct == SbxCLASS_OBJECT && 0 != dynamic_cast<const SbxCollection*>( this ) ) )
{
SbxVariable* pRes = pArray->Find( rName, ct );
if( pRes )
@@ -429,7 +429,7 @@ void SbxObject::Insert( SbxVariable* pVar )
{
// Then this element exists already
// There are objects of the same name allowed at collections
- if( pArray == pObjs && ISA(SbxCollection) )
+ if( pArray == pObjs && 0 != dynamic_cast<const SbxCollection*>( this ) )
{
nIdx = pArray->Count();
}
@@ -463,9 +463,9 @@ void SbxObject::Insert( SbxVariable* pVar )
static const char* pCls[] =
{ "DontCare","Array","Value","Variable","Method","Property","Object" };
OUString aVarName( pVar->GetName() );
- if ( aVarName.isEmpty() && pVar->ISA(SbxObject) )
+ if ( aVarName.isEmpty() && 0 != dynamic_cast<const SbxObject*>( pVar) )
{
- aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
+ aVarName = dynamic_cast<SbxObject*>( pVar)->GetClassName( );
}
SAL_INFO(
"basic.sbx",
@@ -507,9 +507,9 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
static const char* pCls[] =
{ "DontCare","Array","Value","Variable","Method","Property","Object" };
OUString aVarName( pVar->GetName() );
- if ( aVarName.isEmpty() && pVar->ISA(SbxObject) )
+ if ( aVarName.isEmpty() && 0 != dynamic_cast<const SbxObject*>( pVar) )
{
- aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
+ aVarName = dynamic_cast<SbxObject*>( pVar)->GetClassName( );
}
SAL_INFO(
"basic.sbx",
@@ -535,9 +535,9 @@ void SbxObject::Remove( SbxVariable* pVar )
{
#ifdef DBG_UTIL
OUString aVarName( pVar->GetName() );
- if ( aVarName.isEmpty() && pVar->ISA(SbxObject) )
+ if ( aVarName.isEmpty() && 0 != dynamic_cast<const SbxObject*>( pVar) )
{
- aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
+ aVarName = dynamic_cast<SbxObject*>( pVar)->GetClassName( );
}
SAL_INFO(
"basic.sbx",
@@ -855,11 +855,11 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill )
if ( pVar )
{
rStrm.WriteCharPtr( aIndentNameStr.getStr() ).WriteCharPtr( " - Sub" );
- if ( pVar->ISA(SbxObject) )
+ if ( 0 != dynamic_cast<const SbxObject*>( pVar) )
{
static_cast<SbxObject*>(pVar)->Dump( rStrm, bFill );
}
- else if ( pVar->ISA(SbxVariable) )
+ else if ( 0 != dynamic_cast<const SbxVariable*>( pVar) )
{
static_cast<SbxVariable*>(pVar)->Dump( rStrm, bFill );
}