[Libreoffice-commits] core.git: 7 commits - accessibility/inc accessibility/source basctl/source cui/source dbaccess/source extensions/source filter/source fpicker/source include/dbaccess include/svtools include/toolkit include/vcl reportdesign/source sc/source sd/source sfx2/source sot/source svtools/source sw/source toolkit/source vcl/inc vcl/source xmlsecurity/inc xmlsecurity/source

Noel Grandin noel at peralex.com
Thu Sep 10 23:50:33 PDT 2015


 accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx |    2 
 accessibility/source/standard/accessiblemenubasecomponent.cxx            |   11 
 basctl/source/basicide/macrodlg.cxx                                      |    6 
 basctl/source/basicide/macrodlg.hxx                                      |    2 
 cui/source/customize/macropg.cxx                                         |    2 
 cui/source/customize/selector.cxx                                        |    5 
 cui/source/dialogs/hlmarkwn.cxx                                          |    4 
 cui/source/dialogs/linkdlg.cxx                                           |    6 
 cui/source/dialogs/thesdlg.cxx                                           |    4 
 cui/source/inc/autocdlg.hxx                                              |    2 
 cui/source/inc/dbregister.hxx                                            |    4 
 cui/source/inc/hlmarkwn.hxx                                              |    6 
 cui/source/inc/linkdlg.hxx                                               |    4 
 cui/source/inc/macroass.hxx                                              |    4 
 cui/source/inc/macropg.hxx                                               |    2 
 cui/source/inc/numfmt.hxx                                                |    4 
 cui/source/inc/optlingu.hxx                                              |    2 
 cui/source/inc/optpath.hxx                                               |    4 
 cui/source/inc/selector.hxx                                              |    2 
 cui/source/inc/thesdlg.hxx                                               |    2 
 cui/source/options/dbregister.cxx                                        |    4 
 cui/source/options/optaboutconfig.cxx                                    |    4 
 cui/source/options/optaboutconfig.hxx                                    |    2 
 cui/source/options/optlingu.cxx                                          |    4 
 cui/source/options/optpath.cxx                                           |    4 
 cui/source/tabpages/autocdlg.cxx                                         |    4 
 cui/source/tabpages/macroass.cxx                                         |   15 -
 cui/source/tabpages/numfmt.cxx                                           |    4 
 dbaccess/source/ui/app/AppController.cxx                                 |    3 
 dbaccess/source/ui/app/AppController.hxx                                 |    2 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx                           |   10 
 dbaccess/source/ui/app/AppDetailPageHelper.hxx                           |    3 
 dbaccess/source/ui/browser/AsynchronousLink.cxx                          |    2 
 dbaccess/source/ui/browser/brwctrlr.cxx                                  |   17 -
 dbaccess/source/ui/browser/genericcontroller.cxx                         |    6 
 dbaccess/source/ui/control/dbtreelistbox.cxx                             |    3 
 dbaccess/source/ui/dlg/CollectionView.cxx                                |    4 
 dbaccess/source/ui/dlg/adtabdlg.cxx                                      |    6 
 dbaccess/source/ui/dlg/dbwizsetup.cxx                                    |    5 
 dbaccess/source/ui/inc/CollectionView.hxx                                |    2 
 dbaccess/source/ui/inc/TableWindowListBox.hxx                            |    2 
 dbaccess/source/ui/inc/adtabdlg.hxx                                      |    2 
 dbaccess/source/ui/inc/brwctrlr.hxx                                      |    5 
 dbaccess/source/ui/querydesign/TableWindowListBox.cxx                    |    4 
 extensions/source/propctrlr/usercontrol.cxx                              |    4 
 extensions/source/propctrlr/usercontrol.hxx                              |    2 
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx                     |    4 
 filter/source/xsltdialog/xmlfiltersettingsdialog.hxx                     |    2 
 fpicker/source/office/PlacesListBox.cxx                                  |    4 
 fpicker/source/office/PlacesListBox.hxx                                  |    2 
 fpicker/source/office/RemoteFilesDialog.cxx                              |    4 
 fpicker/source/office/RemoteFilesDialog.hxx                              |    2 
 fpicker/source/office/iodlg.cxx                                          |    4 
 fpicker/source/office/iodlg.hxx                                          |    6 
 include/dbaccess/AsynchronousLink.hxx                                    |    4 
 include/dbaccess/genericcontroller.hxx                                   |    4 
 include/svtools/fileview.hxx                                             |    9 
 include/svtools/treelistbox.hxx                                          |   22 -
 include/toolkit/awt/vclxmenu.hxx                                         |    3 
 include/vcl/field.hxx                                                    |    4 
 include/vcl/menu.hxx                                                     |    7 
 include/vcl/svapp.hxx                                                    |    4 
 include/vcl/toolbox.hxx                                                  |    2 
 include/vcl/vclevent.hxx                                                 |    5 
 reportdesign/source/ui/dlg/AddField.cxx                                  |    4 
 reportdesign/source/ui/inc/AddField.hxx                                  |    2 
 sc/source/ui/condformat/condformatmgr.cxx                                |    6 
 sc/source/ui/inc/condformatmgr.hxx                                       |    2 
 sc/source/ui/inc/content.hxx                                             |    2 
 sc/source/ui/inc/solveroptions.hxx                                       |    2 
 sc/source/ui/miscdlgs/solveroptions.cxx                                  |    4 
 sc/source/ui/navipi/content.cxx                                          |    6 
 sd/source/ui/dlg/navigatr.cxx                                            |    4 
 sd/source/ui/inc/navigatr.hxx                                            |    2 
 sfx2/source/appl/newhelp.cxx                                             |    7 
 sfx2/source/appl/newhelp.hxx                                             |    7 
 sfx2/source/dialog/templdlg.cxx                                          |   10 
 sfx2/source/dialog/versdlg.cxx                                           |    4 
 sfx2/source/inc/templdgi.hxx                                             |    1 
 sfx2/source/inc/versdlg.hxx                                              |    2 
 sot/source/sdstor/stg.cxx                                                |    2 
 sot/source/sdstor/stgio.cxx                                              |    8 
 sot/source/sdstor/stgio.hxx                                              |    4 
 svtools/source/contnr/fileview.cxx                                       |    2 
 svtools/source/contnr/treelistbox.cxx                                    |   11 
 sw/source/ui/chrdlg/swuiccoll.cxx                                        |   10 
 sw/source/ui/fldui/flddb.cxx                                             |    2 
 sw/source/ui/fldui/flddinf.cxx                                           |    2 
 sw/source/ui/fldui/fldpage.cxx                                           |    9 
 sw/source/ui/fldui/fldpage.hxx                                           |    4 
 sw/source/ui/fldui/fldref.cxx                                            |    2 
 sw/source/ui/misc/glossary.cxx                                           |    4 
 sw/source/uibase/inc/conttree.hxx                                        |    4 
 sw/source/uibase/inc/glossary.hxx                                        |    2 
 sw/source/uibase/inc/swuiccoll.hxx                                       |    3 
 sw/source/uibase/utlui/content.cxx                                       |    4 
 sw/source/uibase/utlui/glbltree.cxx                                      |    4 
 toolkit/source/awt/vclxmenu.cxx                                          |  132 ++++------
 toolkit/source/awt/vclxtoolkit.cxx                                       |   22 -
 vcl/inc/svdata.hxx                                                       |    4 
 vcl/source/app/svapp.cxx                                                 |   29 +-
 vcl/source/app/vclevent.cxx                                              |   22 -
 vcl/source/control/field.cxx                                             |    4 
 vcl/source/window/menu.cxx                                               |   28 --
 vcl/source/window/toolbox2.cxx                                           |    7 
 xmlsecurity/inc/xmlsecurity/certificatechooser.hxx                       |    2 
 xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx                  |    2 
 xmlsecurity/source/dialogs/certificatechooser.cxx                        |    4 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx                   |    4 
 109 files changed, 339 insertions(+), 356 deletions(-)

New commits:
commit 9e3820ac21685627f5a411b7fa9f9c944eedb2b8
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Sep 11 08:48:26 2015 +0200

    convert Link<> to typed
    
    Change-Id: I70d7c7ae4fc68d2f36a00d7c1b6eba71f63872d7

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index c444d36..bdfa88d 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -778,7 +778,7 @@ public:
 
      @see AddEventListener, RemoveEventListener, RemoveKeyListener
     */
-    static void                 AddKeyListener( const Link<>& rKeyListener );
+    static void                 AddKeyListener( const Link<VclWindowEvent&,bool>& rKeyListener );
 
     /** Remove a keypress listener from the application.
 
@@ -786,7 +786,7 @@ public:
 
      @see AddEventListener, RemoveEventListener, AddKeyListener
     */
-    static void                 RemoveKeyListener( const Link<>& rKeyListener );
+    static void                 RemoveKeyListener( const Link<VclWindowEvent&,bool>& rKeyListener );
 
     /** Send event to all VCL application event listeners
 
diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx
index ae904a8..982958c 100644
--- a/include/vcl/vclevent.hxx
+++ b/include/vcl/vclevent.hxx
@@ -256,11 +256,6 @@ class VCL_DLLPUBLIC VclEventListeners
 {
 public:
     void Call( VclSimpleEvent* pEvent ) const;
-
-    // stops notifying when any handler has processed the event
-    // and returns true in that case
-    // a handler must return true to signal that it has processed the event
-    bool Process( VclSimpleEvent* pEvent ) const;
     void addListener( const Link<>& rListener );
     void removeListener( const Link<>& rListener );
 private:
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 43174f5..00f7999 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -161,20 +161,20 @@ class VCLXToolkit : public VCLXToolkit_Impl,
     ::cppu::OInterfaceContainerHelper m_aKeyHandlers;
     ::cppu::OInterfaceContainerHelper m_aFocusListeners;
     ::Link<> m_aEventListenerLink;
-    ::Link<> m_aKeyListenerLink;
+    ::Link<VclWindowEvent&,bool> m_aKeyListenerLink;
     bool m_bEventListener;
     bool m_bKeyListener;
 
     DECL_LINK(eventListenerHandler, ::VclSimpleEvent const *);
 
-    DECL_LINK(keyListenerHandler, ::VclSimpleEvent const *);
+    DECL_LINK_TYPED(keyListenerHandler, ::VclWindowEvent&, bool);
 
     void callTopWindowListeners(
         ::VclSimpleEvent const * pEvent,
         void (SAL_CALL css::awt::XTopWindowListener::* pFn)(
             css::lang::EventObject const &));
 
-    long callKeyHandlers(::VclSimpleEvent const * pEvent, bool bPressed);
+    bool callKeyHandlers(::VclSimpleEvent const * pEvent, bool bPressed);
 
     void callFocusListeners(::VclSimpleEvent const * pEvent, bool bGained);
 
@@ -1737,16 +1737,16 @@ IMPL_LINK(VCLXToolkit, eventListenerHandler, ::VclSimpleEvent const *, pEvent)
     return 0;
 }
 
-IMPL_LINK(VCLXToolkit, keyListenerHandler, ::VclSimpleEvent const *, pEvent)
+IMPL_LINK_TYPED(VCLXToolkit, keyListenerHandler, ::VclWindowEvent&, rEvent, bool)
 {
-    switch (pEvent->GetId())
+    switch (rEvent.GetId())
     {
     case VCLEVENT_WINDOW_KEYINPUT:
-        return callKeyHandlers(pEvent, true);
+        return callKeyHandlers(&rEvent, true);
     case VCLEVENT_WINDOW_KEYUP:
-        return callKeyHandlers(pEvent, false);
+        return callKeyHandlers(&rEvent, false);
     }
-    return 0;
+    return false;
 }
 
 void VCLXToolkit::callTopWindowListeners(
@@ -1784,7 +1784,7 @@ void VCLXToolkit::callTopWindowListeners(
     }
 }
 
-long VCLXToolkit::callKeyHandlers(::VclSimpleEvent const * pEvent,
+bool VCLXToolkit::callKeyHandlers(::VclSimpleEvent const * pEvent,
                                   bool bPressed)
 {
     css::uno::Sequence< css::uno::Reference< css::uno::XInterface > >
@@ -1818,7 +1818,7 @@ long VCLXToolkit::callKeyHandlers(::VclSimpleEvent const * pEvent,
             {
                 if ((bPressed ? xHandler->keyPressed(aAwtEvent)
                       : xHandler->keyReleased(aAwtEvent)))
-                    return 1;
+                    return true;
             }
             catch (const css::uno::RuntimeException & rEx)
             {
@@ -1829,7 +1829,7 @@ long VCLXToolkit::callKeyHandlers(::VclSimpleEvent const * pEvent,
             }
         }
     }
-    return 0;
+    return false;
 }
 
 void VCLXToolkit::callFocusListeners(::VclSimpleEvent const * pEvent,
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index b879302..bb22ad6 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -101,6 +101,8 @@ public:
     virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) SAL_OVERRIDE;
 };
 
+typedef std::list<Link<VclWindowEvent&,bool> > SVAppKeyListeners;
+
 struct ImplSVAppData
 {
     enum ImeStatusWindowMode
@@ -113,7 +115,7 @@ struct ImplSVAppData
     AllSettings*            mpSettings;                     // Application settings
     LocaleConfigurationListener* mpCfgListener;
     VclEventListeners*      mpEventListeners;               // listeners for vcl events (eg, extended toolkit)
-    VclEventListeners*      mpKeyListeners;                 // listeners for key events only (eg, extended toolkit)
+    SVAppKeyListeners*      mpKeyListeners;                 // listeners for key events only (eg, extended toolkit)
     ImplAccelManager*       mpAccelMgr;                     // Accelerator Manager
     OUString*               mpAppName;                      // Application name
     OUString*               mpAppFileName;                  // Abs. Application FileName
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index efd8354..789da50 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -688,19 +688,19 @@ void Application::RemoveEventListener( const Link<>& rEventListener )
         pSVData->maAppData.mpEventListeners->removeListener( rEventListener );
 }
 
-void Application::AddKeyListener( const Link<>& rKeyListener )
+void Application::AddKeyListener( const Link<VclWindowEvent&,bool>& rKeyListener )
 {
     ImplSVData* pSVData = ImplGetSVData();
     if( !pSVData->maAppData.mpKeyListeners )
-        pSVData->maAppData.mpKeyListeners = new VclEventListeners;
-    pSVData->maAppData.mpKeyListeners->addListener( rKeyListener );
+        pSVData->maAppData.mpKeyListeners = new SVAppKeyListeners;
+    pSVData->maAppData.mpKeyListeners->push_back( rKeyListener );
 }
 
-void Application::RemoveKeyListener( const Link<>& rKeyListener )
+void Application::RemoveKeyListener( const Link<VclWindowEvent&,bool>& rKeyListener )
 {
     ImplSVData* pSVData = ImplGetSVData();
     if( pSVData->maAppData.mpKeyListeners )
-        pSVData->maAppData.mpKeyListeners->removeListener( rKeyListener );
+        pSVData->maAppData.mpKeyListeners->remove( rKeyListener );
 }
 
 bool Application::HandleKey( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKeyEvent )
@@ -709,11 +709,24 @@ bool Application::HandleKey( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKey
     VclWindowEvent aEvent( pWin, nEvent, static_cast<void *>(pKeyEvent) );
 
     ImplSVData* pSVData = ImplGetSVData();
-    bool bProcessed = false;
 
-    if ( pSVData->maAppData.mpKeyListeners )
-        bProcessed = pSVData->maAppData.mpKeyListeners->Process( &aEvent );
+    if ( !pSVData->maAppData.mpKeyListeners )
+        return false;
 
+    if ( pSVData->maAppData.mpKeyListeners->empty() )
+        return false;
+
+    bool bProcessed = false;
+    // Copy the list, because this can be destroyed when calling a Link...
+    std::list<Link<VclWindowEvent&,bool>> aCopy( *pSVData->maAppData.mpKeyListeners );
+    for ( Link<VclWindowEvent&,bool>& rLink : aCopy )
+    {
+        if( rLink.Call( aEvent ) )
+        {
+            bProcessed = true;
+            break;
+        }
+    }
     return bProcessed;
 }
 
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 00c4ffd..00a016d 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -76,28 +76,6 @@ void VclEventListeners::Call( VclSimpleEvent* pEvent ) const
     }
 }
 
-bool VclEventListeners::Process( VclSimpleEvent* pEvent ) const
-{
-    if ( m_aListeners.empty() )
-        return false;
-
-    bool bProcessed = false;
-    // Copy the list, because this can be destroyed when calling a Link...
-    std::list<Link<>> aCopy( m_aListeners );
-    std::list<Link<>>::iterator aIter( aCopy.begin() );
-    std::list<Link<>>::const_iterator aEnd( aCopy.end() );
-    while ( aIter != aEnd )
-    {
-        if( (*aIter).Call( pEvent ) != 0 )
-        {
-            bProcessed = true;
-            break;
-        }
-        ++aIter;
-    }
-    return bProcessed;
-}
-
 void VclEventListeners::addListener( const Link<>& rListener )
 {
     m_aListeners.push_back( rListener );
commit 71a83295d8c719f4fd4fa05f367c3c85323e22e9
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 10 16:44:12 2015 +0200

    convert Link<> to typed
    
    and remove unused maChildEventListeners
    
    Change-Id: I845a9af608c3429cf9ccb0e8041f24f423839513

diff --git a/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx
index a16a974..e7547e1 100644
--- a/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx
+++ b/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx
@@ -112,7 +112,7 @@ protected:
     virtual void            Click();
     virtual bool            IsPopupMenuOpen();
 
-    DECL_LINK( MenuEventListener, VclSimpleEvent* );
+    DECL_LINK_TYPED( MenuEventListener, VclMenuEvent&, void );
 
     void                    ProcessMenuEvent( const VclMenuEvent& rVclMenuEvent );
 
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index 47312f7..26a62b5 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -566,15 +566,10 @@ bool OAccessibleMenuBaseComponent::IsPopupMenuOpen()
 
 
 
-IMPL_LINK( OAccessibleMenuBaseComponent, MenuEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( OAccessibleMenuBaseComponent, MenuEventListener, VclMenuEvent&, rEvent, void )
 {
-    OSL_ENSURE( pEvent && pEvent->ISA( VclMenuEvent ), "OAccessibleMenuBaseComponent - Unknown MenuEvent!" );
-    if ( pEvent && pEvent->ISA( VclMenuEvent ) )
-    {
-        OSL_ENSURE( static_cast<VclMenuEvent*>(pEvent)->GetMenu(), "OAccessibleMenuBaseComponent - Menu?" );
-        ProcessMenuEvent( *static_cast<VclMenuEvent*>(pEvent) );
-    }
-    return 0;
+    OSL_ENSURE( rEvent.GetMenu(), "OAccessibleMenuBaseComponent - Menu?" );
+    ProcessMenuEvent( rEvent );
 }
 
 
diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx
index b38e549..49624fe 100644
--- a/include/toolkit/awt/vclxmenu.hxx
+++ b/include/toolkit/awt/vclxmenu.hxx
@@ -40,6 +40,7 @@ class Menu;
 class MenuBar;
 class VclSimpleEvent;
 class PopupMenu;
+class VclMenuEvent;
 
 typedef ::std::vector<
     css::uno::Reference< css::awt::XPopupMenu >*
@@ -65,7 +66,7 @@ private:
 protected:
     ::osl::Mutex&           GetMutex() { return maMutex; }
 
-    DECL_LINK( MenuEventListener, VclSimpleEvent* );
+    DECL_LINK_TYPED( MenuEventListener, VclMenuEvent&, void );
 
     void ImplCreateMenu( bool bPopup );
 
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 46149cc..b1c1b9b 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -141,8 +141,7 @@ private:
     Link<Menu*, bool> aHighlightHdl;      // Highlight-Handler
     Link<Menu*, bool> aSelectHdl;         // Highlight-Handler
 
-    VclEventListeners   maEventListeners;
-    VclEventListeners   maChildEventListeners;
+    std::list<Link<VclMenuEvent&,void> >  maEventListeners;
 
     OUString aTitleText;         // PopupMenu text
     sal_uInt16 nTitleHeight;
@@ -357,8 +356,8 @@ public:
         return nTitleHeight;
     }
 
-    void AddEventListener( const Link<>& rEventListener );
-    void RemoveEventListener( const Link<>& rEventListener );
+    void AddEventListener( const Link<VclMenuEvent&,void>& rEventListener );
+    void RemoveEventListener( const Link<VclMenuEvent&,void>& rEventListener );
 
     Menu& operator =( const Menu& rMenu );
 
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 9d91d49..732e6f5e 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -226,7 +226,7 @@ private:
 
     DECL_DLLPRIVATE_LINK_TYPED(    ImplCallExecuteCustomMenu, void*, void );
     DECL_DLLPRIVATE_LINK_TYPED(    ImplUpdateHdl, Idle*, void );
-    DECL_DLLPRIVATE_LINK(          ImplCustomMenuListener, VclMenuEvent* );
+    DECL_DLLPRIVATE_LINK_TYPED(    ImplCustomMenuListener, VclMenuEvent&, void );
     DECL_DLLPRIVATE_LINK_TYPED(    ImplDropdownLongClickHdl, Timer*, void );
 
                                    ToolBox (const ToolBox &) SAL_DELETED_FUNCTION;
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 91db85b..b1b809e 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -79,89 +79,83 @@ void VCLXMenu::ImplCreateMenu( bool bPopup )
     mpMenu->AddEventListener( LINK( this, VCLXMenu, MenuEventListener ) );
 }
 
-IMPL_LINK( VCLXMenu, MenuEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( VCLXMenu, MenuEventListener, VclMenuEvent&, rMenuEvent, void )
 {
-    DBG_ASSERT( pEvent && pEvent->ISA( VclMenuEvent ), "Unknown Event!" );
-    if ( pEvent && pEvent->ISA( VclMenuEvent ) )
-    {
-        DBG_ASSERT( static_cast<VclMenuEvent*>(pEvent)->GetMenu() && mpMenu, "Menu???" );
+    DBG_ASSERT( rMenuEvent.GetMenu() && mpMenu, "Menu???" );
 
-        VclMenuEvent* pMenuEvent = static_cast<VclMenuEvent*>(pEvent);
-        if ( pMenuEvent->GetMenu() == mpMenu )  // Also called for the root menu
+    if ( rMenuEvent.GetMenu() == mpMenu )  // Also called for the root menu
+    {
+        switch ( rMenuEvent.GetId() )
         {
-            switch ( pMenuEvent->GetId() )
+            case VCLEVENT_MENU_SELECT:
             {
-                case VCLEVENT_MENU_SELECT:
-                {
-                    if ( maMenuListeners.getLength() )
-                    {
-                        css::awt::MenuEvent aEvent;
-                        aEvent.Source = static_cast<cppu::OWeakObject*>(this);
-                        aEvent.MenuId = mpMenu->GetCurItemId();
-                        maMenuListeners.itemSelected( aEvent );
-                    }
-                }
-                break;
-                case VCLEVENT_OBJECT_DYING:
+                if ( maMenuListeners.getLength() )
                 {
-                    mpMenu = NULL;
+                    css::awt::MenuEvent aEvent;
+                    aEvent.Source = static_cast<cppu::OWeakObject*>(this);
+                    aEvent.MenuId = mpMenu->GetCurItemId();
+                    maMenuListeners.itemSelected( aEvent );
                 }
-                break;
-                case VCLEVENT_MENU_HIGHLIGHT:
+            }
+            break;
+            case VCLEVENT_OBJECT_DYING:
+            {
+                mpMenu = NULL;
+            }
+            break;
+            case VCLEVENT_MENU_HIGHLIGHT:
+            {
+                if ( maMenuListeners.getLength() )
                 {
-                    if ( maMenuListeners.getLength() )
-                    {
-                        css::awt::MenuEvent aEvent;
-                        aEvent.Source = static_cast<cppu::OWeakObject*>(this);
-                        aEvent.MenuId = mpMenu->GetCurItemId();
-                        maMenuListeners.itemHighlighted( aEvent );
-                    }
+                    css::awt::MenuEvent aEvent;
+                    aEvent.Source = static_cast<cppu::OWeakObject*>(this);
+                    aEvent.MenuId = mpMenu->GetCurItemId();
+                    maMenuListeners.itemHighlighted( aEvent );
                 }
-                break;
-                case VCLEVENT_MENU_ACTIVATE:
+            }
+            break;
+            case VCLEVENT_MENU_ACTIVATE:
+            {
+                if ( maMenuListeners.getLength() )
                 {
-                    if ( maMenuListeners.getLength() )
-                    {
-                        css::awt::MenuEvent aEvent;
-                        aEvent.Source = static_cast<cppu::OWeakObject*>(this);
-                        aEvent.MenuId = mpMenu->GetCurItemId();
-                        maMenuListeners.itemActivated( aEvent );
-                    }
+                    css::awt::MenuEvent aEvent;
+                    aEvent.Source = static_cast<cppu::OWeakObject*>(this);
+                    aEvent.MenuId = mpMenu->GetCurItemId();
+                    maMenuListeners.itemActivated( aEvent );
                 }
-                break;
-                case VCLEVENT_MENU_DEACTIVATE:
+            }
+            break;
+            case VCLEVENT_MENU_DEACTIVATE:
+            {
+                if ( maMenuListeners.getLength() )
                 {
-                    if ( maMenuListeners.getLength() )
-                    {
-                        css::awt::MenuEvent aEvent;
-                        aEvent.Source = static_cast<cppu::OWeakObject*>(this);
-                        aEvent.MenuId = mpMenu->GetCurItemId();
-                        maMenuListeners.itemDeactivated( aEvent );
-                    }
+                    css::awt::MenuEvent aEvent;
+                    aEvent.Source = static_cast<cppu::OWeakObject*>(this);
+                    aEvent.MenuId = mpMenu->GetCurItemId();
+                    maMenuListeners.itemDeactivated( aEvent );
                 }
-                break;
-
-                // ignore accessibility events
-                case VCLEVENT_MENU_ENABLE:
-                case VCLEVENT_MENU_INSERTITEM:
-                case VCLEVENT_MENU_REMOVEITEM:
-                case VCLEVENT_MENU_SUBMENUACTIVATE:
-                case VCLEVENT_MENU_SUBMENUDEACTIVATE:
-                case VCLEVENT_MENU_SUBMENUCHANGED:
-                case VCLEVENT_MENU_DEHIGHLIGHT:
-                case VCLEVENT_MENU_DISABLE:
-                case VCLEVENT_MENU_ITEMTEXTCHANGED:
-                case VCLEVENT_MENU_ITEMCHECKED:
-                case VCLEVENT_MENU_ITEMUNCHECKED:
-                case VCLEVENT_MENU_SHOW:
-                case VCLEVENT_MENU_HIDE:
-                break;
-
-                default:    OSL_FAIL( "MenuEventListener - Unknown event!" );
-           }
+            }
+            break;
+
+            // ignore accessibility events
+            case VCLEVENT_MENU_ENABLE:
+            case VCLEVENT_MENU_INSERTITEM:
+            case VCLEVENT_MENU_REMOVEITEM:
+            case VCLEVENT_MENU_SUBMENUACTIVATE:
+            case VCLEVENT_MENU_SUBMENUDEACTIVATE:
+            case VCLEVENT_MENU_SUBMENUCHANGED:
+            case VCLEVENT_MENU_DEHIGHLIGHT:
+            case VCLEVENT_MENU_DISABLE:
+            case VCLEVENT_MENU_ITEMTEXTCHANGED:
+            case VCLEVENT_MENU_ITEMCHECKED:
+            case VCLEVENT_MENU_ITEMUNCHECKED:
+            case VCLEVENT_MENU_SHOW:
+            case VCLEVENT_MENU_HIDE:
+            break;
+
+            default:    OSL_FAIL( "MenuEventListener - Unknown event!" );
        }
     }
-    return 0;
 }
 
 
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index c2e415a..98d9740 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -340,31 +340,29 @@ void Menu::ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos )
     }
 
     if ( !aDelData.isDeleted() )
-        maEventListeners.Call( &aEvent );
-
-    if( !aDelData.isDeleted() )
     {
-        Menu* pMenu = this;
-        while ( pMenu )
+        // Copy the list, because this can be destroyed when calling a Link...
+        std::list<Link<VclMenuEvent&,void>> aCopy( maEventListeners );
+        std::list<Link<VclMenuEvent&,void>>::iterator aIter( aCopy.begin() );
+        std::list<Link<VclMenuEvent&,void>>::const_iterator aEnd( aCopy.end() );
+        while ( aIter != aEnd )
         {
-            maChildEventListeners.Call( &aEvent );
-
-            if( aDelData.isDeleted() )
-                break;
-
-            pMenu = ( pMenu->pStartedFrom != pMenu ) ? pMenu->pStartedFrom : NULL;
+            Link<VclMenuEvent&,void> &rLink = *aIter;
+            if( std::find(maEventListeners.begin(), maEventListeners.end(), rLink) != maEventListeners.end() )
+                rLink.Call( aEvent );
+            ++aIter;
         }
     }
 }
 
-void Menu::AddEventListener( const Link<>& rEventListener )
+void Menu::AddEventListener( const Link<VclMenuEvent&,void>& rEventListener )
 {
-    maEventListeners.addListener( rEventListener );
+    maEventListeners.push_back( rEventListener );
 }
 
-void Menu::RemoveEventListener( const Link<>& rEventListener )
+void Menu::RemoveEventListener( const Link<VclMenuEvent&,void>& rEventListener )
 {
-    maEventListeners.removeListener( rEventListener );
+    maEventListeners.remove( rEventListener );
 }
 
 MenuItemData* Menu::NbcInsertItem(sal_uInt16 nId, MenuItemBits nBits,
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 9c2af02..6b570f9 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1851,15 +1851,14 @@ void ToolBox::UpdateCustomMenu()
     }
 }
 
-IMPL_LINK( ToolBox, ImplCustomMenuListener, VclMenuEvent*, pEvent )
+IMPL_LINK_TYPED( ToolBox, ImplCustomMenuListener, VclMenuEvent&, rEvent, void )
 {
-    if( pEvent->GetMenu() == GetMenu() && pEvent->GetId() == VCLEVENT_MENU_SELECT )
+    if( rEvent.GetMenu() == GetMenu() && rEvent.GetId() == VCLEVENT_MENU_SELECT )
     {
-        sal_uInt16 id = GetMenu()->GetItemId( pEvent->GetItemPos() );
+        sal_uInt16 id = GetMenu()->GetItemId( rEvent.GetItemPos() );
         if( id >= TOOLBOX_MENUITEM_START )
             TriggerItem( id - TOOLBOX_MENUITEM_START, false );
     }
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(ToolBox, ImplCallExecuteCustomMenu, void*, void)
commit c80fb09256f02379b78f7bb219e94dfbf5277872
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 10 15:24:30 2015 +0200

    convert Link<> to typed
    
    Change-Id: I8f64b8f8e1e8ac7ce1475fc5132acb7171237a32

diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index 43f09b4..3a2b02d 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -329,7 +329,7 @@ namespace pcr
     }
 
 
-    IMPL_LINK( OTimeDurationControl, OnCustomConvert, MetricField*, /*pField*/ )
+    IMPL_LINK_NOARG_TYPED( OTimeDurationControl, OnCustomConvert, MetricFormatter&, void )
     {
         long nMultiplier = 1;
         if ( getTypedControlWindow()->GetCurUnitText().equalsIgnoreAsciiCase( "ms" ) )
@@ -342,8 +342,6 @@ namespace pcr
             nMultiplier = 1000 * 60 * 60;
 
         getTypedControlWindow()->SetValue( getTypedControlWindow()->GetLastValue() * nMultiplier );
-
-        return 0L;
     }
 
 
diff --git a/extensions/source/propctrlr/usercontrol.hxx b/extensions/source/propctrlr/usercontrol.hxx
index 3fe258a..44f1a29 100644
--- a/extensions/source/propctrlr/usercontrol.hxx
+++ b/extensions/source/propctrlr/usercontrol.hxx
@@ -152,7 +152,7 @@ namespace pcr
         ::sal_Int16 SAL_CALL getControlType() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
 
     private:
-        DECL_LINK( OnCustomConvert, MetricField* );
+        DECL_LINK_TYPED( OnCustomConvert, MetricFormatter&, void );
     };
 
 
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index e6e117e..8ed681b 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -222,7 +222,7 @@ protected:
     OUString                maCurUnitText;
     sal_Int64               mnBaseValue;
     FieldUnit               meUnit;
-    Link<>                  maCustomConvertLink;
+    Link<MetricFormatter&,void> maCustomConvertLink;
 
 protected:
                             MetricFormatter();
@@ -262,7 +262,7 @@ public:
     virtual OUString        CreateFieldText( sal_Int64 nValue ) const SAL_OVERRIDE;
     sal_Int64               GetCorrectedValue( FieldUnit eOutUnit ) const;
 
-    void                    SetCustomConvertHdl( const Link<>& rLink ) { maCustomConvertLink = rLink; }
+    void                    SetCustomConvertHdl( const Link<MetricFormatter&,void>& rLink ) { maCustomConvertLink = rLink; }
 };
 
 
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 41a72a9..25d249c 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1766,7 +1766,7 @@ void MetricField::Last()
 
 void MetricField::CustomConvert()
 {
-    maCustomConvertLink.Call( this );
+    maCustomConvertLink.Call( *this );
 }
 
 MetricBox::MetricBox( vcl::Window* pParent, WinBits nWinStyle ) :
@@ -1855,7 +1855,7 @@ void MetricBox::ReformatAll()
 
 void MetricBox::CustomConvert()
 {
-    maCustomConvertLink.Call( this );
+    maCustomConvertLink.Call( *this );
 }
 
 void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_Int32 nPos )
commit cf0c04a428754dfd5aa477cebc5441bc74e27005
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 10 14:39:17 2015 +0200

    convert Link<> to typed
    
    Change-Id: I85658fa35b9b85106a3b9c8ef303584cad6f39b0

diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index bed7a62..d95e00d 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -468,18 +468,18 @@ void MacroChooser::CheckButtons()
 
 
 
-IMPL_LINK_NOARG(MacroChooser, MacroDoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(MacroChooser, MacroDoubleClickHdl, SvTreeListBox*, bool)
 {
     StoreMacroDescription();
     if (nMode == Recording)
     {
         SbMethod* pMethod = GetMacro();
         if ( pMethod && !QueryReplaceMacro( pMethod->GetName(), this ) )
-            return 0;
+            return false;
     }
 
     EndDialog(Macro_OkRun);
-    return 0;
+    return false;
 }
 
 IMPL_LINK_TYPED( MacroChooser, MacroSelectHdl, SvTreeListBox *, pBox, void )
diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx
index c16d7d1..b4f621e 100644
--- a/basctl/source/basicide/macrodlg.hxx
+++ b/basctl/source/basicide/macrodlg.hxx
@@ -68,7 +68,7 @@ private:
     Mode                    nMode;
 
     DECL_LINK_TYPED( MacroSelectHdl, SvTreeListBox *, void );
-    DECL_LINK(MacroDoubleClickHdl, void *);
+    DECL_LINK_TYPED( MacroDoubleClickHdl, SvTreeListBox*, bool );
     DECL_LINK_TYPED( BasicSelectHdl, SvTreeListBox *, void );
     DECL_LINK( EditModifyHdl, Edit * );
     DECL_LINK_TYPED( ButtonHdl, Button *, void );
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 1807da6..2e9e877 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -593,7 +593,7 @@ IMPL_LINK_TYPED( _SvxMacroTabPage, AssignDeleteHdl_Impl, Button*, pBtn, void )
     GenericHandler_Impl( this, static_cast<PushButton*>(pBtn) );
 }
 
-IMPL_LINK( _SvxMacroTabPage, DoubleClickHdl_Impl, SvTabListBox *, )
+IMPL_LINK_NOARG_TYPED( _SvxMacroTabPage, DoubleClickHdl_Impl, SvTreeListBox*, bool)
 {
     return GenericHandler_Impl( this, NULL );
 }
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 0a4c29b..ee5ba51 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -949,12 +949,11 @@ IMPL_LINK_TYPED( SvxScriptSelectorDialog, SelectHdl, SvTreeListBox*, pCtrl, void
     UpdateUI();
 }
 
-IMPL_LINK( SvxScriptSelectorDialog, FunctionDoubleClickHdl, Control*, pCtrl )
+IMPL_LINK_NOARG_TYPED( SvxScriptSelectorDialog, FunctionDoubleClickHdl, SvTreeListBox*, bool )
 {
-    (void)pCtrl;
     if (m_pOKButton->IsEnabled())
         ClickHdl(m_pOKButton);
-    return 0;
+    return false;
 }
 
 // Check if command is selected and enable the OK button accordingly
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 795887c..71532bb 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -561,10 +561,10 @@ bool SvxHlinkDlgMarkWnd::SelectEntry(const OUString& aStrMark)
 |*
 |************************************************************************/
 
-IMPL_LINK_NOARG(SvxHlinkDlgMarkWnd, DoubleClickApplyHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxHlinkDlgMarkWnd, DoubleClickApplyHdl_Impl, SvTreeListBox*, bool)
 {
     ClickApplyHdl_Impl(NULL);
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED(SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl, Button*, void)
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 685f9de..1f02356 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -247,12 +247,10 @@ IMPL_LINK_TYPED( SvBaseLinksDlg, LinksSelectHdl, SvTreeListBox *, pSvTabListBox,
     }
 }
 
-IMPL_LINK( SvBaseLinksDlg, LinksDoubleClickHdl, SvTabListBox *, pSvTabListBox )
+IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, LinksDoubleClickHdl, SvTreeListBox *, bool )
 {
-    (void)pSvTabListBox;
-
     ChangeSourceClickHdl( 0 );
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, AutomaticClickHdl, Button*, void )
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 697a8eb..4604ca5 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -412,7 +412,7 @@ IMPL_LINK_TYPED( SvxThesaurusDialog, AlternativesSelectHdl_Impl, SvTreeListBox *
     }
 }
 
-IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox *, pBox )
+IMPL_LINK_TYPED( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvTreeListBox*, pBox, bool )
 {
     SvTreeListEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL;
     if (pEntry)
@@ -433,7 +433,7 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox
     //! workaround to set the selection since calling SelectEntryPos within
     //! the double click handler does not work
     Application::PostUserEvent( LINK( this, SvxThesaurusDialog, SelectFirstHdl_Impl ), pBox, true );
-    return 0;
+    return false;
 }
 
 IMPL_STATIC_LINK_TYPED( SvxThesaurusDialog, SelectFirstHdl_Impl, void *, p, void )
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 1ad068d..472e9ab 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -162,7 +162,7 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage
 
         DECL_LINK_TYPED(SelectHdl, SvTreeListBox*, void);
         DECL_LINK_TYPED(EditHdl, Button*, void);
-        DECL_LINK(DoubleClickEditHdl, void*);
+        DECL_LINK_TYPED(DoubleClickEditHdl, SvTreeListBox*, bool);
         SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol);
 
 
diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx
index 23d4bc6..75cb407 100644
--- a/cui/source/inc/dbregister.hxx
+++ b/cui/source/inc/dbregister.hxx
@@ -55,9 +55,9 @@ namespace svx
         DECL_LINK_TYPED( NewHdl, Button*, void );
         DECL_LINK_TYPED( EditHdl, Button*, void );
         DECL_LINK_TYPED( DeleteHdl, Button*, void );
-        DECL_LINK(PathBoxDoubleClickHdl, void *);
+        DECL_LINK_TYPED( PathBoxDoubleClickHdl, SvTreeListBox*, bool);
 
-        DECL_LINK_TYPED(PathSelect_Impl, SvTreeListBox*, void);
+        DECL_LINK_TYPED( PathSelect_Impl, SvTreeListBox*, void);
 
         DECL_LINK_TYPED( HeaderSelect_Impl, HeaderBar *, void );
         DECL_LINK_TYPED( HeaderEndDrag_Impl, HeaderBar *, void );
diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx
index 209fe82..5ee6b9a 100644
--- a/cui/source/inc/hlmarkwn.hxx
+++ b/cui/source/inc/hlmarkwn.hxx
@@ -86,9 +86,9 @@ protected:
 
     virtual void Move () SAL_OVERRIDE;
 
-    DECL_LINK_TYPED (ClickApplyHdl_Impl, Button*, void );
-    DECL_LINK (DoubleClickApplyHdl_Impl, void* );
-    DECL_LINK_TYPED (ClickCloseHdl_Impl, Button*, void );
+    DECL_LINK_TYPED( ClickApplyHdl_Impl, Button*, void );
+    DECL_LINK_TYPED( DoubleClickApplyHdl_Impl, SvTreeListBox*, bool );
+    DECL_LINK_TYPED( ClickCloseHdl_Impl, Button*, void );
 
 public:
     SvxHlinkDlgMarkWnd (SvxHyperlinkTabPageBase *pParent);
diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx
index beffb1c..22f9a0d 100644
--- a/cui/source/inc/linkdlg.hxx
+++ b/cui/source/inc/linkdlg.hxx
@@ -65,10 +65,10 @@ class SvBaseLinksDlg : public ModalDialog
     Idle aUpdateIdle;
 
     DECL_LINK_TYPED( LinksSelectHdl, SvTreeListBox*, void );
-    DECL_LINK( LinksDoubleClickHdl, SvTabListBox * );
+    DECL_LINK_TYPED( LinksDoubleClickHdl, SvTreeListBox*, bool );
     DECL_LINK_TYPED( AutomaticClickHdl, Button *, void );
     DECL_LINK_TYPED( ManualClickHdl, Button *, void );
-    DECL_LINK_TYPED(UpdateNowClickHdl, Button *, void);
+    DECL_LINK_TYPED( UpdateNowClickHdl, Button *, void);
     DECL_LINK_TYPED( ChangeSourceClickHdl, Button *, void );
     DECL_LINK_TYPED( BreakLinkClickHdl, Button *, void );
     DECL_LINK_TYPED( UpdateWaitingHdl, Idle *, void );
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx
index 5d99c58..a0b06fb 100644
--- a/cui/source/inc/macroass.hxx
+++ b/cui/source/inc/macroass.hxx
@@ -39,9 +39,9 @@ class _SfxMacroTabPage : public SfxTabPage
     DECL_DLLPRIVATE_LINK_TYPED( SelectGroup_Impl, SvTreeListBox*, void );
     DECL_DLLPRIVATE_LINK_TYPED( SelectMacro_Impl, SvTreeListBox*, void );
 
-    DECL_DLLPRIVATE_LINK( AssignDeleteHdl_Impl, PushButton * );
+    DECL_DLLPRIVATE_LINK_TYPED( AssignDeleteHdl_Impl, SvTreeListBox*, bool );
     DECL_DLLPRIVATE_LINK_TYPED( AssignDeleteClickHdl_Impl, Button *, void );
-
+    bool                        AssignDeleteHdl(Control *);
     DECL_DLLPRIVATE_LINK_TYPED( TimeOut_Impl, Idle*, void );
 
 protected:
diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx
index bf19996..f58661d 100644
--- a/cui/source/inc/macropg.hxx
+++ b/cui/source/inc/macropg.hxx
@@ -61,7 +61,7 @@ class _SvxMacroTabPage : public SfxTabPage
 {
     DECL_LINK_TYPED( SelectEvent_Impl, SvTreeListBox*, void );
     DECL_LINK_TYPED( AssignDeleteHdl_Impl, Button *, void );
-    DECL_LINK( DoubleClickHdl_Impl, SvTabListBox * );
+    DECL_LINK_TYPED( DoubleClickHdl_Impl, SvTreeListBox*, bool );
 
     static long GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* pBtn );
 
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 87a8e1d..3ce1a67 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -152,7 +152,7 @@ private:
     bool    Click_Impl(PushButton* pIB);
     // Handler
     DECL_LINK( LostFocusHdl_Impl, Edit* );
-    DECL_LINK( DoubleClickHdl_Impl, SvxFontListBox* );
+    DECL_LINK_TYPED( DoubleClickHdl_Impl, SvTreeListBox*, bool );
     DECL_LINK( SelFormatHdl_Impl, void * );
     DECL_LINK_TYPED( SelFormatListBoxHdl_Impl, SvTreeListBox*, void );
     DECL_LINK_TYPED( SelFormatClickHdl_Impl, Button*, void );
@@ -160,7 +160,7 @@ private:
     DECL_LINK( EditHdl_Impl, Edit* );
     DECL_LINK( OptHdl_Impl, void * );
     DECL_LINK_TYPED( OptClickHdl_Impl, Button*, void );
-    DECL_LINK_TYPED(TimeHdl_Impl, Timer *, void);
+    DECL_LINK_TYPED( TimeHdl_Impl, Timer *, void);
 };
 
 #endif
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index d3768a4..76726d3 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -139,7 +139,7 @@ private:
 
     DECL_LINK_TYPED( SelectHdl_Impl, SvTreeListBox*, void );
     DECL_LINK_TYPED( ClickHdl_Impl, Button *, void );
-    DECL_LINK( BoxDoubleClickHdl_Impl, SvTreeListBox * );
+    DECL_LINK_TYPED( BoxDoubleClickHdl_Impl, SvTreeListBox*, bool );
     DECL_LINK_TYPED( BoxCheckButtonHdl_Impl, SvTreeListBox*, void );
     DECL_LINK_TYPED( PostDblClickHdl_Impl, void *, void);
     DECL_LINK( OpenURLHdl_Impl, void *);
diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index fcce075..26801c1 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -54,10 +54,10 @@ private:
     void        ChangeCurrentEntry( const OUString& _rFolder );
 
     DECL_LINK_TYPED( PathHdl_Impl, Button*, void);
-    DECL_LINK(DoubleClickPathHdl_Impl, void *);
+    DECL_LINK_TYPED( DoubleClickPathHdl_Impl, SvTreeListBox*, bool);
     DECL_LINK_TYPED( StandardHdl_Impl, Button*, void);
 
-    DECL_LINK_TYPED(PathSelect_Impl, SvTreeListBox*, void);
+    DECL_LINK_TYPED( PathSelect_Impl, SvTreeListBox*, void);
     DECL_LINK_TYPED( HeaderSelect_Impl, HeaderBar *, void );
     DECL_LINK_TYPED( HeaderEndDrag_Impl, HeaderBar *, void );
 
diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx
index c88e472..92a8a8c 100644
--- a/cui/source/inc/selector.hxx
+++ b/cui/source/inc/selector.hxx
@@ -186,7 +186,7 @@ class SvxScriptSelectorDialog : public ModelessDialog
 
     DECL_LINK_TYPED( ClickHdl, Button *, void );
     DECL_LINK_TYPED( SelectHdl, SvTreeListBox*, void );
-    DECL_LINK( FunctionDoubleClickHdl, Control* );
+    DECL_LINK_TYPED( FunctionDoubleClickHdl, SvTreeListBox*, bool );
 
     void                            UpdateUI();
 
diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx
index 2a6b5c5..26f7523 100644
--- a/cui/source/inc/thesdlg.hxx
+++ b/cui/source/inc/thesdlg.hxx
@@ -147,7 +147,7 @@ public:
     DECL_LINK( LanguageHdl_Impl, ListBox * );
     DECL_LINK( WordSelectHdl_Impl, ComboBox * );
     DECL_LINK_TYPED( AlternativesSelectHdl_Impl, SvTreeListBox*, void );
-    DECL_LINK( AlternativesDoubleClickHdl_Impl, SvxCheckListBox * );
+    DECL_LINK_TYPED( AlternativesDoubleClickHdl_Impl, SvTreeListBox*, bool );
 
     DECL_STATIC_LINK_TYPED( SvxThesaurusDialog, SelectFirstHdl_Impl, void*, void );
 
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index eec02b8..831ff0c 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -290,10 +290,10 @@ IMPL_LINK_NOARG_TYPED(DbRegistrationOptionsPage, NewHdl, Button*, void)
     openLinkDialog(sNewName,sNewLocation);
 }
 
-IMPL_LINK_NOARG(DbRegistrationOptionsPage, PathBoxDoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(DbRegistrationOptionsPage, PathBoxDoubleClickHdl, SvTreeListBox*, bool)
 {
     EditHdl(NULL);
-    return 0;
+    return false;
 }
 
 
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index d049e93..61e8f22 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -575,10 +575,10 @@ IMPL_LINK_NOARG_TYPED( CuiAboutConfigTabPage, ResetBtnHdl_Impl, Button*, void )
     Reset();
 }
 
-IMPL_LINK_NOARG( CuiAboutConfigTabPage, DoubleClickHdl_Impl )
+IMPL_LINK_NOARG_TYPED( CuiAboutConfigTabPage, DoubleClickHdl_Impl, SvTreeListBox*, bool )
 {
     StandardHdl_Impl(NULL);
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index 047d267..daa9456 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -62,7 +62,7 @@ private:
     void InsertEntry( SvTreeListEntry *pEntry);
 
     DECL_LINK_TYPED( StandardHdl_Impl, Button*, void );
-    DECL_LINK( DoubleClickHdl_Impl, void* );
+    DECL_LINK_TYPED( DoubleClickHdl_Impl, SvTreeListBox*, bool );
     DECL_LINK_TYPED( ResetBtnHdl_Impl, Button*, void );
     DECL_LINK_TYPED( SearchHdl_Impl, Button*, void );
     DECL_LINK_TYPED( ExpandingHdl_Impl, SvTreeListBox*, bool );
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 307cdcd..7f07893 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1515,7 +1515,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet )
 
 
 
-IMPL_LINK( SvxLinguTabPage, BoxDoubleClickHdl_Impl, SvTreeListBox *, pBox )
+IMPL_LINK_TYPED( SvxLinguTabPage, BoxDoubleClickHdl_Impl, SvTreeListBox *, pBox, bool )
 {
     if (pBox == m_pLinguModulesCLB)
     {
@@ -1529,7 +1529,7 @@ IMPL_LINK( SvxLinguTabPage, BoxDoubleClickHdl_Impl, SvTreeListBox *, pBox )
     {
         ClickHdl_Impl(m_pLinguOptionsEditPB);
     }
-    return 0;
+    return false;
 }
 
 
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index eb0037d..893c49e 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -523,10 +523,10 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder )
 
 
 
-IMPL_LINK_NOARG(SvxPathTabPage, DoubleClickPathHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvxPathTabPage, DoubleClickPathHdl_Impl, SvTreeListBox*, bool)
 {
     PathHdl_Impl(NULL);
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, Button*, void)
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 009c5e7..f223f9d 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -722,10 +722,10 @@ IMPL_LINK_TYPED(OfaSwAutoFmtOptionsPage, SelectHdl, SvTreeListBox*, pBox, void)
     m_pEditPB->Enable(0 != pBox->FirstSelected()->GetUserData());
 }
 
-IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, DoubleClickEditHdl)
+IMPL_LINK_NOARG_TYPED(OfaSwAutoFmtOptionsPage, DoubleClickEditHdl, SvTreeListBox*, bool)
 {
     EditHdl(NULL);
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED(OfaSwAutoFmtOptionsPage, EditHdl, Button*, void)
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 153ce47..2401676 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -296,10 +296,15 @@ IMPL_LINK_NOARG_TYPED( _SfxMacroTabPage, SelectMacro_Impl, SvTreeListBox*, void)
 
 IMPL_LINK_TYPED( _SfxMacroTabPage, AssignDeleteClickHdl_Impl, Button*, pBtn, void )
 {
-    AssignDeleteHdl_Impl(static_cast<PushButton*>(pBtn));
+    AssignDeleteHdl(pBtn);
 }
 
-IMPL_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn )
+IMPL_LINK_TYPED( _SfxMacroTabPage, AssignDeleteHdl_Impl, SvTreeListBox*, pBtn, bool )
+{
+    return AssignDeleteHdl(pBtn);
+}
+
+bool _SfxMacroTabPage::AssignDeleteHdl(Control* pBtn)
 {
     SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
     SvTreeListEntry* pE = rListBox.FirstSelected();
@@ -308,7 +313,7 @@ IMPL_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn )
         ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) )
     {
         DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" );
-        return 0;
+        return false;
     }
 
     const bool bAssEnabled = pBtn != mpImpl->pDeletePB && mpImpl->pAssignPB->IsEnabled();
@@ -342,7 +347,7 @@ IMPL_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn )
     rListBox.SetUpdateMode( true );
 
     EnableButtons();
-    return 0;
+    return false;
 }
 
 IMPL_LINK_TYPED( _SfxMacroTabPage, TimeOut_Impl, Idle*,, void )
@@ -367,7 +372,7 @@ void _SfxMacroTabPage::InitAndSetHandler()
 {
     SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
     HeaderBar&          rHeaderBar = mpImpl->pEventLB->GetHeaderBar();
-    Link<>              aLnk(LINK(this, _SfxMacroTabPage, AssignDeleteHdl_Impl ));
+    Link<SvTreeListBox*,bool> aLnk(LINK(this, _SfxMacroTabPage, AssignDeleteHdl_Impl ));
     mpImpl->pMacroLB->SetDoubleClickHdl( aLnk );
     mpImpl->pDeletePB->SetClickHdl( LINK(this, _SfxMacroTabPage, AssignDeleteClickHdl_Impl ) );
     mpImpl->pAssignPB->SetClickHdl( LINK(this, _SfxMacroTabPage, AssignDeleteClickHdl_Impl ) );
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 8308d2e..1e66ff0 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1156,7 +1156,7 @@ void SvxNumberFormatTabPage::UpdateThousandEngineeringText()
 #*
 #************************************************************************/
 
-IMPL_LINK( SvxNumberFormatTabPage, DoubleClickHdl_Impl, SvxFontListBox*, pLb )
+IMPL_LINK_TYPED( SvxNumberFormatTabPage, DoubleClickHdl_Impl, SvTreeListBox*, pLb, bool )
 {
     if (pLb == m_pLbFormat)
     {
@@ -1174,7 +1174,7 @@ IMPL_LINK( SvxNumberFormatTabPage, DoubleClickHdl_Impl, SvxFontListBox*, pLb )
                 pOKButton->Click();
         }
     }
-    return 0;
+    return false;
 }
 
 
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index c935867..d2c2585 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -756,7 +756,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons
     _pTreeView->SetDefaultExpandedEntryBmp( _rImage );
 
     _pTreeView->SetDoubleClickHdl(LINK(this, OAppDetailPageHelper, OnEntryDoubleClick));
-    _pTreeView->SetEnterKeyHdl(LINK(this, OAppDetailPageHelper, OnEntryDoubleClick));
+    _pTreeView->SetEnterKeyHdl(LINK(this, OAppDetailPageHelper, OnEntryEnterKey));
     _pTreeView->SetSelChangeHdl(LINK(this, OAppDetailPageHelper, OnEntrySelChange));
 
     _pTreeView->setCutHandler(LINK(this, OAppDetailPageHelper, OnCutEntry));
@@ -904,11 +904,15 @@ void OAppDetailPageHelper::elementRemoved( ElementType _eType,const OUString& _r
     }
 }
 
-IMPL_LINK(OAppDetailPageHelper, OnEntryDoubleClick, SvTreeListBox*, _pTree)
+IMPL_LINK(OAppDetailPageHelper, OnEntryEnterKey, void*, _pTree)
+{
+    return OnEntryDoubleClick(static_cast<SvTreeListBox*>(_pTree)) ? 0 : 1;
+}
+IMPL_LINK_TYPED(OAppDetailPageHelper, OnEntryDoubleClick, SvTreeListBox*, _pTree, bool)
 {
     OSL_ENSURE( _pTree, "OAppDetailPageHelper, OnEntryDoubleClick: invalid callback!" );
     bool bHandled = ( _pTree != NULL ) && getBorderWin().getView()->getAppController().onEntryDoubleClick( *_pTree );
-    return bHandled ? 1L : 0L;
+    return bHandled;
 }
 
 IMPL_LINK_NOARG(OAppDetailPageHelper, OnEntrySelChange)
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 6876f32..ab23316 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -151,7 +151,8 @@ namespace dbaui
         */
         DBTreeListBox* createSimpleTree( const OString& _sHelpId, const Image& _rImage);
 
-        DECL_LINK( OnEntryDoubleClick,          SvTreeListBox* );
+        DECL_LINK_TYPED( OnEntryDoubleClick,    SvTreeListBox*, bool );
+        DECL_LINK( OnEntryEnterKey,             void* );
         DECL_LINK( OnEntrySelChange,            void* );
 
         DECL_LINK( OnCutEntry,                  void* );
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 4e26400..e395da6 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -400,9 +400,8 @@ bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewTe
 
 bool DBTreeListBox::DoubleClickHdl()
 {
-    long nResult = aDoubleClickHdl.Call( this );
     // continue default processing if the DoubleClickHandler didn't handle it
-    return nResult == 0;
+    return aDoubleClickHdl.Call( this );
 }
 
 void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,bool _bUp)
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 57d4201..2565152 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -236,7 +236,7 @@ IMPL_LINK_NOARG_TYPED(OCollectionView, Up_Click, Button*, void)
     }
 }
 
-IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView)
+IMPL_LINK_NOARG_TYPED(OCollectionView, Dbl_Click_FileView, SvTreeListBox*, bool)
 {
     try
     {
@@ -264,7 +264,7 @@ IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView)
     {
         DBG_UNHANDLED_EXCEPTION();
     }
-    return 0;
+    return false;
 }
 
 void OCollectionView::initCurrentPath()
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 8b0e437..d4dddc1 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -422,17 +422,17 @@ IMPL_LINK_NOARG_TYPED( OAddTableDlg, AddClickHdl, Button*, void )
     TableListDoubleClickHdl(NULL);
 }
 
-IMPL_LINK_NOARG( OAddTableDlg, TableListDoubleClickHdl )
+IMPL_LINK_NOARG_TYPED( OAddTableDlg, TableListDoubleClickHdl, SvTreeListBox*, bool )
 {
     if ( impl_isAddAllowed() )
     {
         impl_addTable();
         if ( !impl_isAddAllowed() )
             Close();
-        return 1L;  // handled
+        return true;  // handled
     }
 
-    return 0L;  // not handled
+    return false;  // not handled
 }
 
 IMPL_LINK_NOARG_TYPED( OAddTableDlg, TableListSelectHdl, SvTreeListBox*, void )
diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx
index e90bd5d..c62020b 100644
--- a/dbaccess/source/ui/inc/CollectionView.hxx
+++ b/dbaccess/source/ui/inc/CollectionView.hxx
@@ -47,7 +47,7 @@ namespace dbaui
         DECL_LINK_TYPED(Up_Click, Button*, void);
         DECL_LINK_TYPED(NewFolder_Click, Button*, void);
         DECL_LINK_TYPED(Save_Click, Button*, void);
-        DECL_LINK(Dbl_Click_FileView,void*);
+        DECL_LINK_TYPED(Dbl_Click_FileView, SvTreeListBox*, bool);
 
         /// sets the fixedtext to the right content
         void initCurrentPath();
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index 7b590cf..2bca53b 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -47,7 +47,7 @@ namespace dbaui
             :public SvTreeListBox
             ,public IDragTransferableListener
     {
-        DECL_LINK( OnDoubleClick, SvTreeListBox* );
+        DECL_LINK_TYPED( OnDoubleClick, SvTreeListBox*, bool );
         DECL_LINK_TYPED( ScrollUpHdl, Timer*, void );
         DECL_LINK_TYPED( ScrollDownHdl, Timer*, void );
         DECL_LINK_TYPED( DropHdl, void*, void );
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
index e265bbc..bd14dee 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -72,7 +72,7 @@ namespace dbaui
 
         DECL_LINK_TYPED( AddClickHdl, Button*, void );
         DECL_LINK_TYPED( CloseClickHdl, Button*, void);
-        DECL_LINK( TableListDoubleClickHdl, void* );
+        DECL_LINK_TYPED( TableListDoubleClickHdl, SvTreeListBox*, bool );
         DECL_LINK_TYPED( TableListSelectHdl, SvTreeListBox*, void );
         DECL_LINK_TYPED( OnTypeSelected, Button*, void );
 
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index b56469e..76ed893 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -342,7 +342,7 @@ void OTableWindowListBox::GetFocus()
     SvTreeListBox::GetFocus();
 }
 
-IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ )
+IMPL_LINK_NOARG_TYPED( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, bool )
 {
     // tell my parent
     vcl::Window* pParent = Window::GetParent();
@@ -350,7 +350,7 @@ IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ )
 
     static_cast<OTableWindow*>(pParent)->OnEntryDoubleClicked(GetHdlEntry());
 
-    return 0;
+    return false;
 }
 
 void OTableWindowListBox::Command(const CommandEvent& rEvt)
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 34a9e75..f2d994f 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -165,10 +165,10 @@ IMPL_LINK_NOARG_TYPED(XMLFilterSettingsDialog, SelectionChangedHdl_Impl, SvTreeL
     updateStates();
 }
 
-IMPL_LINK_NOARG(XMLFilterSettingsDialog, DoubleClickHdl_Impl)
+IMPL_LINK_NOARG_TYPED(XMLFilterSettingsDialog, DoubleClickHdl_Impl, SvTreeListBox*, bool)
 {
     onEdit();
-    return 0;
+    return false;
 }
 
 short XMLFilterSettingsDialog::Execute()
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
index d9a3be0..99e4cd8 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
@@ -93,7 +93,7 @@ public:
 
     DECL_LINK_TYPED(ClickHdl_Impl, Button *, void );
     DECL_LINK_TYPED(SelectionChangedHdl_Impl, SvTreeListBox*, void );
-    DECL_LINK(DoubleClickHdl_Impl, void * );
+    DECL_LINK_TYPED(DoubleClickHdl_Impl, SvTreeListBox*, bool );
 
     virtual short Execute() SAL_OVERRIDE;
 
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index a08bc05..71cc14e 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -187,7 +187,7 @@ IMPL_LINK_NOARG_TYPED( PlacesListBox, Selection, SvTreeListBox*, void )
         mpDlg->RemovablePlaceSelected(false);
 }
 
-IMPL_LINK_NOARG( PlacesListBox, DoubleClick )
+IMPL_LINK_NOARG_TYPED( PlacesListBox, DoubleClick, SvTreeListBox*, bool )
 {
     sal_uInt16 nSelected = mpImpl->GetCurrRow();
     PlacePtr pPlace = maPlaces[nSelected];
@@ -212,7 +212,7 @@ IMPL_LINK_NOARG( PlacesListBox, DoubleClick )
                 break;
         };
     }
-    return 0;
+    return false;
 }
 
 void PlacesListBox::updateView( )
diff --git a/fpicker/source/office/PlacesListBox.hxx b/fpicker/source/office/PlacesListBox.hxx
index 9980546..b5b6a6e 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -75,7 +75,7 @@ class PlacesListBox : public Control
         Image getEntryIcon( PlacePtr pPlace );
 
         DECL_LINK_TYPED( Selection, SvTreeListBox*, void );
-        DECL_LINK( DoubleClick, void* );
+        DECL_LINK_TYPED( DoubleClick, SvTreeListBox*, bool );
 };
 
 #endif
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 90d522b..f0cf7bf 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -916,7 +916,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
     EnableControls();
 }
 
-IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
+IMPL_LINK_NOARG_TYPED( RemoteFilesDialog, DoubleClickHdl, SvTreeListBox*, bool )
 {
     if( m_pFileView->GetSelectionCount() )
     {
@@ -940,7 +940,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
         }
     }
 
-    return 1;
+    return true;
 }
 
 IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 9f4791a..89cda7f 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -189,7 +189,7 @@ private:
     DECL_LINK ( SelectServiceHdl, void * );
     DECL_LINK_TYPED ( EditServiceMenuHdl, MenuButton *, void );
 
-    DECL_LINK( DoubleClickHdl, void * );
+    DECL_LINK_TYPED( DoubleClickHdl, SvTreeListBox*, bool );
     DECL_LINK( SelectHdl, void * );
 
     DECL_LINK( FileNameGetFocusHdl, void * );
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 68b7381..714c68d 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1596,13 +1596,13 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox )
 
 
 
-IMPL_LINK_NOARG(SvtFileDialog, DblClickHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvtFileDialog, DblClickHdl_Impl, SvTreeListBox*, bool)
 {
     _pImp->_bDoubleClick = true;
     OpenHdl_Impl( NULL );
     _pImp->_bDoubleClick = false;
 
-    return 0;
+    return false;
 }
 
 
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 553fae1..54103fc 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -121,12 +121,12 @@ private:
     void                        AddControls_Impl( );
 
     DECL_LINK( SelectHdl_Impl, SvTabListBox* );
-    DECL_LINK(DblClickHdl_Impl, void *);
+    DECL_LINK_TYPED( DblClickHdl_Impl, SvTreeListBox*, bool);
     DECL_LINK(EntrySelectHdl_Impl, void *);
     DECL_LINK( OpenDoneHdl_Impl, SvtFileView* );
-    DECL_LINK_TYPED(AutoExtensionHdl_Impl, Button*, void);
+    DECL_LINK_TYPED( AutoExtensionHdl_Impl, Button*, void);
     DECL_LINK_TYPED( ClickHdl_Impl, Button*, void );
-    DECL_LINK_TYPED(PlayButtonHdl_Impl, Button*, void);
+    DECL_LINK_TYPED( PlayButtonHdl_Impl, Button*, void);
 
 
     // removes a filter with wildcards from the path and returns it
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index 5c87019..3aa326b 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -37,6 +37,7 @@ class SvtFileView_Impl;
 class SvTreeListEntry;
 class HeaderBar;
 struct SvtContentEntry;
+class SvTreeListBox;
 
 /// the result of an action in the FileView
 enum FileViewResult
@@ -158,12 +159,12 @@ public:
     void                    SetNoSelection();
 
     void                    SetSelectHdl( const Link<>& rHdl );
-    void                    SetDoubleClickHdl( const Link<>& rHdl );
+    void                    SetDoubleClickHdl( const Link<SvTreeListBox*,bool>& rHdl );
     void                    SetOpenDoneHdl( const Link<>& rHdl );
 
-    sal_uLong                   GetSelectionCount() const;
-    SvTreeListEntry*            FirstSelected() const;
-    SvTreeListEntry*            NextSelected( SvTreeListEntry* pEntry ) const;
+    sal_uLong               GetSelectionCount() const;
+    SvTreeListEntry*        FirstSelected() const;
+    SvTreeListEntry*        NextSelected( SvTreeListEntry* pEntry ) const;
     void                    EnableAutoResize();
 
     void                    EnableDelete( bool bEnable );
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 2a3cba9..76113ad 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -282,7 +282,7 @@ class SVT_DLLPUBLIC SvTreeListBox
     SvLBoxItem*             pEdItem;
 
 protected:
-    Link<>                  aDoubleClickHdl;
+    Link<SvTreeListBox*,bool> aDoubleClickHdl;
     SvTreeListEntry*        pTargetEntry;
     SvLBoxButtonData*       pCheckButtonData;
     std::vector<SvLBoxTab*> aTabs;
@@ -477,10 +477,10 @@ public:
 
     void            SetSelectHdl( const Link<SvTreeListBox*,void>& rNewHdl ) {aSelectHdl=rNewHdl; }
     void            SetDeselectHdl( const Link<SvTreeListBox*,void>& rNewHdl ) {aDeselectHdl=rNewHdl; }
-    void            SetDoubleClickHdl(const Link<>& rNewHdl) {aDoubleClickHdl=rNewHdl;}
+    void            SetDoubleClickHdl(const Link<SvTreeListBox*,bool>& rNewHdl) {aDoubleClickHdl=rNewHdl;}
     const Link<SvTreeListBox*,void>&   GetSelectHdl() const { return aSelectHdl; }
     const Link<SvTreeListBox*,void>&   GetDeselectHdl() const { return aDeselectHdl; }
-    const Link<>&   GetDoubleClickHdl() const { return aDoubleClickHdl; }
+    const Link<SvTreeListBox*,bool>&   GetDoubleClickHdl() const { return aDoubleClickHdl; }
     void            SetExpandingHdl(const Link<SvTreeListBox*,bool>& rNewHdl){aExpandingHdl=rNewHdl;}
     void            SetExpandedHdl(const Link<SvTreeListBox*,void>& rNewHdl){aExpandedHdl=rNewHdl;}
 
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index cac6622..521d574 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -504,12 +504,12 @@ IMPL_LINK_NOARG_TYPED( OAddFieldWindow, OnClickHdl, Button*, void )
     OnDoubleClickHdl(NULL);
 }
 
-IMPL_LINK_NOARG( OAddFieldWindow, OnDoubleClickHdl )
+IMPL_LINK_NOARG_TYPED( OAddFieldWindow, OnDoubleClickHdl, SvTreeListBox*, bool )
 {
     if ( m_aCreateLink.IsSet() )
         m_aCreateLink.Call(this);
 
-    return 0L;
+    return false;
 }
 
 void OAddFieldWindow::setImageList(sal_Int16 _eBitmapSet)
diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx
index fcb03b0..b9f3f03 100644
--- a/reportdesign/source/ui/inc/AddField.hxx
+++ b/reportdesign/source/ui/inc/AddField.hxx
@@ -70,7 +70,7 @@ class  OAddFieldWindow  :public FloatingWindow
     ::rtl::Reference< comphelper::OContainerListenerAdapter>                    m_pContainerListener;
 
     DECL_LINK_TYPED( OnClickHdl, Button*, void );
-    DECL_LINK( OnDoubleClickHdl,      void* );
+    DECL_LINK_TYPED( OnDoubleClickHdl, SvTreeListBox*, bool );
     DECL_LINK_TYPED( OnSelectHdl, SvTreeListBox*, void );
     DECL_LINK_TYPED( OnSortAction, ToolBox*, void );
 
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 0b0ab2e..882cec0 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -165,16 +165,16 @@ IMPL_LINK_NOARG_TYPED(ScCondFormatManagerDlg, EditBtnClickHdl, Button*, void)
 {
     EditBtnHdl(nullptr);
 }
-IMPL_LINK_NOARG(ScCondFormatManagerDlg, EditBtnHdl)
+IMPL_LINK_NOARG_TYPED(ScCondFormatManagerDlg, EditBtnHdl, SvTreeListBox*, bool)
 {
     ScConditionalFormat* pFormat = m_pCtrlManager->GetSelection();
 
     if(!pFormat)
-        return 0;
+        return false;
 
     EndDialog( DLG_RET_EDIT );
 
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED(ScCondFormatManagerDlg, AddBtnHdl, Button*, void)
diff --git a/sc/source/ui/inc/condformatmgr.hxx b/sc/source/ui/inc/condformatmgr.hxx
index a72e6a2..f581daf 100644
--- a/sc/source/ui/inc/condformatmgr.hxx
+++ b/sc/source/ui/inc/condformatmgr.hxx
@@ -70,7 +70,7 @@ private:
     DECL_LINK_TYPED(RemoveBtnHdl, Button*, void);
     DECL_LINK_TYPED(EditBtnClickHdl, Button*, void);
     DECL_LINK_TYPED(AddBtnHdl, Button*, void);
-    DECL_LINK(EditBtnHdl, void*);
+    DECL_LINK_TYPED(EditBtnHdl, SvTreeListBox*, bool);
 
     bool mbModified;
 };
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index ecd4f0c..9a01602 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -102,7 +102,7 @@ class ScContentTree : public SvTreeListBox
 
     ScDocument* GetSourceDocument();
 
-    DECL_LINK( ContentDoubleClickHdl, void* );
+    DECL_LINK_TYPED( ContentDoubleClickHdl, SvTreeListBox*, bool );
     DECL_LINK_TYPED( ExecDragHdl, void*, void );
 public:
     SvTreeListEntry* pTmpEntry;
diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx
index 230bfa2..c2bcbb4 100644
--- a/sc/source/ui/inc/solveroptions.hxx
+++ b/sc/source/ui/inc/solveroptions.hxx
@@ -47,7 +47,7 @@ class ScSolverOptionsDialog : public ModalDialog
 
     DECL_LINK( EngineSelectHdl, void* );
     DECL_LINK_TYPED( SettingsSelHdl, SvTreeListBox*, void );
-    DECL_LINK( SettingsDoubleClickHdl, void* );
+    DECL_LINK_TYPED( SettingsDoubleClickHdl, SvTreeListBox*, bool );
     DECL_LINK_TYPED( ButtonHdl, Button*, void );
 
     void    ReadFromComponent();
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 9df9f45..c6ed2a3 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -355,10 +355,10 @@ IMPL_LINK_TYPED( ScSolverOptionsDialog, ButtonHdl, Button*, pBtn, void )
         EditOption();
 }
 
-IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsDoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(ScSolverOptionsDialog, SettingsDoubleClickHdl, SvTreeListBox*, bool)
 {
     EditOption();
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG(ScSolverOptionsDialog, EngineSelectHdl)
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index a85e240..c85f305 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -349,7 +349,7 @@ static OUString lcl_GetDBAreaRange( ScDocument* pDoc, const OUString& rDBName )
     return aRet;
 }
 
-IMPL_LINK_NOARG(ScContentTree, ContentDoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(ScContentTree, ContentDoubleClickHdl, SvTreeListBox*, bool)
 {
     sal_uInt16 nType;
     sal_uLong nChild;
@@ -359,7 +359,7 @@ IMPL_LINK_NOARG(ScContentTree, ContentDoubleClickHdl)
     if( pEntry && (nType != SC_CONTENT_ROOT) && (nChild != SC_CONTENT_NOCHILD) )
     {
         if ( bHiddenDoc )
-            return 0;               //! spaeter...
+            return false;               //! spaeter...
 
         OUString aText( GetEntryText( pEntry ) );
 
@@ -419,7 +419,7 @@ IMPL_LINK_NOARG(ScContentTree, ContentDoubleClickHdl)
         ScNavigatorDlg::ReleaseFocus();     // set focus into document
     }
 
-    return 0;
+    return false;
 }
 
 void ScContentTree::MouseButtonDown( const MouseEvent& rMEvt )
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 803f8e9..64024a8 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -389,7 +389,7 @@ IMPL_LINK_TYPED( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void )
     }
 }
 
-IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl)
+IMPL_LINK_NOARG_TYPED(SdNavigatorWin, ClickObjectHdl, SvTreeListBox*, bool)
 {
     if( !mbDocImported || maLbDocs->GetSelectEntryPos() != 0 )
     {
@@ -422,7 +422,7 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl)
             }
         }
     }
-    return 0L;
+    return false;
 }
 
 IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl)
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index bdfbed1..f645e9f 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -146,7 +146,7 @@ private:
                                 DECL_LINK_TYPED( SelectToolboxHdl, ToolBox *, void );
                                 DECL_LINK_TYPED( DropdownClickToolBoxHdl, ToolBox *, void );
                                 DECL_LINK( ClickPageHdl, void * );
-                                DECL_LINK( ClickObjectHdl, void * );
+                                DECL_LINK_TYPED( ClickObjectHdl, SvTreeListBox*, bool );
                                 DECL_LINK( SelectDocumentHdl, void * );
                                 DECL_LINK_TYPED( MenuSelectHdl, Menu *, bool );
                                 DECL_LINK_TYPED( ShapeFilterCallback, Menu *, bool );
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 00ef0bc..9642829 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1726,8 +1726,6 @@ void SfxHelpIndexWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
 void SfxHelpIndexWindow_Impl::SetDoubleClickHdl( const Link<>& rLink )
 {
     aPageDoubleClickLink = rLink;
-    if ( pCPage )
-        pCPage->SetOpenHdl( aPageDoubleClickLink );
     if ( pIPage )
         pIPage->SetDoubleClickHdl( aPageDoubleClickLink );
     if ( pSPage )
@@ -1736,7 +1734,10 @@ void SfxHelpIndexWindow_Impl::SetDoubleClickHdl( const Link<>& rLink )
         pBPage->SetDoubleClickHdl( aPageDoubleClickLink );
 }
 
-
+IMPL_LINK_TYPED(SfxHelpIndexWindow_Impl, ContentTabPageDoubleClickHdl, SvTreeListBox*, p, bool)
+{
+    return aPageDoubleClickLink.Call(p);
+}
 
 void SfxHelpIndexWindow_Impl::SetFactory( const OUString& rFactory, bool bActive )
 {
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index f3e35895..29728f8 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -64,7 +64,7 @@ public:
     virtual void    RequestingChildren( SvTreeListEntry* pParent ) SAL_OVERRIDE;
     virtual bool    Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
 
-    inline void     SetOpenHdl( const Link<>& rLink ) { SetDoubleClickHdl( rLink ); }
+    inline void     SetOpenHdl( const Link<SvTreeListBox*,bool>& rLink ) { SetDoubleClickHdl( rLink ); }
     OUString        GetSelectEntry() const;
 };
 
@@ -101,7 +101,7 @@ public:
     virtual void        ActivatePage() SAL_OVERRIDE;
     virtual Control*    GetLastFocusControl() SAL_OVERRIDE;
 
-    void     SetOpenHdl( const Link<>& rLink ) { m_pContentBox->SetOpenHdl( rLink ); }
+    void     SetOpenHdl( const Link<SvTreeListBox*,bool>& rLink ) { m_pContentBox->SetOpenHdl( rLink ); }
     OUString GetSelectEntry() const { return m_pContentBox->GetSelectEntry(); }
     void     SetFocusOnBox() { m_pContentBox->GrabFocus(); }
 };
@@ -317,6 +317,7 @@ private:
     DECL_LINK_TYPED(InitHdl, Idle *, void);
     DECL_LINK_TYPED(SelectFactoryHdl, Idle *, void);
     DECL_LINK(KeywordHdl, void *);
+    DECL_LINK_TYPED(ContentTabPageDoubleClickHdl, SvTreeListBox*, bool);
 
 public:
     SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* pParent );
@@ -353,7 +354,7 @@ ContentTabPage_Impl* SfxHelpIndexWindow_Impl::GetContentPage()
     if ( !pCPage )
     {
         pCPage = VclPtr<ContentTabPage_Impl>::Create( m_pTabCtrl, this );
-        pCPage->SetOpenHdl( aPageDoubleClickLink );
+        pCPage->SetOpenHdl( LINK(this, SfxHelpIndexWindow_Impl, ContentTabPageDoubleClickHdl) );
     }
     return pCPage;
 }
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 1f1cc09..52ab260 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -866,7 +866,7 @@ void SfxCommonTemplateDialog_Impl::Initialize()
     Update_Impl();
 
     aFilterLb->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, FilterSelectHdl ) );
-    aFmtLb->SetDoubleClickHdl( LINK( this, SfxCommonTemplateDialog_Impl, ApplyHdl ) );
+    aFmtLb->SetDoubleClickHdl( LINK( this, SfxCommonTemplateDialog_Impl, TreeListApplyHdl ) );
     aFmtLb->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, FmtSelectHdl ) );
     aFmtLb->SetSelectionMode(MULTIPLE_SELECTION);
 
@@ -2086,10 +2086,14 @@ void SfxCommonTemplateDialog_Impl::ResetFocus()
     }
 }
 
+IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, TreeListApplyHdl, SvTreeListBox *, bool )
+{
+    return ApplyHdl(NULL) == 1;
+}
+
 // Double-click on a style sheet in the ListBox is applied.
-IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl )
+IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, /*pControl*/ )
 {
-    (void)pControl; //unused
     // only if that region is allowed
     if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
          !GetSelectedEntry().isEmpty() )
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 1bc6df1..54e73ad 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -370,10 +370,10 @@ void SfxVersionDialog::Open_Impl()
     Close();
 }
 
-IMPL_LINK_NOARG(SfxVersionDialog, DClickHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SfxVersionDialog, DClickHdl_Impl, SvTreeListBox*, bool)
 {
     Open_Impl();
-    return 0L;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED(SfxVersionDialog, SelectHdl_Impl, SvTreeListBox*, void)
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index e9383a4..0ece9f5 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -218,6 +218,7 @@ protected:
     DECL_LINK( FilterSelectHdl, ListBox* );
     DECL_LINK_TYPED( FmtSelectHdl, SvTreeListBox*, void );
     DECL_LINK( ApplyHdl, Control* );
+    DECL_LINK_TYPED( TreeListApplyHdl, SvTreeListBox*, bool );
     DECL_LINK( DropHdl, StyleTreeListBox_Impl* );
     DECL_LINK_TYPED( TimeOut, Idle*, void );
 
diff --git a/sfx2/source/inc/versdlg.hxx b/sfx2/source/inc/versdlg.hxx
index b2747d2..4187343 100644
--- a/sfx2/source/inc/versdlg.hxx
+++ b/sfx2/source/inc/versdlg.hxx
@@ -57,7 +57,7 @@ class SfxVersionDialog : public SfxModalDialog
     SfxVersionTableDtor*        m_pTable;
     bool                        m_bIsSaveVersionOnClose;
 
-    DECL_LINK(DClickHdl_Impl, void *);
+    DECL_LINK_TYPED(            DClickHdl_Impl, SvTreeListBox*, bool);
     DECL_LINK_TYPED(            SelectHdl_Impl, SvTreeListBox*, void);
     DECL_LINK_TYPED(            ButtonHdl_Impl, Button*, void );
     void                        Init_Impl();
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 4d542cf..121432c 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1250,7 +1250,7 @@ void SvtFileView::SetSelectHdl( const Link<>& rHdl )
 
 
 
-void SvtFileView::SetDoubleClickHdl( const Link<>& rHdl )
+void SvtFileView::SetDoubleClickHdl( const Link<SvTreeListBox*,bool>& rHdl )
 {
     mpImp->mpView->SetDoubleClickHdl( rHdl );
 }
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 63f5f77..1d10995 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -82,7 +82,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
 
     // Install handlers
     m_pConditionCB->SetClickHdl(   LINK(this, SwCondCollPage, OnOffHdl));
-    m_pTbLinks->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
+    m_pTbLinks->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveTreeListBoxHdl ));
     m_pStyleLB->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
     m_pRemovePB->SetClickHdl(      LINK(this, SwCondCollPage, AssignRemoveClickHdl ));
     m_pAssignPB->SetClickHdl(      LINK(this, SwCondCollPage, AssignRemoveClickHdl ));
@@ -230,9 +230,13 @@ IMPL_LINK_TYPED( SwCondCollPage, OnOffHdl, Button*, pBox, void )
 
 IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveClickHdl, Button*, pBtn, void)
 {
-    AssignRemoveHdl(static_cast<PushButton*>(pBtn));
+    AssignRemoveHdl(pBtn);
 }
-IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
+IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveTreeListBoxHdl, SvTreeListBox*, pBtn, bool)
+{
+    return AssignRemoveHdl(pBtn) != 0;
+}
+IMPL_LINK( SwCondCollPage, AssignRemoveHdl, void*, pBtn)
 {
     SvTreeListEntry* pE = m_pTbLinks->FirstSelected();
     sal_uLong nPos;
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 71c871a..7c23759 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -66,7 +66,7 @@ SwFieldDBPage::SwFieldDBPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
 
     m_pNumFormatLB->SetSelectHdl(LINK(this, SwFieldDBPage, NumSelectHdl));
     m_pDatabaseTLB->SetSelectHdl(LINK(this, SwFieldDBPage, TreeSelectHdl));
-    m_pDatabaseTLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, InsertHdl));
+    m_pDatabaseTLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, TreeListBoxInsertHdl));
 
     m_pValueED->SetModifyHdl(LINK(this, SwFieldDBPage, ModifyHdl));
     m_pAddDBPB->SetClickHdl(LINK(this, SwFieldDBPage, AddDBHdl));
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 267c634..5719d92 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -206,7 +206,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
 
     m_pTypeTLB->SetUpdateMode(true);
     m_pTypeTLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, TypeHdl));
-    m_pTypeTLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl));
+    m_pTypeTLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, TreeListBoxInsertHdl));
     m_pSelectionLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, SubTypeHdl));
     m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl));
     m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl));
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 9db03bd..6e2e274 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -307,7 +307,12 @@ void SwFieldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
 }
 
 // Insert new fields
-IMPL_LINK( SwFieldPage, InsertHdl, Button *, pBtn )
+IMPL_LINK_TYPED( SwFieldPage, TreeListBoxInsertHdl, SvTreeListBox*, pBtn, bool )
+{
+    return InsertHdl(pBtn);
+}
+
+IMPL_LINK( SwFieldPage, InsertHdl, void *, pBtn )
 {
     SwFieldDlg *pDlg = static_cast<SwFieldDlg*>(GetTabDialog());
     if (pDlg)
@@ -315,7 +320,7 @@ IMPL_LINK( SwFieldPage, InsertHdl, Button *, pBtn )
         pDlg->InsertHdl();
 
         if (pBtn)
-            pBtn->GrabFocus();  // because of InputField-Dlg
+            static_cast<Button*>(pBtn)->GrabFocus();  // because of InputField-Dlg
     }
     else
     {
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 845f449..09c7ac7 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -25,6 +25,7 @@
 #define FIELD_COLUMN_WIDTH 76
 
 class ListBox;
+class SvTreeListBox;
 
 const int coLBCount = 3;
 
@@ -53,7 +54,8 @@ protected:
     SwField*            GetCurField()               { return m_pCurField;}
     SwWrtShell*         GetWrtShell() { return m_pWrtShell;}
 
-    DECL_LINK( InsertHdl, Button * = 0);
+    DECL_LINK( InsertHdl, void * = 0);
+    DECL_LINK_TYPED( TreeListBoxInsertHdl, SvTreeListBox*, bool);
     DECL_LINK(NumFormatHdl, void *);
 
     void                Init();
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index c7a135a..4eb1cfd 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -99,7 +99,7 @@ SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet
 
     // #i83479#
     m_pSelectionToolTipLB->SetSelectHdl( LINK(this, SwFieldRefPage, SubTypeTreeListBoxHdl) );
-    m_pSelectionToolTipLB->SetDoubleClickHdl( LINK(this, SwFieldRefPage, InsertHdl) );
+    m_pSelectionToolTipLB->SetDoubleClickHdl( LINK(this, SwFieldRefPage, TreeListBoxInsertHdl) );
     m_pSelectionToolTipLB->SetStyle( m_pSelectionToolTipLB->GetStyle() | WB_HSCROLL );
     m_pSelectionToolTipLB->SetSpaceBetweenEntries(1);
     m_pSelectionToolTipLB->SetHighlightRange();
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index d89f30d..e65f333 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -410,12 +410,12 @@ IMPL_LINK( SwGlossaryDlg, NameModify, Edit *, pEdit )
     return 0;
 }
 
-IMPL_LINK( SwGlossaryDlg, NameDoubleClick, SvTreeListBox*, pBox )
+IMPL_LINK_TYPED( SwGlossaryDlg, NameDoubleClick, SvTreeListBox*, pBox, bool )
 {
     SvTreeListEntry* pEntry = pBox->FirstSelected();
     if(pBox->GetParent(pEntry) && !bIsDocReadOnly)
         EndDialog( RET_OK );
-    return 0;
+    return false;
 }
 
 IMPL_LINK_TYPED( SwGlossaryDlg, EnableHdl, Menu *, pMn, bool )
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index 58051ad..aa6ff6b 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -185,7 +185,7 @@ public:
     const SwWrtShell*   GetActiveWrtShell() {return pActiveShell;}
     SwWrtShell*         GetHiddenWrtShell() {return pHiddenShell;}
 
-    DECL_LINK( ContentDoubleClickHdl, void * );
+    DECL_LINK_TYPED( ContentDoubleClickHdl, SvTreeListBox*, bool );
     DECL_LINK_TYPED( TimerUpdate, Timer *, void );
 
     virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* ) SAL_OVERRIDE;
@@ -289,7 +289,7 @@ protected:
 
     DECL_LINK_TYPED( PopupHdl, Menu*, bool );
     DECL_LINK_TYPED( Timeout, Timer*, void );
-    DECL_LINK(      DoubleClickHdl, void* );
+    DECL_LINK_TYPED( DoubleClickHdl, SvTreeListBox*, bool );
 
     SwNavigationPI* GetParentWindow();
 
diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx
index d1d81dc..22c175e 100644
--- a/sw/source/uibase/inc/glossary.hxx
+++ b/sw/source/uibase/inc/glossary.hxx
@@ -124,7 +124,7 @@ class SwGlossaryDlg : public SvxStandardDialog
     void ShowPreview();
 
     DECL_LINK( NameModify, Edit * );
-    DECL_LINK( NameDoubleClick, SvTreeListBox * );
+    DECL_LINK_TYPED( NameDoubleClick, SvTreeListBox*, bool );
     DECL_LINK_TYPED( GrpSelect, SvTreeListBox *, void );
     DECL_LINK_TYPED( MenuHdl, Menu *, bool );
     DECL_LINK_TYPED( EnableHdl, Menu *, bool );
diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx
index 6da63e4..4988e11 100644
--- a/sw/source/uibase/inc/swuiccoll.hxx
+++ b/sw/source/uibase/inc/swuiccoll.hxx
@@ -53,7 +53,8 @@ class SwCondCollPage : public SfxTabPage
     virtual sfxpg   DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
 
     DECL_LINK_TYPED( OnOffHdl, Button*, void );
-    DECL_LINK( AssignRemoveHdl, PushButton*);
+    DECL_LINK( AssignRemoveHdl, void*);
+    DECL_LINK_TYPED( AssignRemoveTreeListBoxHdl, SvTreeListBox*, bool);
     DECL_LINK_TYPED( AssignRemoveClickHdl, Button*, void);
     DECL_LINK_TYPED( SelectTreeListBoxHdl, SvTreeListBox*, void );
     DECL_LINK( SelectHdl, void* );
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 6c560d8..bb4af2f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1509,7 +1509,7 @@ bool  SwContentTree::Collapse( SvTreeListEntry* pParent )
 
 // Also on double click will be initially opened only.
 
-IMPL_LINK_NOARG(SwContentTree, ContentDoubleClickHdl)
+IMPL_LINK_NOARG_TYPED(SwContentTree, ContentDoubleClickHdl, SvTreeListBox*, bool)
 {
     SvTreeListEntry* pEntry = GetCurEntry();
     // Is it a content type?
@@ -1532,7 +1532,7 @@ IMPL_LINK_NOARG(SwContentTree, ContentDoubleClickHdl)
                 pActiveShell->EnterStdMode();
         }
     }
-    return 0;
+    return false;
 }
 
 // Show the file
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 6047282..530698a 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -1197,7 +1197,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
     }
 }
 
-IMPL_LINK_NOARG( SwGlobalTree, DoubleClickHdl)
+IMPL_LINK_NOARG_TYPED( SwGlobalTree, DoubleClickHdl, SvTreeListBox*, bool)
 {
     SvTreeListEntry* pEntry = GetCurEntry();
     SwGlblDocContent* pCont = static_cast<SwGlblDocContent*>(pEntry->GetUserData());
@@ -1208,7 +1208,7 @@ IMPL_LINK_NOARG( SwGlobalTree, DoubleClickHdl)
         GotoContent(pCont);
         pActiveShell->GetView().GetEditWin().GrabFocus();
     }
-    return 0;
+    return false;
 }
 
 SwNavigationPI* SwGlobalTree::GetParentWindow()
diff --git a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
index a9f7bea..9e97a51c 100644
--- a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
@@ -58,7 +58,7 @@ private:
 
     DECL_LINK_TYPED(ViewButtonHdl, Button*, void);
     DECL_LINK_TYPED(CertificateHighlightHdl, SvTreeListBox*, void );
-    DECL_LINK(          CertificateSelectHdl, void* );
+    DECL_LINK_TYPED(CertificateSelectHdl, SvTreeListBox*, bool );
 
     void ImplShowCertificateDetails();
     void ImplInitialize();
diff --git a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
index b56ddef..e70a714 100644
--- a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
@@ -92,7 +92,7 @@ private:
     DECL_LINK_TYPED(AddButtonHdl, Button*, void);
     DECL_LINK_TYPED(RemoveButtonHdl, Button*, void);
     DECL_LINK_TYPED(SignatureHighlightHdl, SvTreeListBox*, void );
-    DECL_LINK(          SignatureSelectHdl, void* );
+    DECL_LINK_TYPED(SignatureSelectHdl, SvTreeListBox*, bool );
     DECL_LINK(          StartVerifySignatureHdl, void* );
     DECL_LINK_TYPED(OKButtonHdl, Button*, void );
 
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 5f015f3..20b1dc3 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -207,10 +207,10 @@ IMPL_LINK_NOARG_TYPED(CertificateChooser, CertificateHighlightHdl, SvTreeListBox
     m_pOKBtn->Enable( bEnable );
 }
 
-IMPL_LINK_NOARG(CertificateChooser, CertificateSelectHdl)
+IMPL_LINK_NOARG_TYPED(CertificateChooser, CertificateSelectHdl, SvTreeListBox*, bool)
 {
     EndDialog( RET_OK );
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED(CertificateChooser, ViewButtonHdl, Button*, void)
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 627cae6..0c3fb39 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -407,10 +407,10 @@ IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, OKButtonHdl, Button*, void)
     EndDialog(RET_OK);
 }
 
-IMPL_LINK_NOARG(DigitalSignaturesDialog, SignatureSelectHdl)
+IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, SignatureSelectHdl, SvTreeListBox*, bool)
 {
     ImplShowSignaturesDetails();
-    return 0;
+    return false;
 }
 
 IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, ViewButtonHdl, Button*, void)
commit e8ee8473361f09034fdcd4f30a2325a53a512a7a
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 10 10:51:44 2015 +0200

    convert Link<> to typed
    
    Change-Id: I3defac5fff9708228d9bf3200e51853a127bfdc5

diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 700a0e5..2a3cba9 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -295,7 +295,7 @@ private:
     void SetBaseModel(SvTreeList* pNewModel);
 
     DECL_DLLPRIVATE_LINK_TYPED( CheckButtonClick, SvLBoxButtonData *, void );
-    DECL_DLLPRIVATE_LINK( TextEditEndedHdl_Impl, void * );
+    DECL_DLLPRIVATE_LINK_TYPED( TextEditEndedHdl_Impl, SvInplaceEdit2&, void );
     // Handler that is called by TreeList to clone an Entry
     DECL_DLLPRIVATE_LINK_TYPED( CloneHdl_Impl, SvTreeListEntry*, SvTreeListEntry* );
 
@@ -812,13 +812,13 @@ public:
 
 class SvInplaceEdit2
 {
-    Link<>      aCallBackHdl;
-    Accelerator aAccReturn;
-    Accelerator aAccEscape;
-    Idle        aIdle;
+    Link<SvInplaceEdit2&,void> aCallBackHdl;
+    Accelerator   aAccReturn;
+    Accelerator   aAccEscape;
+    Idle          aIdle;
     VclPtr<Edit>  pEdit;
-    bool        bCanceled;
-    bool        bAlreadyInCallBack;
+    bool          bCanceled;
+    bool          bAlreadyInCallBack;
 
     void        CallCallBackHdl_Impl();
     DECL_LINK_TYPED( Timeout_Impl, Idle *, void );
@@ -827,7 +827,7 @@ class SvInplaceEdit2
 
 public:
                 SvInplaceEdit2( vcl::Window* pParent, const Point& rPos, const Size& rSize,
-                   const OUString& rData, const Link<>& rNotifyEditEnd,
+                   const OUString& rData, const Link<SvInplaceEdit2&,void>& rNotifyEditEnd,
                    const Selection&, bool bMultiLine = false );
                ~SvInplaceEdit2();
     bool        KeyInput( const KeyEvent& rKEvt );
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index d5bce70..f86ff4a 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -124,12 +124,12 @@ SvInplaceEdit2::SvInplaceEdit2
     vcl::Window* pParent, const Point& rPos,
     const Size& rSize,
     const OUString& rData,
-    const Link<>& rNotifyEditEnd,
+    const Link<SvInplaceEdit2&,void>& rNotifyEditEnd,
     const Selection& rSelection,
     bool bMulti
 ) :
 
-     aCallBackHdl       ( rNotifyEditEnd ),
+    aCallBackHdl       ( rNotifyEditEnd ),
     bCanceled           ( false ),
     bAlreadyInCallBack  ( false )
 
@@ -253,7 +253,7 @@ void SvInplaceEdit2::CallCallBackHdl_Impl()
         Application::RemoveAccel( &aAccReturn );
         Application::RemoveAccel( &aAccEscape );
         pEdit->Hide();
-        aCallBackHdl.Call( this );
+        aCallBackHdl.Call( *this );
     }
 }
 
@@ -993,10 +993,10 @@ void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect,
         rSel, bMulti );
 }
 
-IMPL_LINK_NOARG(SvTreeListBox, TextEditEndedHdl_Impl)
+IMPL_LINK_NOARG_TYPED(SvTreeListBox, TextEditEndedHdl_Impl, SvInplaceEdit2&, void)
 {
     if ( nImpFlags & SvTreeListBoxFlags::EDTEND_CALLED ) // avoid nesting
-        return 0;
+        return;
     nImpFlags |= SvTreeListBoxFlags::EDTEND_CALLED;
     OUString aStr;
     if ( !pEdCtrl->EditingCanceled() )
@@ -1011,7 +1011,6 @@ IMPL_LINK_NOARG(SvTreeListBox, TextEditEndedHdl_Impl)
     pEdCtrl->Hide();
     nImpFlags &= (~SvTreeListBoxFlags::IN_EDT);
     GrabFocus();
-    return 0;
 }
 
 void SvTreeListBox::CancelTextEditing()
commit 23175c02b0f16b213736f87697b600dbbd72ff60
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 10 10:48:52 2015 +0200

    convert Link<> to typed
    
    Change-Id: I473ab8d77273c512e843427c86664f9eefbff116

diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 69bb927..037802a 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1881,12 +1881,11 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
     return xRet;
 }
 
-IMPL_LINK( OApplicationController, OnSelectContainer, void*, _pType )
+IMPL_LINK_TYPED( OApplicationController, OnSelectContainer, void*, _pType, void )
 {
     ElementType eType = (ElementType)reinterpret_cast< sal_IntPtr >( _pType );
     if (getContainer())
         getContainer()->selectContainer(eType);
-    return 0L;
 }
 
 IMPL_LINK_TYPED( OApplicationController, OnCreateWithPilot, void*, _pType, void )
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index 034a69a..899a9ca 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -527,7 +527,7 @@ namespace dbaui
         DECL_LINK_TYPED( OnClipboardChanged, TransferableDataHelper*, void );
         DECL_LINK_TYPED( OnAsyncDrop, void*, void );
         DECL_LINK_TYPED( OnCreateWithPilot, void*, void );
-        DECL_LINK( OnSelectContainer, void* );
+        DECL_LINK_TYPED( OnSelectContainer, void*, void );
         void OnFirstControllerConnected();
 
     protected:
diff --git a/dbaccess/source/ui/browser/AsynchronousLink.cxx b/dbaccess/source/ui/browser/AsynchronousLink.cxx
index 6b2dbe4..92ce231 100644
--- a/dbaccess/source/ui/browser/AsynchronousLink.cxx
+++ b/dbaccess/source/ui/browser/AsynchronousLink.cxx
@@ -23,7 +23,7 @@
 
 // OAsynchronousLink
 using namespace dbaui;
-OAsynchronousLink::OAsynchronousLink( const Link<>& _rHandler )
+OAsynchronousLink::OAsynchronousLink( const Link<void*,void>& _rHandler )
     :m_aHandler(_rHandler)
     ,m_aEventSafety()
     ,m_aDestructionSafety()
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index cc3b1c3..9d1f159 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1267,14 +1267,13 @@ void SbaXDataBrowserController::frameAction(const css::frame::FrameActionEvent&
         }
 }
 
-IMPL_LINK_NOARG( SbaXDataBrowserController, OnAsyncDisplayError )
+IMPL_LINK_NOARG_TYPED( SbaXDataBrowserController, OnAsyncDisplayError, void*, void )
 {
     if ( m_aCurrentError.isValid() )
     {
         ScopedVclPtrInstance< OSQLMessageBox > aDlg( getBrowserView(), m_aCurrentError );
         aDlg->Execute();
     }
-    return 0L;
 }
 
 void SbaXDataBrowserController::errorOccured(const css::sdb::SQLErrorEvent& aEvent) throw( RuntimeException, std::exception )
@@ -2439,20 +2438,12 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio
     return 0L;
 }
 
-IMPL_LINK_NOARG(SbaXDataBrowserController, OnAsyncGetCellFocus)
+IMPL_LINK_NOARG_TYPED(SbaXDataBrowserController, OnAsyncGetCellFocus, void*, void)
 {
     SbaGridControl* pVclGrid = getBrowserView() ? getBrowserView()->getVclControl() : NULL;
     // if we have a controller, but the window for the controller doesn't have the focus, we correct this
-    if(pVclGrid)
-    {
-        if (!pVclGrid->IsEditing())
-            return 0L;
-
-        if (pVclGrid->HasChildPathFocus())
-            pVclGrid->Controller()->GetWindow().GrabFocus();
-    }
-
-    return 0L;
+    if (pVclGrid && pVclGrid->IsEditing() && pVclGrid->HasChildPathFocus())
+        pVclGrid->Controller()->GetWindow().GrabFocus();
 }
 
 void SbaXDataBrowserController::criticalFail()
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index b7d6dff..8811b5b 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -252,11 +252,10 @@ bool OGenericUnoController::Construct(vcl::Window* /*pParent*/)
     return true;
 }
 
-IMPL_LINK_NOARG(OGenericUnoController, OnAsyncInvalidateAll)
+IMPL_LINK_NOARG_TYPED(OGenericUnoController, OnAsyncInvalidateAll, void*, void)
 {
     if ( !OGenericUnoController_Base::rBHelper.bInDispose && !OGenericUnoController_Base::rBHelper.bDisposed )
         InvalidateFeature_Impl();
-    return 0L;
 }
 
 void OGenericUnoController::impl_initialize()
@@ -1031,7 +1030,7 @@ void OGenericUnoController::closeTask()
     m_aAsyncCloseTask.Call();
 }
 
-IMPL_LINK_NOARG(OGenericUnoController, OnAsyncCloseTask)
+IMPL_LINK_NOARG_TYPED(OGenericUnoController, OnAsyncCloseTask, void*, void)
 {
     if ( !OGenericUnoController_Base::rBHelper.bInDispose )
     {
@@ -1045,7 +1044,6 @@ IMPL_LINK_NOARG(OGenericUnoController, OnAsyncCloseTask)
             DBG_UNHANDLED_EXCEPTION();
         }
     }
-    return 0L;
 }
 
 Any SAL_CALL OGenericUnoController::getViewData() throw( RuntimeException, std::exception )
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 9a3f2ed..ea230da 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -902,7 +902,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
             virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
         private:
-            DECL_LINK( OnOpenDocument, void* );
+            DECL_LINK_TYPED( OnOpenDocument, void*, void );
         };
 
         AsyncLoader::AsyncLoader( const Reference< XComponentContext >& _rxORB, const OUString& _rURL )
@@ -936,7 +936,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
             m_aAsyncCaller.Call( NULL );
         }
 
-        IMPL_LINK_NOARG( AsyncLoader, OnOpenDocument )
+        IMPL_LINK_NOARG_TYPED( AsyncLoader, OnOpenDocument, void*, void )
         {
             try
             {
@@ -970,7 +970,6 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
             catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); }
 
             release();
-            return 0L;
         }
 
         void SAL_CALL AsyncLoader::queryTermination( const css::lang::EventObject& /*Event*/ ) throw (TerminationVetoException, RuntimeException, std::exception)
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 2b1d027..b18b267 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -335,9 +335,8 @@ namespace dbaui
         DECL_LINK(OnFoundData, FmFoundRecordInformation*);
         DECL_LINK(OnCanceledNotFound, FmFoundRecordInformation*);
 
-        DECL_LINK(OnAsyncGetCellFocus, void*);
-
-        DECL_LINK( OnAsyncDisplayError, void* );
+        DECL_LINK_TYPED( OnAsyncGetCellFocus, void*, void );
+        DECL_LINK_TYPED( OnAsyncDisplayError, void*, void );
     };
 }
 
diff --git a/include/dbaccess/AsynchronousLink.hxx b/include/dbaccess/AsynchronousLink.hxx
index a551886..86f2519 100644
--- a/include/dbaccess/AsynchronousLink.hxx
+++ b/include/dbaccess/AsynchronousLink.hxx
@@ -38,7 +38,7 @@ namespace dbaui
     */
     class OAsynchronousLink
     {
-        Link<>              m_aHandler;
+        Link<void*,void>    m_aHandler;
 
     protected:
         ::osl::Mutex        m_aEventSafety;
@@ -49,7 +49,7 @@ namespace dbaui
         /** constructs the object
             @param      _rHandler           The link to be called asynchronously
         */
-        OAsynchronousLink( const Link<>& _rHandler );
+        OAsynchronousLink( const Link<void*,void>& _rHandler );
         virtual ~OAsynchronousLink();
 
         bool    IsRunning() const { return m_nEventId != 0; }
diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx
index 6dad86f..2e48bb5 100644
--- a/include/dbaccess/genericcontroller.hxx
+++ b/include/dbaccess/genericcontroller.hxx
@@ -403,8 +403,8 @@ namespace dbaui
         void ImplBroadcastFeatureState(const OUString& _rFeature, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener, bool _bIgnoreCache);
 
         // link methods
-        DECL_LINK(OnAsyncInvalidateAll, void*);
-        DECL_LINK(OnAsyncCloseTask, void*);
+        DECL_LINK_TYPED(OnAsyncInvalidateAll, void*, void);
+        DECL_LINK_TYPED(OnAsyncCloseTask, void*, void);
 
     public:
         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >  getORB() const { return m_xContext; }
commit 52a949e538de531d35792b59b62c897773ef5ed7
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 10 09:54:30 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ia8dd531759ab4d609d1c3eeb31283612c0d70219

diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index af2de0e..3ebd1c2 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -895,7 +895,7 @@ OUString Storage::GetUserName()
 
 bool Storage::ValidateFAT()
 {
-    Link<> aLink = StgIo::GetErrorLink();
+    Link<StgLinkArg&,void> aLink = StgIo::GetErrorLink();
     ErrCode nErr = pIo->ValidateFATs();
     StgIo::SetErrorLink( aLink );
     return nErr == ERRCODE_NONE;
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 74817eb..b26ee9f 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -336,14 +336,14 @@ sal_uLong Validator::FindUnrefedChains()
         return FAT_OK;
 }
 
-namespace { struct ErrorLink : public rtl::Static<Link<>, ErrorLink > {}; }
+namespace { struct ErrorLink : public rtl::Static<Link<StgLinkArg&,void>, ErrorLink > {}; }
 
-void StgIo::SetErrorLink( const Link<>& rLink )
+void StgIo::SetErrorLink( const Link<StgLinkArg&,void>& rLink )
 {
     ErrorLink::get() = rLink;
 }
 
-const Link<>& StgIo::GetErrorLink()
+const Link<StgLinkArg&,void>& StgIo::GetErrorLink()
 {
     return ErrorLink::get();
 }
@@ -379,7 +379,7 @@ sal_uLong StgIo::ValidateFATs()
             StgLinkArg aArg;
             aArg.aFile = pFileStrm->GetFileName();
             aArg.nErr = nErr;
-            ErrorLink::get().Call( &aArg );
+            ErrorLink::get().Call( aArg );
             bCopied = true;
         }
 //      DBG_ASSERT( nErr == FAT_OK ,"Storage kaputt");
diff --git a/sot/source/sdstor/stgio.hxx b/sot/source/sdstor/stgio.hxx
index 8922d80..f53652d 100644
--- a/sot/source/sdstor/stgio.hxx
+++ b/sot/source/sdstor/stgio.hxx
@@ -64,8 +64,8 @@ public:
     bool Init();                    // set up an empty file
     bool CommitAll();               // commit everything (root commit)
 
-    static void SetErrorLink( const Link<>& );
-    static const Link<>& GetErrorLink();
+    static void SetErrorLink( const Link<StgLinkArg&,void>& );
+    static const Link<StgLinkArg&,void>& GetErrorLink();
     sal_uLong ValidateFATs( );
 };
 


More information about the Libreoffice-commits mailing list