Kaydet (Commit) 6520afe6 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SwBorderDlg

Change-Id: I992201c15a23ebc23170e7e1b69f7faf949c9bb2
Reviewed-on: https://gerrit.libreoffice.org/60810
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 852a6a57
...@@ -413,7 +413,7 @@ public: ...@@ -413,7 +413,7 @@ public:
virtual VclPtr<AbstractSwAutoFormatDlg> CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell, virtual VclPtr<AbstractSwAutoFormatDlg> CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell,
bool bSetAutoFormat = true, bool bSetAutoFormat = true,
const SwTableAutoFormat* pSelFormat = nullptr ) = 0; 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<SfxAbstractDialog> CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) = 0; virtual VclPtr<VclAbstractDialog> CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) = 0;
......
...@@ -906,10 +906,9 @@ VclPtr<AbstractSwAutoFormatDlg> SwAbstractDialogFactory_Impl::CreateSwAutoFormat ...@@ -906,10 +906,9 @@ VclPtr<AbstractSwAutoFormatDlg> SwAbstractDialogFactory_Impl::CreateSwAutoFormat
new SwAutoFormatDlg(pParent, pShell, bSetAutoFormat, pSelFormat))); 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<SwAbstractSfxController_Impl>::Create(o3tl::make_unique<SwBorderDlg>(pParent, rSet, nType));
return VclPtr<SwAbstractSfxDialog_Impl>::Create( pDlg );
} }
VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh )
......
...@@ -618,7 +618,7 @@ public: ...@@ -618,7 +618,7 @@ public:
virtual VclPtr<AbstractSwAutoFormatDlg> CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell, virtual VclPtr<AbstractSwAutoFormatDlg> CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell,
bool bSetAutoFormat = true, bool bSetAutoFormat = true,
const SwTableAutoFormat* pSelFormat = nullptr) override; 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<SfxAbstractDialog> CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) override;
virtual VclPtr<VclAbstractDialog> CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) override; virtual VclPtr<VclAbstractDialog> CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) override;
......
...@@ -29,24 +29,24 @@ ...@@ -29,24 +29,24 @@
#include <uiborder.hxx> #include <uiborder.hxx>
#include <strings.hrc> #include <strings.hrc>
SwBorderDlg::SwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType) : SwBorderDlg::SwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType)
SfxSingleTabDialog(pParent, rSet) : SfxSingleTabDialogController(pParent, rSet)
{ {
SetText(SwResId(STR_FRMUI_BORDER)); m_xDialog->set_title(SwResId(STR_FRMUI_BORDER));
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ); ::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())); SfxAllItemSet aSet(*(rSet.GetPool()));
aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE, static_cast<sal_uInt16>(nType))); aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE, static_cast<sal_uInt16>(nType)));
if(SwBorderModes::TABLE == nType) if(SwBorderModes::TABLE == nType)
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_HIDESHADOWCTL)); aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_HIDESHADOWCTL));
pNewPage->PageCreated(aSet); xNewPage->PageCreated(aSet);
SetTabPage(pNewPage); SetTabPage(xNewPage);
} }
} }
......
...@@ -20,10 +20,8 @@ ...@@ -20,10 +20,8 @@
#define INCLUDED_SW_SOURCE_UIBASE_INC_UIBORDER_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_UIBORDER_HXX
#include <sfx2/basedlgs.hxx> #include <sfx2/basedlgs.hxx>
namespace vcl { class Window; }
class SfxItemSet;
class SwBorderDlg : public SfxSingleTabDialog class SwBorderDlg : public SfxSingleTabDialogController
{ {
public: public:
...@@ -32,7 +30,7 @@ public: ...@@ -32,7 +30,7 @@ public:
// SW_BORDER_MODE_TABLE // SW_BORDER_MODE_TABLE
// SW_BORDER_MODE_FRAME // SW_BORDER_MODE_FRAME
SwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType); SwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType);
virtual ~SwBorderDlg() override; virtual ~SwBorderDlg() override;
}; };
......
...@@ -2467,7 +2467,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) ...@@ -2467,7 +2467,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
::PrepareBoxInfo( aSet, rSh ); ::PrepareBoxInfo( aSet, rSh );
rSh.GetTabBorders( aSet ); rSh.GetTabBorders( aSet );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); 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 ) if ( pDlg->Execute() == RET_OK )
{ {
rSh.SetTabBorders( *pDlg->GetOutputItemSet() ); rSh.SetTabBorders( *pDlg->GetOutputItemSet() );
...@@ -2481,7 +2481,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) ...@@ -2481,7 +2481,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
aSet.Put( aMgr.GetAttrSet() ); aSet.Put( aMgr.GetAttrSet() );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); 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 ) if ( pDlg->Execute() == RET_OK )
{ {
aMgr.SetAttrSet( *pDlg->GetOutputItemSet() ); aMgr.SetAttrSet( *pDlg->GetOutputItemSet() );
...@@ -2496,7 +2496,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) ...@@ -2496,7 +2496,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
::PrepareBoxInfo( aSet, rSh ); ::PrepareBoxInfo( aSet, rSh );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); 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 ) if ( pDlg->Execute() == RET_OK )
{ {
rSh.SetAttrSet( *pDlg->GetOutputItemSet() ); rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment