summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-05 08:37:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-06 13:08:26 +0100
commitbd37588605f7773d41b5388b18952e5c90f12214 (patch)
tree498116ae9376e7671bf0441e476dad16f2bd197e /sd
parent4474d167e1b69ab9ca8a97c636f0400a5084641a (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')
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineView.cxx3
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx5
-rw-r--r--sd/source/ui/view/drviews6.cxx9
3 files changed, 7 insertions, 10 deletions
diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
index 60edcdadf92e..963a9ba3c5ac 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
@@ -63,8 +63,7 @@ AccessibleOutlineView::AccessibleOutlineView (
return;
OutlinerView* pOutlineView = pShellView->GetViewByWindow( pSdWindow );
- SdrOutliner& rOutliner =
- static_cast< ::sd::OutlineView*>(pView)->GetOutliner();
+ SdrOutliner& rOutliner = pShellView->GetOutliner();
if( pOutlineView )
{
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 )
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 6d96270be42a..7c34a560ccad 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -326,12 +326,9 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
// valid graphic object?
- if( dynamic_cast< const SdrGrafObj *>( pObj ) &&
- !static_cast<const SdrGrafObj*>(pObj)->IsEPS() &&
- !mpDrawView->IsTextEdit() )
- {
- bEnable = true;
- }
+ if( auto pGrafObj = dynamic_cast< const SdrGrafObj *>( pObj ) )
+ if (!pGrafObj->IsEPS() && !mpDrawView->IsTextEdit() )
+ bEnable = true;
// put value
rSet.Put( SfxBoolItem( SID_BMPMASK_EXEC, bEnable ) );