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

Noel Grandin noel at peralex.com
Mon May 18 07:59:34 PDT 2015


 basctl/source/basicide/baside2.hxx  |    2 +-
 basctl/source/basicide/baside2b.cxx |    4 +---
 basctl/source/basicide/baside3.cxx  |    5 +++--
 basctl/source/basicide/bastype3.hxx |   14 ++++++--------
 basctl/source/inc/baside3.hxx       |    1 -
 5 files changed, 11 insertions(+), 15 deletions(-)

New commits:
commit 368291e75dbb6b116a3c413d8c02d90217b040b4
Author: Noel Grandin <noel at peralex.com>
Date:   Wed May 13 15:09:20 2015 +0200

    basctl: Use typed Links
    
    Change-Id: I0e0b6086852c06df88e1b623d4631f364eb28b09
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 1fc931f..f3bbe8b 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -237,7 +237,7 @@ protected:
     DECL_LINK( ButtonHdl, ImageButton * );
     DECL_LINK(TreeListHdl, void *);
     DECL_LINK( implEndDragHdl, HeaderBar * );
-    DECL_LINK( EditAccHdl, Accelerator * );
+    DECL_LINK_TYPED( EditAccHdl, Accelerator *, void );
 
 
 public:
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 33aa565..9b5aa20 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1810,7 +1810,7 @@ IMPL_LINK( WatchWindow, implEndDragHdl, HeaderBar *, pBar )
     return 0;
 }
 
-IMPL_LINK( WatchWindow, EditAccHdl, Accelerator *, pAcc )
+IMPL_LINK_TYPED( WatchWindow, EditAccHdl, Accelerator *, pAcc, void )
 {
     switch ( pAcc->GetCurKeyCode().GetCode() )
     {
@@ -1830,8 +1830,6 @@ IMPL_LINK( WatchWindow, EditAccHdl, Accelerator *, pAcc )
         }
         break;
     }
-
-    return 0;
 }
 
 void WatchWindow::UpdateWatches( bool bBasicStopped )
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 0c6c64a..a37b00d 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -83,8 +83,9 @@ DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rD
 {
     InitSettings( true, true, true );
 
-    aOldNotifyUndoActionHdl = pEditor->GetModel().GetNotifyUndoActionHdl();
-    pEditor->GetModel().SetNotifyUndoActionHdl(LINK(this, DialogWindow, NotifyUndoActionHdl));
+    pEditor->GetModel().SetNotifyUndoActionHdl(
+        LINK(this, DialogWindow, NotifyUndoActionHdl)
+    );
 
     SetHelpId( HID_BASICIDE_DIALOGWINDOW );
 
diff --git a/basctl/source/basicide/bastype3.hxx b/basctl/source/basicide/bastype3.hxx
index afc685b8..7565fc4 100644
--- a/basctl/source/basicide/bastype3.hxx
+++ b/basctl/source/basicide/bastype3.hxx
@@ -29,10 +29,9 @@ namespace basctl
 class ExtendedEdit : public Edit
 {
 private:
-    Accelerator     aAcc;
-    Link<>          aAccHdl;
-    Link<>          aGotFocusHdl;
-    Link<>          aLoseFocusHdl;
+    Accelerator      aAcc;
+    Link<Accelerator*,void>  aAccHdl;
+    Link<ExtendedEdit*,void>  aLoseFocusHdl;
 
 protected:
     DECL_LINK( EditAccHdl, Accelerator * );
@@ -42,10 +41,9 @@ protected:
 public:
                     ExtendedEdit( vcl::Window* pParent, IDEResId nRes );
 
-    void            SetAccHdl( const Link<>& rLink )        { aAccHdl = rLink; }
-    void            SetLoseFocusHdl( const Link<>& rLink )  { aLoseFocusHdl = rLink; }
-    void            SetGotFocusHdl( const Link<>& rLink )   { aGotFocusHdl = rLink; }
-    Accelerator&    GetAccelerator()                        { return aAcc; }
+    void            SetAccHdl( const Link<Accelerator*,void>& rLink )         { aAccHdl = rLink; }
+    void            SetLoseFocusHdl( const Link<ExtendedEdit*,void>& rLink )  { aLoseFocusHdl = rLink; }
+    Accelerator&    GetAccelerator()                                          { return aAcc; }
 };
 
 } // namespace basctl
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index 155748d..94cd40e 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -58,7 +58,6 @@ private:
     DialogWindowLayout& rLayout;
     boost::scoped_ptr<DlgEditor> pEditor; // never nullptr
     boost::scoped_ptr<SfxUndoManager> pUndoMgr; // never nullptr
-    Link<>              aOldNotifyUndoActionHdl;
     OUString            aCurPath;
 
 protected:


More information about the Libreoffice-commits mailing list