summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-02 09:41:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-02 12:24:00 +0100
commit068d4108e5ae41ca5bc2bcf22277e6235c6bdd0b (patch)
tree4139d3418c7c72d5126f64e59e192cac3e74c7ee /vbahelper
parente763e13873adfe3c6abfa4c2dfd3ac3847e2d494 (diff)
loplugin:redundantcast catch more dynamic_cast
Change-Id: Ia28e58217cefa306567b53688d851fa210b7821c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110287 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index bfa345c7f3bc..7859c84018c2 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -178,15 +178,14 @@ uno::Reference< frame::XModel >
getCurrentDoc( const OUString& sKey )
{
uno::Reference< frame::XModel > xModel;
- SbxObject* pBasic = dynamic_cast< SbxObject* > ( SfxApplication::GetBasic() );
- SbxObject* basicChosen = pBasic ;
- if ( basicChosen == nullptr)
+ StarBASIC* pBasic = SfxApplication::GetBasic();
+ if (pBasic == nullptr)
{
SAL_INFO("vbahelper", "getModelFromBasic() StarBASIC* is NULL" );
return xModel;
}
- SbxObject* p = pBasic;
- SbxObject* pParent = p->GetParent();
+ SbxObject* basicChosen = pBasic;
+ SbxObject* pParent = pBasic->GetParent();
SbxObject* pParentParent = pParent ? pParent->GetParent() : nullptr;
if( pParentParent )