[Libreoffice-commits] core.git: sfx2/source

Caolán McNamara caolanm at redhat.com
Mon Jun 18 08:02:13 UTC 2018


 sfx2/source/dialog/documentfontsdialog.cxx |   21 +++++++--------------
 sfx2/source/inc/documentfontsdialog.hxx    |    6 ++----
 2 files changed, 9 insertions(+), 18 deletions(-)

New commits:
commit 276a0f01f626193ac572a2ab8e7d5f2610aa372d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jun 17 21:19:46 2018 +0100

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

diff --git a/sfx2/source/dialog/documentfontsdialog.cxx b/sfx2/source/dialog/documentfontsdialog.cxx
index 77177c7f3eeb..7e5e7f51c6e9 100644
--- a/sfx2/source/dialog/documentfontsdialog.cxx
+++ b/sfx2/source/dialog/documentfontsdialog.cxx
@@ -23,26 +23,19 @@
 
 using namespace ::com::sun::star;
 
-VclPtr<SfxTabPage> SfxDocumentFontsPage::Create(TabPageParent parent, const SfxItemSet* set)
+VclPtr<SfxTabPage> SfxDocumentFontsPage::Create(TabPageParent pParent, const SfxItemSet* set)
 {
-    return VclPtr<SfxDocumentFontsPage>::Create( parent.pParent, *set );
+    return VclPtr<SfxDocumentFontsPage>::Create(pParent, *set);
 }
 
-SfxDocumentFontsPage::SfxDocumentFontsPage( vcl::Window* parent, const SfxItemSet& set )
-    : SfxTabPage( parent, "DocumentFontsPage", "sfx/ui/documentfontspage.ui", &set )
+SfxDocumentFontsPage::SfxDocumentFontsPage(TabPageParent parent, const SfxItemSet& set)
+    : SfxTabPage(parent, "sfx/ui/documentfontspage.ui", "DocumentFontsPage", &set)
+    , embedFontsCheckbox(m_xBuilder->weld_check_button("embedFonts"))
 {
-    get( embedFontsCheckbox, "embedFonts" );
 }
 
 SfxDocumentFontsPage::~SfxDocumentFontsPage()
 {
-    disposeOnce();
-}
-
-void SfxDocumentFontsPage::dispose()
-{
-    embedFontsCheckbox.clear();
-    SfxTabPage::dispose();
 }
 
 void SfxDocumentFontsPage::Reset( const SfxItemSet* )
@@ -61,12 +54,12 @@ void SfxDocumentFontsPage::Reset( const SfxItemSet* )
         {
         }
     }
-    embedFontsCheckbox->Check( bVal );
+    embedFontsCheckbox->set_active(bVal);
 }
 
 bool SfxDocumentFontsPage::FillItemSet( SfxItemSet* )
 {
-    bool bVal = embedFontsCheckbox->IsChecked();
+    bool bVal = embedFontsCheckbox->get_active();
     SfxObjectShell* pDocSh = SfxObjectShell::Current();
     if ( pDocSh )
     {
diff --git a/sfx2/source/inc/documentfontsdialog.hxx b/sfx2/source/inc/documentfontsdialog.hxx
index 486055954ab1..1bb9830483dc 100644
--- a/sfx2/source/inc/documentfontsdialog.hxx
+++ b/sfx2/source/inc/documentfontsdialog.hxx
@@ -20,7 +20,6 @@
 #define INCLUDED_SFX2_SOURCE_INC_DOCUMENTFONTSDIALOG_HXX
 
 #include <sfx2/tabdlg.hxx>
-#include <vcl/fixed.hxx>
 
 /**
  Tab page for document font settings in the document properties dialog.
@@ -28,15 +27,14 @@
 class SfxDocumentFontsPage: public SfxTabPage
 {
 public:
-    SfxDocumentFontsPage( vcl::Window* parent, const SfxItemSet& set );
+    SfxDocumentFontsPage(TabPageParent parent, const SfxItemSet& set);
     virtual ~SfxDocumentFontsPage() override;
-    virtual void dispose() override;
     static VclPtr<SfxTabPage> Create(TabPageParent parent, const SfxItemSet* set);
 protected:
     virtual bool FillItemSet( SfxItemSet* set ) override;
     virtual void Reset( const SfxItemSet* set ) override;
 private:
-    VclPtr<CheckBox> embedFontsCheckbox;
+    std::unique_ptr<weld::CheckButton> embedFontsCheckbox;
 };
 
 #endif


More information about the Libreoffice-commits mailing list