sc/source/ui/inc/reffact.hxx      |    4 ++--
 sc/source/ui/inc/simpref.hxx      |   10 +++++-----
 sc/source/ui/inc/tabvwsh.hxx      |    6 +++---
 sc/source/ui/miscdlgs/simpref.cxx |   15 ++++++++-------
 sc/source/ui/view/reffact.cxx     |    4 ++--
 sc/source/ui/view/tabvwsh4.cxx    |   21 +++++++++------------
 6 files changed, 29 insertions(+), 31 deletions(-)

New commits:
commit df9dbfc1b187c6acdf864f8a169e5782aac61285
Author: Noel Grandin <noelgran...@gmail.com>
Date:   Wed Sep 23 12:57:27 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ia647a53efa7bd8d0e0fe6937709b92c85a2e67a6
    Reviewed-on: https://gerrit.libreoffice.org/18808
    Reviewed-by: Noel Grandin <noelgran...@gmail.com>
    Tested-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index e3e8bcc..ae843fc 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -162,8 +162,8 @@ class ScSimpleRefDlgWrapper: public SfxChildWindow
         static void     SetDefaultPosSize(Point aPos, Size aSize, bool bSet = 
true);
         void            SetRefString(const OUString& rStr);
         void            SetCloseHdl( const Link<const OUString*,void>& rLink );
-        void            SetUnoLinks( const Link<>& rDone, const Link<>& rAbort,
-                                        const Link<>& rChange );
+        void            SetUnoLinks( const Link<const OUString&,void>& rDone, 
const Link<const OUString&,void>& rAbort,
+                                        const Link<const OUString&,void>& 
rChange );
         void            SetFlags( bool bCloseOnButtonUp, bool bSingleCell, 
bool bMultiSelection );
         static void     SetAutoReOpen(bool bFlag);
 
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
index d02a4f1..bca6c9c0 100644
--- a/sc/source/ui/inc/simpref.hxx
+++ b/sc/source/ui/inc/simpref.hxx
@@ -36,9 +36,9 @@ class ScSimpleRefDlg: public ScAnyRefDlg
 {
 private:
     Link<const OUString*,void> aCloseHdl;
-    Link<>          aDoneHdl;
-    Link<>          aAbortedHdl;
-    Link<>          aChangeHdl;
+    Link<const OUString&,void> aDoneHdl;
+    Link<const OUString&,void> aAbortedHdl;
+    Link<const OUString&,void> aChangeHdl;
 
     VclPtr<FixedText> m_pFtAssign;
     VclPtr<formula::RefEdit> m_pEdAssign;
@@ -80,8 +80,8 @@ public:
     virtual void    FillInfo(SfxChildWinInfo&) const SAL_OVERRIDE;
 
     void            SetCloseHdl( const Link<const OUString*,void>& rLink );
-    void            SetUnoLinks( const Link<>& rDone, const Link<>& rAbort,
-                                const Link<>& rChange );
+    void            SetUnoLinks( const Link<const OUString&,void>& rDone, 
const Link<const OUString&,void>& rAbort,
+                                const Link<const OUString&,void>& rChange );
 
     void            SetFlags( bool bSetCloseOnButtonUp, bool bSetSingleCell, 
bool bSetMultiSelection );
 };
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 521f2fa..9a0bf9f 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -184,9 +184,9 @@ private:
                                      ::com::sun::star::beans::PropertyValue >& 
rSettings );
 
     DECL_LINK_TYPED( SimpleRefClose, const OUString*, void );
-    DECL_LINK( SimpleRefDone, OUString* );
-    DECL_LINK( SimpleRefAborted, OUString* );
-    DECL_LINK( SimpleRefChange, OUString* );
+    DECL_LINK_TYPED( SimpleRefDone, const OUString&, void );
+    DECL_LINK_TYPED( SimpleRefAborted, const OUString&, void );
+    DECL_LINK_TYPED( SimpleRefChange, const OUString&, void );
     DECL_LINK_TYPED( FormControlActivated, LinkParamNone*, void );
 
 protected:
diff --git a/sc/source/ui/miscdlgs/simpref.cxx 
b/sc/source/ui/miscdlgs/simpref.cxx
index 9fe9592..50309ea 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -123,7 +123,7 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, 
ScDocument* pDocP )
         else
             m_pEdAssign->SetRefString( aRefStr );
 
-        aChangeHdl.Call( &aRefStr );
+        aChangeHdl.Call( aRefStr );
     }
 }
 
@@ -154,8 +154,9 @@ void ScSimpleRefDlg::SetCloseHdl( const Link<const 
OUString*,void>& rLink )
     aCloseHdl=rLink;
 }
 
-void ScSimpleRefDlg::SetUnoLinks( const Link<>& rDone, const Link<>& rAbort,
-                                    const Link<>& rChange )
+void ScSimpleRefDlg::SetUnoLinks( const Link<const OUString&,void>& rDone,
+                                  const Link<const OUString&,void>& rAbort,
+                                  const Link<const OUString&,void>& rChange )
 {
     aDoneHdl    = rDone;
     aAbortedHdl = rAbort;
@@ -195,9 +196,9 @@ IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, OkBtnHdl, Button*, 
void)
     bAutoReOpen=false;
     OUString aResult=m_pEdAssign->GetText();
     aCloseHdl.Call(&aResult);
-    Link<> aUnoLink = aDoneHdl;     // stack var because this is deleted in 
DoClose
+    Link<const OUString&,void> aUnoLink = aDoneHdl;     // stack var because 
this is deleted in DoClose
     DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
-    aUnoLink.Call( &aResult );
+    aUnoLink.Call( aResult );
 }
 
 IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, CancelBtnHdl, Button*, void)
@@ -205,9 +206,9 @@ IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, CancelBtnHdl, 
Button*, void)
     bAutoReOpen=false;
     OUString aResult=m_pEdAssign->GetText();
     aCloseHdl.Call(NULL);
-    Link<> aUnoLink = aAbortedHdl;  // stack var because this is deleted in 
DoClose
+    Link<const OUString&,void> aUnoLink = aAbortedHdl;  // stack var because 
this is deleted in DoClose
     DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
-    aUnoLink.Call( &aResult );
+    aUnoLink.Call( aResult );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 11f3a90..b08af0a 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -202,8 +202,8 @@ void ScSimpleRefDlgWrapper::SetCloseHdl( const Link<const 
OUString*,void>& rLink
     }
 }
 
-void ScSimpleRefDlgWrapper::SetUnoLinks( const Link<>& rDone,
-                    const Link<>& rAbort, const Link<>& rChange )
+void ScSimpleRefDlgWrapper::SetUnoLinks( const Link<const OUString&,void>& 
rDone,
+                    const Link<const OUString&,void>& rAbort, const Link<const 
OUString&,void>& rChange )
 {
     if(GetWindow())
     {
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 40b0133..11a6d05 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1104,28 +1104,25 @@ static ScTabViewObj* lcl_GetViewObj( ScTabViewShell& 
rShell )
     return pRet;
 }
 
-IMPL_LINK( ScTabViewShell, SimpleRefDone, OUString*, pResult )
+IMPL_LINK_TYPED( ScTabViewShell, SimpleRefDone, const OUString&, aResult, void 
)
 {
     ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
-    if ( pImpObj && pResult )
-        pImpObj->RangeSelDone( *pResult );
-    return 0;
+    if ( pImpObj )
+        pImpObj->RangeSelDone( aResult );
 }
 
-IMPL_LINK( ScTabViewShell, SimpleRefAborted, OUString*, pResult )
+IMPL_LINK_TYPED( ScTabViewShell, SimpleRefAborted, const OUString&, rResult, 
void )
 {
     ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
-    if ( pImpObj && pResult )
-        pImpObj->RangeSelAborted( *pResult );
-    return 0;
+    if ( pImpObj )
+        pImpObj->RangeSelAborted( rResult );
 }
 
-IMPL_LINK( ScTabViewShell, SimpleRefChange, OUString*, pResult )
+IMPL_LINK_TYPED( ScTabViewShell, SimpleRefChange, const OUString&, rResult, 
void )
 {
     ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
-    if ( pImpObj && pResult )
-        pImpObj->RangeSelChanged( *pResult );
-    return 0;
+    if ( pImpObj )
+        pImpObj->RangeSelChanged( rResult );
 }
 
 void ScTabViewShell::StartSimpleRefDialog(
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to