diff options
Diffstat (limited to 'svx/source/customshapes/EnhancedCustomShape2d.cxx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 2386b5887d8f..f2a00feaad80 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1980,7 +1980,10 @@ void EnhancedCustomShape2d::CreateSubPath( { basegfx::B2DPolyPolygon aClosedPolyPolygon(aNewB2DPolyPolygon); aClosedPolyPolygon.setClosed(true); - SdrPathObj* pFill = new SdrPathObj(OBJ_POLY, aClosedPolyPolygon); + SdrPathObj* pFill = new SdrPathObj( + mrSdrObjCustomShape.getSdrModelFromSdrObject(), + OBJ_POLY, + aClosedPolyPolygon); SfxItemSet aTempSet(*this); aTempSet.Put(makeSdrShadowItem(false)); aTempSet.Put(XLineStyleItem(drawing::LineStyle_NONE)); @@ -1995,6 +1998,7 @@ void EnhancedCustomShape2d::CreateSubPath( // to correct the polygon (here: open it) using the type, the last edge may get lost. // Thus, use a type that fits the polygon SdrPathObj* pStroke = new SdrPathObj( + mrSdrObjCustomShape.getSdrModelFromSdrObject(), aNewB2DPolyPolygon.isClosed() ? OBJ_POLY : OBJ_PLIN, aNewB2DPolyPolygon); SfxItemSet aTempSet(*this); @@ -2014,6 +2018,7 @@ void EnhancedCustomShape2d::CreateSubPath( { // see comment above about OBJ_PLIN pObj = new SdrPathObj( + mrSdrObjCustomShape.getSdrModelFromSdrObject(), aNewB2DPolyPolygon.isClosed() ? OBJ_POLY : OBJ_PLIN, aNewB2DPolyPolygon); aTempSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); @@ -2021,7 +2026,10 @@ void EnhancedCustomShape2d::CreateSubPath( else { aNewB2DPolyPolygon.setClosed(true); - pObj = new SdrPathObj(OBJ_POLY, aNewB2DPolyPolygon); + pObj = new SdrPathObj( + mrSdrObjCustomShape.getSdrModelFromSdrObject(), + OBJ_POLY, + aNewB2DPolyPolygon); } if(bNoStroke) @@ -2372,7 +2380,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) // copy remaining objects to pRet if(vObjectList.size() > 1) { - pRet = new SdrObjGroup; + pRet = new SdrObjGroup(mrSdrObjCustomShape.getSdrModelFromSdrObject()); for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList ) { @@ -2404,7 +2412,7 @@ SdrObject* EnhancedCustomShape2d::CreateObject( bool bLineGeometryNeededOnly ) if ( eSpType == mso_sptRectangle ) { - pRet = new SdrRectObj( aLogicRect ); + pRet = new SdrRectObj(mrSdrObjCustomShape.getSdrModelFromSdrObject(), aLogicRect); pRet->SetMergedItemSet( *this ); } if ( !pRet ) |