From 84f48dc75c98fc19ab7df0eb3749a3738411b18d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 12 Mar 2019 09:12:25 +0000 Subject: weld SwAddrDlg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6d8b5ffa4b9db27335e771153119264216c0b8f7 Reviewed-on: https://gerrit.libreoffice.org/69084 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/inc/swabstdlg.hxx | 2 +- sw/source/ui/dialog/addrdlg.cxx | 12 ++++++------ sw/source/ui/dialog/swdlgfact.cxx | 5 ++--- sw/source/ui/dialog/swdlgfact.hxx | 2 +- sw/source/ui/fldui/fldedt.cxx | 2 +- sw/source/uibase/inc/addrdlg.hxx | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) (limited to 'sw') diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index bba0b4be2359..ac53affc4664 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -370,7 +370,7 @@ public: SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo* pInfo) = 0; virtual VclPtr CreateSwInsertAbstractDlg(weld::Window* pParent) = 0; - virtual VclPtr CreateSwAddressAbstractDlg(vcl::Window* pParent, const SfxItemSet& rSet) = 0; + virtual VclPtr CreateSwAddressAbstractDlg(weld::Window* pParent, const SfxItemSet& rSet) = 0; virtual VclPtr CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh, SvStream* pStream) = 0; virtual VclPtr CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq ) = 0; diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx index bbc945cfe424..81ea6d9d0806 100644 --- a/sw/source/ui/dialog/addrdlg.cxx +++ b/sw/source/ui/dialog/addrdlg.cxx @@ -18,19 +18,19 @@ */ #include -#include #include -#include +#include -SwAddrDlg::SwAddrDlg(vcl::Window* pParent, const SfxItemSet& rSet) - : SfxSingleTabDialog(pParent, rSet) +SwAddrDlg::SwAddrDlg(weld::Window* pParent, const SfxItemSet& rSet) + : SfxSingleTabDialogController(pParent, rSet) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SFXPAGE_GENERAL ); if ( fnCreatePage ) { - VclPtr pPage2 = (*fnCreatePage)(TabPageParent(get_content_area()), &rSet); - SetTabPage(pPage2); + // create TabPage + TabPageParent aParent(get_content_area(), this); + SetTabPage(fnCreatePage(aParent, &rSet)); } } diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 042136c460e1..1566aba4c060 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -749,11 +749,10 @@ VclPtr SwAbstractDialogFactory_Impl::CreateSwInsert return VclPtr::Create(std::make_unique(pParent)); } -VclPtr SwAbstractDialogFactory_Impl::CreateSwAddressAbstractDlg(vcl::Window* pParent, +VclPtr SwAbstractDialogFactory_Impl::CreateSwAddressAbstractDlg(weld::Window* pParent, const SfxItemSet& rSet) { - VclPtr pDlg = VclPtr::Create( pParent, rSet ); - return VclPtr::Create(pDlg); + return VclPtr::Create(std::make_unique(pParent, rSet)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwDropCapsDialog(weld::Window* pParent, diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 1e67b9b00189..308a603c572a 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -594,7 +594,7 @@ public: virtual VclPtr CreateSwWordCountDialog(SfxBindings* pBindings, SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo* pInfo) override; virtual VclPtr CreateSwInsertAbstractDlg(weld::Window* pParent) override; - virtual VclPtr CreateSwAddressAbstractDlg(vcl::Window* pParent, const SfxItemSet& rSet) override; + virtual VclPtr CreateSwAddressAbstractDlg(weld::Window* pParent, const SfxItemSet& rSet) override; virtual VclPtr CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh, SvStream* pStream) override; virtual VclPtr CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq ) override; diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 8578da18e2d4..b13742cb15bc 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -330,7 +330,7 @@ IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl, Button*, void) aSet.Put(SfxUInt16Item(SID_FIELD_GRABFOCUS, static_cast(nEditPos))); SwAbstractDialogFactory& rFact = swui::GetFactory(); - ScopedVclPtr pDlg(rFact.CreateSwAddressAbstractDlg(this, aSet)); + ScopedVclPtr pDlg(rFact.CreateSwAddressAbstractDlg(GetFrameWeld(), aSet)); if (RET_OK == pDlg->Execute()) { pSh->UpdateOneField(*pCurField); diff --git a/sw/source/uibase/inc/addrdlg.hxx b/sw/source/uibase/inc/addrdlg.hxx index 4142ddadd530..feb839afdd51 100644 --- a/sw/source/uibase/inc/addrdlg.hxx +++ b/sw/source/uibase/inc/addrdlg.hxx @@ -21,10 +21,10 @@ #include -class SwAddrDlg : public SfxSingleTabDialog +class SwAddrDlg : public SfxSingleTabDialogController { public: - SwAddrDlg(vcl::Window* pParent, const SfxItemSet& rSet); + SwAddrDlg(weld::Window* pParent, const SfxItemSet& rSet); }; #endif -- cgit