summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drbezob.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-13 11:02:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-13 12:47:38 +0200
commit1374f5fdcbbd24b9ba614b378fd94f5ff95ad102 (patch)
treea47982a70463150dced3c7c1a7d13c669febd681 /sd/source/ui/view/drbezob.cxx
parent97b7b6030a6cf5b28ae0c1f61f7f55167b82dab6 (diff)
static_cast after dynamic_cast
Change-Id: I53e10fbebfd07c471ddd9b264562317251700500 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104225 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/drbezob.cxx')
-rw-r--r--sd/source/ui/view/drbezob.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index 2ab2bc56be3f..c84489042672 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -88,14 +88,14 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
if(xFunc.is())
{
- if( nullptr != dynamic_cast< const FuSelection *>( xFunc.get() ))
+ if( auto pFuSelection = dynamic_cast< const FuSelection *>( xFunc.get() ))
{
- sal_uInt16 nEditMode = static_cast<FuSelection*>(xFunc.get())->GetEditMode();
+ sal_uInt16 nEditMode = pFuSelection->GetEditMode();
rSet.Put(SfxBoolItem(nEditMode, true));
}
- else if( nullptr != dynamic_cast< const FuConstructBezierPolygon *>( xFunc.get() ))
+ else if( auto pFuPolygon = dynamic_cast< const FuConstructBezierPolygon *>( xFunc.get() ))
{
- sal_uInt16 nEditMode = static_cast<FuConstructBezierPolygon*>(xFunc.get())->GetEditMode();
+ sal_uInt16 nEditMode = pFuPolygon->GetEditMode();
rSet.Put(SfxBoolItem(nEditMode, true));
}
}
@@ -294,13 +294,13 @@ void BezierObjectBar::Execute(SfxRequest& rReq)
if(xFunc.is())
{
- if( nullptr != dynamic_cast< const FuSelection *>( xFunc.get() ))
+ if( auto pFuSelection = dynamic_cast<FuSelection *>( xFunc.get() ))
{
- static_cast<FuSelection*>(xFunc.get())->SetEditMode(rReq.GetSlot());
+ pFuSelection->SetEditMode(rReq.GetSlot());
}
- else if( nullptr != dynamic_cast< const FuConstructBezierPolygon *>( xFunc.get() ))
+ else if( auto pFuPolygon = dynamic_cast<FuConstructBezierPolygon *>( xFunc.get() ))
{
- static_cast<FuConstructBezierPolygon*>(xFunc.get())->SetEditMode(rReq.GetSlot());
+ pFuPolygon->SetEditMode(rReq.GetSlot());
}
}