summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-08 13:33:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-08 14:38:15 +0200
commit3afb514362a2ce2701628256fa96d4a5324433d6 (patch)
tree914e6c3b6a37f66543db8515b1031ae65a230b63 /filter
parent73c8bd42650dafc38c87b5e6dc1ef222d4f6175c (diff)
simplify static_cast after dynamic_cast
Change-Id: I53ae7f18519fdd878730d1d0316ebc408271c66d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/escherex.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 865df7c292b4..95b8b27c48d3 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2582,12 +2582,13 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
if ( !aXPropSet.is() )
return;
- if(nullptr == dynamic_cast< SdrObjCustomShape* >(SdrObject::getSdrObjectFromXShape(rXShape)))
+ SdrObjCustomShape* pSdrObjCustomShape = dynamic_cast< SdrObjCustomShape* >(SdrObject::getSdrObjectFromXShape(rXShape));
+ if(!pSdrObjCustomShape)
{
return;
}
- SdrObjCustomShape& rSdrObjCustomShape(static_cast< SdrObjCustomShape& >(*SdrObject::getSdrObjectFromXShape(rXShape)));
+ SdrObjCustomShape& rSdrObjCustomShape = *pSdrObjCustomShape;
uno::Any aGeoPropSet = aXPropSet->getPropertyValue( "CustomShapeGeometry" );
uno::Sequence< beans::PropertyValue > aGeoPropSeq;
if ( !(aGeoPropSet >>= aGeoPropSeq) )