diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-29 13:33:02 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-01 13:08:41 +0200 |
commit | fa537124ac2ead40c4cba7f4ce298a1982db7d84 (patch) | |
tree | 9f17602f29c9179648ba5117af394c5ed0f8efb1 /basic/source/runtime/methods.cxx | |
parent | 99bb7d664ef6c809ff6478fe2335c8a4a00e141b (diff) |
loplugin: cstylecast
Change-Id: Ie3d13eccdf444d569cbe40befb45eb86941160b6
Diffstat (limited to 'basic/source/runtime/methods.cxx')
-rw-r--r-- | basic/source/runtime/methods.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 53880946bde8..4c6c87779967 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -4410,16 +4410,16 @@ RTLFUNC(Load) } - SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); + SbxBase* pObj = static_cast<SbxObject*>(rPar.Get(1)->GetObject()); if ( pObj ) { if( pObj->IsA( TYPE( SbUserFormModule ) ) ) { - ((SbUserFormModule*)pObj)->Load(); + static_cast<SbUserFormModule*>(pObj)->Load(); } else if( pObj->IsA( TYPE( SbxObject ) ) ) { - SbxVariable* pVar = ((SbxObject*)pObj)->Find( OUString("Load"), SbxCLASS_METHOD ); + SbxVariable* pVar = static_cast<SbxObject*>(pObj)->Find( OUString("Load"), SbxCLASS_METHOD ); if( pVar ) { pVar->GetInteger(); @@ -4441,17 +4441,17 @@ RTLFUNC(Unload) } - SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); + SbxBase* pObj = static_cast<SbxObject*>(rPar.Get(1)->GetObject()); if ( pObj ) { if( pObj->IsA( TYPE( SbUserFormModule ) ) ) { - SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; + SbUserFormModule* pFormModule = static_cast<SbUserFormModule*>(pObj); pFormModule->Unload(); } else if( pObj->IsA( TYPE( SbxObject ) ) ) { - SbxVariable* pVar = ((SbxObject*)pObj)->Find( OUString("Unload"), SbxCLASS_METHOD ); + SbxVariable* pVar = static_cast<SbxObject*>(pObj)->Find( OUString("Unload"), SbxCLASS_METHOD ); if( pVar ) { pVar->GetInteger(); @@ -4480,7 +4480,7 @@ RTLFUNC(LoadPicture) Graphic aGraphic(aBmp); SbxObjectRef xRef = new SbStdPicture; - ((SbStdPicture*)(SbxObject*)xRef)->SetGraphic( aGraphic ); + static_cast<SbStdPicture*>((SbxObject*)xRef)->SetGraphic( aGraphic ); rPar.Get(0)->PutObject( xRef ); } } @@ -4497,11 +4497,11 @@ RTLFUNC(SavePicture) return; } - SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); + SbxBase* pObj = static_cast<SbxObject*>(rPar.Get(1)->GetObject()); if( pObj->IsA( TYPE( SbStdPicture ) ) ) { SvFileStream aOStream( rPar.Get(2)->GetOUString(), STREAM_WRITE | STREAM_TRUNC ); - Graphic aGraphic = ((SbStdPicture*)pObj)->GetGraphic(); + Graphic aGraphic = static_cast<SbStdPicture*>(pObj)->GetGraphic(); WriteGraphic( aOStream, aGraphic ); } } |