diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-27 16:57:21 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-09-06 15:47:44 -0500 |
commit | 5bce32904091ffe28884fd5c0f4801ee82bad101 (patch) | |
tree | fc2573078a858de456a0dc7b7810176d433241c7 /basic | |
parent | 10143717834d8401d85fdf9564e782a58b9983ec (diff) |
SfxHint: convert home-grown RTTI to normal C++ RTTI
Also note that I fixed a bug in SvxFontMenuControl::Notify
where the if statement had the check the wrong way around.
Change-Id: I611e8929c65818191e36bd80f2b985820ada4411
Reviewed-on: https://gerrit.libreoffice.org/11147
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 8 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/stdobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/stdobj1.cxx | 6 | ||||
-rw-r--r-- | basic/source/sbx/sbxcoll.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxvar.cxx | 3 |
8 files changed, 14 insertions, 15 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index db8487d21574..04303b3b2317 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -2100,7 +2100,7 @@ SbxVariable* BasicCollection::Find( const OUString& rName, SbxClassType t ) void BasicCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1, const SfxHint& rHint, const TypeId& rId2 ) { - const SbxHint* p = PTR_CAST(SbxHint,&rHint); + const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); if( p ) { sal_uIntPtr nId = p->GetId(); diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 8a5e761ba47e..9a37a8480a40 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2030,7 +2030,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, if( bNeedIntrospection ) doIntrospection(); - const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { SbxVariable* pVar = pHint->GetVar(); @@ -3617,7 +3617,7 @@ SbxVariable* SbUnoService::Find( const OUString& rName, SbxClassType ) void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) { - const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { SbxVariable* pVar = pHint->GetVar(); @@ -3838,7 +3838,7 @@ SbUnoSingleton::SbUnoSingleton( const OUString& aName_, void SbUnoSingleton::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) { - const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { SbxVariable* pVar = pHint->GetVar(); @@ -5012,7 +5012,7 @@ void SbUnoStructRefObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCTyp { if ( !mbMemberCacheInit ) initMemberCache(); - const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { SbxVariable* pVar = pHint->GetVar(); diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 6f1332fb668b..2ae87f32f3e8 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -747,7 +747,7 @@ void SbModule::SetParent( SbxObject* p ) void SbModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) { - const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { SbxVariable* pVar = pHint->GetVar(); @@ -1892,7 +1892,7 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH { bool bDone = false; - const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { SbxVariable* pVar = pHint->GetVar(); diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index 9a69beadcd1c..da9edc2111d0 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -821,7 +821,7 @@ void SbiStdObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) { - const SbxHint* pHint = PTR_CAST(SbxHint,&rHint); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { SbxVariable* pVar = pHint->GetVar(); diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index 061aa646f038..3f52a8a19b2a 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -144,7 +144,7 @@ void SbStdPicture::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) { - const SbxHint* pHint = PTR_CAST( SbxHint, &rHint ); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { @@ -269,7 +269,7 @@ SbxVariable* SbStdFont::Find( const OUString& rName, SbxClassType t ) void SbStdFont::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) { - const SbxHint* pHint = PTR_CAST( SbxHint, &rHint ); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { @@ -438,7 +438,7 @@ SbxVariable* SbStdClipboard::Find( const OUString& rName, SbxClassType t ) void SbStdClipboard::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) { - const SbxHint* pHint = PTR_CAST( SbxHint, &rHint ); + const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint); if( pHint ) { diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx index 3d473a341224..3932587238b5 100644 --- a/basic/source/sbx/sbxcoll.cxx +++ b/basic/source/sbx/sbxcoll.cxx @@ -117,7 +117,7 @@ SbxVariable* SbxCollection::Find( const OUString& rName, SbxClassType t ) void SbxCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1, const SfxHint& rHint, const TypeId& rId2 ) { - const SbxHint* p = PTR_CAST(SbxHint,&rHint); + const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); if( p ) { sal_uLong nId = p->GetId(); diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 15443694a371..70c308d147bc 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -138,7 +138,7 @@ void SbxObject::Clear() void SbxObject::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ) { - const SbxHint* p = PTR_CAST(SbxHint,&rHint); + const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); if( p ) { sal_uLong nId = p->GetId(); diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 89b712cd2115..1bd8dfddb4ba 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -35,7 +35,6 @@ using namespace com::sun::star::uno; ///////////////////////////// SbxVariable TYPEINIT1(SbxVariable,SbxValue) -TYPEINIT1(SbxHint,SfxSimpleHint) ///////////////////////////// SbxVariableImpl @@ -685,7 +684,7 @@ void SbxAlias::Broadcast( sal_uIntPtr nHt ) void SbxAlias::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ) { - const SbxHint* p = PTR_CAST(SbxHint,&rHint); + const SbxHint* p = dynamic_cast<const SbxHint*>(&rHint); if( p && p->GetId() == SBX_HINT_DYING ) { xAlias.Clear(); |