diff options
Diffstat (limited to 'sd/source/ui/func/fuconbez.cxx')
-rw-r--r-- | sd/source/ui/func/fuconbez.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index 28aadb7c3da8..ebc57cb87ebc 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -298,7 +298,7 @@ void FuConstructBezierPolygon::SetEditMode(sal_uInt16 nMode) rBindings.Invalidate(SID_BEZIER_INSERT); } -SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) +SdrObjectUniquePtr FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { // case SID_DRAW_POLYGON: // case SID_DRAW_POLYGON_NOFILL: @@ -309,14 +309,14 @@ SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, c // case SID_DRAW_BEZIER_FILL: // BASIC // case SID_DRAW_BEZIER_NOFILL: // BASIC - SdrObject* pObj = SdrObjFactory::MakeNewObject( + SdrObjectUniquePtr pObj(SdrObjFactory::MakeNewObject( mpView->getSdrModelFromSdrView(), mpView->GetCurrentObjInventor(), - mpView->GetCurrentObjIdentifier()); + mpView->GetCurrentObjIdentifier())); if(pObj) { - if( dynamic_cast< const SdrPathObj *>( pObj ) != nullptr) + if( auto pPathObj = dynamic_cast< SdrPathObj *>( pObj.get() ) ) { basegfx::B2DPolyPolygon aPoly; @@ -435,7 +435,7 @@ SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, c } } - static_cast<SdrPathObj*>(pObj)->SetPathPoly(aPoly); + pPathObj->SetPathPoly(aPoly); } else { |