diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-05 08:37:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-06 13:08:26 +0100 |
commit | bd37588605f7773d41b5388b18952e5c90f12214 (patch) | |
tree | 498116ae9376e7671bf0441e476dad16f2bd197e /sd/source/ui/unoidl | |
parent | 4474d167e1b69ab9ca8a97c636f0400a5084641a (diff) |
loplugin:staticdynamic look for static after dynamic
Change-Id: Ic3066d9a9441e369370cc6aa0fbffb9a321bc928
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111985
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r-- | sd/source/ui/unoidl/unoobj.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 4b27bd429af0..fdedfb6dcc35 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -898,8 +898,9 @@ void SdXShape::SetEmptyPresObj(bool bEmpty) // really delete SdrOutlinerObj at pObj pObj->NbcSetOutlinerParaObject(nullptr); - if( bVertical && dynamic_cast<SdrTextObj*>( pObj ) ) - static_cast<SdrTextObj*>(pObj)->SetVerticalWriting( true ); + if( bVertical ) + if (auto pTextObj = dynamic_cast<SdrTextObj*>( pObj ) ) + pTextObj->SetVerticalWriting( true ); SdrGrafObj* pGraphicObj = dynamic_cast<SdrGrafObj*>( pObj ); if( pGraphicObj ) |