From 91d06b09ae019f09bca54718c1c24907762aa3ea Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 15 Sep 2015 11:51:30 +0200 Subject: convert Link<> to typed Change-Id: I58b31530b4a29851abe9eccdf8f832b9d0348c2c --- svtools/source/contnr/treelistbox.cxx | 7 +++---- svtools/source/misc/transfer2.cxx | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'svtools') diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index f86ff4a8ea9b..66d3a4931e7d 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1364,20 +1364,19 @@ void SvTreeListBox::RemoveBoxFromDDList_Impl( const SvTreeListBox& rB ) SortLBoxes::get().erase( nVal ); } -IMPL_LINK( SvTreeListBox, DragFinishHdl_Impl, sal_Int8*, pAction ) +IMPL_LINK_TYPED( SvTreeListBox, DragFinishHdl_Impl, sal_Int8, nAction, void ) { sal_uLong nVal = reinterpret_cast(this); std::set &rSortLBoxes = SortLBoxes::get(); std::set::const_iterator it = rSortLBoxes.find(nVal); if( it != rSortLBoxes.end() ) { - DragFinished( *pAction ); + DragFinished( nAction ); rSortLBoxes.erase( it ); } - return 0; } -Link<> SvTreeListBox::GetDragFinishedHdl() const +Link SvTreeListBox::GetDragFinishedHdl() const { AddBoxToDDList_Impl( *this ); return LINK( const_cast(this), SvTreeListBox, DragFinishHdl_Impl ); diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx index b74bcd50223c..dc4122f6e7f8 100644 --- a/svtools/source/misc/transfer2.cxx +++ b/svtools/source/misc/transfer2.cxx @@ -358,7 +358,7 @@ typedef ::std::list< TDataCntnrEntry_Impl > TDataCntnrEntryList; struct TransferDataContainer_Impl { TDataCntnrEntryList aFmtList; - Link<> aFinshedLnk; + Link aFinshedLnk; INetBookmark* pBookmk; Graphic* pGrf; @@ -579,7 +579,7 @@ bool TransferDataContainer::HasAnyData() const void TransferDataContainer::StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions, - const Link<>& rLnk, sal_Int32 nDragPointer, sal_Int32 nDragImage ) + const Link& rLnk, sal_Int32 nDragPointer, sal_Int32 nDragImage ) { pImpl->aFinshedLnk = rLnk; TransferableHelper::StartDrag( pWindow, nDragSourceActions, @@ -591,7 +591,7 @@ void TransferDataContainer::StartDrag( void TransferDataContainer::DragFinished( sal_Int8 nDropAction ) { if( pImpl->aFinshedLnk.IsSet() ) - pImpl->aFinshedLnk.Call( &nDropAction ); + pImpl->aFinshedLnk.Call( nDropAction ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit