[Libreoffice-commits] core.git: sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 12 20:57:16 UTC 2019


 sw/inc/swabstdlg.hxx              |    2 +-
 sw/source/ui/dialog/addrdlg.cxx   |   12 ++++++------
 sw/source/ui/dialog/swdlgfact.cxx |    5 ++---
 sw/source/ui/dialog/swdlgfact.hxx |    2 +-
 sw/source/ui/fldui/fldedt.cxx     |    2 +-
 sw/source/uibase/inc/addrdlg.hxx  |    4 ++--
 6 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 84f48dc75c98fc19ab7df0eb3749a3738411b18d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 12 09:12:25 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Mar 12 21:56:53 2019 +0100

    weld SwAddrDlg
    
    Change-Id: I6d8b5ffa4b9db27335e771153119264216c0b8f7
    Reviewed-on: https://gerrit.libreoffice.org/69084
    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 bba0b4be2359..ac53affc4664 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -370,7 +370,7 @@ public:
         SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo* pInfo) = 0;
 
     virtual VclPtr<AbstractSwInsertAbstractDlg> CreateSwInsertAbstractDlg(weld::Window* pParent) = 0;
-    virtual VclPtr<SfxAbstractDialog> CreateSwAddressAbstractDlg(vcl::Window* pParent, const SfxItemSet& rSet) = 0;
+    virtual VclPtr<SfxAbstractDialog> CreateSwAddressAbstractDlg(weld::Window* pParent, const SfxItemSet& rSet) = 0;
     virtual VclPtr<AbstractSwAsciiFilterDlg>  CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh,
                                                                 SvStream* pStream) = 0;
     virtual VclPtr<VclAbstractDialog> CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq ) = 0;
diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx
index bbc945cfe424..81ea6d9d0806 100644
--- a/sw/source/ui/dialog/addrdlg.cxx
+++ b/sw/source/ui/dialog/addrdlg.cxx
@@ -18,19 +18,19 @@
  */
 
 #include <addrdlg.hxx>
-#include <svx/svxdlg.hxx>
 #include <sfx2/pageids.hxx>
-#include <vcl/layout.hxx>
+#include <svx/svxdlg.hxx>
 
-SwAddrDlg::SwAddrDlg(vcl::Window* pParent, const SfxItemSet& rSet)
-    : SfxSingleTabDialog(pParent, rSet)
+SwAddrDlg::SwAddrDlg(weld::Window* pParent, const SfxItemSet& rSet)
+    : SfxSingleTabDialogController(pParent, rSet)
 {
     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
     ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SFXPAGE_GENERAL );
     if ( fnCreatePage )
     {
-        VclPtr<SfxTabPage> pPage2 = (*fnCreatePage)(TabPageParent(get_content_area()), &rSet);
-        SetTabPage(pPage2);
+        // create TabPage
+        TabPageParent aParent(get_content_area(), this);
+        SetTabPage(fnCreatePage(aParent, &rSet));
     }
 }
 
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 042136c460e1..1566aba4c060 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -749,11 +749,10 @@ VclPtr<AbstractSwInsertAbstractDlg> SwAbstractDialogFactory_Impl::CreateSwInsert
     return VclPtr<AbstractSwInsertAbstractDlg_Impl>::Create(std::make_unique<SwInsertAbstractDlg>(pParent));
 }
 
-VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwAddressAbstractDlg(vcl::Window* pParent,
+VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwAddressAbstractDlg(weld::Window* pParent,
                                                                   const SfxItemSet& rSet)
 {
-    VclPtr<SfxModalDialog> pDlg = VclPtr<SwAddrDlg>::Create( pParent, rSet );
-    return VclPtr<SwAbstractSfxDialog_Impl>::Create(pDlg);
+    return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwAddrDlg>(pParent, rSet));
 }
 
 VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwDropCapsDialog(weld::Window* pParent,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 1e67b9b00189..308a603c572a 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -594,7 +594,7 @@ public:
     virtual VclPtr<AbstractSwWordCountFloatDlg> CreateSwWordCountDialog(SfxBindings* pBindings,
         SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo* pInfo) override;
     virtual VclPtr<AbstractSwInsertAbstractDlg> CreateSwInsertAbstractDlg(weld::Window* pParent) override;
-    virtual VclPtr<SfxAbstractDialog> CreateSwAddressAbstractDlg(vcl::Window* pParent, const SfxItemSet& rSet) override;
+    virtual VclPtr<SfxAbstractDialog> CreateSwAddressAbstractDlg(weld::Window* pParent, const SfxItemSet& rSet) override;
     virtual VclPtr<AbstractSwAsciiFilterDlg>  CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh,
                                                                 SvStream* pStream) override;
     virtual VclPtr<VclAbstractDialog> CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq ) override;
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 8578da18e2d4..b13742cb15bc 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -330,7 +330,7 @@ IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl, Button*, void)
     aSet.Put(SfxUInt16Item(SID_FIELD_GRABFOCUS, static_cast<sal_uInt16>(nEditPos)));
     SwAbstractDialogFactory& rFact = swui::GetFactory();
 
-    ScopedVclPtr<SfxAbstractDialog> pDlg(rFact.CreateSwAddressAbstractDlg(this, aSet));
+    ScopedVclPtr<SfxAbstractDialog> pDlg(rFact.CreateSwAddressAbstractDlg(GetFrameWeld(), aSet));
     if (RET_OK == pDlg->Execute())
     {
         pSh->UpdateOneField(*pCurField);
diff --git a/sw/source/uibase/inc/addrdlg.hxx b/sw/source/uibase/inc/addrdlg.hxx
index 4142ddadd530..feb839afdd51 100644
--- a/sw/source/uibase/inc/addrdlg.hxx
+++ b/sw/source/uibase/inc/addrdlg.hxx
@@ -21,10 +21,10 @@
 
 #include <sfx2/basedlgs.hxx>
 
-class SwAddrDlg : public SfxSingleTabDialog
+class SwAddrDlg : public SfxSingleTabDialogController
 {
 public:
-    SwAddrDlg(vcl::Window* pParent, const SfxItemSet& rSet);
+    SwAddrDlg(weld::Window* pParent, const SfxItemSet& rSet);
 };
 
 #endif


More information about the Libreoffice-commits mailing list