From 61623d5b90510ae6c791a41031d586a9316e74c4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Sep 2015 09:35:04 +0200 Subject: convert Link<> to typed Change-Id: I365a81a0a960f5da736c9a97aa056da16c99452f --- svtools/source/contnr/fileview.cxx | 9 +++++---- svtools/source/contnr/svtabbx.cxx | 3 +-- svtools/source/uno/treecontrolpeer.cxx | 18 ++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) (limited to 'svtools/source') diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 874b98304f22..4d542cf7841b 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -423,7 +423,7 @@ public: inline void EndEditing( bool _bCancel ); protected: - DECL_LINK( SelectionMultiplexer, void* ); + DECL_LINK_TYPED( SelectionMultiplexer, SvTreeListBox*, void ); protected: // IEnumerationResultHandler overridables @@ -1752,9 +1752,10 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter ) } -IMPL_LINK( SvtFileView_Impl, SelectionMultiplexer, void*, _pSource ) +IMPL_LINK_TYPED( SvtFileView_Impl, SelectionMultiplexer, SvTreeListBox*, _pSource, void ) { - return mnSuspendSelectCallback ? 0L : m_aSelectHandler.Call( _pSource ); + if (!mnSuspendSelectCallback) + m_aSelectHandler.Call( _pSource ); } @@ -1762,7 +1763,7 @@ void SvtFileView_Impl::SetSelectHandler( const Link<>& _rHdl ) { m_aSelectHandler = _rHdl; - Link<> aMasterHandler; + Link aMasterHandler; if ( m_aSelectHandler.IsSet() ) aMasterHandler = LINK( this, SvtFileView_Impl, SelectionMultiplexer ); diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 08a29ddb35a5..2a8400b7b3e7 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -609,10 +609,9 @@ void SvHeaderTabListBox::Clear() m_aAccessibleChildren.clear(); } -IMPL_LINK_NOARG(SvHeaderTabListBox, ScrollHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvHeaderTabListBox, ScrollHdl_Impl, SvTreeListBox*, void) { m_pImpl->m_pHeaderBar->SetOffset( -GetXOffset() ); - return 0; } IMPL_LINK_NOARG_TYPED(SvHeaderTabListBox, CreateAccessibleHdl_Impl, HeaderBar*, void) diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 5e11c720454d..49667fd038df 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -96,9 +96,9 @@ public: virtual bool EditingEntry( SvTreeListEntry* pEntry, Selection& ) SAL_OVERRIDE; virtual bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) SAL_OVERRIDE; - DECL_LINK(OnSelectionChangeHdl, void *); - DECL_LINK(OnExpandingHdl, void *); - DECL_LINK(OnExpandedHdl, void *); + DECL_LINK_TYPED(OnSelectionChangeHdl, SvTreeListBox*, void); + DECL_LINK_TYPED(OnExpandingHdl, SvTreeListBox*, bool); + DECL_LINK_TYPED(OnExpandedHdl, SvTreeListBox*, void); private: rtl::Reference< TreeControlPeer > mxPeer; @@ -1507,36 +1507,34 @@ void UnoTreeListBoxImpl::dispose() -IMPL_LINK_NOARG(UnoTreeListBoxImpl, OnSelectionChangeHdl) +IMPL_LINK_NOARG_TYPED(UnoTreeListBoxImpl, OnSelectionChangeHdl, SvTreeListBox*, void) { if( mxPeer.is() ) mxPeer->onSelectionChanged(); - return 0; } -IMPL_LINK_NOARG(UnoTreeListBoxImpl, OnExpandingHdl) +IMPL_LINK_NOARG_TYPED(UnoTreeListBoxImpl, OnExpandingHdl, SvTreeListBox*, bool) { UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( GetHdlEntry() ); if( pEntry && mxPeer.is() ) { - return mxPeer->onExpanding( pEntry->mxNode, !IsExpanded( pEntry ) ) ? 1 : 0; + return mxPeer->onExpanding( pEntry->mxNode, !IsExpanded( pEntry ) ); } - return 0; + return false; } -IMPL_LINK_NOARG(UnoTreeListBoxImpl, OnExpandedHdl) +IMPL_LINK_NOARG_TYPED(UnoTreeListBoxImpl, OnExpandedHdl, SvTreeListBox*, void) { UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( GetHdlEntry() ); if( pEntry && mxPeer.is() ) { mxPeer->onExpanded( pEntry->mxNode, IsExpanded( pEntry ) ); } - return 0; } -- cgit