diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-13 11:10:38 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-14 09:30:20 +0200 |
commit | b4da5037e0cc2952446b2138d515e0c762172b25 (patch) | |
tree | 061c81fb860f5552ce18051d7eb86f4f5324da61 /sw | |
parent | 73ceffe5c247dcffa7653e043530e58e4eb73fdf (diff) |
convert Link<> to typed
Change-Id: I1876f327607e0e23292950741df348d4ec31fde1
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/dbui/mailmergewizard.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 14 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/app/apphdl.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbui.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/mailmergewizard.hxx | 2 |
6 files changed, 14 insertions, 21 deletions
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 04bd7f80153e..d689457187a8 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -303,7 +303,7 @@ short SwMailMergeWizard::Execute() return RET_CANCEL; } -void SwMailMergeWizard::StartExecuteModal( const Link<>& rEndDialogHdl ) +void SwMailMergeWizard::StartExecuteModal( const Link<Dialog&, void>& rEndDialogHdl ) { ::svt::RoadmapWizard::StartExecuteModal( rEndDialogHdl ); } diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index ce894f43059a..b5078121ab90 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -592,7 +592,7 @@ AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl() pDlg.disposeAndClear(); } -void AbstractMailMergeWizard_Impl::StartExecuteModal( const Link<>& rEndDialogHdl ) +void AbstractMailMergeWizard_Impl::StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) { aEndDlgHdl = rEndDialogHdl; pDlg->StartExecuteModal( @@ -604,15 +604,13 @@ long AbstractMailMergeWizard_Impl::GetResult() return pDlg->GetResult(); } -IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, pDialog ) +IMPL_LINK_TYPED( AbstractMailMergeWizard_Impl, EndDialogHdl, Dialog&, rDialog, void ) { - OSL_ENSURE( pDialog == pDlg, "wrong dialog passed to EndDialogHdl!" ); - (void) pDialog; // unused in non-debug + OSL_ENSURE( &rDialog == pDlg, "wrong dialog passed to EndDialogHdl!" ); + (void) rDialog; // unused in non-debug - aEndDlgHdl.Call( this ); - aEndDlgHdl = Link<>(); - - return 0L; + aEndDlgHdl.Call( *pDlg ); + aEndDlgHdl = Link<Dialog&,void>(); } OUString AbstractMailMergeWizard_Impl::GetReloadDocument() const diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index d71bafffe6ba..61ed7a0791bd 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -345,15 +345,15 @@ class SwMailMergeWizard; class AbstractMailMergeWizard_Impl : public AbstractMailMergeWizard { VclPtr<SwMailMergeWizard> pDlg; - Link<> aEndDlgHdl; + Link<Dialog&,void> aEndDlgHdl; - DECL_LINK( EndDialogHdl, SwMailMergeWizard* ); + DECL_LINK_TYPED( EndDialogHdl, Dialog&, void ); public: explicit AbstractMailMergeWizard_Impl( SwMailMergeWizard* p ) : pDlg(p) {} virtual ~AbstractMailMergeWizard_Impl(); - virtual void StartExecuteModal( const Link<>& rEndDialogHdl ) override; + virtual void StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) override; virtual long GetResult() override; virtual OUString GetReloadDocument() const override; diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index bb6004ee0a2a..e4bc0358bfbf 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -267,7 +267,7 @@ class SwMailMergeWizardExecutor : public salhelper::SimpleReferenceObject SwMailMergeConfigItem* m_pMMConfig; // sometimes owner AbstractMailMergeWizard* m_pWizard; // always owner - DECL_LINK( EndDialogHdl, AbstractMailMergeWizard* ); + DECL_LINK_TYPED( EndDialogHdl, Dialog&, void ); DECL_LINK_TYPED( DestroyDialogHdl, void*, void ); DECL_STATIC_LINK_TYPED( SwMailMergeWizardExecutor, DestroyWizardHdl, void*, void ); DECL_LINK_TYPED( CancelHdl, void*, void ); @@ -437,11 +437,8 @@ void SwMailMergeWizardExecutor::ExecuteWizard() LINK( this, SwMailMergeWizardExecutor, EndDialogHdl ) ); } -IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, pDialog ) +IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void ) { - OSL_ENSURE( pDialog == m_pWizard, "wrong dialog passed to EndDialogHdl!" ); - (void) pDialog; - long nRet = m_pWizard->GetResult(); sal_uInt16 nRestartPage = m_pWizard->GetRestartPage(); @@ -570,8 +567,6 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, pD } } // switch - - return 0L; } IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, DestroyDialogHdl, void*, void) diff --git a/sw/source/uibase/dbui/dbui.cxx b/sw/source/uibase/dbui/dbui.cxx index 5c7de4e813c1..75d3d3696c0d 100644 --- a/sw/source/uibase/dbui/dbui.cxx +++ b/sw/source/uibase/dbui/dbui.cxx @@ -135,7 +135,7 @@ void CancelableDialog::SetCancelHdl( const Link<Button*,void>& rLink ) void CancelableDialog::Show() { if (mbModal) - StartExecuteModal( Link<>() ); + StartExecuteModal( Link<Dialog&,void>() ); else Dialog::Show(); } diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx index cadd1cdb164f..1c198c435dba 100644 --- a/sw/source/uibase/inc/mailmergewizard.hxx +++ b/sw/source/uibase/inc/mailmergewizard.hxx @@ -90,7 +90,7 @@ public: void updateRoadmapItemLabel( WizardState _nState ); virtual short Execute() override; - virtual void StartExecuteModal( const Link<>& rEndDialogHdl ) override; + virtual void StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) override; }; #endif |