diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-31 11:57:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-31 22:08:07 +0100 |
commit | 9d1c68ae17ef566b9034478c7b29411c62684289 (patch) | |
tree | 265f9e7decdbe9dc77ff7a108d878b68ed9887a6 /sw/source/ui | |
parent | 97be9270868990d3d45b29724c8fdc3598d2a64c (diff) |
replace StartExecuteModal with StartExecuteAsync
Change-Id: I2c0e0266f6bb468ebb5285f95d1824cf12100812
Reviewed-on: https://gerrit.libreoffice.org/62690
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.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 15a96a671249..39db3b0a1f10 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -724,8 +724,9 @@ void AbstractMailMergeWizard_Impl::dispose() void AbstractMailMergeWizard_Impl::StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) { aEndDlgHdl = rEndDialogHdl; - pDlg->StartExecuteModal( - LINK( this, AbstractMailMergeWizard_Impl, EndDialogHdl ) ); + pDlg->StartExecuteAsync([=](sal_Int32 nResult){ + EndDialogHdl(nResult); + }); } sal_Int32 AbstractMailMergeWizard_Impl::GetResult() @@ -733,11 +734,8 @@ sal_Int32 AbstractMailMergeWizard_Impl::GetResult() return pDlg->GetResult(); } -IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, Dialog&, rDialog, void ) +void AbstractMailMergeWizard_Impl::EndDialogHdl(sal_Int32 /*nResult*/) { - OSL_ENSURE( &rDialog == pDlg, "wrong dialog passed to EndDialogHdl!" ); - (void) rDialog; // unused in non-debug - aEndDlgHdl.Call( *pDlg ); aEndDlgHdl = Link<Dialog&,void>(); } diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 78d79677c0ed..8f2cf77a04c3 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -572,7 +572,7 @@ class AbstractMailMergeWizard_Impl : public AbstractMailMergeWizard VclPtr<SwMailMergeWizard> pDlg; Link<Dialog&,void> aEndDlgHdl; - DECL_LINK( EndDialogHdl, Dialog&, void ); + void EndDialogHdl(sal_Int32 nResult); public: explicit AbstractMailMergeWizard_Impl( SwMailMergeWizard* p ) : pDlg(p) |