weld SwWrapDlg
Change-Id: Ib60a44932764965ab6af3055d615771617737392
Reviewed-on: https://gerrit.libreoffice.org/60816
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 63e966b..e9f201a 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -414,7 +414,7 @@ public:
bool bSetAutoFormat = true,
const SwTableAutoFormat* pSelFormat = nullptr ) = 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(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateSwTableTabDlg(weld::Window* pParent,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 973e46a..2a5849a 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -910,10 +910,9 @@ VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBorderDlg(weld::
return VclPtr<SwAbstractSfxController_Impl>::Create(o3tl::make_unique<SwBorderDlg>(pParent, rSet, nType));
}
VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh )
VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh)
{
VclPtr<SfxModalDialog> pDlg = VclPtr<SwWrapDlg>::Create( pParent, rSet, pSh, true/*bDrawMode*/ );
return VclPtr<SwAbstractSfxDialog_Impl>::Create( pDlg );
return VclPtr<SwAbstractSfxController_Impl>::Create(o3tl::make_unique<SwWrapDlg>(pParent, rSet, pSh, true/*bDrawMode*/));
}
VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index ba2412c..7cbb223 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -620,7 +620,7 @@ public:
const SwTableAutoFormat* pSelFormat = nullptr) 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(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh) override;
virtual VclPtr<VclAbstractDialog> CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSwTableTabDlg(weld::Window* pParent,
const SfxItemSet* pItemSet, SwWrtShell* pSh) override;
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index e20cf76..d01dd02 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -50,14 +50,15 @@ const sal_uInt16 SwWrapTabPage::m_aWrapPageRg[] = {
0
};
SwWrapDlg::SwWrapDlg(vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pWrtShell, bool bDrawMode)
: SfxSingleTabDialog(pParent, rSet, "WrapDialog", "modules/swriter/ui/wrapdialog.ui")
SwWrapDlg::SwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pWrtShell, bool bDrawMode)
: SfxSingleTabDialogController(pParent, rSet, "modules/swriter/ui/wrapdialog.ui", "WrapDialog")
{
// create TabPage
VclPtr<SwWrapTabPage> pNewPage = static_cast<SwWrapTabPage*>( SwWrapTabPage::Create(get_content_area(), &rSet).get() );
pNewPage->SetFormatUsed(false, bDrawMode);
pNewPage->SetShell(pWrtShell);
SetTabPage(pNewPage);
TabPageParent pPageParent(get_content_area(), this);
VclPtr<SwWrapTabPage> xNewPage = static_cast<SwWrapTabPage*>(SwWrapTabPage::Create(pPageParent, &rSet).get());
xNewPage->SetFormatUsed(false, bDrawMode);
xNewPage->SetShell(pWrtShell);
SetTabPage(xNewPage);
}
SwWrapTabPage::SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet)
diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx
index c0c34f1..744b9cf 100644
--- a/sw/source/uibase/inc/wrap.hxx
+++ b/sw/source/uibase/inc/wrap.hxx
@@ -29,10 +29,10 @@ namespace vcl { class Window; }
class SfxItemSet;
class SwWrtShell;
class SwWrapDlg : public SfxSingleTabDialog
class SwWrapDlg : public SfxSingleTabDialogController
{
public:
SwWrapDlg(vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
SwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
};
// circulation TabPage
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 0ab94af..6c77a0d 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -137,7 +137,7 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
pSh->GetObjAttr(aSet);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh ));
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSwWrapDlg(GetView().GetFrameWeld(), aSet, pSh));
if (pDlg->Execute() == RET_OK)
{
diff --git a/sw/uiconfig/swriter/ui/wrapdialog.ui b/sw/uiconfig/swriter/ui/wrapdialog.ui
index c4c48d9..83c6784 100644
--- a/sw/uiconfig/swriter/ui/wrapdialog.ui
+++ b/sw/uiconfig/swriter/ui/wrapdialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="WrapDialog">
@@ -7,7 +7,13 @@
<property name="border_width">6</property>
<property name="title" translatable="yes" context="wrapdialog|WrapDialog">Wrap</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="default_width">0</property>
<property name="default_height">0</property>
<property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>