From e5c8436ce88c4c433b736b776bab499240ffd187 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 Sep 2015 10:32:03 +0200 Subject: convert Link<> to typed Change-Id: Ie743ceadd23d57bce827a759ca89fa7d31cc4c26 Reviewed-on: https://gerrit.libreoffice.org/18857 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- cui/source/customize/cfg.cxx | 14 ++------------ cui/source/customize/selector.cxx | 2 +- cui/source/inc/cfg.hxx | 4 ++-- cui/source/inc/selector.hxx | 10 +++++----- 4 files changed, 10 insertions(+), 20 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index b6bae428c595..d70b472df7cb 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2534,14 +2534,9 @@ IMPL_LINK_TYPED( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton, void } } -IMPL_LINK( SvxMenuConfigPage, AddFunctionHdl, - SvxScriptSelectorDialog *, pDialog ) +IMPL_LINK_NOARG_TYPED( SvxMenuConfigPage, AddFunctionHdl, SvxScriptSelectorDialog&, void ) { - (void)pDialog; - AddFunction(); - - return 0; } IMPL_LINK_NOARG_TYPED( SvxMenuConfigPage, NewMenuHdl, Button *, void ) @@ -4476,14 +4471,9 @@ IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, AddCommandsHdl, Button *, void ) m_pSelectorDlg->Show(); } -IMPL_LINK( SvxToolbarConfigPage, AddFunctionHdl, - SvxScriptSelectorDialog *, pDialog ) +IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, AddFunctionHdl, SvxScriptSelectorDialog&, void ) { - (void)pDialog; - AddFunction(); - - return 0; } SvTreeListEntry* SvxToolbarConfigPage::AddFunction( diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index ee5ba51944ca..07a45a234f43 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -994,7 +994,7 @@ IMPL_LINK_TYPED( SvxScriptSelectorDialog, ClickHdl, Button *, pButton, void ) } else if (pButton == m_pOKButton) { - GetAddHdl().Call( this ); + GetAddHdl().Call( *this ); // If we are displaying Slot API commands then this the dialog is being // run from Tools/Configure and we should not close it diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index e036f1c5cb46..ff59cf4648cf 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -446,7 +446,7 @@ private: DECL_LINK_TYPED( MenuSelectHdl, MenuButton *, void ); DECL_LINK_TYPED( EntrySelectHdl, MenuButton *, void ); DECL_LINK_TYPED( AddCommandsHdl, Button *, void ); - DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog * ); + DECL_LINK_TYPED( AddFunctionHdl, SvxScriptSelectorDialog&, void ); void Init() SAL_OVERRIDE; void UpdateButtonStates() SAL_OVERRIDE; @@ -538,7 +538,7 @@ private: DECL_LINK_TYPED( EntrySelectHdl, MenuButton *, void ); DECL_LINK_TYPED( NewToolbarHdl, Button *, void ); DECL_LINK_TYPED( AddCommandsHdl, Button *, void ); - DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog * ); + DECL_LINK_TYPED( AddFunctionHdl, SvxScriptSelectorDialog&, void ); DECL_LINK_TYPED( MoveHdl, Button *, void ); void UpdateButtonStates() SAL_OVERRIDE; diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx index 92a8a8c0bf66..0ae958b60fe3 100644 --- a/cui/source/inc/selector.hxx +++ b/cui/source/inc/selector.hxx @@ -180,9 +180,9 @@ class SvxScriptSelectorDialog : public ModelessDialog VclPtr m_pOKButton; VclPtr m_pCancelButton; VclPtr m_pDescriptionText; - OUString m_sDefaultDesc; - bool m_bShowSlots; - Link<> m_aAddHdl; + OUString m_sDefaultDesc; + bool m_bShowSlots; + Link m_aAddHdl; DECL_LINK_TYPED( ClickHdl, Button *, void ); DECL_LINK_TYPED( SelectHdl, SvTreeListBox*, void ); @@ -200,8 +200,8 @@ public: virtual ~SvxScriptSelectorDialog(); virtual void dispose() SAL_OVERRIDE; - void SetAddHdl( const Link<>& rLink ) { m_aAddHdl = rLink; } - const Link<>& GetAddHdl() const { return m_aAddHdl; } + void SetAddHdl( const Link& rLink ) { m_aAddHdl = rLink; } + const Link& GetAddHdl() const { return m_aAddHdl; } void SetImageProvider(SaveInData* provider) { -- cgit