From 55cdab3b8b74a29008186050e34d7f05c121c2f7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 14 Sep 2015 11:34:22 +0200 Subject: convert Link<> to typed Change-Id: I057969beed6402b2125f4dc719570d324c1df4fc --- fpicker/source/office/RemoteFilesDialog.cxx | 6 ++---- fpicker/source/office/RemoteFilesDialog.hxx | 2 +- fpicker/source/office/iodlg.cxx | 6 ++---- fpicker/source/office/iodlg.hxx | 2 +- include/svtools/fileview.hxx | 2 +- svtools/source/contnr/fileview.cxx | 10 +++++----- 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index f0cf7bfe067d..b3a60c860cbc 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -291,7 +291,7 @@ RemoteFilesDialog::~RemoteFilesDialog() void RemoteFilesDialog::dispose() { - m_pFileView->SetSelectHdl( Link<>() ); + m_pFileView->SetSelectHdl( Link() ); // save window state if( !m_sIniKey.isEmpty() ) @@ -943,7 +943,7 @@ IMPL_LINK_NOARG_TYPED( RemoteFilesDialog, DoubleClickHdl, SvTreeListBox*, bool ) return true; } -IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl ) +IMPL_LINK_NOARG_TYPED( RemoteFilesDialog, SelectHdl, SvTreeListBox*, void ) { SvTreeListEntry* pEntry = m_pFileView->FirstSelected(); @@ -978,8 +978,6 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl ) EnableControls(); } } - - return 1; } IMPL_LINK_NOARG( RemoteFilesDialog, FileNameGetFocusHdl ) diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx index 89cda7f442df..30fff9de7beb 100644 --- a/fpicker/source/office/RemoteFilesDialog.hxx +++ b/fpicker/source/office/RemoteFilesDialog.hxx @@ -190,7 +190,7 @@ private: DECL_LINK_TYPED ( EditServiceMenuHdl, MenuButton *, void ); DECL_LINK_TYPED( DoubleClickHdl, SvTreeListBox*, bool ); - DECL_LINK( SelectHdl, void * ); + DECL_LINK_TYPED( SelectHdl, SvTreeListBox*, void ); DECL_LINK( FileNameGetFocusHdl, void * ); DECL_LINK( FileNameModifyHdl, void * ); diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 960579e7ea04..7872042d8e3d 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -519,7 +519,7 @@ void SvtFileDialog::dispose() makeAny( sUserData ) ); } - _pFileView->SetSelectHdl( Link<>() ); + _pFileView->SetSelectHdl( Link() ); // Save bookmarked places if(_pImp->_pPlaces->IsUpdated()) { @@ -1542,7 +1542,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL ) -IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox ) +IMPL_LINK_TYPED( SvtFileDialog, SelectHdl_Impl, SvTreeListBox*, pBox, void ) { SvTreeListEntry* pEntry = pBox->FirstSelected(); DBG_ASSERT( pEntry, "SelectHandler without selected entry" ); @@ -1590,8 +1590,6 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox ) } FileSelect(); - - return 0; } diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx index 54103fca5376..5d1c3dc648e0 100644 --- a/fpicker/source/office/iodlg.hxx +++ b/fpicker/source/office/iodlg.hxx @@ -120,7 +120,7 @@ private: void OpenMultiSelection_Impl(); void AddControls_Impl( ); - DECL_LINK( SelectHdl_Impl, SvTabListBox* ); + DECL_LINK_TYPED( SelectHdl_Impl, SvTreeListBox*, void ); DECL_LINK_TYPED( DblClickHdl_Impl, SvTreeListBox*, bool); DECL_LINK(EntrySelectHdl_Impl, void *); DECL_LINK( OpenDoneHdl_Impl, SvtFileView* ); diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx index 3aa326b63444..c57ed40f8079 100644 --- a/include/svtools/fileview.hxx +++ b/include/svtools/fileview.hxx @@ -158,7 +158,7 @@ public: void SetNoSelection(); - void SetSelectHdl( const Link<>& rHdl ); + void SetSelectHdl( const Link& rHdl ); void SetDoubleClickHdl( const Link& rHdl ); void SetOpenDoneHdl( const Link<>& rHdl ); diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 121432cfe3e7..b4ab6a684645 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -337,8 +337,8 @@ class SvtFileView_Impl :public ::svt::IEnumerationResultHandler ,public ITimeoutHandler { protected: - VclPtr mpAntiImpl; - Link<> m_aSelectHandler; + VclPtr mpAntiImpl; + Link m_aSelectHandler; ::rtl::Reference< ::svt::FileViewContentEnumerator > m_xContentEnumerator; @@ -415,7 +415,7 @@ public: void SetActualFolder( const INetURLObject& rActualFolder ); - void SetSelectHandler( const Link<>& _rHdl ); + void SetSelectHandler( const Link& _rHdl ); void InitSelection(); void ResetCursor(); @@ -1243,7 +1243,7 @@ void SvtFileView::GetFocus() -void SvtFileView::SetSelectHdl( const Link<>& rHdl ) +void SvtFileView::SetSelectHdl( const Link& rHdl ) { mpImp->SetSelectHandler( rHdl ); } @@ -1759,7 +1759,7 @@ IMPL_LINK_TYPED( SvtFileView_Impl, SelectionMultiplexer, SvTreeListBox*, _pSourc } -void SvtFileView_Impl::SetSelectHandler( const Link<>& _rHdl ) +void SvtFileView_Impl::SetSelectHandler( const Link& _rHdl ) { m_aSelectHandler = _rHdl; -- cgit