[Libreoffice-commits] core.git: sw/inc sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Sep 20 14:37:47 UTC 2018
sw/inc/swabstdlg.hxx | 2 +-
sw/source/ui/dialog/swdlgfact.cxx | 5 ++---
sw/source/ui/dialog/swdlgfact.hxx | 2 +-
sw/source/ui/frmdlg/uiborder.cxx | 16 ++++++++--------
sw/source/uibase/inc/uiborder.hxx | 6 ++----
sw/source/uibase/shells/basesh.cxx | 6 +++---
6 files changed, 17 insertions(+), 20 deletions(-)
New commits:
commit 6520afe69286e46fa50aceb30cffbf6f9a4a1709
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 20 11:25:24 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Sep 20 16:37:17 2018 +0200
weld SwBorderDlg
Change-Id: I992201c15a23ebc23170e7e1b69f7faf949c9bb2
Reviewed-on: https://gerrit.libreoffice.org/60810
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index a39ab9f80a76..c6e587b391fc 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -413,7 +413,7 @@ public:
virtual VclPtr<AbstractSwAutoFormatDlg> CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell,
bool bSetAutoFormat = true,
const SwTableAutoFormat* pSelFormat = nullptr ) = 0;
- virtual VclPtr<SfxAbstractDialog> CreateSwBorderDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType ) = 0;
+ virtual VclPtr<SfxAbstractDialog> CreateSwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType) = 0;
virtual VclPtr<SfxAbstractDialog> CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) = 0;
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);
}
}
diff --git a/sw/source/uibase/inc/uiborder.hxx b/sw/source/uibase/inc/uiborder.hxx
index eb805a8ee6c7..9f972373ff06 100644
--- a/sw/source/uibase/inc/uiborder.hxx
+++ b/sw/source/uibase/inc/uiborder.hxx
@@ -20,10 +20,8 @@
#define INCLUDED_SW_SOURCE_UIBASE_INC_UIBORDER_HXX
#include <sfx2/basedlgs.hxx>
-namespace vcl { class Window; }
-class SfxItemSet;
-class SwBorderDlg : public SfxSingleTabDialog
+class SwBorderDlg : public SfxSingleTabDialogController
{
public:
@@ -32,7 +30,7 @@ public:
// SW_BORDER_MODE_TABLE
// SW_BORDER_MODE_FRAME
- SwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType);
+ SwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType);
virtual ~SwBorderDlg() override;
};
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 42198e713b1f..91cb88b3d175 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2467,7 +2467,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
::PrepareBoxInfo( aSet, rSh );
rSh.GetTabBorders( aSet );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateSwBorderDlg( &rMDI, aSet, SwBorderModes::TABLE ));
+ pDlg.disposeAndReset(pFact->CreateSwBorderDlg(rMDI.GetFrameWeld(), aSet, SwBorderModes::TABLE));
if ( pDlg->Execute() == RET_OK )
{
rSh.SetTabBorders( *pDlg->GetOutputItemSet() );
@@ -2481,7 +2481,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
aSet.Put( aMgr.GetAttrSet() );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateSwBorderDlg( &rMDI, aSet, SwBorderModes::FRAME ));
+ pDlg.disposeAndReset(pFact->CreateSwBorderDlg(rMDI.GetFrameWeld(), aSet, SwBorderModes::FRAME));
if ( pDlg->Execute() == RET_OK )
{
aMgr.SetAttrSet( *pDlg->GetOutputItemSet() );
@@ -2496,7 +2496,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
::PrepareBoxInfo( aSet, rSh );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateSwBorderDlg( &rMDI, aSet, SwBorderModes::PARA ));
+ pDlg.disposeAndReset(pFact->CreateSwBorderDlg(rMDI.GetFrameWeld(), aSet, SwBorderModes::PARA));
if ( pDlg->Execute() == RET_OK )
{
rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
More information about the Libreoffice-commits
mailing list