diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-30 14:59:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-30 21:45:40 +0200 |
commit | b16eb0d91f204823339a78b353dc8097aa8f7e56 (patch) | |
tree | 66378df0402f80e0d38ec096d490326c02cb74da /cui/source/factory | |
parent | 1fe4a1a76da8fd3c196ccd9529b01ee093516b25 (diff) |
weld SvxZoomDialog
Change-Id: I9d68fdcc9dc27a5aa4f6ec78542ce7822259233e
Reviewed-on: https://gerrit.libreoffice.org/52157
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/factory')
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 19 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 17 |
2 files changed, 22 insertions, 14 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 0acd2ccd46e9..6dc1f279693d 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -104,7 +104,12 @@ IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl); IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl); IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl) IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl) -IMPL_ABSTDLG_BASE(AbstractSvxZoomDialog_Impl) + +short AbstractSvxZoomDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl); IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl); IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl); @@ -406,17 +411,17 @@ void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< css::containe void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) { - pDlg->SetLimits( nMin, nMax ); + m_xDlg->SetLimits( nMin, nMax ); } void AbstractSvxZoomDialog_Impl::HideButton( ZoomButtonId nBtnId ) { - pDlg->HideButton( nBtnId ); + m_xDlg->HideButton( nBtnId ); } const SfxItemSet* AbstractSvxZoomDialog_Impl::GetOutputItemSet() const { - return pDlg->GetOutputItemSet(); + return m_xDlg->GetOutputItemSet(); } void AbstractSpellDialog_Impl::Invalidate() @@ -953,11 +958,9 @@ VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDia return VclPtr<AbstractFmShowColsDialog_Impl>::Create( pDlg ); } -VclPtr<AbstractSvxZoomDialog> AbstractDialogFactory_Impl::CreateSvxZoomDialog( vcl::Window* pParent, - const SfxItemSet& rCoreSet) +VclPtr<AbstractSvxZoomDialog> AbstractDialogFactory_Impl::CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) { - VclPtrInstance<SvxZoomDialog> pDlg( pParent, rCoreSet); - return VclPtr<AbstractSvxZoomDialog_Impl>::Create( pDlg ); + return VclPtr<AbstractSvxZoomDialog_Impl>::Create(new SvxZoomDialog(pParent, rCoreSet)); } VclPtr<AbstractSpellDialog> AbstractDialogFactory_Impl::CreateSvxSpellDialog( diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 4a77f17607ee..25573f60a19e 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -187,11 +187,17 @@ class AbstractFmShowColsDialog_Impl : public AbstractFmShowColsDialog class SvxZoomDialog; class AbstractSvxZoomDialog_Impl : public AbstractSvxZoomDialog { - DECL_ABSTDLG_BASE(AbstractSvxZoomDialog_Impl,SvxZoomDialog) - virtual void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) override; - virtual void HideButton( ZoomButtonId nBtnId ) override; +protected: + std::unique_ptr<SvxZoomDialog> m_xDlg; +public: + explicit AbstractSvxZoomDialog_Impl(SvxZoomDialog* p) + : m_xDlg(p) + { + } + virtual short Execute() override; + virtual void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) override; + virtual void HideButton( ZoomButtonId nBtnId ) override; virtual const SfxItemSet* GetOutputItemSet() const override ; - }; namespace svx{ class SpellDialog;} @@ -547,8 +553,7 @@ public: SvxSpellWrapper* pWrapper ) override; virtual VclPtr<AbstractFmShowColsDialog> CreateFmShowColsDialog() override; - virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog( vcl::Window* pParent, - const SfxItemSet& rCoreSet) override; + virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) override; // add for SvxBorderBackgroundDlg virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg( vcl::Window* pParent, |