diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-20 11:25:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-20 16:37:17 +0200 |
commit | 6520afe69286e46fa50aceb30cffbf6f9a4a1709 (patch) | |
tree | 54bb167c5a6c66ad9d4761da761660e8782030e0 /sw/source/ui | |
parent | 852a6a57f99f8ceacee791329f2e6ca04a28dc58 (diff) |
weld SwBorderDlg
Change-Id: I992201c15a23ebc23170e7e1b69f7faf949c9bb2
Reviewed-on: https://gerrit.libreoffice.org/60810
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/uiborder.cxx | 16 |
3 files changed, 11 insertions, 12 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index aabfaff6a42c..7374679ae9fa 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -906,10 +906,9 @@ VclPtr<AbstractSwAutoFormatDlg> SwAbstractDialogFactory_Impl::CreateSwAutoFormat new SwAutoFormatDlg(pParent, pShell, bSetAutoFormat, pSelFormat))); } -VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType ) +VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType ) { - VclPtr<SfxModalDialog> pDlg = VclPtr<SwBorderDlg>::Create( pParent, rSet, nType ); - return VclPtr<SwAbstractSfxDialog_Impl>::Create( pDlg ); + return VclPtr<SwAbstractSfxController_Impl>::Create(o3tl::make_unique<SwBorderDlg>(pParent, rSet, nType)); } VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 27dacb7c419e..8a8044f96645 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -618,7 +618,7 @@ public: virtual VclPtr<AbstractSwAutoFormatDlg> CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell, bool bSetAutoFormat = true, const SwTableAutoFormat* pSelFormat = nullptr) override; - virtual VclPtr<SfxAbstractDialog> CreateSwBorderDlg (vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType ) override; + virtual VclPtr<SfxAbstractDialog> CreateSwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType) override; virtual VclPtr<SfxAbstractDialog> CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) override; virtual VclPtr<VclAbstractDialog> CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) override; diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx index ae6b14c55202..412bddd4144d 100644 --- a/sw/source/ui/frmdlg/uiborder.cxx +++ b/sw/source/ui/frmdlg/uiborder.cxx @@ -29,24 +29,24 @@ #include <uiborder.hxx> #include <strings.hrc> -SwBorderDlg::SwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType) : - SfxSingleTabDialog(pParent, rSet) - +SwBorderDlg::SwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType) + : SfxSingleTabDialogController(pParent, rSet) { - SetText(SwResId(STR_FRMUI_BORDER)); + m_xDialog->set_title(SwResId(STR_FRMUI_BORDER)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ); - if ( fnCreatePage ) + if (fnCreatePage) { - VclPtr<SfxTabPage> pNewPage = (*fnCreatePage)( get_content_area(), &rSet ); + TabPageParent pPageParent(get_content_area(), this); + VclPtr<SfxTabPage> xNewPage = (*fnCreatePage)(pPageParent, &rSet); SfxAllItemSet aSet(*(rSet.GetPool())); aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE, static_cast<sal_uInt16>(nType))); if(SwBorderModes::TABLE == nType) aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_HIDESHADOWCTL)); - pNewPage->PageCreated(aSet); - SetTabPage(pNewPage); + xNewPage->PageCreated(aSet); + SetTabPage(xNewPage); } } |