diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-02-10 14:59:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-02-11 16:34:44 +0100 |
commit | 4bb482cc2e65a10fd4f38cddfab405169cf192e4 (patch) | |
tree | cb4859d2ece07f9163f7b79f39fdb3f613c9eee0 /cui/source/factory | |
parent | cac7541e1b2a1bbd0fca08853fd8323bb0078247 (diff) |
weld SvBaseLinksDlg
Change-Id: I40afcb99ae0e8fd27387077aea688906f037d6f4
Reviewed-on: https://gerrit.libreoffice.org/67676
Tested-by: Jenkins
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 | 16 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 10 |
2 files changed, 18 insertions, 8 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 483e4352be73..6a244b16daa5 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -248,7 +248,11 @@ short AbstractInsertObjectDialog_Impl::Execute() return m_xDlg->run(); } -IMPL_ABSTDLG_BASE(AbstractLinksDialog_Impl); +short AbstractLinksDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + IMPL_ABSTDLG_BASE(AbstractSpellDialog_Impl); short AbstractSvxPostItDialog_Impl::Execute() @@ -1580,12 +1584,12 @@ VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog(wel return VclPtr<AbstractPasteDialog_Impl>::Create(std::make_unique<SvPasteObjectDialog>(pParent)); } -VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p) +VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog(weld::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p) { - VclPtrInstance<SvBaseLinksDlg> pLinkDlg( pParent, pMgr, bHTML ); - if ( p ) - pLinkDlg->SetActLink(p); - return VclPtr<AbstractLinksDialog_Impl>::Create( pLinkDlg ); + auto xLinkDlg(std::make_unique<SvBaseLinksDlg>(pParent, pMgr, bHTML)); + if (p) + xLinkDlg->SetActLink(p); + return VclPtr<AbstractLinksDialog_Impl>::Create(std::move(xLinkDlg)); } VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel, const SdrObject* /*pObj*/) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index ed27c2c8b6c6..8d48168cf329 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -584,8 +584,14 @@ public: class AbstractLinksDialog_Impl : public SfxAbstractLinksDialog { +protected: + std::unique_ptr<SvBaseLinksDlg> m_xDlg; public: - DECL_ABSTDLG_BASE(AbstractLinksDialog_Impl, SvBaseLinksDlg ) + explicit AbstractLinksDialog_Impl(std::unique_ptr<SvBaseLinksDlg> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; }; class SvxPostItDialog; @@ -722,7 +728,7 @@ public: virtual VclPtr<VclAbstractDialog> CreateEditObjectDialog(weld::Window* pParent, const OUString& rCommmand, const css::uno::Reference < css::embed::XEmbeddedObject >& xObj ) override; virtual VclPtr<SfxAbstractPasteDialog> CreatePasteDialog(weld::Window* pParent) override; - virtual VclPtr<SfxAbstractLinksDialog> CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML = false, sfx2::SvBaseLink* p=nullptr ) override; + virtual VclPtr<SfxAbstractLinksDialog> CreateLinksDialog(weld::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML = false, sfx2::SvBaseLink* p=nullptr) override; virtual VclPtr<AbstractHangulHanjaConversionDialog> CreateHangulHanjaConversionDialog( vcl::Window* _pParent, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) override; |