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

Noel Grandin noelgrandin at gmail.com
Fri Sep 25 11:23:28 PDT 2015


 cui/source/customize/cfg.cxx      |   14 ++------------
 cui/source/customize/selector.cxx |    2 +-
 cui/source/inc/cfg.hxx            |    4 ++--
 cui/source/inc/selector.hxx       |   10 +++++-----
 4 files changed, 10 insertions(+), 20 deletions(-)

New commits:
commit e5c8436ce88c4c433b736b776bab499240ffd187
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Fri Sep 25 10:32:03 2015 +0200

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

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index b6bae42..d70b472 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2534,14 +2534,9 @@ IMPL_LINK_TYPED( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton, void
     }
 }
 
-IMPL_LINK( SvxMenuConfigPage, AddFunctionHdl,
-    SvxScriptSelectorDialog *, pDialog )
+IMPL_LINK_NOARG_TYPED( SvxMenuConfigPage, AddFunctionHdl, SvxScriptSelectorDialog&, void )
 {
-    (void)pDialog;
-
     AddFunction();
-
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED( SvxMenuConfigPage, NewMenuHdl, Button *, void )
@@ -4476,14 +4471,9 @@ IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, AddCommandsHdl, Button *, void )
     m_pSelectorDlg->Show();
 }
 
-IMPL_LINK( SvxToolbarConfigPage, AddFunctionHdl,
-    SvxScriptSelectorDialog *, pDialog )
+IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, AddFunctionHdl, SvxScriptSelectorDialog&, void )
 {
-    (void)pDialog;
-
     AddFunction();
-
-    return 0;
 }
 
 SvTreeListEntry* SvxToolbarConfigPage::AddFunction(
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index ee5ba51..07a45a2 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -994,7 +994,7 @@ IMPL_LINK_TYPED( SvxScriptSelectorDialog, ClickHdl, Button *, pButton, void )
     }
     else if (pButton == m_pOKButton)
     {
-        GetAddHdl().Call( this );
+        GetAddHdl().Call( *this );
 
         // If we are displaying Slot API commands then this the dialog is being
         // run from Tools/Configure and we should not close it
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index e036f1c..ff59cf4 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -446,7 +446,7 @@ private:
     DECL_LINK_TYPED( MenuSelectHdl, MenuButton *, void );
     DECL_LINK_TYPED( EntrySelectHdl, MenuButton *, void );
     DECL_LINK_TYPED( AddCommandsHdl, Button *, void );
-    DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog * );
+    DECL_LINK_TYPED( AddFunctionHdl, SvxScriptSelectorDialog&, void );
 
     void            Init() SAL_OVERRIDE;
     void            UpdateButtonStates() SAL_OVERRIDE;
@@ -538,7 +538,7 @@ private:
     DECL_LINK_TYPED( EntrySelectHdl, MenuButton *, void );
     DECL_LINK_TYPED( NewToolbarHdl, Button *, void );
     DECL_LINK_TYPED( AddCommandsHdl, Button *, void );
-    DECL_LINK( AddFunctionHdl, SvxScriptSelectorDialog * );
+    DECL_LINK_TYPED( AddFunctionHdl, SvxScriptSelectorDialog&, void );
     DECL_LINK_TYPED( MoveHdl, Button *, void );
 
     void            UpdateButtonStates() SAL_OVERRIDE;
diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx
index 92a8a8c..0ae958b 100644
--- a/cui/source/inc/selector.hxx
+++ b/cui/source/inc/selector.hxx
@@ -180,9 +180,9 @@ class SvxScriptSelectorDialog : public ModelessDialog
     VclPtr<PushButton>                     m_pOKButton;
     VclPtr<PushButton>                     m_pCancelButton;
     VclPtr<VclMultiLineEdit>               m_pDescriptionText;
-    OUString                        m_sDefaultDesc;
-    bool                        m_bShowSlots;
-    Link<>                          m_aAddHdl;
+    OUString                               m_sDefaultDesc;
+    bool                                   m_bShowSlots;
+    Link<SvxScriptSelectorDialog&,void>    m_aAddHdl;
 
     DECL_LINK_TYPED( ClickHdl, Button *, void );
     DECL_LINK_TYPED( SelectHdl, SvTreeListBox*, void );
@@ -200,8 +200,8 @@ public:
     virtual ~SvxScriptSelectorDialog();
     virtual void dispose() SAL_OVERRIDE;
 
-    void        SetAddHdl( const Link<>& rLink ) { m_aAddHdl = rLink; }
-    const Link<>& GetAddHdl() const { return m_aAddHdl; }
+    void        SetAddHdl( const Link<SvxScriptSelectorDialog&,void>& rLink ) { m_aAddHdl = rLink; }
+    const Link<SvxScriptSelectorDialog&,void>& GetAddHdl() const { return m_aAddHdl; }
 
     void        SetImageProvider(SaveInData* provider)
     {


More information about the Libreoffice-commits mailing list