sw/inc/swabstdlg.hxx                 |    2 +-
 sw/source/ui/dialog/swdlgfact.cxx    |    5 ++---
 sw/source/ui/dialog/swdlgfact.hxx    |    2 +-
 sw/source/ui/frmdlg/wrap.cxx         |   13 +++++++------
 sw/source/uibase/inc/wrap.hxx        |    4 ++--
 sw/source/uibase/shells/drwbassh.cxx |    2 +-
 sw/uiconfig/swriter/ui/wrapdialog.ui |    8 +++++++-
 7 files changed, 21 insertions(+), 15 deletions(-)

New commits:
commit f6ab12d5dae1212b0ad4e82ca3325f3dd4c974b6
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Sep 20 14:24:55 2018 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Sep 20 18:13:05 2018 +0200

    weld SwWrapDlg
    
    Change-Id: Ib60a44932764965ab6af3055d615771617737392
    Reviewed-on: https://gerrit.libreoffice.org/60816
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 63e966bbd723..e9f201a35ffb 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 973e46ab8fd7..2a5849a1753e 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 ba2412c50a70..7cbb22347371 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 e20cf7677b90..d01dd02ab9a2 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 c0c34f1b6404..744b9cf183f2 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 0ab94affdb5a..6c77a0dc1eab 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 c4c48d9a23f5..83c6784f5782 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>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to