[Libreoffice-commits] core.git: 10 commits - chart2/source dbaccess/source extensions/source fpicker/source framework/inc framework/source include/dbaccess include/svtools include/svx include/vcl sc/source sd/source sfx2/source svtools/inc svtools/source svx/inc svx/source vcl/inc vcl/source

Noel Grandin noel at peralex.com
Tue Sep 15 00:38:13 PDT 2015


 chart2/source/controller/dialogs/dlg_DataEditor.cxx |    4 --
 chart2/source/controller/inc/dlg_DataEditor.hxx     |    2 -
 dbaccess/source/ui/misc/ToolBoxHelper.cxx           |    4 --
 extensions/source/bibliography/toolbar.cxx          |    4 --
 extensions/source/bibliography/toolbar.hxx          |    2 -
 fpicker/source/office/RemoteFilesDialog.cxx         |    6 +--
 fpicker/source/office/RemoteFilesDialog.hxx         |    2 -
 fpicker/source/office/iodlg.cxx                     |   10 +-----
 fpicker/source/office/iodlg.hxx                     |    4 +-
 framework/inc/uielement/toolbarmanager.hxx          |    2 -
 framework/source/dispatch/closedispatcher.cxx       |    2 -
 framework/source/uielement/toolbarmanager.cxx       |    3 -
 include/dbaccess/ToolBoxHelper.hxx                  |    2 -
 include/svtools/fileview.hxx                        |    4 +-
 include/svtools/htmlcfg.hxx                         |    1 
 include/svtools/menuoptions.hxx                     |    4 +-
 include/svtools/miscopt.hxx                         |    4 +-
 include/svtools/roadmapwizard.hxx                   |    2 -
 include/svtools/toolbarmenu.hxx                     |    2 -
 include/svx/imapdlg.hxx                             |    2 -
 include/vcl/print.hxx                               |    1 
 include/vcl/syswin.hxx                              |    4 +-
 sc/source/ui/inc/prevwsh.hxx                        |    2 -
 sc/source/ui/view/prevwsh.cxx                       |    5 +--
 sd/source/ui/controller/slidelayoutcontroller.cxx   |   15 +++++----
 sd/source/ui/dlg/RemoteDialog.cxx                   |    7 +---
 sd/source/ui/dlg/RemoteDialog.hxx                   |    2 -
 sfx2/source/appl/newhelp.cxx                        |    4 --
 sfx2/source/appl/newhelp.hxx                        |    2 -
 sfx2/source/inc/virtmenu.hxx                        |    2 -
 sfx2/source/menu/virtmenu.cxx                       |    4 --
 sfx2/source/toolbox/imgmgr.cxx                      |    5 +--
 svtools/inc/roadmap.hxx                             |    4 +-
 svtools/source/config/htmlcfg.cxx                   |   10 ------
 svtools/source/config/menuoptions.cxx               |   31 +++++++-------------
 svtools/source/config/miscopt.cxx                   |   26 ++++++++--------
 svtools/source/contnr/fileview.cxx                  |   14 ++++-----
 svtools/source/contnr/imivctl.hxx                   |    2 -
 svtools/source/contnr/imivctl1.cxx                  |   15 ++++-----
 svtools/source/control/roadmap.cxx                  |   12 +++----
 svtools/source/control/toolbarmenu.cxx              |    2 -
 svtools/source/control/toolbarmenuimp.hxx           |    2 -
 svtools/source/dialogs/roadmapwizard.cxx            |   10 ++----
 svx/inc/galbrws2.hxx                                |    2 -
 svx/source/dialog/_contdlg.cxx                      |    6 +--
 svx/source/dialog/contimp.hxx                       |    2 -
 svx/source/dialog/imapdlg.cxx                       |    6 +--
 svx/source/gallery2/galbrws2.cxx                    |    4 --
 svx/source/tbxctrls/bulletsnumbering.cxx            |   15 +++++----
 svx/source/tbxctrls/extrusioncontrols.cxx           |   27 +++++++++--------
 svx/source/tbxctrls/extrusioncontrols.hxx           |   10 +++---
 svx/source/tbxctrls/fontworkgallery.cxx             |   12 ++-----
 vcl/inc/printdlg.hxx                                |    1 
 vcl/source/gdi/print3.cxx                           |    6 ---
 vcl/source/window/printdlg.cxx                      |    9 -----
 vcl/source/window/syswin.cxx                        |    8 ++---
 vcl/source/window/winproc.cxx                       |    4 +-
 57 files changed, 150 insertions(+), 209 deletions(-)

New commits:
commit 98236528da98fda429671d8146e4f28c99b0c65a
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 08:33:41 2015 +0200

    convert Link<> to typed
    
    Change-Id: I5c4021c9cb3fdeace7f7d99d580dc7fe2f7c354a

diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 11bd97d..a59e201 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -186,7 +186,7 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL&
     if (m_pSysWindow && m_pSysWindow->GetCloseHdl().IsSet())
     {
         // The closing frame has its own close handler.  Call it instead.
-        m_pSysWindow->GetCloseHdl().Call(m_pSysWindow);
+        m_pSysWindow->GetCloseHdl().Call(*m_pSysWindow);
         return;
     }
 
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index e2b3884..78de8c9 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -279,8 +279,8 @@ public:
 
     void            SetApplicationID( const OUString &rApplicationID );
 
-    void SetCloseHdl(const Link<>& rLink);
-    const Link<>& GetCloseHdl() const;
+    void SetCloseHdl(const Link<SystemWindow&,void>& rLink);
+    const Link<SystemWindow&,void>& GetCloseHdl() const;
 
     SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutIdle.IsActive(); }
 
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index ff52c67..796c959 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -56,7 +56,7 @@ class ScPreviewShell: public SfxViewShell
 private:
     void            Construct( vcl::Window* pParent );
     DECL_LINK_TYPED( ScrollHandler, ScrollBar*, void );
-    DECL_LINK(CloseHdl, SystemWindow*);
+    DECL_LINK_TYPED( CloseHdl, SystemWindow&, void);
     void            DoScroll( sal_uInt16 nMode );
     void            ExitPreview();
 
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 7c4f303..47abf1b 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -184,7 +184,7 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
 ScPreviewShell::~ScPreviewShell()
 {
     if (mpFrameWindow)
-        mpFrameWindow->SetCloseHdl(Link<>()); // Remove close handler.
+        mpFrameWindow->SetCloseHdl(Link<SystemWindow&,void>()); // Remove close handler.
 
     // #108333#; notify Accessibility that Shell is dying and before destroy all
     BroadcastAccessibility( SfxSimpleHint( SFX_HINT_DYING ) );
@@ -480,10 +480,9 @@ IMPL_LINK_TYPED( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void )
     }
 }
 
-IMPL_LINK (ScPreviewShell, CloseHdl, SystemWindow*,)
+IMPL_LINK_NOARG_TYPED(ScPreviewShell, CloseHdl, SystemWindow&, void)
 {
     ExitPreview();
-    return 0;
 }
 
 bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index 06f70ef..b630edf 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -55,22 +55,21 @@ IMPL_LINK_NOARG_TYPED(RemoteDialog, HandleConnectButton, Button*, void)
     OUString aPin ( m_pClientBox->getPin() );
     if ( RemoteServer::connectClient( aEntry->m_pClientInfo, aPin ) )
     {
-        CloseHdl( 0 );
+        CloseHdl( *this );
     }
 #endif
 }
 
 IMPL_LINK_NOARG_TYPED( RemoteDialog, CloseClickHdl, Button*, void )
 {
-    CloseHdl(NULL);
+    CloseHdl(*this);
 }
-IMPL_LINK_NOARG( RemoteDialog, CloseHdl )
+IMPL_LINK_NOARG_TYPED( RemoteDialog, CloseHdl, SystemWindow&, void )
 {
 #ifdef ENABLE_SDREMOTE
     RemoteServer::restoreDiscoverable();
 #endif
     Close();
-    return 0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/RemoteDialog.hxx b/sd/source/ui/dlg/RemoteDialog.hxx
index 764d844..68bc947 100644
--- a/sd/source/ui/dlg/RemoteDialog.hxx
+++ b/sd/source/ui/dlg/RemoteDialog.hxx
@@ -29,7 +29,7 @@ private:
     VclPtr<ClientBox>      m_pClientBox;
 
     DECL_DLLPRIVATE_LINK_TYPED( HandleConnectButton, Button*, void );
-    DECL_LINK( CloseHdl, void* );
+    DECL_LINK_TYPED( CloseHdl, SystemWindow&, void );
     DECL_LINK_TYPED( CloseClickHdl, Button*, void );
 public:
     RemoteDialog( vcl::Window* pWindow );
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 2f95022..b711cb3 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -50,8 +50,8 @@ public:
 
     TaskPaneList*   mpTaskPaneList;
     Size            maMaxOutSize;
-    OUString   maRepresentedURL;
-    Link<> maCloseHdl;
+    OUString        maRepresentedURL;
+    Link<SystemWindow&,void> maCloseHdl;
 };
 
 SystemWindow::ImplData::ImplData()
@@ -1001,12 +1001,12 @@ void SystemWindow::SetApplicationID(const OUString &rApplicationID)
     mpWindowImpl->mpFrame->SetApplicationID( rApplicationID );
 }
 
-void SystemWindow::SetCloseHdl(const Link<>& rLink)
+void SystemWindow::SetCloseHdl(const Link<SystemWindow&,void>& rLink)
 {
     mpImplData->maCloseHdl = rLink;
 }
 
-const Link<>& SystemWindow::GetCloseHdl() const
+const Link<SystemWindow&,void>& SystemWindow::GetCloseHdl() const
 {
     return mpImplData->maCloseHdl;
 }
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 035cee4..519d13f 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1981,10 +1981,10 @@ void ImplHandleClose( vcl::Window* pWindow )
     if (pSysWin)
     {
         // See if the custom close handler is set.
-        const Link<>& rLink = pSysWin->GetCloseHdl();
+        const Link<SystemWindow&,void>& rLink = pSysWin->GetCloseHdl();
         if (rLink.IsSet())
         {
-            rLink.Call(pSysWin);
+            rLink.Call(*pSysWin);
             return;
         }
     }
commit 662084d5cb0256a1e2f4654b0dcf78930dfd38fc
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 15:23:05 2015 +0200

    remove Link<> field that is never Call()'ed
    
    Change-Id: I416734c7c42709438e3bdcdb8922ce4ec576c95a

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 2eac971..4f4f223 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -534,7 +534,6 @@ public:
     VCL_PLUGIN_PUBLIC PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false );
     VCL_PLUGIN_PUBLIC void printFilteredPage( int i_nPage );
     SAL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
-    SAL_DLLPRIVATE void setOptionChangeHdl( const Link<>& );
     VCL_PLUGIN_PUBLIC void createProgressDialog();
     VCL_PLUGIN_PUBLIC bool isProgressCanceled() const;
     SAL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 8d3d722..a5f1769 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -245,7 +245,6 @@ namespace vcl
         DECL_LINK_TYPED( ToggleHdl, CheckBox&, void );
         DECL_LINK_TYPED( ToggleRadioHdl, RadioButton&, void );
         DECL_LINK( ModifyHdl, Edit* );
-        DECL_LINK( UIOptionsChanged, void* );
 
         DECL_LINK_TYPED( UIOption_CheckHdl, CheckBox&, void );
         DECL_LINK_TYPED( UIOption_RadioHdl, RadioButton&, void );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 17ada9e..ab68012 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -145,7 +145,6 @@ public:
     std::vector< PropertyValue >                                maUIProperties;
     std::vector< bool >                                         maUIPropertyEnabled;
     PropertyToIndexMap                                          maPropertyToIndex;
-    Link<>                                                      maOptionChangeHdl;
     ControlDependencyMap                                        maControlDependencies;
     ChoiceDisableMap                                            maChoiceDisableMap;
     bool                                                    mbFirstPage;
@@ -1653,11 +1652,6 @@ OUString PrinterController::makeEnabled( const OUString& i_rProperty )
     return aDependency;
 }
 
-void PrinterController::setOptionChangeHdl( const Link<>& i_rHdl )
-{
-    mpImplData->maOptionChangeHdl = i_rHdl;
-}
-
 void PrinterController::createProgressDialog()
 {
     if( ! mpImplData->mpProgress )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 2c81a2a..b2185fc 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -697,9 +697,6 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC
     // setup optional UI options set by application
     setupOptionalUI();
 
-    // set change handler for UI options
-    maPController->setOptionChangeHdl( LINK( this, PrintDialog, UIOptionsChanged ) );
-
     // remove layout page if unwanted
     if (!mbShowLayoutPage)
         mpTabCtrl->RemovePage(mpTabCtrl->GetPageId(2));
@@ -1675,12 +1672,6 @@ IMPL_LINK( PrintDialog, ModifyHdl, Edit*, pEdit )
     return 0;
 }
 
-IMPL_LINK_NOARG(PrintDialog, UIOptionsChanged)
-{
-    checkOptionalControlDependencies();
-    return 0;
-}
-
 PropertyValue* PrintDialog::getValueForWindow( vcl::Window* i_pWindow ) const
 {
     PropertyValue* pVal = NULL;
commit 8491065b9a673450bd62d8b837540d879f5ce07e
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 14:17:56 2015 +0200

    convert Link<> to typed
    
    Change-Id: Id8ea19a0fe04061c6ec35229f41c164b4ebd408c

diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx
index 5cbf609..3999f89 100644
--- a/include/svtools/toolbarmenu.hxx
+++ b/include/svtools/toolbarmenu.hxx
@@ -81,7 +81,7 @@ public:
 
     const Size&     getMenuSize() const;
 
-    void            SetSelectHdl( const Link<>& rLink );
+    void            SetSelectHdl( const Link<ToolbarMenu*,void>& rLink );
 
     int             getSelectedEntryId() const;
     int             getHighlightedEntryId() const;
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 288260f..3319f65 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -70,9 +70,9 @@ public:
     virtual void dispose() SAL_OVERRIDE;
 
 protected:
-    DECL_LINK( SelectHdl, void * );
+    DECL_LINK_TYPED( SelectToolbarMenuHdl, ToolbarMenu*, void );
     DECL_LINK_TYPED( SelectValueSetHdl, ValueSet*, void );
-
+    void SelectHdl(void*);
 private:
     SlideLayoutController& mrController;
     Reference< XFrame > mxFrame;
@@ -182,7 +182,7 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
     SvtLanguageOptions aLanguageOptions;
     const bool bVerticalEnabled = aLanguageOptions.IsVerticalTextEnabled();
 
-    SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectHdl ) );
+    SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectToolbarMenuHdl ) );
 
     mpLayoutSet1 = createEmptyValueSetControl();
     mpLayoutSet1->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectValueSetHdl ) );
@@ -272,7 +272,12 @@ IMPL_LINK_TYPED( LayoutToolbarMenu, SelectValueSetHdl, ValueSet*, pControl, void
 {
     SelectHdl(pControl);
 }
-IMPL_LINK( LayoutToolbarMenu, SelectHdl, void *, pControl )
+IMPL_LINK_TYPED( LayoutToolbarMenu, SelectToolbarMenuHdl, ToolbarMenu *, pControl, void )
+{
+    SelectHdl(pControl);
+}
+
+void LayoutToolbarMenu::SelectHdl(void* pControl)
 {
     if ( IsInPopupMode() )
         EndPopupMode();
@@ -304,8 +309,6 @@ IMPL_LINK( LayoutToolbarMenu, SelectHdl, void *, pControl )
     }
 
     mrController.dispatchCommand( sCommandURL, aArgs );
-
-    return 0;
 }
 
 OUString SlideLayoutController_getImplementationName() throw (css::uno::RuntimeException)
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 2be2370..62157b7 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1612,7 +1612,7 @@ const Size& ToolbarMenu::getMenuSize() const
 
 
 
-void ToolbarMenu::SetSelectHdl( const Link<>& rLink )
+void ToolbarMenu::SetSelectHdl( const Link<ToolbarMenu*,void>& rLink )
 {
     mpImpl->maSelectHdl = rLink;
 }
diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index 54a5bd7..951bc74 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -267,7 +267,7 @@ struct ToolbarMenu_Impl
 
     Size maSize;
 
-    Link<>          maSelectHdl;
+    Link<ToolbarMenu*,void>          maSelectHdl;
 
     ToolbarMenu_Impl( ToolbarMenu& rMenu, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
     ~ToolbarMenu_Impl();
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx
index d00606f5..2ca014a 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -38,9 +38,9 @@ class NumberingPopup : public svtools::ToolbarMenu
     bool mbBulletItem;
     NumberingToolBoxControl& mrController;
     VclPtr<SvxNumValueSet> mpValueSet;
-    DECL_LINK( VSSelectHdl, void * );
+    DECL_LINK_TYPED( VSSelectToolbarMenuHdl, ToolbarMenu*, void );
     DECL_LINK_TYPED( VSSelectValueSetHdl, ValueSet*, void );
-
+    void VSSelectHdl(void *);
 public:
     NumberingPopup( NumberingToolBoxControl& rController,
                     const css::uno::Reference< css::frame::XFrame >& rFrame,
@@ -124,7 +124,7 @@ NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController,
 
     SetOutputSizePixel( getMenuSize() );
     mpValueSet->SetSelectHdl( LINK( this, NumberingPopup, VSSelectValueSetHdl ) );
-    SetSelectHdl( LINK( this, NumberingPopup, VSSelectHdl ) );
+    SetSelectHdl( LINK( this, NumberingPopup, VSSelectToolbarMenuHdl ) );
 
     if ( mbBulletItem )
         AddStatusListener( ".uno:CurrentBulletListType" );
@@ -157,7 +157,12 @@ IMPL_LINK_TYPED( NumberingPopup, VSSelectValueSetHdl, ValueSet*, pControl, void
 {
     VSSelectHdl(pControl);
 }
-IMPL_LINK( NumberingPopup, VSSelectHdl, void *, pControl )
+IMPL_LINK_TYPED( NumberingPopup, VSSelectToolbarMenuHdl, ToolbarMenu*, pControl, void )
+{
+    VSSelectHdl(pControl);
+}
+
+void NumberingPopup::VSSelectHdl(void* pControl)
 {
     if ( IsInPopupMode() )
         EndPopupMode();
@@ -193,8 +198,6 @@ IMPL_LINK( NumberingPopup, VSSelectHdl, void *, pControl )
         aArgs[0].Value <<= aPageName;
         mrController.dispatchCommand( ".uno:OutlineBullet", aArgs );
     }
-
-    return 0;
 }
 
 
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 4804392..18dfe43 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -78,7 +78,7 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow(
         maImgDirection[i] = Image( SVX_RES( RID_SVXIMG_DIRECTION + i ) );
     }
 
-    SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
+    SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectToolbarMenuHdl ) );
     mpDirectionSet = createEmptyValueSetControl();
 
     mpDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectValueSetHdl ) );
@@ -206,7 +206,11 @@ IMPL_LINK_TYPED( ExtrusionDirectionWindow, SelectValueSetHdl, ValueSet*, pContro
 {
     SelectHdl(pControl);
 }
-IMPL_LINK( ExtrusionDirectionWindow, SelectHdl, void *, pControl )
+IMPL_LINK_TYPED( ExtrusionDirectionWindow, SelectToolbarMenuHdl, ToolbarMenu*, pControl, void )
+{
+    SelectHdl(pControl);
+}
+void ExtrusionDirectionWindow::SelectHdl(void* pControl)
 {
     if ( IsInPopupMode() )
         EndPopupMode();
@@ -232,8 +236,6 @@ IMPL_LINK( ExtrusionDirectionWindow, SelectHdl, void *, pControl )
             implSetProjection( nProjection );
         }
     }
-
-    return 0;
 }
 
 ExtrusionDirectionControl::ExtrusionDirectionControl(
@@ -430,7 +432,7 @@ void ExtrusionDepthWindow::statusChanged(
     }
 }
 
-IMPL_LINK_NOARG(ExtrusionDepthWindow, SelectHdl)
+IMPL_LINK_NOARG_TYPED(ExtrusionDepthWindow, SelectHdl, ToolbarMenu*, void)
 {
     int nSelected = getSelectedEntryId();
     if( nSelected != -1 )
@@ -474,7 +476,6 @@ IMPL_LINK_NOARG(ExtrusionDepthWindow, SelectHdl)
                 EndPopupMode();
         }
     }
-    return 0;
 }
 
 
@@ -569,7 +570,7 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(svt::ToolboxController& rContro
         maImgLightingPreview[i] = Image(SVX_RES(RID_SVXIMG_LIGHT_PREVIEW + i));
     }
 
-    SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) );
+    SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectToolbarMenuHdl ) );
 
     mpLightingSet = createEmptyValueSetControl();
     mpLightingSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );
@@ -707,7 +708,11 @@ IMPL_LINK_TYPED( ExtrusionLightingWindow, SelectValueSetHdl, ValueSet*, pControl
 {
     SelectHdl(pControl);
 }
-IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl )
+IMPL_LINK_TYPED( ExtrusionLightingWindow, SelectToolbarMenuHdl, ToolbarMenu*, pControl, void )
+{
+    SelectHdl(pControl);
+}
+void ExtrusionLightingWindow::SelectHdl(void* pControl)
 {
     if ( IsInPopupMode() )
         EndPopupMode();
@@ -747,8 +752,6 @@ IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl )
         }
 
     }
-
-    return 0;
 }
 
 
@@ -875,7 +878,7 @@ void ExtrusionSurfaceWindow::statusChanged(
 
 
 
-IMPL_LINK_NOARG(ExtrusionSurfaceWindow, SelectHdl)
+IMPL_LINK_NOARG_TYPED(ExtrusionSurfaceWindow, SelectHdl, ToolbarMenu*, void)
 {
     if ( IsInPopupMode() )
         EndPopupMode();
@@ -891,8 +894,6 @@ IMPL_LINK_NOARG(ExtrusionSurfaceWindow, SelectHdl)
 
         implSetSurface( nSurface, true );
     }
-
-    return 0;
 }
 
 
diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx
index 07a8a9f..9994657 100644
--- a/svx/source/tbxctrls/extrusioncontrols.hxx
+++ b/svx/source/tbxctrls/extrusioncontrols.hxx
@@ -58,8 +58,9 @@ private:
     const OUString msExtrusionDirection;
     const OUString msExtrusionProjection;
 
-    DECL_LINK( SelectHdl, void * );
+    DECL_LINK_TYPED( SelectToolbarMenuHdl, ToolbarMenu*, void );
     DECL_LINK_TYPED( SelectValueSetHdl, ValueSet*, void );
+    void SelectHdl(void*);
 
     void implSetDirection( sal_Int32 nSkew, bool bEnabled = true );
     void implSetProjection( sal_Int32 nProjection, bool bEnabled = true );
@@ -104,7 +105,7 @@ private:
     const OUString msExtrusionDepth;
     const OUString msMetricUnit;
 
-    DECL_LINK( SelectHdl, void * );
+    DECL_LINK_TYPED( SelectHdl, ToolbarMenu*, void );
 
     void    implFillStrings( FieldUnit eUnit );
     void    implSetDepth( double fDepth );
@@ -160,8 +161,9 @@ private:
     void    implSetIntensity( int nLevel, bool bEnabled );
     void    implSetDirection( int nDirection, bool bEnabled );
 
-    DECL_LINK( SelectHdl, void * );
+    DECL_LINK_TYPED( SelectToolbarMenuHdl, ToolbarMenu*, void );
     DECL_LINK_TYPED( SelectValueSetHdl, ValueSet*, void );
+    void SelectHdl(void*);
 public:
     ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
     virtual ~ExtrusionLightingWindow();
@@ -205,7 +207,7 @@ private:
 
     const OUString msExtrusionSurface;
 
-    DECL_LINK( SelectHdl, void * );
+    DECL_LINK_TYPED( SelectHdl, ToolbarMenu*, void );
 
     void    implSetSurface( int nSurface, bool bEnabled );
 
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 4f9b5b8..a7f6172 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -275,7 +275,7 @@ private:
 
     const OUString msFontworkAlignment;
 
-    DECL_LINK( SelectHdl, void * );
+    DECL_LINK_TYPED( SelectHdl, ToolbarMenu*, void );
 
     void    implSetAlignment( int nAlignmentMode, bool bEnabled );
 };
@@ -331,7 +331,7 @@ void FontworkAlignmentWindow::statusChanged( const frame::FeatureStateEvent& Eve
     }
 }
 
-IMPL_LINK_NOARG(FontworkAlignmentWindow, SelectHdl)
+IMPL_LINK_NOARG_TYPED(FontworkAlignmentWindow, SelectHdl, ToolbarMenu*, void)
 {
     if ( IsInPopupMode() )
         EndPopupMode();
@@ -347,8 +347,6 @@ IMPL_LINK_NOARG(FontworkAlignmentWindow, SelectHdl)
 
         implSetAlignment( nAlignment, true );
     }
-
-    return 0;
 }
 
 class FontworkAlignmentControl : public svt::PopupWindowController
@@ -446,7 +444,7 @@ private:
     const OUString msFontworkCharacterSpacing;
     const OUString msFontworkKernCharacterPairs;
 
-    DECL_LINK( SelectHdl, void * );
+    DECL_LINK_TYPED( SelectHdl, ToolbarMenu*, void );
 
     void    implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled );
     void    implSetKernCharacterPairs( bool bKernOnOff, bool bEnabled );
@@ -543,7 +541,7 @@ void FontworkCharacterSpacingWindow::statusChanged( const ::com::sun::star::fram
 
 
 
-IMPL_LINK_NOARG(FontworkCharacterSpacingWindow, SelectHdl)
+IMPL_LINK_NOARG_TYPED(FontworkCharacterSpacingWindow, SelectHdl,ToolbarMenu*, void)
 {
     if ( IsInPopupMode() )
         EndPopupMode();
@@ -587,8 +585,6 @@ IMPL_LINK_NOARG(FontworkCharacterSpacingWindow, SelectHdl)
 
         implSetCharacterSpacing( nCharacterSpacing, true );
     }
-
-    return 0;
 }
 
 class FontworkCharacterSpacingControl : public svt::PopupWindowController
commit 4ac7459bef17ceee74f6b2388c96f657c25eddff
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 11:48:56 2015 +0200

    convert Link<> to typed
    
    Change-Id: I6564e4e7042c34741fd7c9ed03627c83ef818486

diff --git a/include/svtools/roadmapwizard.hxx b/include/svtools/roadmapwizard.hxx
index c79577d..d6ea94a 100644
--- a/include/svtools/roadmapwizard.hxx
+++ b/include/svtools/roadmapwizard.hxx
@@ -216,7 +216,7 @@ namespace svt
         void    updateRoadmapItemLabel( WizardState _nState );
 
     private:
-        DECL_DLLPRIVATE_LINK( OnRoadmapItemSelected, void* );
+        DECL_DLLPRIVATE_LINK_TYPED( OnRoadmapItemSelected, LinkParamNone*, void );
 
         /** updates the roadmap control to show the given path, as far as possible
             (modulo conflicts with other paths)
diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx
index 304c8c7..0e5a23d 100644
--- a/svtools/inc/roadmap.hxx
+++ b/svtools/inc/roadmap.hxx
@@ -76,8 +76,8 @@ public:
     ItemId          GetCurrentRoadmapItemID() const;
     bool            SelectRoadmapItemByID( ItemId _nItemID );
 
-    void            SetItemSelectHdl( const Link<>& _rHdl );
-    Link<>          GetItemSelectHdl( ) const;
+    void            SetItemSelectHdl( const Link<LinkParamNone*,void>& _rHdl );
+    Link<LinkParamNone*,void> GetItemSelectHdl( ) const;
     virtual void    DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
     virtual void    GetFocus() SAL_OVERRIDE;
 
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index f27ac1a..cd9e471 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -89,7 +89,7 @@ class RoadmapImpl : public RoadmapTypes
 {
 protected:
     const ORoadmap&     m_rAntiImpl;
-    Link<>              m_aSelectHdl;
+    Link<LinkParamNone*,void> m_aSelectHdl;
     BitmapEx            m_aPicture;
     HL_Vector           m_aRoadmapSteps;
     ItemId              m_iCurItemID;
@@ -162,11 +162,11 @@ public:
         return m_aPicture;
     }
 
-    void setSelectHdl(const Link<>& _rHdl)
+    void setSelectHdl(const Link<LinkParamNone*,void>& _rHdl)
     {
         m_aSelectHdl = _rHdl;
     }
-    const Link<>& getSelectHdl() const
+    const Link<LinkParamNone*,void>& getSelectHdl() const
     {
         return m_aSelectHdl;
     }
@@ -515,19 +515,19 @@ void ORoadmap::DeselectOldRoadmapItems()
     }
 }
 
-void ORoadmap::SetItemSelectHdl(const Link<>& _rHdl)
+void ORoadmap::SetItemSelectHdl(const Link<LinkParamNone*,void>& _rHdl)
 {
     m_pImpl->setSelectHdl(_rHdl);
 }
 
-Link<> ORoadmap::GetItemSelectHdl() const
+Link<LinkParamNone*,void> ORoadmap::GetItemSelectHdl() const
 {
     return m_pImpl->getSelectHdl();
 }
 
 void ORoadmap::Select()
 {
-    GetItemSelectHdl().Call( this );
+    GetItemSelectHdl().Call( nullptr );
     CallEventListeners( VCLEVENT_ROADMAP_ITEMSELECTED );
 }
 
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index a5a8c5e..e0d81d5 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -461,16 +461,16 @@ namespace svt
     }
 
 
-    IMPL_LINK_NOARG(RoadmapWizard, OnRoadmapItemSelected)
+    IMPL_LINK_NOARG_TYPED(RoadmapWizard, OnRoadmapItemSelected, LinkParamNone*, void)
     {
 
         RoadmapTypes::ItemId nCurItemId = m_pImpl->pRoadmap->GetCurrentRoadmapItemID();
         if ( nCurItemId == getCurrentState() )
             // nothing to do
-            return 1L;
+            return;
 
         if ( isTravelingSuspended() )
-            return 0;
+            return;
 
         WizardTravelSuspension aTravelGuard( *this );
 
@@ -481,7 +481,7 @@ namespace svt
             "RoadmapWizard::OnRoadmapItemSelected: something's wrong here!" );
         if ( ( nCurrentIndex == -1 ) || ( nNewIndex == -1 ) )
         {
-            return 0L;
+            return;
         }
 
         bool bResult = true;
@@ -500,8 +500,6 @@ namespace svt
 
         if ( !bResult )
             m_pImpl->pRoadmap->SelectRoadmapItemByID( getCurrentState() );
-
-        return 1L;
     }
 
 
commit 699eb7e3ca3ad11b8b797bf6a785876183661d04
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 11:45:05 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ia7a63d72048f6abde92b414e58b464cdd611017b

diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 1833769..66d0708 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -309,7 +309,7 @@ class SvxIconChoiceCtrl_Impl
     void                VisRectChanged() { aVisRectChangedIdle.Start(); }
     void                SetOrigin( const Point& );
 
-                        DECL_LINK(TextEditEndedHdl, void *);
+                        DECL_LINK_TYPED(TextEditEndedHdl, LinkParamNone*, void);
 
     void                ShowFocus ( Rectangle& rRect );
     void                DrawFocusRect(vcl::RenderContext& rRenderContext);
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 4c23286..fa7b37d 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -55,7 +55,7 @@ static bool bEndScrollInvalidate = true;
 
 class IcnViewEdit_Impl : public MultiLineEdit
 {
-    Link<>          aCallBackHdl;
+    Link<LinkParamNone*,void> aCallBackHdl;
     Accelerator     aAccReturn;
     Accelerator     aAccEscape;
     Idle            aIdle;
@@ -75,7 +75,7 @@ public:
                         const Point& rPos,
                         const Size& rSize,
                         const OUString& rData,
-                        const Link<>& rNotifyEditEnd );
+                        const Link<LinkParamNone*,void>& rNotifyEditEnd );
 
     virtual         ~IcnViewEdit_Impl();
     virtual void    dispose() SAL_OVERRIDE;
@@ -3025,13 +3025,13 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
         LINK( this, SvxIconChoiceCtrl_Impl, TextEditEndedHdl ) );
 }
 
-IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, TextEditEndedHdl)
+IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, TextEditEndedHdl, LinkParamNone*, void)
 {
     DBG_ASSERT(pEdit,"TextEditEnded: pEdit not set");
     if( !pEdit )
     {
         pCurEditedEntry = 0;
-        return 0;
+        return;
     }
     DBG_ASSERT(pCurEditedEntry,"TextEditEnded: pCurEditedEntry not set");
 
@@ -3040,7 +3040,7 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, TextEditEndedHdl)
         pEdit->Hide();
         if( pEdit->IsGrabFocus() )
             pView->GrabFocus();
-        return 0;
+        return;
     }
 
     OUString aText;
@@ -3059,7 +3059,6 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, TextEditEndedHdl)
     // The edit can not be deleted here, because it is not within a handler. It
     // will be deleted in the dtor or in the next EditEntry.
     pCurEditedEntry = 0;
-    return 0;
 }
 
 void SvxIconChoiceCtrl_Impl::StopEntryEditing( bool bCancel )
@@ -3125,7 +3124,7 @@ void SvxIconChoiceCtrl_Impl::SelectAll( bool bSelect, bool bPaint )
 }
 
 IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPos,
-    const Size& rSize, const OUString& rData, const Link<>& rNotifyEditEnd ) :
+    const Size& rSize, const OUString& rData, const Link<LinkParamNone*,void>& rNotifyEditEnd ) :
     MultiLineEdit( pParent, (pParent->GetStyle() & WB_ICON) ? WB_CENTER : WB_LEFT),
     aCallBackHdl( rNotifyEditEnd ),
     bCanceled( false ),
@@ -3178,7 +3177,7 @@ void IcnViewEdit_Impl::CallCallBackHdl_Impl()
         Application::RemoveAccel( &aAccReturn );
         Application::RemoveAccel( &aAccEscape );
         Hide();
-        aCallBackHdl.Call( this );
+        aCallBackHdl.Call( nullptr );
     }
 }
 
commit e0f617aa586d7d9c7094b3cfcc9d4d765e154283
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 11:38:47 2015 +0200

    convert Link<> to typed
    
    Change-Id: I8cd997f55f4c7206358cba9edd3d41dbedd4363f

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 7872042..a482e9b0 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1614,7 +1614,7 @@ IMPL_LINK_NOARG(SvtFileDialog, EntrySelectHdl_Impl)
 
 
 
-IMPL_LINK( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView )
+IMPL_LINK_TYPED( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView, void )
 {
     OUString sCurrentFolder( pView->GetViewURL() );
     // check if we can create new folders
@@ -1632,8 +1632,6 @@ IMPL_LINK( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView )
         aCurrentFolder.removeSegment();
     }
     EnableControl( _pImp->_pBtnUp, bCanTravelUp );
-
-    return 0;
 }
 
 
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 5d1c3dc..f214c3d 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -123,7 +123,7 @@ private:
     DECL_LINK_TYPED( SelectHdl_Impl, SvTreeListBox*, void );
     DECL_LINK_TYPED( DblClickHdl_Impl, SvTreeListBox*, bool);
     DECL_LINK(EntrySelectHdl_Impl, void *);
-    DECL_LINK( OpenDoneHdl_Impl, SvtFileView* );
+    DECL_LINK_TYPED( OpenDoneHdl_Impl, SvtFileView*, void );
     DECL_LINK_TYPED( AutoExtensionHdl_Impl, Button*, void);
     DECL_LINK_TYPED( ClickHdl_Impl, Button*, void );
     DECL_LINK_TYPED( PlayButtonHdl_Impl, Button*, void);
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index c57ed40..4070e4a 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -160,7 +160,7 @@ public:
 
     void                    SetSelectHdl( const Link<SvTreeListBox*,void>& rHdl );
     void                    SetDoubleClickHdl( const Link<SvTreeListBox*,bool>& rHdl );
-    void                    SetOpenDoneHdl( const Link<>& rHdl );
+    void                    SetOpenDoneHdl( const Link<SvtFileView*,void>& rHdl );
 
     sal_uLong               GetSelectionCount() const;
     SvTreeListEntry*        FirstSelected() const;
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index b4ab6a6..2f4ef7b 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -370,7 +370,7 @@ public:
     OUString                maAllFilter;
     OUString                maCurrentFilter;
     Image                   maFolderImage;
-    Link<>                  maOpenDoneLink;
+    Link<SvtFileView*,void> maOpenDoneLink;
     Reference< XCommandEnvironment >    mxCmdEnv;
 
     SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv,
@@ -1286,7 +1286,7 @@ const OUString& SvtFileView::GetViewURL() const
     return mpImp->maViewURL;
 }
 
-void SvtFileView::SetOpenDoneHdl( const Link<>& rHdl )
+void SvtFileView::SetOpenDoneHdl( const Link<SvtFileView*,void>& rHdl )
 {
     mpImp->maOpenDoneLink = rHdl;
 }
commit 55cdab3b8b74a29008186050e34d7f05c121c2f7
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 11:34:22 2015 +0200

    convert Link<> to typed
    
    Change-Id: I057969beed6402b2125f4dc719570d324c1df4fc

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index f0cf7bf..b3a60c8 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -291,7 +291,7 @@ RemoteFilesDialog::~RemoteFilesDialog()
 
 void RemoteFilesDialog::dispose()
 {
-    m_pFileView->SetSelectHdl( Link<>() );
+    m_pFileView->SetSelectHdl( Link<SvTreeListBox*,void>() );
 
     // save window state
     if( !m_sIniKey.isEmpty() )
@@ -943,7 +943,7 @@ IMPL_LINK_NOARG_TYPED( RemoteFilesDialog, DoubleClickHdl, SvTreeListBox*, bool )
     return true;
 }
 
-IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
+IMPL_LINK_NOARG_TYPED( RemoteFilesDialog, SelectHdl, SvTreeListBox*, void )
 {
     SvTreeListEntry* pEntry = m_pFileView->FirstSelected();
 
@@ -978,8 +978,6 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
             EnableControls();
         }
     }
-
-    return 1;
 }
 
 IMPL_LINK_NOARG( RemoteFilesDialog, FileNameGetFocusHdl )
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 89cda7f..30fff9d 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -190,7 +190,7 @@ private:
     DECL_LINK_TYPED ( EditServiceMenuHdl, MenuButton *, void );
 
     DECL_LINK_TYPED( DoubleClickHdl, SvTreeListBox*, bool );
-    DECL_LINK( SelectHdl, void * );
+    DECL_LINK_TYPED( SelectHdl, SvTreeListBox*, void );
 
     DECL_LINK( FileNameGetFocusHdl, void * );
     DECL_LINK( FileNameModifyHdl, void * );
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 960579e..7872042 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -519,7 +519,7 @@ void SvtFileDialog::dispose()
                              makeAny( sUserData ) );
     }
 
-    _pFileView->SetSelectHdl( Link<>() );
+    _pFileView->SetSelectHdl( Link<SvTreeListBox*,void>() );
 
     // Save bookmarked places
     if(_pImp->_pPlaces->IsUpdated()) {
@@ -1542,7 +1542,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL )
 
 
 
-IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox )
+IMPL_LINK_TYPED( SvtFileDialog, SelectHdl_Impl, SvTreeListBox*, pBox, void )
 {
     SvTreeListEntry* pEntry = pBox->FirstSelected();
     DBG_ASSERT( pEntry, "SelectHandler without selected entry" );
@@ -1590,8 +1590,6 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox )
     }
 
     FileSelect();
-
-    return 0;
 }
 
 
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 54103fc..5d1c3dc 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -120,7 +120,7 @@ private:
     void                        OpenMultiSelection_Impl();
     void                        AddControls_Impl( );
 
-    DECL_LINK( SelectHdl_Impl, SvTabListBox* );
+    DECL_LINK_TYPED( SelectHdl_Impl, SvTreeListBox*, void );
     DECL_LINK_TYPED( DblClickHdl_Impl, SvTreeListBox*, bool);
     DECL_LINK(EntrySelectHdl_Impl, void *);
     DECL_LINK( OpenDoneHdl_Impl, SvtFileView* );
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index 3aa326b..c57ed40 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -158,7 +158,7 @@ public:
 
     void                    SetNoSelection();
 
-    void                    SetSelectHdl( const Link<>& rHdl );
+    void                    SetSelectHdl( const Link<SvTreeListBox*,void>& rHdl );
     void                    SetDoubleClickHdl( const Link<SvTreeListBox*,bool>& rHdl );
     void                    SetOpenDoneHdl( const Link<>& rHdl );
 
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 121432c..b4ab6a6 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -337,8 +337,8 @@ class SvtFileView_Impl  :public ::svt::IEnumerationResultHandler
                         ,public ITimeoutHandler
 {
 protected:
-    VclPtr<SvtFileView>         mpAntiImpl;
-    Link<>                      m_aSelectHandler;
+    VclPtr<SvtFileView>                 mpAntiImpl;
+    Link<SvTreeListBox*,void>           m_aSelectHandler;
 
     ::rtl::Reference< ::svt::FileViewContentEnumerator >
                                         m_xContentEnumerator;
@@ -415,7 +415,7 @@ public:
 
     void                    SetActualFolder( const INetURLObject& rActualFolder );
 
-    void                    SetSelectHandler( const Link<>& _rHdl );
+    void                    SetSelectHandler( const Link<SvTreeListBox*,void>& _rHdl );
 
     void                    InitSelection();
     void                    ResetCursor();
@@ -1243,7 +1243,7 @@ void SvtFileView::GetFocus()
 
 
 
-void SvtFileView::SetSelectHdl( const Link<>& rHdl )
+void SvtFileView::SetSelectHdl( const Link<SvTreeListBox*,void>& rHdl )
 {
     mpImp->SetSelectHandler( rHdl );
 }
@@ -1759,7 +1759,7 @@ IMPL_LINK_TYPED( SvtFileView_Impl, SelectionMultiplexer, SvTreeListBox*, _pSourc
 }
 
 
-void SvtFileView_Impl::SetSelectHandler( const Link<>& _rHdl )
+void SvtFileView_Impl::SetSelectHandler( const Link<SvTreeListBox*,void>& _rHdl )
 {
     m_aSelectHandler = _rHdl;
 
commit e0714ae393661da231466ee679d1a6f5cd49fe35
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 11:28:15 2015 +0200

    convert Link<> to typed
    
    Change-Id: I8f3e401afa27778678788b4ac90ea927a2fed1d7

diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index 13d416f..a12497c 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -167,14 +167,12 @@ void DataEditor::SetReadOnly( bool bReadOnly )
     m_xBrwData->SetReadOnly( m_bReadOnly );
 }
 
-IMPL_LINK_NOARG(DataEditor, MiscHdl)
+IMPL_LINK_NOARG_TYPED(DataEditor, MiscHdl, LinkParamNone*, void)
 {
     SvtMiscOptions aMiscOptions;
     sal_Int16 nStyle( aMiscOptions.GetToolboxStyle() );
 
     m_pTbxData->SetOutStyle( nStyle );
-
-    return 0L;
 }
 
 void DataEditor::UpdateData()
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
index eb49d92..e2c1005 100644
--- a/chart2/source/controller/inc/dlg_DataEditor.hxx
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -77,7 +77,7 @@ private:
     /// is called, if the cursor of the table has moved
     DECL_LINK_TYPED( BrowserCursorMovedHdl, DataBrowser*, void);
     /// this is called if MiscOptions change, esp. High-Contrast mode
-    DECL_LINK( MiscHdl, void* );
+    DECL_LINK_TYPED( MiscHdl, LinkParamNone*, void );
 
     void UpdateData();
     /// moved and resizes the series name control etc. to fit the dimensions of the edit browsebox
diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
index 52f658e..facfa72 100644
--- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx
+++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
@@ -63,7 +63,7 @@ namespace dbaui
         }
     }
 
-    IMPL_LINK(OToolBoxHelper, ConfigOptionsChanged, SvtMiscOptions*, /*_pOptions*/)
+    IMPL_LINK_NOARG_TYPED(OToolBoxHelper, ConfigOptionsChanged, LinkParamNone*, void)
     {
         if ( m_pToolBox )
         {
@@ -73,8 +73,6 @@ namespace dbaui
             if ( aOptions.GetToolboxStyle() != m_pToolBox->GetOutStyle() )
                 m_pToolBox->SetOutStyle(aOptions.GetToolboxStyle());
         }
-
-        return 0L;
     }
     IMPL_LINK(OToolBoxHelper, SettingsChanged, VclWindowEvent*, _pEvt)
     {
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index f634b49..e60e3f7 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -533,7 +533,7 @@ void BibToolBar::DataChanged( const DataChangedEvent& rDCEvt )
     ToolBox::DataChanged( rDCEvt );
 }
 
-IMPL_LINK_NOARG( BibToolBar, OptionsChanged_Impl )
+IMPL_LINK_NOARG_TYPED( BibToolBar, OptionsChanged_Impl, LinkParamNone*, void )
 {
     bool bRebuildToolBar = false;
     sal_Int16 eSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize();
@@ -551,8 +551,6 @@ IMPL_LINK_NOARG( BibToolBar, OptionsChanged_Impl )
 
     if ( bRebuildToolBar )
         RebuildToolbar();
-
-    return 0L;
 }
 
 
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index 271e54d..341344e 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -131,7 +131,7 @@ class BibToolBar:   public ToolBox
         DECL_LINK( SelHdl, ListBox* );
         DECL_LINK_TYPED( SendSelHdl, Idle*, void );
         DECL_LINK_TYPED( MenuHdl, ToolBox*, void );
-        DECL_LINK( OptionsChanged_Impl, void* );
+        DECL_LINK_TYPED( OptionsChanged_Impl, LinkParamNone*, void );
         DECL_LINK( SettingsChanged_Impl, void* );
 
         void                    ApplyImageList();
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index f443177..b041500 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -134,7 +134,7 @@ class ToolBarManager : public ToolbarManager_Base
         DECL_LINK_TYPED(Select, ToolBox *, void);
         DECL_LINK_TYPED( StateChanged, StateChangedType const *, void );
         DECL_LINK_TYPED( DataChanged, DataChangedEvent const *, void );
-        DECL_LINK( MiscOptionsChanged, void* );
+        DECL_LINK_TYPED( MiscOptionsChanged, LinkParamNone*, void );
 
         DECL_LINK_TYPED( MenuButton, ToolBox *, void );
         DECL_LINK_TYPED( MenuSelect, Menu *, bool );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index f19c611..d41fbef 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -2099,10 +2099,9 @@ IMPL_LINK_TYPED( ToolBarManager, DataChanged, DataChangedEvent const *, pDataCha
     }
 }
 
-IMPL_LINK_NOARG(ToolBarManager, MiscOptionsChanged)
+IMPL_LINK_NOARG_TYPED(ToolBarManager, MiscOptionsChanged, LinkParamNone*, void)
 {
     CheckAndUpdateImages();
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(ToolBarManager, AsyncUpdateControllersHdl, Timer *, void)
diff --git a/include/dbaccess/ToolBoxHelper.hxx b/include/dbaccess/ToolBoxHelper.hxx
index d9671b4..b64bf85 100644
--- a/include/dbaccess/ToolBoxHelper.hxx
+++ b/include/dbaccess/ToolBoxHelper.hxx
@@ -71,7 +71,7 @@ namespace dbaui
         void checkImageList();
 
     protected:
-        DECL_LINK(ConfigOptionsChanged, SvtMiscOptions*);
+        DECL_LINK_TYPED(ConfigOptionsChanged, LinkParamNone*, void);
         DECL_LINK(SettingsChanged, VclWindowEvent* );
     };
 }
diff --git a/include/svtools/miscopt.hxx b/include/svtools/miscopt.hxx
index 7c660e6..d8da703 100644
--- a/include/svtools/miscopt.hxx
+++ b/include/svtools/miscopt.hxx
@@ -60,8 +60,8 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options
          SvtMiscOptions();
         virtual ~SvtMiscOptions();
 
-        void        AddListenerLink( const Link<>& rLink );
-        void        RemoveListenerLink( const Link<>& rLink );
+        void        AddListenerLink( const Link<LinkParamNone*,void>& rLink );
+        void        RemoveListenerLink( const Link<LinkParamNone*,void>& rLink );
 
         bool        UseSystemFileDialog() const;
         void        SetUseSystemFileDialog( bool bSet );
diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
index 3c0b013..ebd0f48 100644
--- a/include/svx/imapdlg.hxx
+++ b/include/svx/imapdlg.hxx
@@ -126,7 +126,7 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
     DECL_LINK( URLLoseFocusHdl, void* );
     DECL_LINK_TYPED( UpdateHdl, Idle *, void );
     DECL_LINK_TYPED( StateHdl, GraphCtrl*, void );
-    DECL_LINK( MiscHdl, void* );
+    DECL_LINK_TYPED( MiscHdl, LinkParamNone*, void );
 
     void                DoOpen();
     bool                DoSave();
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index c096c0a..9e60bd7 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2247,13 +2247,11 @@ IMPL_LINK_NOARG_TYPED(SfxHelpTextWindow_Impl, SelectHdl, Idle *, void)
 
 
 
-IMPL_LINK( SfxHelpTextWindow_Impl, NotifyHdl, SvtMiscOptions*, pOptions )
+IMPL_LINK_NOARG_TYPED( SfxHelpTextWindow_Impl, NotifyHdl, LinkParamNone*, void )
 {
-    (void)pOptions; // unused variable
     InitToolBoxImages();
     Resize();
     aToolBox->Invalidate();
-    return 0;
 }
 
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 29728f8..89c7d55 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -452,7 +452,7 @@ private:
     bool                    isHandledKey( const vcl::KeyCode& _rKeyCode );
 
     DECL_LINK_TYPED(        SelectHdl, Idle *, void);
-    DECL_LINK(              NotifyHdl, SvtMiscOptions* );
+    DECL_LINK_TYPED(        NotifyHdl, LinkParamNone*, void );
     DECL_LINK(              FindHdl, sfx2::SearchDialog* );
     DECL_LINK(              CloseHdl, sfx2::SearchDialog* );
     DECL_LINK_TYPED(        CheckHdl, Button*, void );
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index 3f432f5..36b46ea 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -62,7 +62,7 @@ public:
     Image                   GetImage( sal_uInt16 nId, bool bBig );
     void                    SetSymbolsSize_Impl( sal_Int16 );
 
-    DECL_LINK( OptionsChanged_Impl, void* );
+    DECL_LINK_TYPED( OptionsChanged_Impl, LinkParamNone*, void );
     DECL_LINK( SettingsChanged_Impl, VclWindowEvent* );
 
     explicit SfxImageManager_Impl(SfxModule& rModule);
@@ -200,10 +200,9 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize )
 
 
 
-IMPL_LINK_NOARG(SfxImageManager_Impl, OptionsChanged_Impl)
+IMPL_LINK_NOARG_TYPED(SfxImageManager_Impl, OptionsChanged_Impl, LinkParamNone*, void)
 {
     SetSymbolsSize_Impl( m_aOpt.GetCurrentSymbolsSize() );
-    return 0L;
 }
 
 
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 48adb6f..76953ab 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -69,8 +69,8 @@ using namespace ::com::sun::star;
 
 class SvtMiscOptions_Impl : public ConfigItem
 {
-    private:
-    ::std::list<Link<>> aList;
+private:
+    ::std::list<Link<LinkParamNone*,void>> aList;
     bool        m_bUseSystemFileDialog;
     bool        m_bIsUseSystemFileDialogRO;
     bool        m_bPluginsEnabled;
@@ -92,7 +92,7 @@ class SvtMiscOptions_Impl : public ConfigItem
 
         virtual void ImplCommit() SAL_OVERRIDE;
 
-    public:
+public:
 
          SvtMiscOptions_Impl();
         virtual ~SvtMiscOptions_Impl();
@@ -201,15 +201,15 @@ class SvtMiscOptions_Impl : public ConfigItem
         bool IsShowLinkWarningDialogReadOnly() const
         { return m_bIsShowLinkWarningDialogRO; }
 
-        void AddListenerLink( const Link<>& rLink );
-        void RemoveListenerLink( const Link<>& rLink );
+        void AddListenerLink( const Link<LinkParamNone*,void>& rLink );
+        void RemoveListenerLink( const Link<LinkParamNone*,void>& rLink );
         void CallListeners();
 
 
     //  private methods
 
 
-    private:
+private:
 
         /*-****************************************************************************************************
             @short      return list of key names of our configuration management which represent oue module tree
@@ -471,14 +471,14 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames )
     }
 }
 
-void SvtMiscOptions_Impl::AddListenerLink( const Link<>& rLink )
+void SvtMiscOptions_Impl::AddListenerLink( const Link<LinkParamNone*,void>& rLink )
 {
     aList.push_back( rLink );
 }
 
-void SvtMiscOptions_Impl::RemoveListenerLink( const Link<>& rLink )
+void SvtMiscOptions_Impl::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink )
 {
-    for ( ::std::list<Link<>>::iterator iter = aList.begin(); iter != aList.end(); ++iter )
+    for ( ::std::list<Link<LinkParamNone*,void>>::iterator iter = aList.begin(); iter != aList.end(); ++iter )
     {
         if ( *iter == rLink )
         {
@@ -490,8 +490,8 @@ void SvtMiscOptions_Impl::RemoveListenerLink( const Link<>& rLink )
 
 void SvtMiscOptions_Impl::CallListeners()
 {
-    for ( ::std::list<Link<>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter )
-        iter->Call( this );
+    for ( ::std::list<Link<LinkParamNone*,void>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter )
+        iter->Call( nullptr );
 }
 
 void SvtMiscOptions_Impl::SetToolboxStyle( sal_Int16 nStyle, bool _bSetModified )
@@ -862,12 +862,12 @@ Mutex & SvtMiscOptions::GetInitMutex()
     return theSvtMiscOptionsMutex::get();
 }
 
-void SvtMiscOptions::AddListenerLink( const Link<>& rLink )
+void SvtMiscOptions::AddListenerLink( const Link<LinkParamNone*,void>& rLink )
 {
     m_pDataContainer->AddListenerLink( rLink );
 }
 
-void SvtMiscOptions::RemoveListenerLink( const Link<>& rLink )
+void SvtMiscOptions::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink )
 {
     m_pDataContainer->RemoveListenerLink( rLink );
 }
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 09223c0..a2f1380 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -140,7 +140,7 @@ private:
                         DECL_LINK_TYPED( SelectObjectHdl, GalleryListView*, void );
                         DECL_LINK_TYPED( SelectObjectValueSetHdl, ValueSet*, void );
                         DECL_LINK_TYPED( SelectTbxHdl, ToolBox*, void );
-                        DECL_LINK( MiscHdl, void* );
+                        DECL_LINK_TYPED( MiscHdl, LinkParamNone*, void );
 
 private:
 
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 6e02396..f2d327c 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -737,12 +737,10 @@ IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow*, pWnd )
     return 0L;
 }
 
-IMPL_LINK_NOARG(SvxSuperContourDlg, MiscHdl)
+IMPL_LINK_NOARG_TYPED(SvxSuperContourDlg, MiscHdl, LinkParamNone*, void)
 {
-       SvtMiscOptions aMiscOptions;
+    SvtMiscOptions aMiscOptions;
     m_pTbx1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
-
-    return 0L;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
index 5f72e27..9512e17 100644
--- a/svx/source/dialog/contimp.hxx
+++ b/svx/source/dialog/contimp.hxx
@@ -92,7 +92,7 @@ class SvxSuperContourDlg : public SvxContourDlg
                         DECL_LINK( PipetteHdl, ContourWindow* );
                         DECL_LINK( PipetteClickHdl, ContourWindow* );
                         DECL_LINK( WorkplaceClickHdl, ContourWindow* );
-                        DECL_LINK( MiscHdl, void* );
+                        DECL_LINK_TYPED( MiscHdl, LinkParamNone*, void );
 
 public:
 
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 0a75e7b..3442f0d 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -804,12 +804,10 @@ IMPL_LINK_TYPED( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void )
     }
 }
 
-IMPL_LINK_NOARG(SvxIMapDlg, MiscHdl)
+IMPL_LINK_NOARG_TYPED(SvxIMapDlg, MiscHdl, LinkParamNone*, void)
 {
-       SvtMiscOptions aMiscOptions;
+    SvtMiscOptions aMiscOptions;
     m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
-
-    return 0L;
 }
 
 SvxIMapDlg* GetIMapDlg()
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index ce1e832..f54a934 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1331,7 +1331,7 @@ IMPL_LINK_TYPED( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox, void )
         SetMode( GALLERYBROWSERMODE_LIST );
 }
 
-IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl)
+IMPL_LINK_NOARG_TYPED(GalleryBrowser2, MiscHdl, LinkParamNone*, void)
 {
     maViewBox->SetOutStyle( maMiscOptions.GetToolboxStyle() );
 
@@ -1351,8 +1351,6 @@ IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl)
     maViewBox->SetSizePixel( maViewBox->CalcWindowSizePixel() );
 
     Resize();
-
-    return 0L;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 30350f72d8ce9d60ae6c47d602eff90f34bf71a9
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 11:04:47 2015 +0200

    convert Link<> to typed
    
    Change-Id: I99ae0ff43a25dbaf8f6f5f03ec0f8751f0893ccb

diff --git a/include/svtools/menuoptions.hxx b/include/svtools/menuoptions.hxx
index 064898d..7f448dc 100644
--- a/include/svtools/menuoptions.hxx
+++ b/include/svtools/menuoptions.hxx
@@ -58,8 +58,8 @@ class SVT_DLLPUBLIC SAL_WARN_UNUSED SvtMenuOptions: public utl::detail::Options
          SvtMenuOptions();
         virtual ~SvtMenuOptions();
 
-        void AddListenerLink( const Link<>& rLink );
-        void RemoveListenerLink( const Link<>& rLink );
+        void AddListenerLink( const Link<LinkParamNone*,void>& rLink );
+        void RemoveListenerLink( const Link<LinkParamNone*,void>& rLink );
 
         /*-****************************************************************************************************
             @short      interface methods to get and set value of config key "org.openoffice.Office.Common/View/Menu/..."
diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx
index 370e24f..f353169 100644
--- a/sfx2/source/inc/virtmenu.hxx
+++ b/sfx2/source/inc/virtmenu.hxx
@@ -72,7 +72,7 @@ protected:
     DECL_STATIC_LINK_TYPED( SfxVirtualMenu, Highlight, Menu *, bool );
     DECL_LINK_TYPED( Activate, Menu *, bool );
     DECL_LINK_TYPED( Deactivate, Menu *, bool );
-    DECL_LINK( SettingsChanged, void* );
+    DECL_LINK_TYPED( SettingsChanged, LinkParamNone*, void );
 
     // Used for runtime popup menus
     void            UpdateImages( Menu* pMenu );
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 5bbda1c..7f471bf 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -490,7 +490,7 @@ IMPL_STATIC_LINK_NOARG_TYPED(
     return true;
 }
 
-IMPL_LINK_NOARG(SfxVirtualMenu, SettingsChanged)
+IMPL_LINK_NOARG_TYPED(SfxVirtualMenu, SettingsChanged, LinkParamNone*, void)
 {
     sal_uInt16 nItemCount = pSVMenu->GetItemCount();
     SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame();
@@ -552,8 +552,6 @@ IMPL_LINK_NOARG(SfxVirtualMenu, SettingsChanged)
 
     if ( pImageControl )
         pImageControl->Update();
-
-    return 0;
 }
 
 
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index 32d54b2..2f9626a 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -69,7 +69,7 @@ class SvtMenuOptions_Impl : public ConfigItem
 
 
     private:
-        ::std::list<Link<>> aList;
+        ::std::list<Link<LinkParamNone*,void>> aList;
         bool        m_bDontHideDisabledEntries          ;   /// cache "DontHideDisabledEntries" of Menu section
         bool        m_bFollowMouse                      ;   /// cache "FollowMouse" of Menu section
         TriState    m_eMenuIcons                        ;   /// cache "MenuIcons" of Menu section
@@ -87,8 +87,8 @@ class SvtMenuOptions_Impl : public ConfigItem
          SvtMenuOptions_Impl();
         virtual ~SvtMenuOptions_Impl();
 
-        void AddListenerLink( const Link<>& rLink );
-        void RemoveListenerLink( const Link<>& rLink );
+        void AddListenerLink( const Link<LinkParamNone*,void>& rLink );
+        void RemoveListenerLink( const Link<LinkParamNone*,void>& rLink );
 
 
         //  override methods of baseclass
@@ -126,8 +126,8 @@ class SvtMenuOptions_Impl : public ConfigItem
                     {
                         m_eMenuIcons = eState;
                         SetModified();
-                        for ( ::std::list<Link<>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter )
-                            iter->Call( this );
+                        for ( ::std::list<Link<LinkParamNone*,void>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter )
+                            iter->Call( nullptr );
                         // tdf#93451: don't Commit() here, it's too early
                     }
 
@@ -285,8 +285,8 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
     if ( bMenuSettingsChanged )
         m_eMenuIcons = bSystemMenuIcons ? TRISTATE_INDET : static_cast<TriState>(bMenuIcons);
 
-    for ( ::std::list<Link<>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter )
-        iter->Call( this );
+    for ( ::std::list<Link<LinkParamNone*,void>>::const_iterator iter = aList.begin(); iter != aList.end(); ++iter )
+        iter->Call( nullptr );
 }
 
 
@@ -347,21 +347,14 @@ Sequence< OUString > SvtMenuOptions_Impl::impl_GetPropertyNames()
     return seqPropertyNames;
 }
 
-void SvtMenuOptions_Impl::AddListenerLink( const Link<>& rLink )
+void SvtMenuOptions_Impl::AddListenerLink( const Link<LinkParamNone*,void>& rLink )
 {
     aList.push_back( rLink );
 }
 
-void SvtMenuOptions_Impl::RemoveListenerLink( const Link<>& rLink )
+void SvtMenuOptions_Impl::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink )
 {
-    for ( ::std::list<Link<>>::iterator iter = aList.begin(); iter != aList.end(); ++iter )
-    {
-        if ( *iter == rLink )
-        {
-            aList.erase(iter);
-            break;
-        }
-    }
+    aList.erase(std::remove(aList.begin(), aList.end(), rLink), aList.end());
 }
 
 
@@ -460,12 +453,12 @@ Mutex& SvtMenuOptions::GetOwnStaticMutex()
     return *pMutex;
 }
 
-void SvtMenuOptions::AddListenerLink( const Link<>& rLink )
+void SvtMenuOptions::AddListenerLink( const Link<LinkParamNone*,void>& rLink )
 {
     m_pDataContainer->AddListenerLink( rLink );
 }
 
-void SvtMenuOptions::RemoveListenerLink( const Link<>& rLink )
+void SvtMenuOptions::RemoveListenerLink( const Link<LinkParamNone*,void>& rLink )
 {
     m_pDataContainer->RemoveListenerLink( rLink );
 }
commit dccd68adba8affbac7080cfe7ac97451037b79a0
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Sep 14 10:26:40 2015 +0200

    remove unused Link<>
    
    Change-Id: I7749d0d7d7dc27395373ed4a81e8235b9317d284

diff --git a/include/svtools/htmlcfg.hxx b/include/svtools/htmlcfg.hxx
index 156fb23..4dc2485 100644
--- a/include/svtools/htmlcfg.hxx
+++ b/include/svtools/htmlcfg.hxx
@@ -39,7 +39,6 @@ class SVT_DLLPUBLIC SvxHtmlOptions : public utl::ConfigItem
     HtmlOptions_Impl*pImp;
     static const com::sun::star::uno::Sequence<OUString>& GetPropertyNames();
     void Load( const com::sun::star::uno::Sequence< OUString >& rPropertyNames );
-    void CallListeners();
 
     virtual void    ImplCommit() SAL_OVERRIDE;
 
diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx
index 1dadb4a..073ac0e 100644
--- a/svtools/source/config/htmlcfg.cxx
+++ b/svtools/source/config/htmlcfg.cxx
@@ -45,7 +45,6 @@ using namespace com::sun::star::uno;
 
 struct HtmlOptions_Impl
 {
-    ::std::list<Link<>> aList;
     sal_Int32   nFlags;
     sal_Int32   nExportMode;
     sal_Int32   aFontSizeArr[HTML_FONT_COUNT];
@@ -242,17 +241,9 @@ void    SvxHtmlOptions::ImplCommit()
     PutProperties(aNames, aValues);
 }
 
-void SvxHtmlOptions::CallListeners()
-{
-    for ( ::std::list<Link<>>::const_iterator iter = pImp->aList.begin(); iter != pImp->aList.end(); ++iter )
-        iter->Call( this );
-}
-
-
 void SvxHtmlOptions::Notify( const com::sun::star::uno::Sequence< OUString >& )
 {
     Load( GetPropertyNames() );
-    CallListeners();
 }
 
 
@@ -311,7 +302,6 @@ void SvxHtmlOptions::SetExportMode(sal_uInt16 nSet)
     {
         pImp->nExportMode = nSet;
         SetModified();
-        CallListeners();
     }
 }
 


More information about the Libreoffice-commits mailing list