[Libreoffice-commits] core.git: include/vcl svtools/inc svtools/source svtools/uiconfig vcl/source vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 5 15:12:39 UTC 2018


 include/vcl/weld.hxx                            |    1 
 svtools/inc/FltCallDialogParameter.hxx          |    4 
 svtools/source/filter/SvFilterOptionsDialog.cxx |   10 
 svtools/source/filter/exportdialog.cxx          |  431 ++++++++++--------------
 svtools/source/filter/exportdialog.hxx          |  152 ++++----
 svtools/uiconfig/ui/graphicexport.ui            |  105 ++---
 vcl/source/app/salvtables.cxx                   |    6 
 vcl/unx/gtk3/gtk3gtkinst.cxx                    |    9 
 8 files changed, 339 insertions(+), 379 deletions(-)

New commits:
commit c98578f9b8da2c9ff9525c13697ff33c4f00731d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 5 11:26:09 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Oct 5 17:12:11 2018 +0200

    weld ExportDialog
    
    Change-Id: I9d0f21a10708edcc7f5da14f83944da58c33b1d9
    Reviewed-on: https://gerrit.libreoffice.org/61408
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e35befc64168..eddb3baaa176 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -503,6 +503,7 @@ protected:
 public:
     virtual void set_value(int value) = 0;
     virtual int get_value() const = 0;
+    virtual void set_range(int min, int max) = 0;
     void connect_value_changed(const Link<Scale&, void>& rLink) { m_aValueChangedHdl = rLink; }
 };
 
diff --git a/svtools/inc/FltCallDialogParameter.hxx b/svtools/inc/FltCallDialogParameter.hxx
index 29e3fabf5fce..ddc78e6cd1ea 100644
--- a/svtools/inc/FltCallDialogParameter.hxx
+++ b/svtools/inc/FltCallDialogParameter.hxx
@@ -35,14 +35,14 @@ class Window;
 
 struct FltCallDialogParameter
 {
-    VclPtr<vcl::Window> pWindow;
+    weld::Window* pWindow;
     FieldUnit const eFieldUnit;
     OUString aFilterExt;
 
     // In and Out PropertySequence for all filter dialogs
     css::uno::Sequence<css::beans::PropertyValue> aFilterData;
 
-    FltCallDialogParameter(vcl::Window* pW, FieldUnit eFiUni)
+    FltCallDialogParameter(weld::Window* pW, FieldUnit eFiUni)
         : pWindow(pW)
         , eFieldUnit(eFiUni){};
 };
diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 49de7ab6d62c..0e9f31c059d7 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -222,12 +222,16 @@ sal_Int16 SvFilterOptionsDialog::execute()
         }
         if ( nFormat < nFilterCount )
         {
-            FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), meFieldUnit );
+            vcl::Window* pParent = Application::GetDefDialogParent();
+            //TODO
+            FltCallDialogParameter aFltCallDlgPara(pParent ? pParent->GetFrameWeld() : nullptr, meFieldUnit);
             aFltCallDlgPara.aFilterData = maFilterDataSequence;
             aFltCallDlgPara.aFilterExt = aGraphicFilter.GetExportFormatShortName( nFormat );
             bool bIsPixelFormat( aGraphicFilter.IsExportPixelFormat( nFormat ) );
-            if ( ScopedVclPtrInstance<ExportDialog>( aFltCallDlgPara, mxContext, mxSourceDocument, mbExportSelection,
-                        bIsPixelFormat, mbGraphicsSource, xGraphic )->Execute() == RET_OK )
+
+            ExportDialog aDialog(aFltCallDlgPara, mxContext, mxSourceDocument, mbExportSelection,
+                        bIsPixelFormat, mbGraphicsSource, xGraphic);
+            if (aDialog.run() == RET_OK)
                 nRet = ui::dialogs::ExecutableDialogResults::OK;
 
             // taking the out parameter from the dialog
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index c58bad20cf80..b3e6529ea8a0 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -150,7 +150,7 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( bool bUpdateC
 {
     if ( bUpdateConfig )
     {
-        sal_Int32 nUnit = mpLbSizeX->GetSelectedEntryPos();
+        sal_Int32 nUnit = mxLbSizeX->get_active();
         if ( nUnit < 0 )
             nUnit = UNIT_CM;
 
@@ -163,13 +163,13 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( bool bUpdateC
             if ( nUnit > UNIT_MAX_ID )
                 nUnit = UNIT_PIXEL;
 
-            sal_Int32 nResolution = mpNfResolution->GetValue();
+            sal_Int32 nResolution = mxNfResolution->get_value();
             if ( nResolution < 1 )
                 nResolution = 96;
 
             mpOptionsItem->WriteInt32("PixelExportUnit", nUnit);
             mpOptionsItem->WriteInt32("PixelExportResolution", nResolution);
-            mpOptionsItem->WriteInt32("PixelExportResolutionUnit", mpLbResolution->GetSelectedEntryPos());
+            mpOptionsItem->WriteInt32("PixelExportResolutionUnit", mxLbResolution->get_active());
         }
         else
         {
@@ -217,25 +217,25 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( bool bUpdateC
     {
         case FORMAT_JPG :
         {
-            sal_Int32 nColor = mpLbColorDepth->GetSelectedEntryPos();
+            sal_Int32 nColor = mxLbColorDepth->get_active();
             if ( nColor == 1 )
                 nColor = 0;
             else
                 nColor = 1;
             pFilterOptions->WriteInt32("ColorMode", nColor);
-            pFilterOptions->WriteInt32("Quality", static_cast<sal_Int32>(mpSbCompression->GetThumbPos()));
+            pFilterOptions->WriteInt32("Quality", static_cast<sal_Int32>(mpSbCompression->get_value()));
         }
         break;
 
         case FORMAT_PNG :
         {
-            pFilterOptions->WriteInt32("Compression", static_cast<sal_Int32>(mpSbCompression->GetThumbPos()));
+            pFilterOptions->WriteInt32("Compression", static_cast<sal_Int32>(mpSbCompression->get_value()));
             sal_Int32 nInterlace = 0;
-            if ( mpCbInterlaced->IsChecked() )
+            if ( mxCbInterlaced->get_active() )
                 nInterlace++;
             pFilterOptions->WriteInt32("Interlaced", nInterlace);
             sal_Int32 nValue = 0;
-            if ( mpCbSaveTransparency->IsChecked() )
+            if ( mxCbSaveTransparency->get_active() )
                 nValue++;
             pFilterOptions->WriteInt32("Translucent", nValue);
         }
@@ -243,20 +243,20 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( bool bUpdateC
 
         case FORMAT_BMP :
         {
-            pFilterOptions->WriteInt32("Color", mpLbColorDepth->GetSelectedEntryPos() + 1);
-            pFilterOptions->WriteBool("RLE_Coding", mpCbRLEEncoding->IsChecked());
+            pFilterOptions->WriteInt32("Color", mxLbColorDepth->get_active() + 1);
+            pFilterOptions->WriteBool("RLE_Coding", mxCbRLEEncoding->get_active());
         }
         break;
 
         case FORMAT_GIF :
         {
             sal_Int32 nValue = 0;
-            if ( mpCbInterlaced->IsChecked() )
+            if ( mxCbInterlaced->get_active() )
                 nValue++;
             pFilterOptions->WriteInt32("Interlaced", nValue);
 
             nValue = 0;
-            if (mpCbSaveTransparency->IsChecked())
+            if (mxCbSaveTransparency->get_active())
                 nValue++;
             pFilterOptions->WriteInt32("Translucent", nValue);
         }
@@ -265,24 +265,24 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( bool bUpdateC
         case FORMAT_EPS :
         {
             sal_Int32 nCheck = 0;
-            if ( mpCbEPSPreviewTIFF->IsChecked() )
+            if ( mxCbEPSPreviewTIFF->get_active() )
                 nCheck++;
-            if ( mpCbEPSPreviewEPSI->IsChecked() )
+            if ( mxCbEPSPreviewEPSI->get_active() )
                 nCheck += 2;
             pFilterOptions->WriteInt32("Preview", nCheck);
 
             nCheck = 1;
-            if ( mpRbEPSLevel2->IsChecked() )
+            if ( mxRbEPSLevel2->get_active() )
                 nCheck++;
             pFilterOptions->WriteInt32("Version", nCheck);
 
             nCheck = 1;
-            if ( mpRbEPSColorFormat2->IsChecked() )
+            if ( mxRbEPSColorFormat2->get_active() )
                 nCheck++;
             pFilterOptions->WriteInt32("ColorFormat", nCheck);
 
             nCheck = 1;
-            if ( mpRbEPSCompressionNone->IsChecked() )
+            if ( mxRbEPSCompressionNone->get_active() )
                 nCheck++;
             pFilterOptions->WriteInt32("CompressionMode", nCheck);
         }
@@ -535,7 +535,7 @@ sal_uInt32 ExportDialog::GetRawFileSize() const
     if ( mbIsPixelFormat )
     {
         sal_Int32 nBitsPerPixel = 24;
-        OUString aEntry( mpLbColorDepth->GetSelectedEntry() );
+        OUString aEntry(mxLbColorDepth->get_active_text());
         if ( ms1BitTreshold == aEntry )
             nBitsPerPixel = 1;
         else if ( ms1BitDithered == aEntry )
@@ -575,13 +575,11 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara,
     const css::uno::Reference< css::lang::XComponent >& rxSourceDocument,
     bool bExportSelection, bool bIsPixelFormat, bool bGraphicsSource,
     const css::uno::Reference< css::graphic::XGraphic >& rxGraphic)
-    : ModalDialog(rPara.pWindow, "GraphicExportDialog", "svt/ui/graphicexport.ui")
+    : GenericDialogController(rPara.pWindow, "svt/ui/graphicexport.ui", "GraphicExportDialog")
     , mrFltCallPara(rPara)
     , mxContext(rxContext)
     , mxSourceDocument(rxSourceDocument)
     , mxGraphic(rxGraphic)
-    , mpSbCompression(nullptr)
-    , mpNfCompression(nullptr)
     , msEstimatedSizePix1(SvtResId(STR_SVT_ESTIMATED_SIZE_PIX_1))
     , msEstimatedSizePix2(SvtResId(STR_SVT_ESTIMATED_SIZE_PIX_2))
     , msEstimatedSizeVec(SvtResId(STR_SVT_ESTIMATED_SIZE_VEC))
@@ -600,50 +598,46 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara,
     , mbIsPixelFormat(bIsPixelFormat)
     , mbExportSelection(bExportSelection)
     , mbGraphicsSource(bGraphicsSource)
+    , mpSbCompression(nullptr)
+    , mpNfCompression(nullptr)
+    , mxMfSizeX(m_xBuilder->weld_spin_button("widthmf"))
+    , mxLbSizeX(m_xBuilder->weld_combo_box("widthlb"))
+    , mxMfSizeY(m_xBuilder->weld_spin_button( "heightmf"))
+    , mxFtResolution(m_xBuilder->weld_label("resolutionft"))
+    , mxNfResolution(m_xBuilder->weld_spin_button("resolutionmf"))
+    , mxLbResolution(m_xBuilder->weld_combo_box("resolutionlb"))
+    , mxColorDepth(m_xBuilder->weld_widget("colordepth"))
+    , mxLbColorDepth(m_xBuilder->weld_combo_box("colordepthlb"))
+    , mxJPGQuality(m_xBuilder->weld_widget("jpgquality"))
+    , mxPNGCompression(m_xBuilder->weld_widget("pngcompression"))
+    , mxSbPngCompression(m_xBuilder->weld_scale("compressionpngsb"))
+    , mxNfPngCompression(m_xBuilder->weld_spin_button("compressionpngnf"))
+    , mxSbJpgCompression(m_xBuilder->weld_scale("compressionjpgsb"))
+    , mxNfJpgCompression(m_xBuilder->weld_spin_button("compressionjpgnf"))
+    , mxMode(m_xBuilder->weld_widget("mode"))
+    , mxCbInterlaced(m_xBuilder->weld_check_button("interlacedcb"))
+    , mxBMPCompression(m_xBuilder->weld_widget("bmpcompression"))
+    , mxCbRLEEncoding(m_xBuilder->weld_check_button("rlecb"))
+    , mxDrawingObjects(m_xBuilder->weld_widget("drawingobjects"))
+    , mxCbSaveTransparency(m_xBuilder->weld_check_button("savetransparencycb"))
+    , mxEncoding(m_xBuilder->weld_widget("encoding"))
+    , mxRbBinary(m_xBuilder->weld_radio_button("binarycb"))
+    , mxRbText(m_xBuilder->weld_radio_button("textcb"))
+    , mxEPSGrid(m_xBuilder->weld_widget("epsgrid"))
+    , mxCbEPSPreviewTIFF(m_xBuilder->weld_check_button("tiffpreviewcb"))
+    , mxCbEPSPreviewEPSI(m_xBuilder->weld_check_button("epsipreviewcb"))
+    , mxRbEPSLevel1(m_xBuilder->weld_radio_button("level1rb"))
+    , mxRbEPSLevel2(m_xBuilder->weld_radio_button("level2rb"))
+    , mxRbEPSColorFormat1(m_xBuilder->weld_radio_button("color1rb"))
+    , mxRbEPSColorFormat2(m_xBuilder->weld_radio_button("color2rb"))
+    , mxRbEPSCompressionLZW(m_xBuilder->weld_radio_button("compresslzw"))
+    , mxRbEPSCompressionNone(m_xBuilder->weld_radio_button("compressnone"))
+    , mxInfo(m_xBuilder->weld_widget("information"))
+    , mxFtEstimatedSize(m_xBuilder->weld_label("estsizeft"))
+    , mxBtnOK(m_xBuilder->weld_button("ok"))
 {
-    get(mpMfSizeX, "widthmf-nospin");
-    get(mpMfSizeY, "heightmf-nospin");
-    get(mpLbSizeX, "widthlb");
-    get(mpFtResolution, "resolutionft");
-    get(mpNfResolution, "resolutionmf-nospin");
-    get(mpLbResolution, "resolutionlb");
-
-    get(mpColorDepth, "colordepth");
-    get(mpLbColorDepth, "colordepthlb");
-
-    get(mpJPGQuality, "jpgquality");
-    get(mpPNGCompression, "pngcompression");
-
-    get(mpBMPCompression, "bmpcompression");
-    get(mpCbRLEEncoding, "rlecb");
-
-    get(mpMode, "mode");
-    get(mpCbInterlaced, "interlacedcb");
-
-    get(mpDrawingObjects, "drawingobjects");
-    get(mpCbSaveTransparency, "savetransparencycb");
-
-    get(mpEncoding, "encoding");
-    get(mpRbBinary, "binarycb");
-    get(mpRbText, "textcb");
-
-    get(mpEPSGrid, "epsgrid");
-    get(mpCbEPSPreviewTIFF, "tiffpreviewcb");
-    get(mpCbEPSPreviewEPSI, "epsipreviewcb");
-    get(mpRbEPSLevel1, "level1rb");
-    get(mpRbEPSLevel2, "level2rb");
-    get(mpRbEPSColorFormat1, "color1rb");
-    get(mpRbEPSColorFormat2, "color2rb");
-    get(mpRbEPSCompressionLZW, "compresslzw");
-    get(mpRbEPSCompressionNone, "compressnone");
-
     GetGraphicSource();
 
-    get(mpInfo, "information");
-    get(mpFtEstimatedSize, "estsizeft");
-
-    get(mpBtnOK, "ok");
-
     maExt = maExt.toAsciiUpperCase();
 
     OUString  aFilterConfigPath( "Office.Common/Filter/Graphic/Export/" );
@@ -656,9 +650,9 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara,
         : mpOptionsItem->ReadInt32("VectorExportUnit", UNIT_DEFAULT);
 
     mnMaxFilesizeForRealtimePreview = mpOptionsItem->ReadInt32("MaxFilesizeForRealtimePreview", 0);
-    mpFtEstimatedSize->SetText(" \n ");
+    mxFtEstimatedSize->set_label(" \n ");
 
-    SetText( GetText().replaceFirst("%1", maExt) ); //Set dialog title
+    m_xDialog->set_title(m_xDialog->get_title().replaceFirst("%1", maExt)); //Set dialog title
 
     mnFormat = GetFilterFormat( maExt );
 
@@ -693,42 +687,42 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara,
     setupControls();
 
     // Size
-    mpLbSizeX->SetSelectHdl( LINK( this, ExportDialog, SelectListBoxHdl ) );
+    mxLbSizeX->connect_changed( LINK( this, ExportDialog, SelectListBoxHdl ) );
 
     if (mpSbCompression)
-        mpSbCompression->SetSlideHdl(LINK(this, ExportDialog, SbCompressionUpdateHdl));
+        mpSbCompression->connect_value_changed(LINK(this, ExportDialog, SbCompressionUpdateHdl));
     if (mpNfCompression)
-        mpNfCompression->SetModifyHdl(LINK(this, ExportDialog, SelectHdl));
+        mpNfCompression->connect_value_changed(LINK(this, ExportDialog, SelectHdl));
 
-    mpMfSizeX->SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeX ) );
-    mpMfSizeY->SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) );
+    mxMfSizeX->connect_value_changed( LINK( this, ExportDialog, UpdateHdlMtfSizeX ) );
+    mxMfSizeY->connect_value_changed( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) );
 
-    mpNfResolution->SetModifyHdl( LINK( this, ExportDialog, UpdateHdlNfResolution ) );
-    mpLbResolution->SetSelectHdl( LINK( this, ExportDialog, SelectListBoxHdl ) );
+    mxNfResolution->connect_value_changed( LINK( this, ExportDialog, UpdateHdlNfResolution ) );
+    mxLbResolution->connect_changed( LINK( this, ExportDialog, SelectListBoxHdl ) );
 
-    mpLbColorDepth->SetSelectHdl( LINK( this, ExportDialog, SelectListBoxHdl ) );
+    mxLbColorDepth->connect_changed( LINK( this, ExportDialog, SelectListBoxHdl ) );
 
-    mpCbInterlaced->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+    mxCbInterlaced->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
 
-    mpCbSaveTransparency->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+    mxCbSaveTransparency->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
 
-    mpCbEPSPreviewTIFF->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
-    mpCbEPSPreviewEPSI->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+    mxCbEPSPreviewTIFF->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
+    mxCbEPSPreviewEPSI->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
 
-    mpRbEPSCompressionLZW->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
-    mpRbEPSCompressionNone->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+    mxRbEPSCompressionLZW->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
+    mxRbEPSCompressionNone->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
 
-    mpRbBinary->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
-    mpRbText->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+    mxRbBinary->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
+    mxRbText->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
 
     // BMP
-    mpCbRLEEncoding->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+    mxCbRLEEncoding->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
 
     // EPS
-    mpRbEPSLevel1->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
-    mpRbEPSLevel2->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
+    mxRbEPSLevel1->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
+    mxRbEPSLevel2->connect_toggled( LINK( this, ExportDialog, UpdateHdl ) );
 
-    mpBtnOK->SetClickHdl( LINK( this, ExportDialog, OK ) );
+    mxBtnOK->connect_clicked( LINK( this, ExportDialog, OK ) );
 
     updateControls();
 }
@@ -741,10 +735,10 @@ void ExportDialog::setupSizeControls()
 
     if (!mbIsPixelFormat)
     {
-        mpFtResolution->Hide();
-        mpNfResolution->Hide();
-        mpLbResolution->Hide();
-        mpLbSizeX->RemoveEntry( UNIT_PIXEL );        // removing pixel
+        mxFtResolution->hide();
+        mxNfResolution->hide();
+        mxLbResolution->hide();
+        mxLbSizeX->remove( UNIT_PIXEL );        // removing pixel
         if ( nUnit >= UNIT_PIXEL )
             nUnit = UNIT_CM;
     }
@@ -752,7 +746,7 @@ void ExportDialog::setupSizeControls()
         nUnit = UNIT_PIXEL;
     if ( nUnit < 0 )
         nUnit = UNIT_CM;
-    mpLbSizeX->SelectEntryPos( static_cast< sal_uInt16 >( nUnit ) );
+    mxLbSizeX->set_active( static_cast< sal_uInt16 >( nUnit ) );
 
     if ( !mbIsPixelFormat )      // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes
 return;
@@ -762,12 +756,12 @@ return;
     sal_Int32 nResolution = mpOptionsItem->ReadInt32("PixelExportResolution", 96);
     if ( nResolution < 1 )
         nResolution = 96;
-    mpNfResolution->SetValue( nResolution );
+    mxNfResolution->set_value( nResolution );
 
     sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32("PixelExportResolutionUnit", 1);
     if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) )
         nResolutionUnit = 1;
-    mpLbResolution->SelectEntryPos( static_cast< sal_uInt16 >( nResolutionUnit ) );
+    mxLbResolution->set_active( static_cast< sal_uInt16 >( nResolutionUnit ) );
 }
 
 void ExportDialog::createFilterOptions()
@@ -781,50 +775,44 @@ void ExportDialog::createFilterOptions()
                 nColor = 0;
             else
                 nColor = 1;
-            mpLbColorDepth->InsertEntry( ms8BitGrayscale );
-            mpLbColorDepth->InsertEntry( ms24BitColor );
-            mpLbColorDepth->SelectEntryPos( nColor );
-            mpColorDepth->Show();
+            mxLbColorDepth->append_text( ms8BitGrayscale );
+            mxLbColorDepth->append_text( ms24BitColor );
+            mxLbColorDepth->set_active( nColor );
+            mxColorDepth->show();
 
             // Quality
-            mpJPGQuality->Show();
+            mxJPGQuality->show();
             sal_Int32 nQuality = mpFilterOptionsItem->ReadInt32("Quality", 75);
             if ((nQuality < 1 ) || (nQuality > 100))
                 nQuality = 75;
-            get(mpSbCompression, "compressionjpgsb");
-            get(mpNfCompression, "compressionjpgnf");
-            mpSbCompression->SetRangeMin( 1 );
-            mpSbCompression->SetRangeMax( 100 );
-            mpNfCompression->SetMin( 1 );
-            mpNfCompression->SetMax( 100 );
-            mpNfCompression->SetValue( nQuality );
-            mpNfCompression->SetStrictFormat( true );
+            mpSbCompression = mxSbJpgCompression.get();
+            mpNfCompression = mxNfJpgCompression.get();
+            mpSbCompression->set_range(1, 100);
+            mpNfCompression->set_range(1, 100);
+            mpNfCompression->set_value(nQuality);
         }
         break;
         case FORMAT_PNG :
         {
             // Compression 1..9
-            mpPNGCompression->Show();
+            mxPNGCompression->show();
             sal_Int32 nCompression = mpFilterOptionsItem->ReadInt32("Compression", 6);
             if ( ( nCompression < 1 ) || ( nCompression > 9 ) )
                 nCompression = 6;
 
-            get(mpSbCompression, "compressionpngsb");
-            get(mpNfCompression, "compressionpngnf");
-            mpSbCompression->SetRangeMin( 1 );
-            mpSbCompression->SetRangeMax( 9 );
-            mpNfCompression->SetMin( 1 );
-            mpNfCompression->SetMax( 9 );
-            mpNfCompression->SetValue( nCompression );
-            mpNfCompression->SetStrictFormat( true );
+            mpSbCompression = mxSbPngCompression.get();
+            mpNfCompression = mxNfPngCompression.get();
+            mpSbCompression->set_range(1, 9);
+            mpNfCompression->set_range(1, 9);
+            mpNfCompression->set_value(nCompression);
 
             // Interlaced
-            mpMode->Show();
-            mpCbInterlaced->Check(mpFilterOptionsItem->ReadInt32("Interlaced", 0) != 0);
+            mxMode->show();
+            mxCbInterlaced->set_active(mpFilterOptionsItem->ReadInt32("Interlaced", 0) != 0);
 
             // Transparency
-            mpDrawingObjects->Show();
-            mpCbSaveTransparency->Check(mpFilterOptionsItem->ReadInt32("Translucent", 1) != 0);
+            mxDrawingObjects->show();
+            mxCbSaveTransparency->set_active(mpFilterOptionsItem->ReadInt32("Translucent", 1) != 0);
         }
         break;
         case FORMAT_BMP :
@@ -834,35 +822,35 @@ void ExportDialog::createFilterOptions()
                 nColor = 6;
             else
                 nColor--;
-            mpLbColorDepth->InsertEntry( ms1BitTreshold );
-            mpLbColorDepth->InsertEntry( ms1BitDithered );
-            mpLbColorDepth->InsertEntry( ms4BitGrayscale );
-            mpLbColorDepth->InsertEntry( ms4BitColorPalette );
-            mpLbColorDepth->InsertEntry( ms8BitGrayscale );
-            mpLbColorDepth->InsertEntry( ms8BitColorPalette );
-            mpLbColorDepth->InsertEntry( ms24BitColor );
-            mpLbColorDepth->SelectEntryPos( nColor );
-            mpColorDepth->Show();
+            mxLbColorDepth->append_text( ms1BitTreshold );
+            mxLbColorDepth->append_text( ms1BitDithered );
+            mxLbColorDepth->append_text( ms4BitGrayscale );
+            mxLbColorDepth->append_text( ms4BitColorPalette );
+            mxLbColorDepth->append_text( ms8BitGrayscale );
+            mxLbColorDepth->append_text( ms8BitColorPalette );
+            mxLbColorDepth->append_text( ms24BitColor );
+            mxLbColorDepth->set_active( nColor );
+            mxColorDepth->show();
 
             // RLE coding
-            mpBMPCompression->Show();
-            mpCbRLEEncoding->Check(mpFilterOptionsItem->ReadBool("RLE_Coding", true));
+            mxBMPCompression->show();
+            mxCbRLEEncoding->set_active(mpFilterOptionsItem->ReadBool("RLE_Coding", true));
         }
         break;
         case FORMAT_GIF :
         {
             // Interlaced
-            mpMode->Show();
-            mpCbInterlaced->Check(mpFilterOptionsItem->ReadInt32("Interlaced", 1) != 0);
+            mxMode->show();
+            mxCbInterlaced->set_active(mpFilterOptionsItem->ReadInt32("Interlaced", 1) != 0);
 
             // Transparency
-            mpDrawingObjects->Show();
-            mpCbSaveTransparency->Check(mpFilterOptionsItem->ReadInt32("Translucent", 1) != 0);
+            mxDrawingObjects->show();
+            mxCbSaveTransparency->set_active(mpFilterOptionsItem->ReadInt32("Translucent", 1) != 0);
         }
         break;
         case FORMAT_EPS :
         {
-            mpEPSGrid->Show();
+            mxEPSGrid->show();
 
             sal_Int32 nPreview = mpFilterOptionsItem->ReadInt32("Preview", 0);
             sal_Int32 nVersion = mpFilterOptionsItem->ReadInt32("Version", 2);
@@ -871,17 +859,17 @@ void ExportDialog::createFilterOptions()
 
             mpFilterOptionsItem->ReadInt32("TextMode", 0);
 
-            mpCbEPSPreviewTIFF->Check( ( nPreview & 1 ) != 0 );
-            mpCbEPSPreviewEPSI->Check( ( nPreview & 2 ) != 0 );
+            mxCbEPSPreviewTIFF->set_active( ( nPreview & 1 ) != 0 );
+            mxCbEPSPreviewEPSI->set_active( ( nPreview & 2 ) != 0 );
 
-            mpRbEPSLevel1->Check( nVersion == 1 );
-            mpRbEPSLevel2->Check( nVersion == 2 );
+            mxRbEPSLevel1->set_active( nVersion == 1 );
+            mxRbEPSLevel2->set_active( nVersion == 2 );
 
-            mpRbEPSColorFormat1->Check( nColor == 1 );
-            mpRbEPSColorFormat2->Check( nColor != 1 );
+            mxRbEPSColorFormat1->set_active( nColor == 1 );
+            mxRbEPSColorFormat2->set_active( nColor != 1 );
 
-            mpRbEPSCompressionLZW->Check( nCompr == 1 );
-            mpRbEPSCompressionNone->Check( nCompr != 1 );
+            mxRbEPSCompressionLZW->set_active( nCompr == 1 );
+            mxRbEPSCompressionNone->set_active( nCompr != 1 );
         }
         break;
     }
@@ -893,7 +881,7 @@ void ExportDialog::setupControls()
     createFilterOptions();
 
     if (mnMaxFilesizeForRealtimePreview || mbIsPixelFormat)
-        mpInfo->Show();
+        mxInfo->show();
 }
 
 static OUString ImpValueOfInKB( sal_Int64 rVal )
@@ -914,28 +902,28 @@ void ExportDialog::updateControls()
     if ( !mbIsPixelFormat )
     {
         awt::Size aSize100thmm( maSize );
-        Size aSize( LogicToLogic( Size(aSize100thmm.Width * 100, aSize100thmm.Height * 100),
+        Size aSize( OutputDevice::LogicToLogic( Size(aSize100thmm.Width * 100, aSize100thmm.Height * 100),
             MapMode(MapUnit::Map100thMM),
-            MapMode( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ) ) ) );
-        mpMfSizeX->SetValue( aSize.Width() );
-        mpMfSizeY->SetValue( aSize.Height() );
+            MapMode( GetMapUnit( mxLbSizeX->get_active() ) ) ) );
+        mxMfSizeX->set_value( aSize.Width() );
+        mxMfSizeY->set_value( aSize.Height() );
     }
     else
     {
-        MapUnit aMapUnit( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ) );
+        MapUnit aMapUnit( GetMapUnit( mxLbSizeX->get_active() ) );
         if ( aMapUnit == MapUnit::MapPixel )
         {   // calculating pixel count via resolution and original graphic size
-            mpMfSizeX->SetDecimalDigits( 0 );
-            mpMfSizeY->SetDecimalDigits( 0 );
-            mpMfSizeX->SetValue( maSize.Width );
-            mpMfSizeY->SetValue( maSize.Height );
+            mxMfSizeX->set_digits( 0 );
+            mxMfSizeY->set_digits( 0 );
+            mxMfSizeX->set_value( maSize.Width );
+            mxMfSizeY->set_value( maSize.Height );
         }
         else
         {
-            mpMfSizeX->SetDecimalDigits( 2 );
-            mpMfSizeY->SetDecimalDigits( 2 );
+            mxMfSizeX->set_digits( 2 );
+            mxMfSizeY->set_digits( 2 );
             double fRatio;
-            switch( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ) )
+            switch( GetMapUnit( mxLbSizeX->get_active() ) )
             {
                 case MapUnit::MapInch : fRatio = static_cast< double >( maResolution.Width ) * 0.0254; break;
                 case MapUnit::MapMM :   fRatio = static_cast< double >( maResolution.Width ) * 0.001; break;
@@ -943,22 +931,22 @@ void ExportDialog::updateControls()
                 default:
                 case MapUnit::MapCM :   fRatio = static_cast< double >( maResolution.Width ) * 0.01; break;
             }
-            mpMfSizeX->SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Width * 100 ) / fRatio ) + 0.5 ) );
-            mpMfSizeY->SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Height * 100 ) / fRatio ) + 0.5 ) );
+            mxMfSizeX->set_value( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Width * 100 ) / fRatio ) + 0.5 ) );
+            mxMfSizeY->set_value( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Height * 100 ) / fRatio ) + 0.5 ) );
         }
     }
     sal_Int32 nResolution = 0;
-    switch( mpLbResolution->GetSelectedEntryPos() )
+    switch( mxLbResolution->get_active() )
     {
         case 0 : nResolution = maResolution.Width / 100; break;     // pixels / cm
         case 2 : nResolution = maResolution.Width; break;           // pixels / meter
         default:
         case 1 : nResolution = static_cast< sal_Int32 >(maResolution.Width * 0.0254); break;    // pixels / inch
     }
-    mpNfResolution->SetValue( nResolution );
+    mxNfResolution->set_value( nResolution );
 
-    if (mpSbCompression && mpSbCompression->IsVisible() && mpNfCompression)
-        mpSbCompression->SetThumbPos(mpNfCompression->GetValue());
+    if (mpSbCompression && mpSbCompression->get_visible() && mpNfCompression)
+        mpSbCompression->set_value(mpNfCompression->get_value());
 
     GetGraphicStream();
 
@@ -978,7 +966,7 @@ void ExportDialog::updateControls()
             if (nInd != -1)
                 aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
         }
-        mpFtEstimatedSize->SetText( aEst );
+        mxFtEstimatedSize->set_label( aEst );
     }
     else
     {
@@ -988,111 +976,70 @@ void ExportDialog::updateControls()
             sal_Int32 nInd = aEst.indexOf( "%" );
             if (nInd != -1)
                 aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
-            mpFtEstimatedSize->SetText( aEst );
+            mxFtEstimatedSize->set_label( aEst );
         }
     }
 
     // EPS
-    if ( mpRbEPSLevel1->IsVisible() )
+    if ( mxRbEPSLevel1->get_visible() )
     {
-        bool bEnabled = !mpRbEPSLevel1->IsChecked();
-        mpRbEPSColorFormat1->Enable( bEnabled );
-        mpRbEPSColorFormat2->Enable( bEnabled );
-        mpRbEPSCompressionLZW->Enable( bEnabled );
-        mpRbEPSCompressionNone->Enable( bEnabled );
+        bool bEnabled = !mxRbEPSLevel1->get_active();
+        mxRbEPSColorFormat1->set_sensitive( bEnabled );
+        mxRbEPSColorFormat2->set_sensitive( bEnabled );
+        mxRbEPSCompressionLZW->set_sensitive( bEnabled );
+        mxRbEPSCompressionNone->set_sensitive( bEnabled );
     }
 }
 
 ExportDialog::~ExportDialog()
 {
-    disposeOnce();
 }
 
-void ExportDialog::dispose()
-{
-    mpTempStream.reset();
-    mpFilterOptionsItem.reset();
-    mpOptionsItem.reset();
-    mpMfSizeX.clear();
-    mpLbSizeX.clear();
-    mpMfSizeY.clear();
-    mpFtResolution.clear();
-    mpNfResolution.clear();
-    mpLbResolution.clear();
-    mpColorDepth.clear();
-    mpLbColorDepth.clear();
-    mpJPGQuality.clear();
-    mpPNGCompression.clear();
-    mpSbCompression.clear();
-    mpNfCompression.clear();
-    mpMode.clear();
-    mpCbInterlaced.clear();
-    mpBMPCompression.clear();
-    mpCbRLEEncoding.clear();
-    mpDrawingObjects.clear();
-    mpCbSaveTransparency.clear();
-    mpEncoding.clear();
-    mpRbBinary.clear();
-    mpRbText.clear();
-    mpEPSGrid.clear();
-    mpCbEPSPreviewTIFF.clear();
-    mpCbEPSPreviewEPSI.clear();
-    mpRbEPSLevel1.clear();
-    mpRbEPSLevel2.clear();
-    mpRbEPSColorFormat1.clear();
-    mpRbEPSColorFormat2.clear();
-    mpRbEPSCompressionLZW.clear();
-    mpRbEPSCompressionNone.clear();
-    mpInfo.clear();
-    mpFtEstimatedSize.clear();
-    mpBtnOK.clear();
-    ModalDialog::dispose();
-}
-
-
 /*************************************************************************
 |*
 |* stores values set in the ini-file
 |*
 \************************************************************************/
-IMPL_LINK_NOARG(ExportDialog, SelectHdl, Edit&, void)
+IMPL_LINK_NOARG(ExportDialog, SelectHdl, weld::SpinButton&, void)
 {
     updateControls();
 }
-IMPL_LINK_NOARG(ExportDialog, SelectListBoxHdl, ListBox&, void)
+
+IMPL_LINK_NOARG(ExportDialog, SelectListBoxHdl, weld::ComboBox&, void)
 {
     updateControls();
 }
-IMPL_LINK_NOARG(ExportDialog, UpdateHdl, Button*, void)
+
+IMPL_LINK_NOARG(ExportDialog, UpdateHdl, weld::ToggleButton&, void)
 {
     updateControls();
 }
 
-IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeX, Edit&, void)
+IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeX, weld::SpinButton&, void)
 {
     double fRatio = static_cast< double >( maOriginalSize.Height ) / maOriginalSize.Width;
 
     if ( mbIsPixelFormat )
     {
-        switch( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ) )
+        switch( GetMapUnit( mxLbSizeX->get_active() ) )
         {
-            case MapUnit::MapInch :     maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * mpMfSizeX->GetValue() / 100.0 + 0.5 ); break;
-            case MapUnit::MapCM :       maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.01 * mpMfSizeX->GetValue() / 100.0 + 0.5 ); break;
-            case MapUnit::MapMM :       maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.001 * mpMfSizeX->GetValue() / 100.0 + 0.5 ); break;
-            case MapUnit::MapPoint :    maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * mpMfSizeX->GetValue() / 100.0 * 72 + 0.5 ); break;
+            case MapUnit::MapInch :     maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * mxMfSizeX->get_value() / 100.0 + 0.5 ); break;
+            case MapUnit::MapCM :       maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.01 * mxMfSizeX->get_value() / 100.0 + 0.5 ); break;
+            case MapUnit::MapMM :       maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.001 * mxMfSizeX->get_value() / 100.0 + 0.5 ); break;
+            case MapUnit::MapPoint :    maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * mxMfSizeX->get_value() / 100.0 * 72 + 0.5 ); break;
             default:
-            case MapUnit::MapPixel :    maSize.Width = mpMfSizeX->GetValue(); break;
+            case MapUnit::MapPixel :    maSize.Width = mxMfSizeX->get_value(); break;
         }
         maSize.Height = static_cast< sal_Int32 >( fRatio * maSize.Width + 0.5 );
     }
     else
     {
         Fraction aFract( 1, 100 );
-        sal_Int32 nWidth = mpMfSizeX->GetValue();
+        sal_Int32 nWidth = mxMfSizeX->get_value();
         sal_Int32 nHeight= static_cast< sal_Int32 >( nWidth * fRatio );
         const Size aSource( nWidth, nHeight );
-        MapMode aSourceMapMode( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ),Point(), aFract, aFract );
-        Size aDest( LogicToLogic(aSource, aSourceMapMode, MapMode(MapUnit::Map100thMM)) );
+        MapMode aSourceMapMode( GetMapUnit( mxLbSizeX->get_active() ),Point(), aFract, aFract );
+        Size aDest(OutputDevice::LogicToLogic(aSource, aSourceMapMode, MapMode(MapUnit::Map100thMM)));
 
         maSize.Width = aDest.Width();
         maSize.Height = aDest.Height();
@@ -1100,31 +1047,31 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeX, Edit&, void)
     updateControls();
 }
 
-IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeY, Edit&, void)
+IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeY, weld::SpinButton&, void)
 {
     double fRatio = static_cast< double >( maOriginalSize.Width ) / maOriginalSize.Height;
 
     if ( mbIsPixelFormat )
     {
-        switch( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ) )
+        switch( GetMapUnit( mxLbSizeX->get_active() ) )
         {
-            case MapUnit::MapInch :     maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * mpMfSizeY->GetValue() / 100.0 + 0.5 ); break;
-            case MapUnit::MapCM :       maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.01 * mpMfSizeY->GetValue() / 100.0 + 0.5 ); break;
-            case MapUnit::MapMM :       maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.001 * mpMfSizeY->GetValue() / 100.0 + 0.5 ); break;
-            case MapUnit::MapPoint :    maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * mpMfSizeY->GetValue() / 100.0 * 72 + 0.5 ); break;
+            case MapUnit::MapInch :     maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * mxMfSizeY->get_value() / 100.0 + 0.5 ); break;
+            case MapUnit::MapCM :       maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.01 * mxMfSizeY->get_value() / 100.0 + 0.5 ); break;
+            case MapUnit::MapMM :       maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.001 * mxMfSizeY->get_value() / 100.0 + 0.5 ); break;
+            case MapUnit::MapPoint :    maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * mxMfSizeY->get_value() / 100.0 * 72 + 0.5 ); break;
             default:
-            case MapUnit::MapPixel :    maSize.Height = mpMfSizeY->GetValue(); break;
+            case MapUnit::MapPixel :    maSize.Height = mxMfSizeY->get_value(); break;
         }
         maSize.Width = static_cast< sal_Int32 >( fRatio * maSize.Height + 0.5 );
     }
     else
     {
         Fraction aFract( 1, 100 );
-        sal_Int32 nHeight= mpMfSizeY->GetValue();
+        sal_Int32 nHeight= mxMfSizeY->get_value();
         sal_Int32 nWidth = static_cast< sal_Int32 >( nHeight * fRatio );
         const Size aSource( nWidth, nHeight );
-        MapMode aSourceMapMode( GetMapUnit( mpLbSizeX->GetSelectedEntryPos() ),Point(), aFract, aFract );
-        Size aDest( LogicToLogic(aSource, aSourceMapMode, MapMode(MapUnit::Map100thMM)) );
+        MapMode aSourceMapMode( GetMapUnit( mxLbSizeX->get_active() ),Point(), aFract, aFract );
+        Size aDest( OutputDevice::LogicToLogic(aSource, aSourceMapMode, MapMode(MapUnit::Map100thMM)) );
 
         maSize.Height = aDest.Height();
         maSize.Width = aDest.Width();
@@ -1132,12 +1079,12 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeY, Edit&, void)
     updateControls();
 }
 
-IMPL_LINK_NOARG(ExportDialog, UpdateHdlNfResolution, Edit&, void)
+IMPL_LINK_NOARG(ExportDialog, UpdateHdlNfResolution, weld::SpinButton&, void)
 {
-    sal_Int32 nResolution = mpNfResolution->GetValue();
-    if ( mpLbResolution->GetSelectedEntryPos() == 0 )      // pixels / cm
+    auto nResolution = mxNfResolution->get_value();
+    if ( mxLbResolution->get_active() == 0 )      // pixels / cm
         nResolution *= 100;
-    else if ( mpLbResolution->GetSelectedEntryPos() == 1 ) // pixels / inch
+    else if ( mxLbResolution->get_active() == 1 ) // pixels / inch
         nResolution = static_cast< sal_Int32 >( ( ( static_cast< double >( nResolution ) + 0.5 ) / 0.0254 ) );
     maResolution.Width = nResolution;
     maResolution.Height= nResolution;
@@ -1145,18 +1092,18 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlNfResolution, Edit&, void)
     updateControls();
 }
 
-IMPL_LINK_NOARG(ExportDialog, SbCompressionUpdateHdl, Slider*, void)
+IMPL_LINK_NOARG(ExportDialog, SbCompressionUpdateHdl, weld::Scale&, void)
 {
-    mpNfCompression->SetValue( mpSbCompression->GetThumbPos() );
+    mpNfCompression->set_value(mpSbCompression->get_value());
     updateControls();
 }
 
-IMPL_LINK_NOARG(ExportDialog, OK, Button*, void)
+IMPL_LINK_NOARG(ExportDialog, OK, weld::Button&, void)
 {
     // writing config parameter
 
     mrFltCallPara.aFilterData = GetFilterData( true );
-    EndDialog( RET_OK );
+    m_xDialog->response(RET_OK);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx
index 99a07021355e..4634e1b327b3 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -29,6 +29,7 @@
 #include <vcl/layout.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/slider.hxx>
+#include <vcl/weld.hxx>
 #include <com/sun/star/document/XExporter.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
@@ -42,7 +43,7 @@
 \************************************************************************/
 
 class FilterConfigItem;
-class ExportDialog : public ModalDialog
+class ExportDialog : public weld::GenericDialogController
 {
 private:
 
@@ -55,50 +56,6 @@ private:
     const css::uno::Reference< css::graphic::XGraphic >&
                                mxGraphic;
 
-    VclPtr<NumericField>       mpMfSizeX;
-    VclPtr<ListBox>            mpLbSizeX;
-    VclPtr<NumericField>       mpMfSizeY;
-    VclPtr<FixedText>          mpFtResolution;
-    VclPtr<NumericField>       mpNfResolution;
-    VclPtr<ListBox>            mpLbResolution;
-
-    VclPtr<VclContainer>       mpColorDepth;
-    VclPtr<ListBox>            mpLbColorDepth;
-
-    VclPtr<VclContainer>       mpJPGQuality;
-    VclPtr<VclContainer>       mpPNGCompression;
-
-    VclPtr<Slider>             mpSbCompression;
-    VclPtr<NumericField>       mpNfCompression;
-
-    VclPtr<VclContainer>       mpMode;
-    VclPtr<CheckBox>           mpCbInterlaced;
-
-    VclPtr<VclContainer>       mpBMPCompression;
-    VclPtr<CheckBox>           mpCbRLEEncoding;
-
-    VclPtr<VclContainer>       mpDrawingObjects;
-    VclPtr<CheckBox>           mpCbSaveTransparency;
-
-    VclPtr<VclContainer>       mpEncoding;
-    VclPtr<RadioButton>        mpRbBinary;
-    VclPtr<RadioButton>        mpRbText;
-
-    VclPtr<VclContainer>       mpEPSGrid;
-    VclPtr<CheckBox>           mpCbEPSPreviewTIFF;
-    VclPtr<CheckBox>           mpCbEPSPreviewEPSI;
-    VclPtr<RadioButton>        mpRbEPSLevel1;
-    VclPtr<RadioButton>        mpRbEPSLevel2;
-    VclPtr<RadioButton>        mpRbEPSColorFormat1;
-    VclPtr<RadioButton>        mpRbEPSColorFormat2;
-    VclPtr<RadioButton>        mpRbEPSCompressionLZW;
-    VclPtr<RadioButton>        mpRbEPSCompressionNone;
-
-    VclPtr<VclContainer>       mpInfo;
-    VclPtr<FixedText>          mpFtEstimatedSize;
-
-    VclPtr<OKButton>           mpBtnOK;
-
     OUString const            msEstimatedSizePix1;
     OUString const            msEstimatedSizePix2;
     OUString const            msEstimatedSizeVec;
@@ -140,44 +97,91 @@ private:
     css::uno::Reference< css::drawing::XDrawPage >
                         mxPage;
 
+    weld::Scale* mpSbCompression;
+    weld::SpinButton* mpNfCompression;
+
+    std::unique_ptr<weld::SpinButton> mxMfSizeX;
+    std::unique_ptr<weld::ComboBox> mxLbSizeX;
+    std::unique_ptr<weld::SpinButton> mxMfSizeY;
+    std::unique_ptr<weld::Label> mxFtResolution;
+    std::unique_ptr<weld::SpinButton> mxNfResolution;
+    std::unique_ptr<weld::ComboBox> mxLbResolution;
+
+    std::unique_ptr<weld::Widget> mxColorDepth;
+    std::unique_ptr<weld::ComboBox> mxLbColorDepth;
+
+    std::unique_ptr<weld::Widget> mxJPGQuality;
+    std::unique_ptr<weld::Widget> mxPNGCompression;
+
+    std::unique_ptr<weld::Scale> mxSbPngCompression;
+    std::unique_ptr<weld::SpinButton> mxNfPngCompression;
+
+    std::unique_ptr<weld::Scale> mxSbJpgCompression;
+    std::unique_ptr<weld::SpinButton> mxNfJpgCompression;
+
+    std::unique_ptr<weld::Widget> mxMode;
+    std::unique_ptr<weld::CheckButton> mxCbInterlaced;
+
+    std::unique_ptr<weld::Widget> mxBMPCompression;
+    std::unique_ptr<weld::CheckButton> mxCbRLEEncoding;
+
+    std::unique_ptr<weld::Widget> mxDrawingObjects;
+    std::unique_ptr<weld::CheckButton> mxCbSaveTransparency;
+
+    std::unique_ptr<weld::Widget> mxEncoding;
+    std::unique_ptr<weld::RadioButton> mxRbBinary;
+    std::unique_ptr<weld::RadioButton> mxRbText;
+
+    std::unique_ptr<weld::Widget> mxEPSGrid;
+    std::unique_ptr<weld::CheckButton> mxCbEPSPreviewTIFF;
+    std::unique_ptr<weld::CheckButton> mxCbEPSPreviewEPSI;
+    std::unique_ptr<weld::RadioButton> mxRbEPSLevel1;
+    std::unique_ptr<weld::RadioButton> mxRbEPSLevel2;
+    std::unique_ptr<weld::RadioButton> mxRbEPSColorFormat1;
+    std::unique_ptr<weld::RadioButton> mxRbEPSColorFormat2;
+    std::unique_ptr<weld::RadioButton> mxRbEPSCompressionLZW;
+    std::unique_ptr<weld::RadioButton> mxRbEPSCompressionNone;
+
+    std::unique_ptr<weld::Widget> mxInfo;
+    std::unique_ptr<weld::Label> mxFtEstimatedSize;
+
+    std::unique_ptr<weld::Button> mxBtnOK;
 
-                        DECL_LINK( UpdateHdl, Button*, void );
-                        DECL_LINK( SelectListBoxHdl, ListBox&, void );
-                        DECL_LINK( SelectHdl, Edit&, void );
-                        DECL_LINK( UpdateHdlMtfSizeX, Edit&, void );
-                        DECL_LINK( UpdateHdlMtfSizeY, Edit&, void );
-                        DECL_LINK( UpdateHdlNfResolution, Edit&, void );
-                        DECL_LINK( SbCompressionUpdateHdl, Slider*, void );
+    DECL_LINK(UpdateHdl, weld::ToggleButton&, void);
+    DECL_LINK(SelectListBoxHdl, weld::ComboBox&, void);
+    DECL_LINK(SelectHdl, weld::SpinButton&, void);
+    DECL_LINK(UpdateHdlMtfSizeX, weld::SpinButton&, void);
+    DECL_LINK(UpdateHdlMtfSizeY, weld::SpinButton&, void);
+    DECL_LINK(UpdateHdlNfResolution, weld::SpinButton&, void);
+    DECL_LINK(SbCompressionUpdateHdl, weld::Scale&, void);
 
-                        DECL_LINK( OK, Button*, void );
+    DECL_LINK(OK, weld::Button&, void);
 
-                        void setupSizeControls();
-                        void createFilterOptions();
-                        void setupControls();
-                        void updateControls();
+    void setupSizeControls();
+    void createFilterOptions();
+    void setupControls();
+    void updateControls();
 
-                        void GetGraphicSource();
-                        void GetGraphicStream();
-                        static BitmapEx GetGraphicBitmap( SvStream& rStream );
-                        css::uno::Sequence< css::beans::PropertyValue >
-                            GetFilterData( bool bUpdateConfig );
+    void GetGraphicSource();
+    void GetGraphicStream();
+    static BitmapEx GetGraphicBitmap( SvStream& rStream );
+    css::uno::Sequence< css::beans::PropertyValue >
+        GetFilterData( bool bUpdateConfig );
 
-                        sal_uInt32 GetRawFileSize() const;
-                        bool IsTempExportAvailable() const;
+    sal_uInt32 GetRawFileSize() const;
+    bool IsTempExportAvailable() const;
 
-                        css::awt::Size
-                            GetOriginalSize();
+    css::awt::Size GetOriginalSize();
 
-                        sal_Int32 GetDefaultUnit();
+    sal_Int32 GetDefaultUnit();
 
 public:
-                        ExportDialog( FltCallDialogParameter& rPara,
-                            const css::uno::Reference< css::uno::XComponentContext >& rxContext,
-                            const css::uno::Reference< css::lang::XComponent >& rxSourceDocument,
-                            bool bExportSelection, bool bIsExportVectorFormat, bool bGraphicsSource,
-                            const css::uno::Reference< css::graphic::XGraphic >& rxGraphic);
-                        virtual ~ExportDialog() override;
-                        virtual void dispose() override;
+    ExportDialog( FltCallDialogParameter& rPara,
+        const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+        const css::uno::Reference< css::lang::XComponent >& rxSourceDocument,
+        bool bExportSelection, bool bIsExportVectorFormat, bool bGraphicsSource,
+        const css::uno::Reference< css::graphic::XGraphic >& rxGraphic);
+    virtual ~ExportDialog() override;
 };
 
 
diff --git a/svtools/uiconfig/ui/graphicexport.ui b/svtools/uiconfig/ui/graphicexport.ui
index 6afdf96ab1e8..fa1965fcbe97 100644
--- a/svtools/uiconfig/ui/graphicexport.ui
+++ b/svtools/uiconfig/ui/graphicexport.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="svt">
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkAdjustment" id="adjustment1">
@@ -21,52 +21,28 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <object class="GtkListStore" id="liststore1">
-    <columns>
-      <!-- column-name gchararray1 -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" context="graphicexport|liststore1">pixels/cm</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="graphicexport|liststore1">pixels/inch</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="graphicexport|liststore1">pixels/meter</col>
-      </row>
-    </data>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="upper">999.99000000000001</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
   </object>
-  <object class="GtkListStore" id="liststore2">
-    <columns>
-      <!-- column-name gchararray1 -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes" context="graphicexport|liststore2">inches</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="graphicexport|liststore2">cm</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="graphicexport|liststore2">mm</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="graphicexport|liststore2">points</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" context="graphicexport|liststore2">pixels</col>
-      </row>
-    </data>
+  <object class="GtkAdjustment" id="adjustment5">
+    <property name="upper">999.99000000000001</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
   </object>
   <object class="GtkDialog" id="GraphicExportDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="graphicexport|GraphicExportDialog">%1 Options</property>
     <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
+    <child>
+      <placeholder/>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
@@ -158,7 +134,7 @@
                             <property name="can_focus">False</property>
                             <property name="label" translatable="yes" context="graphicexport|label5">Width:</property>
                             <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">widthmf-nospin</property>
+                            <property name="mnemonic_widget">widthmf</property>
                             <property name="xalign">1</property>
                           </object>
                           <packing>
@@ -172,7 +148,7 @@
                             <property name="can_focus">False</property>
                             <property name="label" translatable="yes" context="graphicexport|label6">Height:</property>
                             <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">heightmf-nospin</property>
+                            <property name="mnemonic_widget">heightmf</property>
                             <property name="xalign">1</property>
                           </object>
                           <packing>
@@ -186,7 +162,7 @@
                             <property name="can_focus">False</property>
                             <property name="label" translatable="yes" context="graphicexport|resolutionft">Resolution:</property>
                             <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">resolutionmf-nospin</property>
+                            <property name="mnemonic_widget">resolutionmf</property>
                             <property name="xalign">1</property>
                           </object>
                           <packing>
@@ -195,9 +171,10 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkSpinButton" id="widthmf-nospin">
+                          <object class="GtkSpinButton" id="widthmf">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="activates_default">True</property>
                             <property name="xalign">1</property>
                             <property name="adjustment">adjustment3</property>
                             <property name="digits">2</property>
@@ -208,11 +185,12 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkSpinButton" id="heightmf-nospin">
+                          <object class="GtkSpinButton" id="heightmf">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="activates_default">True</property>
                             <property name="xalign">1</property>
-                            <property name="adjustment">adjustment3</property>
+                            <property name="adjustment">adjustment4</property>
                             <property name="digits">2</property>
                           </object>
                           <packing>
@@ -221,11 +199,12 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkSpinButton" id="resolutionmf-nospin">
+                          <object class="GtkSpinButton" id="resolutionmf">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="activates_default">True</property>
                             <property name="xalign">1</property>
-                            <property name="adjustment">adjustment3</property>
+                            <property name="adjustment">adjustment5</property>
                           </object>
                           <packing>
                             <property name="left_attach">1</property>
@@ -233,10 +212,16 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkComboBox" id="widthlb">
+                          <object class="GtkComboBoxText" id="widthlb">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="model">liststore2</property>
+                            <items>
+                              <item translatable="yes" context="graphicexport|liststore2">inches</item>
+                              <item translatable="yes" context="graphicexport|liststore2">cm</item>
+                              <item translatable="yes" context="graphicexport|liststore2">mm</item>
+                              <item translatable="yes" context="graphicexport|liststore2">points</item>
+                              <item translatable="yes" context="graphicexport|liststore2">pixels</item>
+                            </items>
                           </object>
                           <packing>
                             <property name="left_attach">2</property>
@@ -244,10 +229,14 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkComboBox" id="resolutionlb">
+                          <object class="GtkComboBoxText" id="resolutionlb">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="model">liststore1</property>
+                            <items>
+                              <item translatable="yes" context="graphicexport|liststore1">pixels/cm</item>
+                              <item translatable="yes" context="graphicexport|liststore1">pixels/inch</item>
+                              <item translatable="yes" context="graphicexport|liststore1">pixels/meter</item>
+                            </items>
                           </object>
                           <packing>
                             <property name="left_attach">2</property>
@@ -290,7 +279,7 @@
                     <property name="top_padding">6</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkComboBox" id="colordepthlb">
+                      <object class="GtkComboBoxText" id="colordepthlb">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                       </object>
@@ -334,6 +323,7 @@
                           <object class="GtkSpinButton" id="compressionjpgnf">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="activates_default">True</property>
                             <property name="xalign">1</property>
                             <property name="adjustment">adjustment1</property>
                           </object>
@@ -345,10 +335,11 @@
                         <child>
                           <object class="GtkScale" id="compressionjpgsb">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can_focus">True</property>
                             <property name="valign">center</property>
                             <property name="hexpand">True</property>
                             <property name="adjustment">adjustment1</property>
+                            <property name="digits">0</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -396,6 +387,7 @@
                           <object class="GtkSpinButton" id="compressionpngnf">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="activates_default">True</property>
                             <property name="xalign">1</property>
                             <property name="adjustment">adjustment2</property>
                           </object>
@@ -407,10 +399,11 @@
                         <child>
                           <object class="GtkScale" id="compressionpngsb">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
+                            <property name="can_focus">True</property>
                             <property name="valign">center</property>
                             <property name="hexpand">True</property>
                             <property name="adjustment">adjustment2</property>
+                            <property name="digits">0</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -605,7 +598,6 @@
                             <property name="xalign">0</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
-                            <property name="group">binarycb</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -745,7 +737,6 @@
                                 <property name="xalign">0</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <property name="group">color1rb</property>
                               </object>
                               <packing>
                                 <property name="left_attach">0</property>
@@ -814,7 +805,6 @@
                                 <property name="xalign">0.059999998658895493</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <property name="group">level1rb</property>
                               </object>
                               <packing>
                                 <property name="left_attach">0</property>
@@ -883,7 +873,6 @@
                                 <property name="xalign">0</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <property name="group">compresslzw</property>
                               </object>
                               <packing>
                                 <property name="left_attach">0</property>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e4647b02cb04..fb8363ff10e4 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1433,6 +1433,12 @@ public:
         m_xScale->SetThumbPos(value);
     }
 
+    virtual void set_range(int min, int max) override
+    {
+        m_xScale->SetRangeMin(min);
+        m_xScale->SetRangeMax(max);
+    }
+
     virtual int get_value() const override
     {
         return m_xScale->GetThumbPos();
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 106419b1ff93..fa976af04dae 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3379,7 +3379,16 @@ public:
 
     virtual void set_value(int value) override
     {
+        disable_notify_events();
         gtk_range_set_value(GTK_RANGE(m_pScale), value);
+        enable_notify_events();
+    }
+
+    virtual void set_range(int min, int max) override
+    {
+        disable_notify_events();
+        gtk_range_set_range(GTK_RANGE(m_pScale), min, max);
+        enable_notify_events();
     }
 
     virtual int get_value() const override


More information about the Libreoffice-commits mailing list