summaryrefslogtreecommitdiff
path: root/filter/source/msfilter/escherex.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-01-10 13:58:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-10 14:59:31 +0100
commit8f453c674f19188360ba5895c2bd9bd80273a83b (patch)
treece569bb8caeaea0b110e1e23e845716cb841588f /filter/source/msfilter/escherex.cxx
parentc5367ee0a60966b755e726de6d175dfcd1630741 (diff)
static_cast after dynamic_cast
Change-Id: I3792ddadad9582a7e6f4740829c081d9571ddaff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109049 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/msfilter/escherex.cxx')
-rw-r--r--filter/source/msfilter/escherex.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index bde712649af4..1cc14d87ff83 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4518,13 +4518,10 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
if (aType == "drawing.Custom")
{
- const bool bIsSdrObjCustomShape(nullptr != dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(aXShape)));
-
- if(bIsSdrObjCustomShape)
+ if (auto pSdrObjCustomShape = dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(aXShape)))
{
- SdrObjCustomShape& rSdrObjCustomShape(static_cast< SdrObjCustomShape& >(*GetSdrObjectFromXShape(aXShape)));
const SdrCustomShapeGeometryItem& rGeometryItem =
- rSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
+ pSdrObjCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
OUString sShapeType;
const uno::Any* pType = rGeometryItem.GetPropertyValueByName( "Type" );
@@ -4541,7 +4538,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
if ( nGluePointType == drawing::EnhancedCustomShapeGluePointType::CUSTOM )
{
- const SdrGluePointList* pList = rSdrObjCustomShape.GetGluePointList();
+ const SdrGluePointList* pList = pSdrObjCustomShape->GetGluePointList();
if ( pList )
{
tools::Polygon aPoly;
@@ -4551,7 +4548,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
for ( nNum = 0; nNum < nCnt; nNum++ )
{
const SdrGluePoint& rGP = (*pList)[ nNum ];
- Point aPt(rGP.GetAbsolutePos(rSdrObjCustomShape));
+ Point aPt(rGP.GetAbsolutePos(*pSdrObjCustomShape));
aPoly.Insert( POLY_APPEND, aPt );
}
nRule = GetClosestPoint( aPoly, aRefPoint );
@@ -4562,7 +4559,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
else if ( nGluePointType == drawing::EnhancedCustomShapeGluePointType::SEGMENTS )
{
tools::PolyPolygon aPolyPoly;
- SdrObjectUniquePtr pTemporaryConvertResultObject(rSdrObjCustomShape.DoConvertToPolyObj(true, true));
+ SdrObjectUniquePtr pTemporaryConvertResultObject(pSdrObjCustomShape->DoConvertToPolyObj(true, true));
SdrPathObj* pSdrPathObj(dynamic_cast< SdrPathObj* >(pTemporaryConvertResultObject.get()));
if(pSdrPathObj)