diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-09-27 16:39:56 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-09-27 16:39:56 +0200 |
commit | 134741211d5c95a1a0ef07e13eb4846c62adce22 (patch) | |
tree | 9b220785f4b9f5e0775ef848e76ea9ff08a1acfb /sc/source/ui/drawfunc/graphsh.cxx | |
parent | 0854f0566c5d18b919b76df10b4bbd5a3606b7d6 (diff) |
Save Commit: must be squashed!!! ObjectGraphic refactor
Change-Id: I69f0b8bef3a08d1a325ccbe2b5f128df9cc14880
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 ); } } |