diff options
Diffstat (limited to 'sc/source/ui/drawfunc/graphsh.cxx')
-rw-r--r-- | sc/source/ui/drawfunc/graphsh.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 6276575cd712..9b295b685266 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -59,7 +59,7 @@ public: aStr.Append( sal_Unicode(' ') ); aStr.Append( String( "External Edit" ) ); m_pView->BegUndo( aStr ); - pNewObj->SetGraphicObject( aGraphic ); + pNewObj->SetGraphicObject( GraphicObject::Create(aGraphic) ); m_pView->ReplaceObjectAtView( m_pObj, *pPageView, pNewObj ); m_pView->EndUndo(); } @@ -135,10 +135,10 @@ void ScGraphicShell::ExecuteFilter( SfxRequest& rReq ) if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) { - GraphicObject aFilterObj( ( (SdrGrafObj*) pObj )->GetGraphicObject() ); + Graphic* pFilterObj = new Graphic( ( (SdrGrafObj*) pObj )->GetGraphicObject()->GetGraphic() ); if( SVX_GRAPHICFILTER_ERRCODE_NONE == - SvxGraphicFilter::ExecuteGrfFilterSlot( rReq, aFilterObj ) ) + SvxGraphicFilter::ExecuteGrfFilterSlot( rReq, &pFilterObj ) ) { SdrPageView* pPageView = pView->GetSdrPageView(); @@ -150,11 +150,12 @@ void ScGraphicShell::ExecuteFilter( SfxRequest& rReq ) aStr.Append( sal_Unicode(' ') ); aStr.Append( String( ScResId( SCSTR_UNDO_GRAFFILTER ) ) ); pView->BegUndo( aStr ); - pFilteredObj->SetGraphicObject( aFilterObj ); + pFilteredObj->SetGraphicObject( GraphicObject::Create(*pFilterObj )); pView->ReplaceObjectAtView( pObj, *pPageView, pFilteredObj ); pView->EndUndo(); } } + delete pFilterObj; } } @@ -189,9 +190,9 @@ void ScGraphicShell::ExecuteExternalEdit( SfxRequest& ) if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) { - GraphicObject aGraphicObject( ( (SdrGrafObj*) pObj )->GetGraphicObject() ); + rtl::Reference<GraphicObject> xGraphicObject = ( (SdrGrafObj*) pObj )->GetGraphicObject(); ScExternalToolEdit* aExternalToolEdit = new ScExternalToolEdit( pView, pObj ); - aExternalToolEdit->Edit( &aGraphicObject ); + aExternalToolEdit->Edit( xGraphicObject ); } } |