[Libreoffice-commits] .: Branch 'libreoffice-4-0' - sc/source sd/source svx/AllLangResTarget_svx.mk svx/inc svx/Module_svx.mk svx/source svx/uiconfig svx/UI_svx.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Dec 16 10:30:21 PST 2012


 sc/source/ui/drawfunc/graphsh.cxx           |   12 
 sd/source/ui/view/drviews2.cxx              |   27 -
 svx/AllLangResTarget_svx.mk                 |    1 
 svx/Module_svx.mk                           |    1 
 svx/UI_svx.mk                               |   16 
 svx/inc/svx/compressgraphicdialog.hxx       |   58 +-
 svx/source/dialog/compressgraphicdialog.cxx |  235 ++++++----
 svx/source/dialog/compressgraphicdialog.hrc |   55 --
 svx/source/dialog/compressgraphicdialog.src |  272 ------------
 svx/uiconfig/ui/compressgraphicdialog.ui    |  630 ++++++++++++++++++++++++++++
 10 files changed, 822 insertions(+), 485 deletions(-)

New commits:
commit e7453c4f1ae0b0d6fc695e665fd271b53e0cc90f
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Sun Dec 16 19:29:20 2012 +0100

    Compress graphics dialog converted to new widget layout.
    
    Change-Id: Ibcf6338f33c40fbe6682a843b4771d51ea5a6845

diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index d8f1a71..edc9445 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();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 1ac1f0d..30ac765 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1017,25 +1017,20 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             if( rMarkList.GetMarkCount() == 1 )
             {
                 SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
+
                 if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP )
                 {
-                    GraphicObject aGraphicObject( ( (SdrGrafObj*) pObj )->GetGraphicObject() );
+                    SdrGrafObj* pGraphicObj = (SdrGrafObj*) pObj;
+                    CompressGraphicsDialog dialog( GetParentWindow(), pGraphicObj, GetViewFrame()->GetBindings() );
+                    if ( dialog.Execute() == RET_OK )
                     {
-                        CompressGraphicsDialog dialog( GetParentWindow(), aGraphicObject.GetGraphic(), pObj->GetLogicRect().GetSize(), GetViewFrame()->GetBindings() );
-                        if ( dialog.Execute() == RET_OK )
-                        {
-                            SdrGrafObj* pNewObject = (SdrGrafObj*) pObj->Clone();
-                            const Graphic aNewGraphic = dialog.GetCompressedGraphic();
-                            SdrPageView* pPageView = mpDrawView->GetSdrPageView();
-                            pNewObject->SetEmptyPresObj( sal_False );
-                            pNewObject->SetGraphic( aNewGraphic );
-                            String aUndoString( mpDrawView->GetDescriptionOfMarkedObjects() );
-                            aUndoString += (sal_Unicode) ( ' ' );
-                            aUndoString += String( "Compress" );
-                            mpDrawView->BegUndo( aUndoString );
-                            mpDrawView->ReplaceObjectAtView( pObj, *pPageView, pNewObject );
-                            mpDrawView->EndUndo();
-                        }
+                        SdrGrafObj* pNewObject = dialog.GetCompressedSdrGrafObj();
+                        SdrPageView* pPageView = mpDrawView->GetSdrPageView();
+                        String aUndoString( mpDrawView->GetDescriptionOfMarkedObjects() );
+                        aUndoString += String( " Compress" );
+                        mpDrawView->BegUndo( aUndoString );
+                        mpDrawView->ReplaceObjectAtView( pObj, *pPageView, pNewObject );
+                        mpDrawView->EndUndo();
                     }
                 }
             }
diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk
index 5f8b5b6..c996c3a 100644
--- a/svx/AllLangResTarget_svx.mk
+++ b/svx/AllLangResTarget_svx.mk
@@ -51,7 +51,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
     svx/source/dialog/bmpmask.src \
     svx/source/dialog/contdlg.src \
     svx/source/dialog/ctredlin.src \
-    svx/source/dialog/compressgraphicdialog.src \
     svx/source/dialog/dlgctrl.src \
     svx/source/dialog/docrecovery.src \
     svx/source/dialog/fontwork.src \
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 640e863..d5aceb8 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Module_add_targets,svx,\
     Package_globlmn_hrc \
     Package_inc \
     Package_sdi \
+    UI_svx \
 ))
 
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
diff --git a/svx/UI_svx.mk b/svx/UI_svx.mk
new file mode 100644
index 0000000..ae1ccf8
--- /dev/null
+++ b/svx/UI_svx.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UI_UI,svx))
+
+$(eval $(call gb_UI_add_uifiles,svx,\
+	svx/uiconfig/ui/compressgraphicdialog \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svx/inc/svx/compressgraphicdialog.hxx b/svx/inc/svx/compressgraphicdialog.hxx
index d535b98..20d15ab 100644
--- a/svx/inc/svx/compressgraphicdialog.hxx
+++ b/svx/inc/svx/compressgraphicdialog.hxx
@@ -27,46 +27,37 @@
 #include <sfx2/bindings.hxx>
 #include "svx/svxdllapi.h"
 
+class SdrGrafObj;
+
 class SVX_DLLPUBLIC CompressGraphicsDialog : public ModalDialog
 {
 private:
-    FixedLine       m_aImageDetailsFL;
-    FixedText       m_aFixedText2X;
-    FixedText       m_aFixedText2;
-    FixedText       m_aFixedText3X;
-    FixedText       m_aFixedText3;
-    FixedText       m_aFixedText5X;
-    FixedText       m_aFixedText5;
-    FixedText       m_aFixedText6X;
-    FixedText       m_aFixedText6;
-
-    FixedLine       m_aSettingsFL;
-    CheckBox        m_aReduceResolutionCB;
-    FixedText       m_aNewWidthFT;
-    MetricField     m_aMFNewWidth;
-    FixedText       m_aNewHeightFT;
-    MetricField     m_aMFNewHeight;
-    FixedText       m_aResolutionFT;
-    ComboBox        m_aResolutionLB;
-    FixedText       m_aFixedTextDPI;
-    RadioButton     m_aLosslessRB;
-    RadioButton     m_aJpegCompRB;
-    FixedText       m_aCompressionFT;
-    MetricField     m_aCompressionMF;
-    FixedText       m_aQualityFT;
-    MetricField     m_aQualityMF;
-    CheckBox        m_aCropCB;
-    OKButton        m_aBtnOK;
-    CancelButton    m_aBtnCancel;
-    HelpButton      m_aBtnHelp;
-    PushButton      m_aBtnCalculate;
+    FixedText*       m_pFixedText2;
+    FixedText*       m_pFixedText3;
+    FixedText*       m_pFixedText5;
+    FixedText*       m_pFixedText6;
+
+    CheckBox*        m_pReduceResolutionCB;
+    NumericField*    m_pMFNewWidth;
+    NumericField*    m_pMFNewHeight;
+    ComboBox*        m_pResolutionLB;
+    RadioButton*     m_pLosslessRB;
+    RadioButton*     m_pJpegCompRB;
+    NumericField*    m_pCompressionMF;
+    NumericField*    m_pQualityMF;
+    PushButton*      m_pBtnCalculate;
+    ListBox*         m_pInterpolationCombo;
 
+    SdrGrafObj*     m_pGraphicObj;
     Graphic         m_aGraphic;
     Size            m_aViewSize100mm;
+    Rectangle       m_aCropRectangle;
     SfxBindings&    m_rBindings;
 
     double          m_dResolution;
 
+    void Initialize();
+
     DECL_LINK( NewWidthModifiedHdl, void* );
     DECL_LINK( NewHeightModifiedHdl, void* );
     DECL_LINK( ResolutionModifiedHdl, void* );
@@ -82,15 +73,16 @@ private:
 
     void Compress(SvStream& aStream);
 
-
     double GetViewWidthInch();
     double GetViewHeightInch();
 
+    sal_uLong GetSelectedInterpolationType();
+
 public:
-    CompressGraphicsDialog( Window* pParent, const Graphic& rGraphic, const Size& rViewSize100mm, SfxBindings& rBindings );
+    CompressGraphicsDialog( Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings );
     virtual ~CompressGraphicsDialog();
 
-    Graphic GetCompressedGraphic();
+    SdrGrafObj* GetCompressedSdrGrafObj();
 };
 
 #endif
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 37db8f5..7232936 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -17,81 +17,77 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <svx/dialogs.hrc>
-#include <svx/dialmgr.hxx>
-#include <vcl/graph.hxx>
-#include <compressgraphicdialog.hrc>
-#include <svx/compressgraphicdialog.hxx>
 #include <dlgunit.hxx>
+#include <vcl/graph.hxx>
 #include <vcl/virdev.hxx>
-#include <sfx2/dispatch.hxx>
 #include <vcl/svapp.hxx>
-#include <comphelper/processfactory.hxx>
+#include <svx/svdograf.hxx>
+#include <svx/sdgcpitm.hxx>
+#include <svx/dialmgr.hxx>
+#include <svx/compressgraphicdialog.hxx>
 #include <svtools/filter.hxx>
+#include <sfx2/dispatch.hxx>
+#include <comphelper/processfactory.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::beans;
 
-CompressGraphicsDialog::CompressGraphicsDialog( Window* pParent, const Graphic& rGraphic, const Size& rViewSize100mm, SfxBindings& rBindings ) :
-    ModalDialog             ( pParent, SVX_RES( RID_SVXDLG_COMPRESSGRAPHICS ) ),
-    m_aImageDetailsFL       ( this,    SVX_RES( FL_IMAGE_DETAILS ) ),
-    m_aFixedText2X          ( this,    SVX_RES( FT_CG_2_X ) ),
-    m_aFixedText2           ( this,    SVX_RES( FT_CG_2 ) ),
-    m_aFixedText3X          ( this,    SVX_RES( FT_CG_3_X ) ),
-    m_aFixedText3           ( this,    SVX_RES( FT_CG_3 ) ),
-    m_aFixedText5X          ( this,    SVX_RES( FT_CG_5_X ) ),
-    m_aFixedText5           ( this,    SVX_RES( FT_CG_5 ) ),
-    m_aFixedText6X          ( this,    SVX_RES( FT_CG_6_X ) ),
-    m_aFixedText6           ( this,    SVX_RES( FT_CG_6 ) ),
-    m_aSettingsFL           ( this,    SVX_RES( FL_SETTINGS ) ),
-    m_aReduceResolutionCB   ( this,    SVX_RES( CB_REDUCE_IMAGE_RESOLUTION ) ),
-    m_aNewWidthFT           ( this,    SVX_RES( FT_NEW_WIDTH ) ),
-    m_aMFNewWidth           ( this,    SVX_RES( MF_NEW_WIDTH ) ),
-    m_aNewHeightFT          ( this,    SVX_RES( FT_NEW_HEIGHT ) ),
-    m_aMFNewHeight          ( this,    SVX_RES( MF_NEW_HEIGHT ) ),
-    m_aResolutionFT         ( this,    SVX_RES( FT_RESOLUTION ) ),
-    m_aResolutionLB         ( this,    SVX_RES( LB_RESOLUTION ) ),
-    m_aFixedTextDPI         ( this,    SVX_RES( FT_DPI ) ),
-    m_aLosslessRB           ( this,    SVX_RES( RB_LOSSLESS_COMPRESSION ) ),
-    m_aJpegCompRB           ( this,    SVX_RES( RB_JPEG_COMPRESSION ) ),
-    m_aCompressionFT        ( this,    SVX_RES( FT_COMPRESSION ) ),
-    m_aCompressionMF        ( this,    SVX_RES( MF_COMPRESSION_FACTOR ) ),
-    m_aQualityFT            ( this,    SVX_RES( FT_QUALITY ) ),
-    m_aQualityMF            ( this,    SVX_RES( MF_QUALITY_FACTOR ) ),
-    m_aCropCB               ( this,    SVX_RES( CB_CROP ) ),
-    m_aBtnOK                ( this,    SVX_RES( BUTTON_CG_OK ) ),
-    m_aBtnCancel            ( this,    SVX_RES( BUTTON_CG_CANCEL ) ),
-    m_aBtnHelp              ( this,    SVX_RES( BUTTON_CG_HELP ) ),
-    m_aBtnCalculate         ( this,    SVX_RES( BUTTON_CG_CALCULATE ) ),
-    m_aGraphic              ( rGraphic ),
-    m_aViewSize100mm        ( rViewSize100mm ),
-    m_rBindings             ( rBindings )
-{
-    FreeResource();
-
-    SetStyle(GetStyle() | WB_CENTER | WB_VCENTER);
-
-    m_aQualityMF.SetValue( 90L );
-    m_aCompressionMF.SetValue( 9L );
-
-    m_aMFNewWidth.SetModifyHdl( LINK( this, CompressGraphicsDialog, NewWidthModifiedHdl ));
-    m_aMFNewHeight.SetModifyHdl( LINK( this, CompressGraphicsDialog, NewHeightModifiedHdl ));
-
-    m_dResolution = 96.0;
-
-    m_aResolutionLB.SetModifyHdl( LINK( this, CompressGraphicsDialog, ResolutionModifiedHdl ));
-    m_aBtnCalculate.SetClickHdl(  LINK( this, CompressGraphicsDialog, CalculateClickHdl ) );
-
-    m_aLosslessRB.SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleCompressionRB ) );
-    m_aJpegCompRB.SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleCompressionRB ) );
-
-    m_aReduceResolutionCB.SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleReduceResolutionRB ) );
+#include <stdio.h>
 
+CompressGraphicsDialog::CompressGraphicsDialog( Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings ) :
+    ModalDialog       ( pParent, "CompressGraphicDialog", "svx/ui/compressgraphicdialog.ui" ),
+    m_pGraphicObj     ( pGraphicObj ),
+    m_aGraphic        ( pGraphicObj->GetGraphicObject().GetGraphic() ),
+    m_aViewSize100mm  ( pGraphicObj->GetLogicRect().GetSize() ),
+    m_aCropRectangle  ( Rectangle() ),
+    m_rBindings       ( rBindings ),
+    m_dResolution     ( 96.0 )
+{
+    Initialize();
+}
 
-    m_aLosslessRB.Check();
-    m_aReduceResolutionCB.Check();
+void CompressGraphicsDialog::Initialize()
+{
+    get(m_pFixedText2,          "label-original-size");
+    get(m_pFixedText3,          "label-view-size");
+    get(m_pFixedText5,          "label-image-capacity");
+    get(m_pFixedText6,          "label-new-capacity");
+    get(m_pJpegCompRB,          "radio-jpeg");
+    get(m_pCompressionMF,       "spin-compression");
+    get(m_pLosslessRB,          "radio-lossless");
+    get(m_pQualityMF,           "spin-quality");
+    get(m_pReduceResolutionCB,  "checkbox-reduce-resolution");
+    get(m_pMFNewWidth,          "spin-new-width");
+    get(m_pMFNewHeight,         "spin-new-height");
+    get(m_pResolutionLB,        "combo-resolution");
+    get(m_pBtnCalculate,        "calculate");
+    get(m_pInterpolationCombo,  "interpolation-method-combo");
+
+    m_pResolutionLB->InsertEntry(OUString("50"));
+    m_pResolutionLB->InsertEntry(OUString("75"));
+    m_pResolutionLB->InsertEntry(OUString("96"));
+    m_pResolutionLB->InsertEntry(OUString("150"));
+    m_pResolutionLB->InsertEntry(OUString("200"));
+    m_pResolutionLB->InsertEntry(OUString("300"));
+    m_pResolutionLB->InsertEntry(OUString("600"));
+
+    m_pInterpolationCombo->SelectEntry( OUString("Lanczos") );
+
+    m_pMFNewWidth->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewWidthModifiedHdl ));
+    m_pMFNewHeight->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewHeightModifiedHdl ));
+
+    m_pResolutionLB->SetModifyHdl( LINK( this, CompressGraphicsDialog, ResolutionModifiedHdl ));
+    m_pBtnCalculate->SetClickHdl(  LINK( this, CompressGraphicsDialog, CalculateClickHdl ) );
+
+    m_pLosslessRB->SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleCompressionRB ) );
+    m_pJpegCompRB->SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleCompressionRB ) );
+
+    m_pReduceResolutionCB->SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleReduceResolutionRB ) );
+
+    m_pJpegCompRB->Check();
+    m_pReduceResolutionCB->Check();
 
     UpdateNewWidthMF();
     UpdateNewHeightMF();
@@ -107,7 +103,7 @@ void CompressGraphicsDialog::Update()
 {
     const FieldUnit eFieldUnit = m_rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
     const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
-    sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
+    sal_Unicode cSeparator = rLocaleWrapper.getNumDecimalSep()[0];
 
     VirtualDevice* pDummyVDev = new VirtualDevice();
     pDummyVDev->EnableOutput( false );
@@ -117,27 +113,27 @@ void CompressGraphicsDialog::Update()
     Size aOriginalSize100mm( pDummyVDev->PixelToLogic( m_aGraphic.GetSizePixel(), MAP_100TH_MM ) );
 
     String aBitmapSizeString;
-    aBitmapSizeString += GetUnitString( aOriginalSize100mm.Width(), eFieldUnit, cSep );
+    aBitmapSizeString += GetUnitString( aOriginalSize100mm.Width(), eFieldUnit, cSeparator );
     aBitmapSizeString += String( " x " ) ;
-    aBitmapSizeString += GetUnitString( aOriginalSize100mm.Height(), eFieldUnit, cSep );
+    aBitmapSizeString += GetUnitString( aOriginalSize100mm.Height(), eFieldUnit, cSeparator );
     aBitmapSizeString += String( " ( " ) ;
     aBitmapSizeString += UniString::CreateFromInt32(aPixelSize.Width());
     aBitmapSizeString += String( " x " ) ;
     aBitmapSizeString += UniString::CreateFromInt32(aPixelSize.Height());
     aBitmapSizeString += String( " px )" ) ;
-    m_aFixedText2.SetText(aBitmapSizeString);
+    m_pFixedText2->SetText(aBitmapSizeString);
 
     String aViewSizeString;
 
     int aValX = (int) (aPixelSize.Width() / GetViewWidthInch());
 
-    aViewSizeString += GetUnitString( m_aViewSize100mm.Width(), eFieldUnit, cSep );
+    aViewSizeString += GetUnitString( m_aViewSize100mm.Width(), eFieldUnit, cSeparator );
     aViewSizeString += String( " x " ) ;
-    aViewSizeString += GetUnitString( m_aViewSize100mm.Height(), eFieldUnit, cSep );
+    aViewSizeString += GetUnitString( m_aViewSize100mm.Height(), eFieldUnit, cSeparator );
     aViewSizeString += ( " at " ) ;
     aViewSizeString += UniString::CreateFromInt32(aValX);
     aViewSizeString += ( " DPI" ) ;
-    m_aFixedText3.SetText(aViewSizeString);
+    m_pFixedText3->SetText(aViewSizeString);
 
     SvMemoryStream aMemStream;
     aMemStream.SetVersion( SOFFICE_FILEFORMAT_CURRENT );
@@ -149,25 +145,25 @@ void CompressGraphicsDialog::Update()
     aNativeSizeString += UniString::CreateFromInt32(aNativeSize / 1024);
     aNativeSizeString += String( " kiB" ) ;
 
-    m_aFixedText5.SetText(aNativeSizeString);
-    m_aFixedText6.SetText(String("??"));
+    m_pFixedText5->SetText(aNativeSizeString);
+    m_pFixedText6->SetText(String("??"));
 }
 
 void CompressGraphicsDialog::UpdateNewWidthMF()
 {
     int nPixelX = (sal_Int32)( GetViewWidthInch() * m_dResolution );
-    m_aMFNewWidth.SetText( UniString::CreateFromInt32( nPixelX ) );
+    m_pMFNewWidth->SetText( UniString::CreateFromInt32( nPixelX ) );
 }
 
 void CompressGraphicsDialog::UpdateNewHeightMF()
 {
     int nPixelY = (sal_Int32)( GetViewHeightInch() * m_dResolution );
-    m_aMFNewHeight.SetText( UniString::CreateFromInt32( nPixelY ) );
+    m_pMFNewHeight->SetText( UniString::CreateFromInt32( nPixelY ) );
 }
 
 void CompressGraphicsDialog::UpdateResolutionLB()
 {
-    m_aResolutionLB.SetText( UniString::CreateFromInt32( (sal_Int32) m_dResolution ) );
+    m_pResolutionLB->SetText( UniString::CreateFromInt32( (sal_Int32) m_dResolution ) );
 }
 
 double CompressGraphicsDialog::GetViewWidthInch()
@@ -180,15 +176,31 @@ double CompressGraphicsDialog::GetViewHeightInch()
     return (double) MetricField::ConvertValue(m_aViewSize100mm.Height(),  2, MAP_100TH_MM, FUNIT_INCH) / 100.0;
 }
 
-void CompressGraphicsDialog::Compress(SvStream& aStream)
+sal_uLong CompressGraphicsDialog::GetSelectedInterpolationType()
 {
-    long nPixelX = (long)( GetViewWidthInch() * m_dResolution );
-    long nPixelY = (long)( GetViewHeightInch() * m_dResolution );
+    OUString aSelectionText = OUString( m_pInterpolationCombo->GetSelectEntry() );
+
+    if( aSelectionText == "Lanczos" ) {
+        return BMP_SCALE_LANCZOS;
+    } else if( aSelectionText == "Bilinear" ) {
+        return BMP_SCALE_BILINEAR;
+    } else if( aSelectionText == "Bicubic" ) {
+        return BMP_SCALE_BICUBIC;
+    } else if ( aSelectionText == "None" ) {
+        return BMP_SCALE_FAST;
+    }
+    return BMP_SCALE_BEST;
+}
 
+void CompressGraphicsDialog::Compress(SvStream& aStream)
+{
     BitmapEx bitmap = m_aGraphic.GetBitmapEx();
-    if ( m_aReduceResolutionCB.IsChecked() )
+    if ( m_pReduceResolutionCB->IsChecked() )
     {
-        bitmap.Scale( Size( nPixelX, nPixelY ), BMP_SCALE_BEST );
+        long nPixelX = (long)( GetViewWidthInch() * m_dResolution );
+        long nPixelY = (long)( GetViewHeightInch() * m_dResolution );
+
+        bitmap.Scale( Size( nPixelX, nPixelY ), GetSelectedInterpolationType() );
     }
     Graphic aScaledGraphic = Graphic( bitmap );
     GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
@@ -197,11 +209,11 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
     aFilterData[ 0 ].Name = "Interlaced";
     aFilterData[ 0 ].Value <<= (sal_Int32) 0;
     aFilterData[ 1 ].Name = "Compression";
-    aFilterData[ 1 ].Value <<= (sal_Int32) m_aCompressionMF.GetValue();
+    aFilterData[ 1 ].Value <<= (sal_Int32) m_pCompressionMF->GetValue();
     aFilterData[ 2 ].Name = "Quality";
-    aFilterData[ 2 ].Value <<= (sal_Int32) m_aQualityMF.GetValue();
+    aFilterData[ 2 ].Value <<= (sal_Int32) m_pQualityMF->GetValue();
 
-    String aGraphicFormatName = m_aLosslessRB.IsChecked() ? String( "png" ) : String( "jpg" );
+    String aGraphicFormatName = m_pLosslessRB->IsChecked() ? String( "png" ) : String( "jpg" );
 
     sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( aGraphicFormatName );
     rFilter.ExportGraphic( aScaledGraphic, String( "test" ), aStream, nFilterFormat, &aFilterData );
@@ -209,7 +221,7 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
 
 IMPL_LINK_NOARG( CompressGraphicsDialog, NewWidthModifiedHdl )
 {
-    m_dResolution =  m_aMFNewWidth.GetValue() / GetViewWidthInch();
+    m_dResolution =  m_pMFNewWidth->GetValue() / GetViewWidthInch();
 
     UpdateNewHeightMF();
     UpdateResolutionLB();
@@ -220,7 +232,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, NewWidthModifiedHdl )
 
 IMPL_LINK_NOARG( CompressGraphicsDialog, NewHeightModifiedHdl )
 {
-    m_dResolution =  m_aMFNewHeight.GetValue() / GetViewHeightInch();
+    m_dResolution =  m_pMFNewHeight->GetValue() / GetViewHeightInch();
 
     UpdateNewWidthMF();
     UpdateResolutionLB();
@@ -231,7 +243,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, NewHeightModifiedHdl )
 
 IMPL_LINK_NOARG( CompressGraphicsDialog, ResolutionModifiedHdl )
 {
-    m_dResolution = (double) m_aResolutionLB.GetText().ToInt32();
+    m_dResolution = (double) m_pResolutionLB->GetText().ToInt32();
 
     UpdateNewWidthMF();
     UpdateNewHeightMF();
@@ -242,19 +254,20 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, ResolutionModifiedHdl )
 
 IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleCompressionRB )
 {
-    bool choice = m_aLosslessRB.IsChecked();
-    m_aCompressionMF.Enable(choice);
-    m_aQualityMF.Enable(!choice);
+    bool choice = m_pLosslessRB->IsChecked();
+    m_pCompressionMF->Enable(choice);
+    m_pQualityMF->Enable(!choice);
 
     return 0L;
 }
 
 IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleReduceResolutionRB )
 {
-    bool choice = m_aReduceResolutionCB.IsChecked();
-    m_aMFNewWidth.Enable(choice);
-    m_aMFNewHeight.Enable(choice);
-    m_aResolutionLB.Enable(choice);
+    bool choice = m_pReduceResolutionCB->IsChecked();
+    m_pMFNewWidth->Enable(choice);
+    m_pMFNewHeight->Enable(choice);
+    m_pResolutionLB->Enable(choice);
+    m_pInterpolationCombo->Enable(choice);
 
     return 0L;
 }
@@ -277,25 +290,47 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, CalculateClickHdl )
         String aNewSizeString;
         aNewSizeString += UniString::CreateFromInt32(aSize / 1024);
         aNewSizeString += String( " kiB" ) ;
-        m_aFixedText6.SetText(aNewSizeString);
+        m_pFixedText6->SetText(aNewSizeString);
     }
     return 0L;
 }
 
-Graphic CompressGraphicsDialog::GetCompressedGraphic()
+SdrGrafObj* CompressGraphicsDialog::GetCompressedSdrGrafObj()
 {
     if ( m_dResolution > 0  )
     {
-        GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
-        Graphic aResultGraphic = Graphic ();
+        SdrGrafObj* pNewObject = (SdrGrafObj*) m_pGraphicObj->Clone();
+
+        if ( m_pReduceResolutionCB->IsChecked() )
+        {
+            const SdrGrafCropItem& rCrop = (const SdrGrafCropItem&) m_pGraphicObj->GetMergedItem(SDRATTR_GRAFCROP);
+            long nPixelX = (long)( GetViewWidthInch()  * m_dResolution );
+            long nPixelY = (long)( GetViewHeightInch() * m_dResolution );
+            Size size = m_aGraphic.GetBitmapEx().GetSizePixel();
+            double aScaleX = nPixelX / (double) size.Width();
+            double aScaleY = nPixelY / (double) size.Height();
+
+            SdrGrafCropItem aNewCrop(
+                rCrop.GetLeft()  * aScaleX,
+                rCrop.GetTop()   * aScaleY,
+                rCrop.GetRight() * aScaleX,
+                rCrop.GetBottom()* aScaleY);
+            pNewObject->SetMergedItem(aNewCrop);
+        }
+
         SvMemoryStream aMemStream;
         aMemStream.SetVersion( SOFFICE_FILEFORMAT_CURRENT );
         Compress( aMemStream );
         aMemStream.Seek( STREAM_SEEK_TO_BEGIN );
-        rFilter.ImportGraphic( aResultGraphic, String("test"), aMemStream );
-        return aResultGraphic;
+        Graphic aResultGraphic;
+        GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+        rFilter.ImportGraphic( aResultGraphic, String("import"), aMemStream );
+
+        pNewObject->SetGraphic( aResultGraphic );
+
+        return pNewObject;
     }
-    return m_aGraphic;
+    return NULL;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/compressgraphicdialog.hrc b/svx/source/dialog/compressgraphicdialog.hrc
deleted file mode 100644
index a0925f1..0000000
--- a/svx/source/dialog/compressgraphicdialog.hrc
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _COMPRESS_GRAPHICS_DIALOG_HRC
-#define _COMPRESS_GRAPHICS_DIALOG_HRC
-
-#define FL_IMAGE_DETAILS    1
-#define FT_CG_2             2
-#define FT_CG_2_X           3
-#define FT_CG_3             4
-#define FT_CG_3_X           5
-#define FT_CG_5             8
-#define FT_CG_5_X           9
-#define FT_CG_6             10
-#define FT_CG_6_X           11
-
-#define FL_SETTINGS                 20
-
-#define CB_REDUCE_IMAGE_RESOLUTION  21
-#define FT_NEW_WIDTH                22
-#define MF_NEW_WIDTH                23
-#define FT_NEW_HEIGHT               24
-#define MF_NEW_HEIGHT               25
-#define FT_RESOLUTION               26
-#define LB_RESOLUTION               27
-#define FT_DPI                      28
-
-#define RB_LOSSLESS_COMPRESSION     29
-#define RB_JPEG_COMPRESSION         30
-#define FT_COMPRESSION              31
-#define MF_COMPRESSION_FACTOR       32
-#define FT_QUALITY                  33
-#define MF_QUALITY_FACTOR           34
-#define CB_CROP                     35
-
-#define BUTTON_CG_OK           40
-#define BUTTON_CG_CANCEL       41
-#define BUTTON_CG_HELP         42
-#define BUTTON_CG_CALCULATE    43
-
-#endif
diff --git a/svx/source/dialog/compressgraphicdialog.src b/svx/source/dialog/compressgraphicdialog.src
deleted file mode 100644
index 3ec2e64..0000000
--- a/svx/source/dialog/compressgraphicdialog.src
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svx/dialogs.hrc>
-#include "helpid.hrc"
-#include "compressgraphicdialog.hrc"
-
-ModalDialog RID_SVXDLG_COMPRESSGRAPHICS
-{
-    HelpID = "svx:ModalDialog:RID_SVXDLG_COMPRESSGRAPHICS";
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 242 , 200 ) ;
-    Moveable = TRUE ;
-    Sizeable = TRUE ;
-    Closeable = TRUE ;
-    Hide = TRUE ;
-    Text [ en-US ] = "Compress Graphics" ;
-
-    FixedLine FL_IMAGE_DETAILS
-    {
-        Pos = MAP_APPFONT ( 6 , 0 ) ;
-        Size = MAP_APPFONT ( 164 , 12 ) ;
-        Text[ en-US ] = "Image Details";
-    };
-
-    FixedText FT_CG_2_X
-    {
-        Pos = MAP_APPFONT ( 6 , 12 ) ;
-        Size = MAP_APPFONT ( 50 , 10 ) ;
-        Text [ en-US ] = "Original Size:" ;
-    };
-
-    FixedText FT_CG_2
-    {
-        Pos = MAP_APPFONT ( 56 , 12 ) ;
-        Size = MAP_APPFONT ( 124 , 10 ) ;
-    };
-
-    FixedText FT_CG_3_X
-    {
-        Pos = MAP_APPFONT ( 6 , 24 ) ;
-        Size = MAP_APPFONT ( 50 , 10 ) ;
-        Text [ en-US ] = "View Size:" ;
-    };
-
-    FixedText FT_CG_3
-    {
-        Pos = MAP_APPFONT ( 56 , 24 ) ;
-        Size = MAP_APPFONT ( 124 , 10 ) ;
-    };
-
-    FixedText FT_CG_5_X
-    {
-        Pos = MAP_APPFONT ( 6 , 36 ) ;
-        Size = MAP_APPFONT ( 50 , 10 ) ;
-        Text [ en-US ] = "Image Capacity:" ;
-    };
-
-    FixedText FT_CG_5
-    {
-        Pos = MAP_APPFONT ( 56 , 36 ) ;
-        Size = MAP_APPFONT ( 124 , 10 ) ;
-    };
-
-    FixedText FT_CG_6_X
-    {
-        Pos = MAP_APPFONT ( 6 , 48 ) ;
-        Size = MAP_APPFONT ( 50 , 10 ) ;
-        Text [ en-US ] = "New Capacity:" ;
-    };
-
-    FixedText FT_CG_6
-    {
-        Pos = MAP_APPFONT ( 56 , 48 ) ;
-        Size = MAP_APPFONT ( 124 , 10 ) ;
-    };
-
-     FixedLine FL_SETTINGS
-    {
-        Pos = MAP_APPFONT ( 6 , 60 ) ;
-        Size = MAP_APPFONT ( 164 , 12 ) ;
-        Text[ en-US ] = "Settings";
-    };
-
-    CheckBox CB_REDUCE_IMAGE_RESOLUTION
-    {
-        Pos = MAP_APPFONT ( 6 , 72 ) ;
-        Size = MAP_APPFONT ( 118 , 10 ) ;
-        Text [ en-US ] = "Reduce Image Resolution";
-    };
-
-    FixedText FT_NEW_WIDTH
-    {
-        Pos = MAP_APPFONT ( 16 , 85 ) ;
-        Size = MAP_APPFONT ( 20 , 12 ) ;
-        Text [ en-US ] = "Width:" ;
-    };
-
-    MetricField MF_NEW_WIDTH
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 36, 84 ) ;
-        Size = MAP_APPFONT ( 30 , 12 ) ;
-        TabStop = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Maximum = 9999 ;
-        Last = 9999 ;
-        SpinSize = 1 ;
-        Unit = FUNIT_CUSTOM ;
-    };
-
-    FixedText FT_NEW_HEIGHT
-    {
-        Pos = MAP_APPFONT ( 72 , 85 ) ;
-        Size = MAP_APPFONT ( 20 , 12 ) ;
-        Text [ en-US ] = "Height:" ;
-    };
-
-    MetricField MF_NEW_HEIGHT
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 98, 84 ) ;
-        Size = MAP_APPFONT ( 30 , 12 ) ;
-        TabStop = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Maximum = 9999 ;
-        Last = 9999 ;
-        SpinSize = 1 ;
-        Unit = FUNIT_CUSTOM ;
-    };
-
-    FixedText FT_RESOLUTION
-    {
-        Pos = MAP_APPFONT ( 16 , 97 ) ;
-        Size = MAP_APPFONT ( 34 , 12 ) ;
-        Text [ en-US ] = "Resolution:" ;
-    };
-
-    ComboBox LB_RESOLUTION
-    {
-        HelpID = "sfx2:ListBox:TP_COMMONPRINTOPTIONS:LB_REDUCEBITMAPS_RESOLUTION";
-        TabStop = TRUE;
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 50, 96 ) ;
-        Size = MAP_APPFONT ( 30, 50 ) ;
-        DropDown = TRUE;
-        StringList [ en-US ] =
-        {
-            "75";
-            "96";
-            "150";
-            "200";
-            "300";
-            "600";
-        };
-    };
-    FixedText FT_DPI
-    {
-        Pos = MAP_APPFONT ( 81 , 97 ) ;
-        Size = MAP_APPFONT ( 20 , 12 ) ;
-        Text [ en-US ] = "DPI" ;
-    };
-
-    RadioButton RB_LOSSLESS_COMPRESSION
-    {
-        HelpID = "filter:RadioButton:RID_SVXDLG_COMPRESSGRAPHICS:RB_LOSSLESS_COMPRESSION";
-        Pos = MAP_APPFONT ( 6, 108 ) ;
-        Size = MAP_APPFONT ( 158 , 10 ) ;
-        Text[ en-US ] = "~Lossless compression";
-    };
-
-    FixedText FT_COMPRESSION
-    {
-        Pos = MAP_APPFONT ( 16 , 120 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        Text [ en-US ] = "Compression:" ;
-    };
-
-    MetricField MF_COMPRESSION_FACTOR
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 56, 120 ) ;
-        Size = MAP_APPFONT ( 30 , 12 ) ;
-        TabStop = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Maximum = 9 ;
-        Last = 9 ;
-        SpinSize = 1 ;
-        Unit = FUNIT_CUSTOM ;
-    };
-
-    RadioButton RB_JPEG_COMPRESSION
-    {
-        HelpID = "filter:RadioButton:RID_SVXDLG_COMPRESSGRAPHICS:RB_JPEG_COMPRESSION";
-        Pos = MAP_APPFONT ( 6, 132 ) ;
-        Size = MAP_APPFONT ( 158 , 10 ) ;
-        Text[ en-US ] = "~JPEG compression";
-    };
-
-    FixedText FT_QUALITY
-    {
-        Pos = MAP_APPFONT ( 16 , 144 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        Text [ en-US ] = "Quality:" ;
-    };
-
-    MetricField MF_QUALITY_FACTOR
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 56, 144 ) ;
-        Size = MAP_APPFONT ( 30 , 12 ) ;
-        TabStop = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Maximum = 99 ;
-        Last = 99 ;
-        SpinSize = 1 ;
-        Unit = FUNIT_PERCENT ;
-    };
-
-    CheckBox CB_CROP
-    {
-        Pos = MAP_APPFONT ( 6 , 156 ) ;
-        Size = MAP_APPFONT ( 118 , 10 ) ;
-        Text [ en-US ] = "Crop";
-    };
-
-    OKButton BUTTON_CG_OK
-    {
-        Pos = MAP_APPFONT ( 186 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        DefButton = TRUE ;
-    };
-
-    CancelButton BUTTON_CG_CANCEL
-    {
-        Pos = MAP_APPFONT ( 186 , 23 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-
-    HelpButton BUTTON_CG_HELP
-    {
-        Pos = MAP_APPFONT ( 186 , 43 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-
-    PushButton BUTTON_CG_CALCULATE
-    {
-        Pos = MAP_APPFONT ( 186 , 63 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "Calculate";
-    };
-};
diff --git a/svx/uiconfig/ui/compressgraphicdialog.ui b/svx/uiconfig/ui/compressgraphicdialog.ui
new file mode 100644
index 0000000..dc0ef32
--- /dev/null
+++ b/svx/uiconfig/ui/compressgraphicdialog.ui
@@ -0,0 +1,630 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="CompressGraphicDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="bottom_padding">20</property>
+                <child>
+                  <object class="GtkExpander" id="expander1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="expanded">True</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="left_padding">20</property>
+                        <child>
+                          <object class="GtkGrid" id="grid1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="row_spacing">2</property>
+                            <property name="column_spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Original Size:</property>
+                                <property name="width_chars">15</property>
+                                <property name="single_line_mode">True</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">0</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label-original-size">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="hexpand">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label">???</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">0</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label8">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">View Size:</property>
+                                <property name="width_chars">15</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">1</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label9">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Image Capacity:</property>
+                                <property name="width_chars">15</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">2</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label10">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">New Capacity:</property>
+                                <property name="width_chars">15</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">0</property>
+                                <property name="top_attach">3</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label-view-size">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="hexpand">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label">???</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">1</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label-image-capacity">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="hexpand">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label">???</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">2</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label-new-capacity">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="hexpand">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label">???</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">3</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButton" id="calculate">
+                                <property name="label">Calculate</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_action_appearance">False</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="top_attach">4</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Image Information</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="grid2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="row_spacing">2</property>
+                <property name="column_spacing">6</property>
+                <child>
+                  <object class="GtkRadioButton" id="radio-lossless">
+                    <property name="label" translatable="yes">Lossless Compression</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="xalign">0</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">3</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="checkbox-reduce-resolution">
+                    <property name="label" translatable="yes">Reduce Image Resolution</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                    <property name="width">3</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">20</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Width:</property>
+                    <property name="width_chars">15</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="spin-new-width">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="adjustment">width-adjustment</property>
+                    <property name="numeric">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">20</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Heigth:</property>
+                    <property name="width_chars">15</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">6</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="radio-jpeg">
+                    <property name="label" translatable="yes">JPEG Compression</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">radio-lossless</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">3</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">20</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Resolution:</property>
+                    <property name="width_chars">15</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">7</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="spin-new-height">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="adjustment">height-adjustment</property>
+                    <property name="numeric">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">6</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="combo-resolution">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="column_span_column">0</property>
+                    <property name="has_entry">True</property>
+                    <items>
+                      <item translatable="yes">50</item>
+                      <item translatable="yes">75</item>
+                      <item translatable="yes">96</item>
+                      <item translatable="yes">150</item>
+                      <item translatable="yes">200</item>
+                      <item translatable="yes">300</item>
+                      <item translatable="yes">600</item>
+                    </items>
+                    <child internal-child="entry">
+                      <object class="GtkEntry" id="comboboxtext-entry">
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">•</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">7</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">20</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Quality:</property>
+                    <property name="width_chars">15</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">20</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Compression:</property>
+                    <property name="width_chars">15</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="spin-quality">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="adjustment">quality-adjustment</property>
+                    <property name="numeric">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="spin-compression">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="adjustment">compression-adjustment</property>
+                    <property name="numeric">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label11">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_left">20</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Interpolation:</property>
+                    <property name="width_chars">15</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">8</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="interpolation-method-combo">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="model">interpolation-method-store</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">8</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label12">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">px</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">5</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label13">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">px</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">6</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label14">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">DPI</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">7</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkAdjustment" id="compression-adjustment">
+    <property name="lower">1</property>
+    <property name="upper">9</property>
+    <property name="value">9</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="height-adjustment">
+    <property name="lower">1</property>
+    <property name="upper">20000</property>
+    <property name="value">1</property>
+    <property name="step_increment">100</property>
+    <property name="page_increment">100</property>
+  </object>
+  <object class="GtkListStore" id="interpolation-method-store">
+    <columns>
+      <!-- column-name scale-method-name -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">None</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Bilinear</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Bicubic</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Lanczos</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkAdjustment" id="quality-adjustment">
+    <property name="lower">1</property>
+    <property name="upper">99</property>
+    <property name="value">90</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="width-adjustment">
+    <property name="lower">1</property>
+    <property name="upper">20000</property>
+    <property name="value">1</property>
+    <property name="step_increment">100</property>
+    <property name="page_increment">100</property>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list