summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-17 09:52:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-17 14:08:07 +0200
commit6c8c47429936c30ebb760253fa4078c1e410eea5 (patch)
treef3c6ffeca318801302c7c35a36c69a95c9d52b50 /sw/source/ui
parent2410cce33e9bde53cecd8d2d5a73ab91121567e3 (diff)
weld SwMailMergeFieldConnectionsDlg
Change-Id: I15ee027db596c98eef878e2e174429c532789dad Reviewed-on: https://gerrit.libreoffice.org/61871 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx14
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx13
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx14
3 files changed, 22 insertions, 19 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index e8eb7119af93..6dca63b32f43 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -214,7 +214,12 @@ short AbstractJavaEditDialog_Impl::Execute()
IMPL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl);
+
+short AbstractMailMergeFieldConnectionsDlg_Impl::Execute()
+{
+ return m_xDlg->run();
+}
+
IMPL_ABSTDLG_BASE(AbstractMultiTOXTabDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractEditRegionDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractInsertSectionTabDialog_Impl);
@@ -637,7 +642,7 @@ bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
{
- return pDlg->IsUseExistingConnections();
+ return m_xDlg->IsUseExistingConnections();
}
CurTOXType AbstractMultiTOXTabDialog_Impl::GetCurrentTOXType() const
@@ -1040,10 +1045,9 @@ VclPtr<AbstractMailMergeCreateFromDlg> SwAbstractDialogFactory_Impl::CreateMailM
return VclPtr<AbstractMailMergeCreateFromDlg_Impl>::Create(pDlg);
}
-VclPtr<AbstractMailMergeFieldConnectionsDlg> SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent)
+VclPtr<AbstractMailMergeFieldConnectionsDlg> SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg(weld::Window* pParent)
{
- VclPtr<SwMailMergeFieldConnectionsDlg> pDlg = VclPtr<SwMailMergeFieldConnectionsDlg>::Create( pParent );
- return VclPtr<AbstractMailMergeFieldConnectionsDlg_Impl>::Create( pDlg );
+ return VclPtr<AbstractMailMergeFieldConnectionsDlg_Impl>::Create(o3tl::make_unique<SwMailMergeFieldConnectionsDlg>(pParent));
}
VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 6471d1864c4c..07953242d358 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -508,8 +508,15 @@ class AbstractMailMergeCreateFromDlg_Impl : public AbstractMailMergeCreateFromDl
class SwMailMergeFieldConnectionsDlg;
class AbstractMailMergeFieldConnectionsDlg_Impl : public AbstractMailMergeFieldConnectionsDlg
{
- DECL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl,SwMailMergeFieldConnectionsDlg)
- virtual bool IsUseExistingConnections() const override ;
+protected:
+ std::unique_ptr<SwMailMergeFieldConnectionsDlg> m_xDlg;
+public:
+ explicit AbstractMailMergeFieldConnectionsDlg_Impl(std::unique_ptr<SwMailMergeFieldConnectionsDlg> p)
+ : m_xDlg(std::move(p))
+ {
+ }
+ virtual short Execute() override;
+ virtual bool IsUseExistingConnections() const override ;
};
class SwMultiTOXTabDialog;
@@ -670,7 +677,7 @@ public:
sal_Int32 nCommandType,
const css::uno::Reference< css::sdbc::XConnection>& xConnection ) override;
virtual VclPtr<AbstractMailMergeCreateFromDlg> CreateMailMergeCreateFromDlg(vcl::Window* pParent) override;
- virtual VclPtr<AbstractMailMergeFieldConnectionsDlg> CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent) override;
+ virtual VclPtr<AbstractMailMergeFieldConnectionsDlg> CreateMailMergeFieldConnectionsDlg(weld::Window* pParent) override;
virtual VclPtr<VclAbstractDialog> CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr) override;
virtual VclPtr<SfxAbstractTabDialog> CreateOutlineTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet,
SwWrtShell &) override;
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 6230ad636d48..9bcd53d6c206 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -634,22 +634,14 @@ void SwMailMergeCreateFromDlg::dispose()
ModalDialog::dispose();
}
-SwMailMergeFieldConnectionsDlg::SwMailMergeFieldConnectionsDlg(vcl::Window* pParent)
- : ModalDialog(pParent, "MergeConnectDialog",
- "modules/swriter/ui/mergeconnectdialog.ui")
+SwMailMergeFieldConnectionsDlg::SwMailMergeFieldConnectionsDlg(weld::Window* pParent)
+ : GenericDialogController(pParent, "modules/swriter/ui/mergeconnectdialog.ui", "MergeConnectDialog")
+ , m_xUseExistingRB(m_xBuilder->weld_radio_button("existing"))
{
- get(m_pUseExistingRB, "existing");
}
SwMailMergeFieldConnectionsDlg::~SwMailMergeFieldConnectionsDlg()
{
- disposeOnce();
-}
-
-void SwMailMergeFieldConnectionsDlg::dispose()
-{
- m_pUseExistingRB.clear();
- ModalDialog::dispose();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */