From 6fd356a08e92c043be612594eeba1521a837e48a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 24 Sep 2015 19:04:43 +0200 Subject: convert Link<> to typed Change-Id: I845f48577a9b93854e24a2004168c2d2311d9542 Reviewed-on: https://gerrit.libreoffice.org/18854 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/dialogs/postdlg.cxx | 4 ++-- cui/source/factory/dlgfact.cxx | 10 ++++------ cui/source/factory/dlgfact.hxx | 4 ++-- cui/source/inc/postdlg.hxx | 8 ++++---- 4 files changed, 12 insertions(+), 14 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 14dea85ec193..a2ab2ec0efe2 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -176,12 +176,12 @@ void SvxPostItDialog::EnableTravel(bool bNext, bool bPrev) IMPL_LINK_NOARG_TYPED(SvxPostItDialog, PrevHdl, Button*, void) { - aPrevHdlLink.Call( this ); + aPrevHdlLink.Call( *this ); } IMPL_LINK_NOARG_TYPED(SvxPostItDialog, NextHdl, Button*, void) { - aNextHdlLink.Call( this ); + aNextHdlLink.Call( *this ); } IMPL_LINK_NOARG_TYPED(SvxPostItDialog, Stamp, Button*, void) diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 94356f2d8115..6810b42a28a0 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -785,7 +785,7 @@ void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link<>& rLink ) if( rLink.IsSet() ) pDlg->SetNextHdl( LINK(this, AbstractSvxPostItDialog_Impl, NextHdl ) ); else - pDlg->SetNextHdl( Link<>() ); + pDlg->SetNextHdl( Link() ); } void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<>& rLink ) { @@ -793,19 +793,17 @@ void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<>& rLink ) if( rLink.IsSet() ) pDlg->SetPrevHdl( LINK(this, AbstractSvxPostItDialog_Impl, PrevHdl ) ); else - pDlg->SetPrevHdl( Link<>() ); + pDlg->SetPrevHdl( Link() ); } -IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl, NextHdl) +IMPL_LINK_NOARG_TYPED(AbstractSvxPostItDialog_Impl, NextHdl, SvxPostItDialog&, void) { if( aNextHdl.IsSet() ) aNextHdl.Call(this); - return 0; } -IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl, PrevHdl) +IMPL_LINK_NOARG_TYPED(AbstractSvxPostItDialog_Impl, PrevHdl, SvxPostItDialog&, void) { if( aPrevHdl.IsSet() ) aPrevHdl.Call(this); - return 0; } vcl::Window * AbstractSvxPostItDialog_Impl::GetWindow() { diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 949e25266f4c..af543dcc593a 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -460,8 +460,8 @@ class AbstractSvxPostItDialog_Impl :public AbstractSvxPostItDialog private: Link<> aNextHdl; Link<> aPrevHdl; - DECL_LINK(NextHdl, void *); - DECL_LINK(PrevHdl, void *); + DECL_LINK_TYPED(NextHdl, SvxPostItDialog&, void); + DECL_LINK_TYPED(PrevHdl, SvxPostItDialog&, void); }; class PasswordToOpenModifyDialog; diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx index 395190897541..d367676dd20d 100644 --- a/cui/source/inc/postdlg.hxx +++ b/cui/source/inc/postdlg.hxx @@ -51,9 +51,9 @@ public: static const sal_uInt16* GetRanges(); const SfxItemSet* GetOutputItemSet() const { return pOutSet; } - void SetPrevHdl( const Link<>& rLink ) + void SetPrevHdl( const Link& rLink ) { aPrevHdlLink = rLink; } - void SetNextHdl( const Link<>& rLink ) + void SetNextHdl( const Link& rLink ) { aNextHdlLink = rLink; } void EnableTravel(bool bNext, bool bPrev); @@ -91,8 +91,8 @@ private: const SfxItemSet& rSet; SfxItemSet* pOutSet; - Link<> aPrevHdlLink; - Link<> aNextHdlLink; + Link aPrevHdlLink; + Link aNextHdlLink; DECL_LINK_TYPED(Stamp, Button*, void); DECL_LINK_TYPED(OKHdl, Button*, void); -- cgit