diff options
Diffstat (limited to 'sw/source/filter/ww8/wrtw8esh.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index ecd54e861087..49fe80b9a625 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1344,8 +1344,8 @@ sal_Int32 SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) OpenContainer( ESCHER_SpContainer ); AddShape(ESCHER_ShpInst_PictureFrame, 0xa00,0x401); EscherPropertyContainer aPropOpt; - GraphicObject aGraphicObject( rGrf ); - OString aUniqueId = aGraphicObject.GetUniqueID(); + rtl::Reference<GraphicObject> xGraphicObject = GraphicObject::Create( rGrf ); + OString aUniqueId = xGraphicObject->GetUniqueID(); if ( !aUniqueId.isEmpty() ) { const MapMode aMap100mm( MAP_100TH_MM ); @@ -1431,8 +1431,8 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh pGrfNd->SwapIn(true); Graphic aGraphic(pGrfNd->GetGrf()); - GraphicObject aGraphicObject( aGraphic ); - OString aUniqueId = aGraphicObject.GetUniqueID(); + rtl::Reference<GraphicObject> xGraphicObject = GraphicObject::Create( aGraphic ); + OString aUniqueId = xGraphicObject->GetUniqueID(); if (!aUniqueId.isEmpty()) { @@ -1639,12 +1639,13 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush, { bool bSetOpacity = false; sal_uInt32 nOpaque = 0; - if (const GraphicObject *pGraphicObject = rBrush.GetGraphicObject()) + rtl::Reference<GraphicObject> xGraphicObject = rBrush.GetGraphicObject(); + if(xGraphicObject.is()) { - OString aUniqueId = pGraphicObject->GetUniqueID(); + OString aUniqueId = xGraphicObject->GetUniqueID(); if (!aUniqueId.isEmpty()) { - const Graphic &rGraphic = pGraphicObject->GetGraphic(); + const Graphic &rGraphic = xGraphicObject->GetGraphic(); Size aSize(rGraphic.GetPrefSize()); const MapMode aMap100mm(MAP_100TH_MM); if (MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit()) @@ -1667,7 +1668,7 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush, rPropOpt.AddOpt(ESCHER_Prop_fillBlip,nBlibId,sal_True); } - if (0 != (nOpaque = pGraphicObject->GetAttr().GetTransparency())) + if (0 != (nOpaque = xGraphicObject->GetAttr().GetTransparency())) bSetOpacity = true; rPropOpt.AddOpt( ESCHER_Prop_fillType, ESCHER_FillPicture ); @@ -2813,8 +2814,8 @@ void SwBasicEscherEx::WriteOLEPicture(EscherPropertyContainer &rPropOpt, //nShapeFlags == 0xA00 + flips and ole active AddShape(ESCHER_ShpInst_PictureFrame, nShapeFlags, nShapeId); - GraphicObject aGraphicObject(rGraphic); - OString aId = aGraphicObject.GetUniqueID(); + rtl::Reference<GraphicObject> xGraphicObject = GraphicObject::Create(rGraphic); + OString aId = xGraphicObject->GetUniqueID(); if (!aId.isEmpty()) { Rectangle aRect = rObj.GetLogicRect(); |