[Libreoffice-commits] core.git: cui/source include/svx svx/source

Noel Grandin noelgrandin at gmail.com
Tue Sep 22 11:57:26 PDT 2015


 cui/source/dialogs/cuigaldlg.cxx      |   13 ++++---------
 cui/source/inc/cuigaldlg.hxx          |    2 +-
 include/svx/galtheme.hxx              |    2 +-
 svx/source/gallery2/galtheme.cxx      |    4 ++--
 svx/source/unogallery/unogaltheme.cxx |    2 +-
 5 files changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 0554e83ca9968e2301934bb2f420c9b9faee5681
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Tue Sep 22 15:31:53 2015 +0200

    convert Link<> to typed
    
    Change-Id: I285d7093f4d9db4a511fbf236f493cc4199ce534
    Reviewed-on: https://gerrit.libreoffice.org/18775
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 1a5d0fd..bb703c2 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 43f0737..2ab6b08 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 d3e9cbf..c293806 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 315449f..4e97329 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 edbd37f..c15c8cb 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 );
     }
 }


More information about the Libreoffice-commits mailing list