summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2012-12-09 22:34:32 +0100
committerTomaž Vajngerl <quikee@gmail.com>2012-12-09 22:43:06 +0100
commitfdb7fe63db5ba17036a71fe4f7f25f834bef8f95 (patch)
treea5380ca6f87e27022781dbe236ea7fd4e5880941 /sc
parent38364f5adc77c516721ad26297562d0b1bb66b8d (diff)
Compress graphics dialog converted to new widget layout.
Change-Id: Iff1ffba10c5aaf3d438acf0a69467a0ac9e0f7cf
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index d8f1a7143a64..edc9445f7dd4 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -226,18 +226,14 @@ void ScGraphicShell::ExecuteCompressGraphic( SfxRequest& )
if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP )
{
- GraphicObject aGraphicObject( ( (SdrGrafObj*) pObj )->GetGraphicObject() );
- CompressGraphicsDialog dialog( GetViewData()->GetDialogParent(), aGraphicObject.GetGraphic(), pObj->GetLogicRect().GetSize(), GetViewData()->GetBindings() );
+ SdrGrafObj* pGraphicObj = (SdrGrafObj*) pObj;
+ CompressGraphicsDialog dialog( GetViewData()->GetDialogParent(), pGraphicObj, GetViewData()->GetBindings() );
if ( dialog.Execute() == RET_OK )
{
- SdrGrafObj* pNewObject = (SdrGrafObj*) pObj->Clone();
- const Graphic aNewGraphic = dialog.GetCompressedGraphic();
+ SdrGrafObj* pNewObject = dialog.GetCompressedSdrGrafObj();
SdrPageView* pPageView = pView->GetSdrPageView();
- pNewObject->SetEmptyPresObj( sal_False );
- pNewObject->SetGraphic( aNewGraphic );
String aUndoString( pView->GetDescriptionOfMarkedObjects() );
- aUndoString += (sal_Unicode) ' ';
- aUndoString += String( "Compress" );
+ aUndoString += String( " Compress" );
pView->BegUndo( aUndoString );
pView->ReplaceObjectAtView( pObj, *pPageView, pNewObject );
pView->EndUndo();