Kaydet (Commit) 276a0f01 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SfxDocumentFontsPage

Change-Id: I09bb788455053c266ce18d21055157147668263e
Reviewed-on: https://gerrit.libreoffice.org/55968
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e371a4a1
...@@ -23,26 +23,19 @@ ...@@ -23,26 +23,19 @@
using namespace ::com::sun::star; 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 ) SfxDocumentFontsPage::SfxDocumentFontsPage(TabPageParent parent, const SfxItemSet& set)
: SfxTabPage( parent, "DocumentFontsPage", "sfx/ui/documentfontspage.ui", &set ) : SfxTabPage(parent, "sfx/ui/documentfontspage.ui", "DocumentFontsPage", &set)
, embedFontsCheckbox(m_xBuilder->weld_check_button("embedFonts"))
{ {
get( embedFontsCheckbox, "embedFonts" );
} }
SfxDocumentFontsPage::~SfxDocumentFontsPage() SfxDocumentFontsPage::~SfxDocumentFontsPage()
{ {
disposeOnce();
}
void SfxDocumentFontsPage::dispose()
{
embedFontsCheckbox.clear();
SfxTabPage::dispose();
} }
void SfxDocumentFontsPage::Reset( const SfxItemSet* ) void SfxDocumentFontsPage::Reset( const SfxItemSet* )
...@@ -61,12 +54,12 @@ 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 SfxDocumentFontsPage::FillItemSet( SfxItemSet* )
{ {
bool bVal = embedFontsCheckbox->IsChecked(); bool bVal = embedFontsCheckbox->get_active();
SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxObjectShell* pDocSh = SfxObjectShell::Current();
if ( pDocSh ) if ( pDocSh )
{ {
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#define INCLUDED_SFX2_SOURCE_INC_DOCUMENTFONTSDIALOG_HXX #define INCLUDED_SFX2_SOURCE_INC_DOCUMENTFONTSDIALOG_HXX
#include <sfx2/tabdlg.hxx> #include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
/** /**
Tab page for document font settings in the document properties dialog. Tab page for document font settings in the document properties dialog.
...@@ -28,15 +27,14 @@ ...@@ -28,15 +27,14 @@
class SfxDocumentFontsPage: public SfxTabPage class SfxDocumentFontsPage: public SfxTabPage
{ {
public: public:
SfxDocumentFontsPage( vcl::Window* parent, const SfxItemSet& set ); SfxDocumentFontsPage(TabPageParent parent, const SfxItemSet& set);
virtual ~SfxDocumentFontsPage() override; virtual ~SfxDocumentFontsPage() override;
virtual void dispose() override;
static VclPtr<SfxTabPage> Create(TabPageParent parent, const SfxItemSet* set); static VclPtr<SfxTabPage> Create(TabPageParent parent, const SfxItemSet* set);
protected: protected:
virtual bool FillItemSet( SfxItemSet* set ) override; virtual bool FillItemSet( SfxItemSet* set ) override;
virtual void Reset( const SfxItemSet* set ) override; virtual void Reset( const SfxItemSet* set ) override;
private: private:
VclPtr<CheckBox> embedFontsCheckbox; std::unique_ptr<weld::CheckButton> embedFontsCheckbox;
}; };
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment