diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-22 15:31:53 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-22 18:56:53 +0000 |
commit | 0554e83ca9968e2301934bb2f420c9b9faee5681 (patch) | |
tree | 0a71da3db6dbeb540d1275e2925a09bc8e47a022 | |
parent | f378e1748f0645481a8b2deebd7bb2b34797aff7 (diff) |
convert Link<> to typed
Change-Id: I285d7093f4d9db4a511fbf236f493cc4199ce534
Reviewed-on: https://gerrit.libreoffice.org/18775
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 13 | ||||
-rw-r--r-- | cui/source/inc/cuigaldlg.hxx | 2 | ||||
-rw-r--r-- | include/svx/galtheme.hxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 4 | ||||
-rw-r--r-- | svx/source/unogallery/unogaltheme.cxx | 2 |
5 files changed, 9 insertions, 14 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 1a5d0fd91b69..bb703c2eb248 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -511,7 +511,7 @@ IMPL_LINK_TYPED( ActualizeProgress, TimeoutHdl, Idle*, _pTimer, void) -IMPL_LINK( ActualizeProgress, ActualizeHdl, INetURLObject*, pURL ) +IMPL_LINK_TYPED( ActualizeProgress, ActualizeHdl, const INetURLObject&, rURL, void ) { for( long i = 0; i < 128; i++ ) Application::Reschedule(); @@ -519,14 +519,9 @@ IMPL_LINK( ActualizeProgress, ActualizeHdl, INetURLObject*, pURL ) Flush(); Sync(); - if( pURL ) - { - m_pFtActualizeFile->SetText( GetReducedString( *pURL, 30 ) ); - m_pFtActualizeFile->Flush(); - m_pFtActualizeFile->Sync(); - } - - return 0; + m_pFtActualizeFile->SetText( GetReducedString( rURL, 30 ) ); + m_pFtActualizeFile->Flush(); + m_pFtActualizeFile->Sync(); } TitleDialog::TitleDialog(vcl::Window* pParent, const OUString& rOldTitle) diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 43f073719acf..2ab6b08e6c04 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -160,7 +160,7 @@ private: DECL_LINK_TYPED( ClickCancelBtn, Button*, void ); DECL_LINK_TYPED( TimeoutHdl, Idle*, void ); - DECL_LINK( ActualizeHdl, INetURLObject* ); + DECL_LINK_TYPED( ActualizeHdl, const INetURLObject&, void ); public: ActualizeProgress( vcl::Window* pWindow, GalleryTheme* pThm ); diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx index d3e9cbf042ea..c29380628787 100644 --- a/include/svx/galtheme.hxx +++ b/include/svx/galtheme.hxx @@ -178,7 +178,7 @@ public: bool IsDefault() const; SAL_DLLPRIVATE bool IsModified() const; - void Actualize( const Link<>& rActualizeLink, GalleryProgress* pProgress = NULL ); + void Actualize( const Link<const INetURLObject&, void>& rActualizeLink, GalleryProgress* pProgress = NULL ); SAL_DLLPRIVATE void AbortActualize() { bAbortActualize = true; } SAL_DLLPRIVATE Gallery* GetParent() const { return pParent; } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 315449fc1f1f..4e9732992309 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -509,7 +509,7 @@ bool GalleryTheme::ChangeObjectPos( size_t nOldPos, size_t nNewPos ) return true; } -void GalleryTheme::Actualize( const Link<>& rActualizeLink, GalleryProgress* pProgress ) +void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualizeLink, GalleryProgress* pProgress ) { if( !IsReadOnly() ) { @@ -534,7 +534,7 @@ void GalleryTheme::Actualize( const Link<>& rActualizeLink, GalleryProgress* pPr const INetURLObject aURL( pEntry->aURL ); - rActualizeLink.Call( const_cast<INetURLObject *>(&aURL) ); + rActualizeLink.Call( aURL ); // SvDraw objects will be updated later if( pEntry->eObjKind != SGA_OBJ_SVDRAW ) diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx index edbd37fd4c7e..c15c8cbd20de 100644 --- a/svx/source/unogallery/unogaltheme.cxx +++ b/svx/source/unogallery/unogaltheme.cxx @@ -206,7 +206,7 @@ void SAL_CALL GalleryTheme::update( ) if( mpTheme ) { - const Link<> aDummyLink; + const Link<const INetURLObject&, void> aDummyLink; mpTheme->Actualize( aDummyLink ); } } |