[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - 2 commits - filter/source filter/uiconfig

Caolán McNamara caolanm at redhat.com
Mon Jun 18 20:05:29 UTC 2018


 filter/source/pdf/impdialog.cxx    |  274 ++++++++++++++-----------------------
 filter/source/pdf/impdialog.hxx    |   64 ++++----
 filter/uiconfig/ui/pdflinkspage.ui |   18 --
 filter/uiconfig/ui/pdfviewpage.ui  |   21 +-
 4 files changed, 152 insertions(+), 225 deletions(-)

New commits:
commit 935fd2d2b776003a89d441bcd243fd079cc0fa65
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 18 11:10:10 2018 +0100

    weld ImpPDFTabLinksPage
    
    Change-Id: I6e10b135d102f56d42a9f456557150cb557dd788
    Reviewed-on: https://gerrit.libreoffice.org/56037
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index e48641bef88a..7474ba9a648f 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1365,53 +1365,33 @@ void    ImpPDFTabSecurityPage::ImplPDFASecurityControl( bool bEnableSecurity )
     enablePermissionControls();
 }
 
-
 /// The link preferences tab page (relative and other stuff)
-ImpPDFTabLinksPage::ImpPDFTabLinksPage( vcl::Window* pParent,
-                                              const SfxItemSet& rCoreSet ) :
-    SfxTabPage( pParent, "PdfLinksPage","filter/ui/pdflinkspage.ui",&rCoreSet ),
-
-    mbOpnLnksDefaultUserState( false ),
-    mbOpnLnksLaunchUserState( false ),
-    mbOpnLnksBrowserUserState( false )
+ImpPDFTabLinksPage::ImpPDFTabLinksPage(TabPageParent pParent, const SfxItemSet& rCoreSet)
+    : SfxTabPage(pParent, "filter/ui/pdflinkspage.ui", "PdfLinksPage", &rCoreSet)
+    , mbOpnLnksDefaultUserState(false)
+    , mbOpnLnksLaunchUserState(false)
+    , mbOpnLnksBrowserUserState(false)
+    , m_xCbExprtBmkrToNmDst(m_xBuilder->weld_check_button("export"))
+    , m_xCbOOoToPDFTargets(m_xBuilder->weld_check_button("convert"))
+    , m_xCbExportRelativeFsysLinks(m_xBuilder->weld_check_button("exporturl"))
+    , m_xRbOpnLnksDefault(m_xBuilder->weld_radio_button("default"))
+    , m_xRbOpnLnksLaunch(m_xBuilder->weld_radio_button("openpdf"))
+    , m_xRbOpnLnksBrowser(m_xBuilder->weld_radio_button("openinternet"))
 {
-    get(m_pCbExprtBmkrToNmDst,"export");
-    get(m_pCbOOoToPDFTargets ,"convert");
-    get(m_pCbExportRelativeFsysLinks ,"exporturl");
-    get(m_pRbOpnLnksDefault ,"default");
-    get(m_pRbOpnLnksLaunch ,"openpdf");
-    get(m_pRbOpnLnksBrowser ,"openinternet");
 }
 
-
 ImpPDFTabLinksPage::~ImpPDFTabLinksPage()
 {
-    disposeOnce();
 }
 
-
-void ImpPDFTabLinksPage::dispose()
+VclPtr<SfxTabPage> ImpPDFTabLinksPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
 {
-    m_pCbExprtBmkrToNmDst.clear();
-    m_pCbOOoToPDFTargets.clear();
-    m_pCbExportRelativeFsysLinks.clear();
-    m_pRbOpnLnksDefault.clear();
-    m_pRbOpnLnksLaunch.clear();
-    m_pRbOpnLnksBrowser.clear();
-    SfxTabPage::dispose();
+    return VclPtr<ImpPDFTabLinksPage>::Create(pParent, *rAttrSet);
 }
 
-
-VclPtr<SfxTabPage> ImpPDFTabLinksPage::Create( TabPageParent pParent,
-                                               const SfxItemSet* rAttrSet)
-{
-    return VclPtr<ImpPDFTabLinksPage>::Create( pParent.pParent, *rAttrSet );
-}
-
-
 void ImpPDFTabLinksPage::GetFilterConfigItem( ImpPDFTabDialog* paParent  )
 {
-    paParent->mbExportRelativeFsysLinks = m_pCbExportRelativeFsysLinks->IsChecked();
+    paParent->mbExportRelativeFsysLinks = m_xCbExportRelativeFsysLinks->get_active();
 
     bool bIsPDFASel = false;
     ImpPDFTabGeneralPage* pGeneralPage = paParent->getGeneralPage();
@@ -1421,9 +1401,9 @@ void ImpPDFTabLinksPage::GetFilterConfigItem( ImpPDFTabDialog* paParent  )
     if( !bIsPDFASel )
     {
         // ...get the control states
-        mbOpnLnksDefaultUserState = m_pRbOpnLnksDefault->IsChecked();
-        mbOpnLnksLaunchUserState =  m_pRbOpnLnksLaunch->IsChecked();
-        mbOpnLnksBrowserUserState = m_pRbOpnLnksBrowser->IsChecked();
+        mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
+        mbOpnLnksLaunchUserState =  m_xRbOpnLnksLaunch->get_active();
+        mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active();
     }
     // the control states, or the saved is used
     // to form the stored selection
@@ -1433,33 +1413,32 @@ void ImpPDFTabLinksPage::GetFilterConfigItem( ImpPDFTabDialog* paParent  )
     else if( mbOpnLnksLaunchUserState )
         paParent->mnViewPDFMode = 1;
 
-    paParent->mbConvertOOoTargets = m_pCbOOoToPDFTargets->IsChecked();
-    paParent->mbExportBmkToPDFDestination = m_pCbExprtBmkrToNmDst->IsChecked();
+    paParent->mbConvertOOoTargets = m_xCbOOoToPDFTargets->get_active();
+    paParent->mbExportBmkToPDFDestination = m_xCbExprtBmkrToNmDst->get_active();
 }
 
-
 void ImpPDFTabLinksPage::SetFilterConfigItem( const  ImpPDFTabDialog* paParent )
 {
-    m_pCbOOoToPDFTargets->Check( paParent->mbConvertOOoTargets );
-    m_pCbExprtBmkrToNmDst->Check( paParent->mbExportBmkToPDFDestination );
+    m_xCbOOoToPDFTargets->set_active(paParent->mbConvertOOoTargets);
+    m_xCbExprtBmkrToNmDst->set_active(paParent->mbExportBmkToPDFDestination);
 
-    m_pRbOpnLnksDefault->SetClickHdl( LINK( this, ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl ) );
-    m_pRbOpnLnksBrowser->SetClickHdl( LINK( this, ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl ) );
+    m_xRbOpnLnksDefault->connect_toggled(LINK(this, ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl));
+    m_xRbOpnLnksBrowser->connect_toggled(LINK(this, ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl));
 
-    m_pCbExportRelativeFsysLinks->Check( paParent->mbExportRelativeFsysLinks );
+    m_xCbExportRelativeFsysLinks->set_active(paParent->mbExportRelativeFsysLinks);
     switch( paParent->mnViewPDFMode )
     {
     default:
     case 0:
-        m_pRbOpnLnksDefault->Check();
+        m_xRbOpnLnksDefault->set_active(true);
         mbOpnLnksDefaultUserState = true;
         break;
     case 1:
-        m_pRbOpnLnksLaunch->Check();
+        m_xRbOpnLnksLaunch->set_active(true);
         mbOpnLnksLaunchUserState = true;
         break;
     case 2:
-        m_pRbOpnLnksBrowser->Check();
+        m_xRbOpnLnksBrowser->set_active(true);
         mbOpnLnksBrowserUserState = true;
         break;
     }
@@ -1482,43 +1461,40 @@ void ImpPDFTabLinksPage::ImplPDFALinkControl( bool bEnableLaunch )
     // set the value and position of link type selection
     if( bEnableLaunch )
     {
-        m_pRbOpnLnksLaunch->Enable();
+        m_xRbOpnLnksLaunch->set_sensitive(true);
         // restore user state with no PDF/A-1 selected
-        m_pRbOpnLnksDefault->Check( mbOpnLnksDefaultUserState );
-        m_pRbOpnLnksLaunch->Check( mbOpnLnksLaunchUserState );
-        m_pRbOpnLnksBrowser->Check( mbOpnLnksBrowserUserState );
+        m_xRbOpnLnksDefault->set_active(mbOpnLnksDefaultUserState);
+        m_xRbOpnLnksLaunch->set_active(mbOpnLnksLaunchUserState);
+        m_xRbOpnLnksBrowser->set_active(mbOpnLnksBrowserUserState);
     }
     else
     {
         // save user state with no PDF/A-1 selected
-        mbOpnLnksDefaultUserState = m_pRbOpnLnksDefault->IsChecked();
-        mbOpnLnksLaunchUserState = m_pRbOpnLnksLaunch->IsChecked();
-        mbOpnLnksBrowserUserState = m_pRbOpnLnksBrowser->IsChecked();
-        m_pRbOpnLnksLaunch->Enable( false );
-        if( mbOpnLnksLaunchUserState )
-            m_pRbOpnLnksBrowser->Check();
+        mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
+        mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
+        mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active();
+        m_xRbOpnLnksLaunch->set_sensitive(false);
+        if (mbOpnLnksLaunchUserState)
+            m_xRbOpnLnksBrowser->set_active(true);
     }
 }
 
-
 /// Reset the memory of Launch action present when PDF/A-1 was requested
-IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl, Button*, void)
+IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl, weld::ToggleButton&, void)
 {
-    mbOpnLnksDefaultUserState = m_pRbOpnLnksDefault->IsChecked();
-    mbOpnLnksLaunchUserState = m_pRbOpnLnksLaunch->IsChecked();
-    mbOpnLnksBrowserUserState = m_pRbOpnLnksBrowser->IsChecked();
+    mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
+    mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
+    mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active();
 }
 
-
 /// Reset the memory of a launch action present when PDF/A-1 was requested
-IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, Button*, void)
+IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, weld::ToggleButton&, void)
 {
-    mbOpnLnksDefaultUserState = m_pRbOpnLnksDefault->IsChecked();
-    mbOpnLnksLaunchUserState = m_pRbOpnLnksLaunch->IsChecked();
-    mbOpnLnksBrowserUserState = m_pRbOpnLnksBrowser->IsChecked();
+    mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
+    mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
+    mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active();
 }
 
-
 ImplErrorDialog::ImplErrorDialog(weld::Window* pParent, const std::set<vcl::PDFWriter::ErrorCode>& rErrors)
     : MessageDialogController(pParent, "filter/ui/warnpdfdialog.ui", "WarnPDFDialog", "grid")
     , m_xErrors(m_xBuilder->weld_tree_view("errors"))
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index ddd86c8a8473..f4613f0757d3 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -376,26 +376,25 @@ public:
 /// Implements the relative link stuff
 class ImpPDFTabLinksPage : public SfxTabPage
 {
-    VclPtr<CheckBox>            m_pCbExprtBmkrToNmDst;
-    VclPtr<CheckBox>            m_pCbOOoToPDFTargets;
-    VclPtr<CheckBox>            m_pCbExportRelativeFsysLinks;
-
-    VclPtr<RadioButton>         m_pRbOpnLnksDefault;
     bool                        mbOpnLnksDefaultUserState;
-    VclPtr<RadioButton>         m_pRbOpnLnksLaunch;
     bool                        mbOpnLnksLaunchUserState;
-    VclPtr<RadioButton>         m_pRbOpnLnksBrowser;
     bool                        mbOpnLnksBrowserUserState;
 
-    DECL_LINK( ClickRbOpnLnksDefaultHdl, Button*, void );
-    DECL_LINK( ClickRbOpnLnksBrowserHdl, Button*, void );
+    std::unique_ptr<weld::CheckButton> m_xCbExprtBmkrToNmDst;
+    std::unique_ptr<weld::CheckButton> m_xCbOOoToPDFTargets;
+    std::unique_ptr<weld::CheckButton> m_xCbExportRelativeFsysLinks;
+    std::unique_ptr<weld::RadioButton> m_xRbOpnLnksDefault;
+    std::unique_ptr<weld::RadioButton> m_xRbOpnLnksLaunch;
+    std::unique_ptr<weld::RadioButton> m_xRbOpnLnksBrowser;
+
+    DECL_LINK(ClickRbOpnLnksDefaultHdl, weld::ToggleButton&, void);
+    DECL_LINK(ClickRbOpnLnksBrowserHdl, weld::ToggleButton&, void);
 
 public:
-                                ImpPDFTabLinksPage( vcl::Window* pParent, const SfxItemSet& rSet );
+    ImpPDFTabLinksPage(TabPageParent pParent, const SfxItemSet& rSet);
     virtual                     ~ImpPDFTabLinksPage() override;
 
-    virtual void                dispose() override;
-    static VclPtr<SfxTabPage>   Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
+    static VclPtr<SfxTabPage>   Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
 
     void                        GetFilterConfigItem( ImpPDFTabDialog* paParent);
     void                        SetFilterConfigItem( const ImpPDFTabDialog* paParent );
diff --git a/filter/uiconfig/ui/pdflinkspage.ui b/filter/uiconfig/ui/pdflinkspage.ui
index ba3562afc3df..656130852f0e 100644
--- a/filter/uiconfig/ui/pdflinkspage.ui
+++ b/filter/uiconfig/ui/pdflinkspage.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
 <interface domain="flt">
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkBox" id="PdfLinksPage">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -38,8 +39,6 @@
                   <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>
@@ -56,8 +55,6 @@
                   <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>
@@ -74,8 +71,6 @@
                   <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>
               </object>
@@ -126,13 +121,10 @@
                     <property name="xalign">0</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">openpdf</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>
@@ -144,13 +136,11 @@
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">openinternet</property>
+                    <property name="group">default</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>
@@ -167,8 +157,6 @@
                   <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>
               </object>
commit f8b74d8095bfea66aa47a0d70839807478989396
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 18 12:20:10 2018 +0100

    weld ImpPDFTabOpnFtrPage
    
    Change-Id: Icafd88d41f2f0757fcf788882196e7ac07d7c745
    Reviewed-on: https://gerrit.libreoffice.org/56038
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 284cada63e2c..e48641bef88a 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -880,105 +880,76 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportPDFAHdl, CheckBox&, void)
     }
 }
 
-
 /// The option features tab page
-ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
-    : SfxTabPage(pParent, "PdfViewPage","filter/ui/pdfviewpage.ui", &rCoreSet)
+ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage(TabPageParent pParent, const SfxItemSet& rCoreSet)
+    : SfxTabPage(pParent, "filter/ui/pdfviewpage.ui", "PdfViewPage", &rCoreSet)
     , mbUseCTLFont(false)
-{
-    get(mpRbOpnPageOnly, "pageonly");
-    get(mpRbOpnOutline, "outline");
-    get(mpRbOpnThumbs, "thumbs");
-    get(mpNumInitialPage, "page");
-    get(mpRbMagnDefault, "fitdefault");
-    get(mpRbMagnFitWin, "fitwin");
-    get(mpRbMagnFitWidth, "fitwidth");
-    get(mpRbMagnFitVisible, "fitvis");
-    get(mpRbMagnZoom, "fitzoom");
-    get(mpNumZoom, "zoom");
-    get(mpRbPgLyDefault, "defaultlayout");
-    get(mpRbPgLySinglePage, "singlelayout");
-    get(mpRbPgLyContinue, "contlayout");
-    get(mpRbPgLyContinueFacing, "contfacinglayout");
-    get(mpCbPgLyFirstOnLeft, "firstonleft");
-
-    mpRbMagnDefault->SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
-    mpRbMagnFitWin->SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
-    mpRbMagnFitWidth->SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
-    mpRbMagnFitVisible->SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
-    mpRbMagnZoom->SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
+    , mxRbOpnPageOnly(m_xBuilder->weld_radio_button("pageonly"))
+    , mxRbOpnOutline(m_xBuilder->weld_radio_button("outline"))
+    , mxRbOpnThumbs(m_xBuilder->weld_radio_button("thumbs"))
+    , mxNumInitialPage(m_xBuilder->weld_spin_button("page"))
+    , mxRbMagnDefault(m_xBuilder->weld_radio_button("fitdefault"))
+    , mxRbMagnFitWin(m_xBuilder->weld_radio_button("fitwin"))
+    , mxRbMagnFitWidth(m_xBuilder->weld_radio_button("fitwidth"))
+    , mxRbMagnFitVisible(m_xBuilder->weld_radio_button("fitvis"))
+    , mxRbMagnZoom(m_xBuilder->weld_radio_button("fitzoom"))
+    , mxNumZoom(m_xBuilder->weld_spin_button("zoom"))
+    , mxRbPgLyDefault(m_xBuilder->weld_radio_button("defaultlayout"))
+    , mxRbPgLySinglePage(m_xBuilder->weld_radio_button("singlelayout"))
+    , mxRbPgLyContinue(m_xBuilder->weld_radio_button("contlayout"))
+    , mxRbPgLyContinueFacing(m_xBuilder->weld_radio_button("contfacinglayout"))
+    , mxCbPgLyFirstOnLeft(m_xBuilder->weld_check_button("firstonleft"))
+{
+    mxRbMagnDefault->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
+    mxRbMagnFitWin->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
+    mxRbMagnFitWidth->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
+    mxRbMagnFitVisible->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
+    mxRbMagnZoom->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
 }
 
-
 ImpPDFTabOpnFtrPage::~ImpPDFTabOpnFtrPage()
 {
-    disposeOnce();
-}
-
-
-void ImpPDFTabOpnFtrPage::dispose()
-{
-    mpRbOpnPageOnly.clear();
-    mpRbOpnOutline.clear();
-    mpRbOpnThumbs.clear();
-    mpNumInitialPage.clear();
-    mpRbMagnDefault.clear();
-    mpRbMagnFitWin.clear();
-    mpRbMagnFitWidth.clear();
-    mpRbMagnFitVisible.clear();
-    mpRbMagnZoom.clear();
-    mpNumZoom.clear();
-    mpRbPgLyDefault.clear();
-    mpRbPgLySinglePage.clear();
-    mpRbPgLyContinue.clear();
-    mpRbPgLyContinueFacing.clear();
-    mpCbPgLyFirstOnLeft.clear();
-    SfxTabPage::dispose();
 }
 
-
-VclPtr<SfxTabPage> ImpPDFTabOpnFtrPage::Create( TabPageParent pParent,
-                                                const SfxItemSet* rAttrSet)
+VclPtr<SfxTabPage> ImpPDFTabOpnFtrPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
 {
-    return VclPtr<ImpPDFTabOpnFtrPage>::Create( pParent.pParent, *rAttrSet );
+    return VclPtr<ImpPDFTabOpnFtrPage>::Create(pParent, *rAttrSet);
 }
 
-
 void ImpPDFTabOpnFtrPage::GetFilterConfigItem( ImpPDFTabDialog* paParent  )
 {
     paParent->mnInitialView = 0;
-    if( mpRbOpnOutline->IsChecked() )
+    if( mxRbOpnOutline->get_active() )
         paParent->mnInitialView = 1;
-    else if( mpRbOpnThumbs->IsChecked() )
+    else if( mxRbOpnThumbs->get_active() )
         paParent->mnInitialView = 2;
 
     paParent->mnMagnification = 0;
-    if( mpRbMagnFitWin->IsChecked() )
+    if( mxRbMagnFitWin->get_active() )
         paParent->mnMagnification = 1;
-    else if( mpRbMagnFitWidth->IsChecked() )
+    else if( mxRbMagnFitWidth->get_active() )
         paParent->mnMagnification = 2;
-    else if( mpRbMagnFitVisible->IsChecked() )
+    else if( mxRbMagnFitVisible->get_active() )
         paParent->mnMagnification = 3;
-    else if( mpRbMagnZoom->IsChecked() )
+    else if( mxRbMagnZoom->get_active() )
     {
         paParent->mnMagnification = 4;
-        paParent->mnZoom = static_cast<sal_Int32>(mpNumZoom->GetValue());
+        paParent->mnZoom = mxNumZoom->get_value();
     }
 
-    paParent->mnInitialPage = static_cast<sal_Int32>(mpNumInitialPage->GetValue());
+    paParent->mnInitialPage = mxNumInitialPage->get_value();
 
     paParent->mnPageLayout = 0;
-    if( mpRbPgLySinglePage->IsChecked() )
+    if( mxRbPgLySinglePage->get_active() )
         paParent->mnPageLayout = 1;
-    else if( mpRbPgLyContinue->IsChecked() )
+    else if( mxRbPgLyContinue->get_active() )
         paParent->mnPageLayout = 2;
-    else if( mpRbPgLyContinueFacing->IsChecked() )
+    else if( mxRbPgLyContinueFacing->get_active() )
         paParent->mnPageLayout = 3;
 
-    paParent->mbFirstPageLeft = mbUseCTLFont && mpCbPgLyFirstOnLeft->IsChecked();
+    paParent->mbFirstPageLeft = mbUseCTLFont && mxCbPgLyFirstOnLeft->get_active();
 }
 
-
 void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const  ImpPDFTabDialog* paParent )
 {
     mbUseCTLFont = paParent->mbUseCTLFont;
@@ -986,16 +957,16 @@ void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const  ImpPDFTabDialog* paParent
     {
     default:
     case 0:
-        mpRbPgLyDefault->Check();
+        mxRbPgLyDefault->set_active(true);
         break;
     case 1:
-        mpRbPgLySinglePage->Check();
+        mxRbPgLySinglePage->set_active(true);
         break;
     case 2:
-        mpRbPgLyContinue->Check();
+        mxRbPgLyContinue->set_active(true);
         break;
     case 3:
-        mpRbPgLyContinueFacing->Check();
+        mxRbPgLyContinueFacing->set_active(true);
         break;
     }
 
@@ -1003,13 +974,13 @@ void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const  ImpPDFTabDialog* paParent
     {
     default:
     case 0:
-        mpRbOpnPageOnly->Check();
+        mxRbOpnPageOnly->set_active(true);
         break;
     case 1:
-        mpRbOpnOutline->Check();
+        mxRbOpnOutline->set_active(true);
         break;
     case 2:
-        mpRbOpnThumbs->Check();
+        mxRbOpnThumbs->set_active(true);
         break;
     }
 
@@ -1017,56 +988,53 @@ void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const  ImpPDFTabDialog* paParent
     {
     default:
     case 0:
-        mpRbMagnDefault->Check();
-        mpNumZoom->Enable( false );
+        mxRbMagnDefault->set_active(true);
+        mxNumZoom->set_sensitive(false);
         break;
     case 1:
-        mpRbMagnFitWin->Check();
-        mpNumZoom->Enable( false );
+        mxRbMagnFitWin->set_active(true);
+        mxNumZoom->set_sensitive(false);
         break;
     case 2:
-        mpRbMagnFitWidth->Check();
-        mpNumZoom->Enable( false );
+        mxRbMagnFitWidth->set_active(true);
+        mxNumZoom->set_sensitive(false);
         break;
     case 3:
-        mpRbMagnFitVisible->Check();
-        mpNumZoom->Enable( false );
+        mxRbMagnFitVisible->set_active(true);
+        mxNumZoom->set_sensitive(false);
         break;
     case 4:
-        mpRbMagnZoom->Check();
-        mpNumZoom->Enable();
+        mxRbMagnZoom->set_active(true);
+        mxNumZoom->set_sensitive(true);
         break;
     }
 
-    mpNumZoom->SetValue( paParent->mnZoom );
-    mpNumInitialPage->SetValue( paParent->mnInitialPage );
+    mxNumZoom->set_value(paParent->mnZoom);
+    mxNumInitialPage->set_value(paParent->mnInitialPage);
 
-    if( !mbUseCTLFont )
-        mpCbPgLyFirstOnLeft->Hide( );
+    if (!mbUseCTLFont)
+        mxCbPgLyFirstOnLeft->hide();
     else
     {
-        mpRbPgLyContinueFacing->SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl ) );
-        mpCbPgLyFirstOnLeft->Check( paParent->mbFirstPageLeft );
+        mxRbPgLyContinueFacing->connect_toggled(LINK(this, ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl));
+        mxCbPgLyFirstOnLeft->set_active(paParent->mbFirstPageLeft);
         ToggleRbPgLyContinueFacingHdl();
     }
 }
 
-
-IMPL_LINK_NOARG(ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, RadioButton&, void)
+IMPL_LINK_NOARG(ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, weld::ToggleButton&, void)
 {
     ToggleRbPgLyContinueFacingHdl();
 }
 
-
 void ImpPDFTabOpnFtrPage::ToggleRbPgLyContinueFacingHdl()
 {
-    mpCbPgLyFirstOnLeft->Enable( mpRbPgLyContinueFacing->IsChecked() );
+    mxCbPgLyFirstOnLeft->set_sensitive(mxRbPgLyContinueFacing->get_active());
 }
 
-
-IMPL_LINK_NOARG( ImpPDFTabOpnFtrPage, ToggleRbMagnHdl, RadioButton&, void )
+IMPL_LINK_NOARG( ImpPDFTabOpnFtrPage, ToggleRbMagnHdl, weld::ToggleButton&, void )
 {
-    mpNumZoom->Enable( mpRbMagnZoom->IsChecked() );
+    mxNumZoom->set_sensitive(mxRbMagnZoom->get_active());
 }
 
 
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 3d8ffce28ad6..ddd86c8a8473 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -257,36 +257,33 @@ public:
 /// Class tab page viewer
 class ImpPDFTabOpnFtrPage : public SfxTabPage
 {
-    VclPtr<RadioButton>         mpRbOpnPageOnly;
-    VclPtr<RadioButton>         mpRbOpnOutline;
-    VclPtr<RadioButton>         mpRbOpnThumbs;
-    VclPtr<NumericField>        mpNumInitialPage;
-
-    VclPtr<RadioButton>         mpRbMagnDefault;
-    VclPtr<RadioButton>         mpRbMagnFitWin;
-    VclPtr<RadioButton>         mpRbMagnFitWidth;
-    VclPtr<RadioButton>         mpRbMagnFitVisible;
-    VclPtr<RadioButton>         mpRbMagnZoom;
-    VclPtr<NumericField>        mpNumZoom;
-
-    VclPtr<RadioButton>         mpRbPgLyDefault;
-    VclPtr<RadioButton>         mpRbPgLySinglePage;
-    VclPtr<RadioButton>         mpRbPgLyContinue;
-    VclPtr<RadioButton>         mpRbPgLyContinueFacing;
-    VclPtr<CheckBox>            mpCbPgLyFirstOnLeft;
-
     bool                        mbUseCTLFont;
 
-    DECL_LINK( ToggleRbPgLyContinueFacingHdl, RadioButton&, void );
-    DECL_LINK( ToggleRbMagnHdl, RadioButton&, void );
+    std::unique_ptr<weld::RadioButton> mxRbOpnPageOnly;
+    std::unique_ptr<weld::RadioButton> mxRbOpnOutline;
+    std::unique_ptr<weld::RadioButton> mxRbOpnThumbs;
+    std::unique_ptr<weld::SpinButton> mxNumInitialPage;
+    std::unique_ptr<weld::RadioButton> mxRbMagnDefault;
+    std::unique_ptr<weld::RadioButton> mxRbMagnFitWin;
+    std::unique_ptr<weld::RadioButton> mxRbMagnFitWidth;
+    std::unique_ptr<weld::RadioButton> mxRbMagnFitVisible;
+    std::unique_ptr<weld::RadioButton> mxRbMagnZoom;
+    std::unique_ptr<weld::SpinButton> mxNumZoom;
+    std::unique_ptr<weld::RadioButton> mxRbPgLyDefault;
+    std::unique_ptr<weld::RadioButton> mxRbPgLySinglePage;
+    std::unique_ptr<weld::RadioButton> mxRbPgLyContinue;
+    std::unique_ptr<weld::RadioButton> mxRbPgLyContinueFacing;
+    std::unique_ptr<weld::CheckButton> mxCbPgLyFirstOnLeft;
+
+    DECL_LINK(ToggleRbPgLyContinueFacingHdl, weld::ToggleButton&, void);
+    DECL_LINK(ToggleRbMagnHdl, weld::ToggleButton&, void);
 
     void                        ToggleRbPgLyContinueFacingHdl();
 
 public:
-                                ImpPDFTabOpnFtrPage( vcl::Window* pParent, const SfxItemSet& rSet );
+    ImpPDFTabOpnFtrPage(TabPageParent pParent, const SfxItemSet& rSet);
     virtual                     ~ImpPDFTabOpnFtrPage() override;
 
-    virtual void                dispose() override;
     static VclPtr<SfxTabPage>   Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
 
     void                        GetFilterConfigItem( ImpPDFTabDialog* paParent);
diff --git a/filter/uiconfig/ui/pdfviewpage.ui b/filter/uiconfig/ui/pdfviewpage.ui
index b6a6373ee77a..183d7e13bd08 100644
--- a/filter/uiconfig/ui/pdfviewpage.ui
+++ b/filter/uiconfig/ui/pdfviewpage.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="flt">
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkAdjustment" id="adjustment1">
@@ -54,7 +54,6 @@
                         <property name="xalign">0</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">outline</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -70,7 +69,7 @@
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">thumbs</property>
+                        <property name="group">pageonly</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -102,10 +101,10 @@
                           <object class="GtkLabel" id="label4">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
                             <property name="label" translatable="yes" context="pdfviewpage|label4">Open on pa_ge:</property>
                             <property name="use_underline">True</property>
                             <property name="mnemonic_widget">page</property>
+                            <property name="xalign">0</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -116,6 +115,7 @@
                           <object class="GtkSpinButton" id="page">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="activates_default">True</property>
                             <property name="adjustment">adjustment1</property>
                           </object>
                           <packing>
@@ -177,7 +177,6 @@
                         <property name="xalign">0</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">fitwin</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -193,7 +192,7 @@
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">fitwidth</property>
+                        <property name="group">fitdefault</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -209,7 +208,7 @@
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">fitvis</property>
+                        <property name="group">fitdefault</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -225,7 +224,7 @@
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">fitzoom</property>
+                        <property name="group">fitdefault</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -260,6 +259,7 @@
                           <object class="GtkSpinButton" id="zoom">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="activates_default">True</property>
                             <property name="adjustment">adjustment2</property>
                             <accessibility>
                               <relation type="labelled-by" target="fitzoom"/>
@@ -331,7 +331,6 @@
                     <property name="xalign">0</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">singlelayout</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -347,7 +346,7 @@
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">contlayout</property>
+                    <property name="group">defaultlayout</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
@@ -363,7 +362,7 @@
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">contfacinglayout</property>
+                    <property name="group">defaultlayout</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>


More information about the Libreoffice-commits mailing list