[Libreoffice-commits] core.git: 22 commits - cui/source desktop/source reportdesign/source sd/inc sd/source starmath/inc starmath/source

Noel Grandin noel at peralex.com
Thu Sep 17 05:42:35 PDT 2015


 cui/source/dialogs/SpellDialog.cxx                                |   28 ++--
 cui/source/dialogs/dlgname.cxx                                    |    4 
 cui/source/dialogs/hangulhanjadlg.cxx                             |    7 -
 cui/source/factory/dlgfact.cxx                                    |   12 -
 cui/source/factory/dlgfact.hxx                                    |    4 
 cui/source/inc/SpellDialog.hxx                                    |    4 
 cui/source/inc/autocdlg.hxx                                       |   14 +-
 cui/source/inc/dlgname.hxx                                        |   12 -
 cui/source/inc/hangulhanjadlg.hxx                                 |    6 
 cui/source/tabpages/autocdlg.cxx                                  |   43 ++++--
 desktop/source/deployment/gui/license_dialog.cxx                  |   28 +---
 reportdesign/source/ui/dlg/AddField.cxx                           |    4 
 reportdesign/source/ui/dlg/Formula.cxx                            |    8 -
 reportdesign/source/ui/inc/AddField.hxx                           |    4 
 reportdesign/source/ui/inc/ColorListener.hxx                      |    6 
 reportdesign/source/ui/inc/Formula.hxx                            |    2 
 reportdesign/source/ui/inc/ReportController.hxx                   |    2 
 reportdesign/source/ui/inc/SectionWindow.hxx                      |    2 
 reportdesign/source/ui/misc/ColorListener.cxx                     |    2 
 reportdesign/source/ui/report/ReportController.cxx                |    5 
 reportdesign/source/ui/report/SectionWindow.cxx                   |   16 --
 reportdesign/source/ui/report/StartMarker.cxx                     |    2 
 sd/inc/sdobjfac.hxx                                               |    6 
 sd/source/core/sdobjfac.cxx                                       |    8 -
 sd/source/ui/accessibility/AccessibleSlideSorterView.cxx          |   10 -
 sd/source/ui/animations/CustomAnimationCreateDialog.cxx           |   13 --
 sd/source/ui/animations/CustomAnimationPane.cxx                   |   13 --
 sd/source/ui/animations/CustomAnimationPane.hxx                   |    2 
 sd/source/ui/animations/SlideTransitionPane.cxx                   |   11 -
 sd/source/ui/animations/SlideTransitionPane.hxx                   |    2 
 sd/source/ui/annotations/annotationmanager.cxx                    |   11 -
 sd/source/ui/annotations/annotationmanagerimpl.hxx                |    2 
 sd/source/ui/dlg/RemoteDialogClientBox.hxx                        |    3 
 sd/source/ui/dlg/dlgass.cxx                                       |    5 
 sd/source/ui/dlg/docprev.cxx                                      |    2 
 sd/source/ui/inc/EventMultiplexer.hxx                             |    4 
 sd/source/ui/inc/FormShellManager.hxx                             |    2 
 sd/source/ui/inc/MasterPageObserver.hxx                           |    6 
 sd/source/ui/inc/OutlineView.hxx                                  |    2 
 sd/source/ui/inc/docprev.hxx                                      |    4 
 sd/source/ui/inc/tools/SlotStateListener.hxx                      |    6 
 sd/source/ui/inc/view/viewoverlaymanager.hxx                      |    2 
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx               |   63 ++++------
 sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx               |    2 
 sd/source/ui/sidebar/LayoutMenu.cxx                               |   15 --
 sd/source/ui/sidebar/LayoutMenu.hxx                               |    6 
 sd/source/ui/sidebar/MasterPageContainer.cxx                      |   24 +--
 sd/source/ui/sidebar/MasterPageContainer.hxx                      |    5 
 sd/source/ui/sidebar/MasterPageObserver.cxx                       |   21 +--
 sd/source/ui/sidebar/MasterPagesSelector.cxx                      |   17 +-
 sd/source/ui/sidebar/MasterPagesSelector.hxx                      |    4 
 sd/source/ui/sidebar/PreviewValueSet.cxx                          |    6 
 sd/source/ui/sidebar/PreviewValueSet.hxx                          |    4 
 sd/source/ui/sidebar/RecentMasterPagesSelector.cxx                |    3 
 sd/source/ui/sidebar/RecentMasterPagesSelector.hxx                |    2 
 sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx                  |   56 +++-----
 sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx                  |   10 -
 sd/source/ui/slidesorter/controller/SlsFocusManager.cxx           |   10 -
 sd/source/ui/slidesorter/controller/SlsListener.cxx               |   16 +-
 sd/source/ui/slidesorter/controller/SlsListener.hxx               |    2 
 sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx |    2 
 sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx       |    6 
 sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx             |    6 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx                 |    8 -
 sd/source/ui/table/TableDesignPane.cxx                            |   11 -
 sd/source/ui/table/TableDesignPane.hxx                            |    2 
 sd/source/ui/tools/EventMultiplexer.cxx                           |   16 +-
 sd/source/ui/tools/SlotStateListener.cxx                          |    8 -
 sd/source/ui/view/FormShellManager.cxx                            |   10 -
 sd/source/ui/view/ToolBarManager.cxx                              |   38 ++----
 sd/source/ui/view/outlview.cxx                                    |   40 ++----
 sd/source/ui/view/viewoverlaymanager.cxx                          |   11 -
 starmath/inc/dialog.hxx                                           |   22 +--
 starmath/source/dialog.cxx                                        |   24 ++-
 74 files changed, 375 insertions(+), 424 deletions(-)

New commits:
commit 528d698f97ef89635ac17f01530dd40a0cc5a7d0
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 14:40:42 2015 +0200

    convert Link<> to typed
    
    Change-Id: Idc8e9b0ad0032940b98357b07f3e6caf26c5c2d7

diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 5620523..9e09118 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -324,7 +324,7 @@ public:
 
 class SmShowSymbol : public Control
 {
-    Link<> aDblClickHdlLink;
+    Link<SmShowSymbol&,void> aDblClickHdlLink;
 
     virtual void    Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
     virtual void    ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
@@ -340,7 +340,7 @@ public:
     }
 
     void    SetSymbol(const SmSym *pSymbol);
-    void    SetDblClickHdl(const Link<> &rLink) { aDblClickHdlLink = rLink; }
+    void    SetDblClickHdl(const Link<SmShowSymbol&,void> &rLink) { aDblClickHdlLink = rLink; }
 };
 
 
@@ -366,10 +366,11 @@ class SmSymbolDialog : public ModalDialog
 
     DECL_LINK(SymbolSetChangeHdl, void*);
     DECL_LINK_TYPED(SymbolChangeHdl, SmShowSymbolSetWindow&, void);
-    DECL_LINK(SymbolDblClickHdl, void*);
+    DECL_LINK_TYPED(SymbolDblClickHdl, SmShowSymbol&, void);
     DECL_LINK_TYPED(SymbolDblClickHdl2, SmShowSymbolSetWindow&, void);
     DECL_LINK_TYPED(EditClickHdl, Button*, void);
     DECL_LINK_TYPED(GetClickHdl, Button*, void);
+    void SymbolDblClickHdl();
 
     void            FillSymbolSets(bool bDeleteText = true);
     const SmSym    *GetSymbol() const;
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index c059a68..ff8ed3a 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1409,7 +1409,7 @@ void SmShowSymbol::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rR
 void SmShowSymbol::MouseButtonDown(const MouseEvent& rMEvt)
 {
     if (rMEvt.GetClicks() > 1)
-        aDblClickHdlLink.Call(this);
+        aDblClickHdlLink.Call(*this);
     else
         Control::MouseButtonDown (rMEvt);
 }
@@ -1506,13 +1506,16 @@ IMPL_LINK_NOARG_TYPED(SmSymbolDialog, EditClickHdl, Button*, void)
 
 IMPL_LINK_NOARG_TYPED( SmSymbolDialog, SymbolDblClickHdl2, SmShowSymbolSetWindow&, void )
 {
-    SymbolDblClickHdl(nullptr);
+    SymbolDblClickHdl();
 }
-IMPL_LINK_NOARG( SmSymbolDialog, SymbolDblClickHdl )
+IMPL_LINK_NOARG_TYPED( SmSymbolDialog, SymbolDblClickHdl, SmShowSymbol&, void )
+{
+    SymbolDblClickHdl();
+}
+void SmSymbolDialog::SymbolDblClickHdl()
 {
     GetClickHdl(m_pGetBtn);
     EndDialog(RET_OK);
-    return 0;
 }
 
 
commit 485dcc9104a27812284e80d93d2bfbae86261afc
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 14:36:04 2015 +0200

    convert Link<> to typed
    
    Change-Id: If9d4ec8d33719a76603a266c14990897fbbc11a7

diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 1c7642c..5620523 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -271,8 +271,8 @@ class SmShowSymbolSetWindow : public Control
 {
     VclPtr<ScrollBar>  m_pVScrollBar;
     SymbolPtrVec_t aSymbolSet;
-    Link<>      aSelectHdlLink;
-    Link<>      aDblClickHdlLink;
+    Link<SmShowSymbolSetWindow&,void> aSelectHdlLink;
+    Link<SmShowSymbolSetWindow&,void> aDblClickHdlLink;
     long        nLen;
     long        nRows, nColumns;
     long        nXOffset, nYOffset;
@@ -297,8 +297,8 @@ public:
     void    SelectSymbol(sal_uInt16 nSymbol);
     sal_uInt16  GetSelectSymbol() const { return nSelectSymbol; }
     void SetSymbolSet(const SymbolPtrVec_t& rSymbolSet);
-    void SetSelectHdl(const Link<>& rLink) { aSelectHdlLink = rLink; }
-    void SetDblClickHdl(const Link<>& rLink) { aDblClickHdlLink = rLink; }
+    void SetSelectHdl(const Link<SmShowSymbolSetWindow&,void>& rLink) { aSelectHdlLink = rLink; }
+    void SetDblClickHdl(const Link<SmShowSymbolSetWindow&,void>& rLink) { aDblClickHdlLink = rLink; }
 };
 
 class SmShowSymbolSet : public VclHBox
@@ -316,8 +316,8 @@ public:
     void    SelectSymbol(sal_uInt16 nSymbol) { aSymbolWindow->SelectSymbol(nSymbol); }
     sal_uInt16  GetSelectSymbol() const { return aSymbolWindow->GetSelectSymbol(); }
 
-    void SetSelectHdl(const Link<>& rLink) { aSymbolWindow->SetSelectHdl(rLink); }
-    void SetDblClickHdl(const Link<>& rLink) { aSymbolWindow->SetDblClickHdl(rLink); }
+    void SetSelectHdl(const Link<SmShowSymbolSetWindow&,void>& rLink) { aSymbolWindow->SetSelectHdl(rLink); }
+    void SetDblClickHdl(const Link<SmShowSymbolSetWindow&,void>& rLink) { aSymbolWindow->SetDblClickHdl(rLink); }
 };
 
 
@@ -365,8 +365,9 @@ class SmSymbolDialog : public ModalDialog
     VclPtr<OutputDevice> pFontListDev;
 
     DECL_LINK(SymbolSetChangeHdl, void*);
-    DECL_LINK(SymbolChangeHdl, void*);
+    DECL_LINK_TYPED(SymbolChangeHdl, SmShowSymbolSetWindow&, void);
     DECL_LINK(SymbolDblClickHdl, void*);
+    DECL_LINK_TYPED(SymbolDblClickHdl2, SmShowSymbolSetWindow&, void);
     DECL_LINK_TYPED(EditClickHdl, Button*, void);
     DECL_LINK_TYPED(GetClickHdl, Button*, void);
 
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 08ea8a4..c059a68 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1193,10 +1193,10 @@ void SmShowSymbolSetWindow::MouseButtonDown(const MouseEvent& rMEvt)
                       m_pVScrollBar->GetThumbPos() * nColumns;
         SelectSymbol( sal::static_int_cast< sal_uInt16 >(nPos) );
 
-        aSelectHdlLink.Call(this);
+        aSelectHdlLink.Call(*this);
 
         if (rMEvt.GetClicks() > 1)
-            aDblClickHdlLink.Call(this);
+            aDblClickHdlLink.Call(*this);
     }
 }
 
@@ -1239,7 +1239,7 @@ void SmShowSymbolSetWindow::KeyInput(const KeyEvent& rKEvt)
     }
 
     SelectSymbol(n);
-    aSelectHdlLink.Call(this);
+    aSelectHdlLink.Call(*this);
 }
 
 void SmShowSymbolSetWindow::setScrollbar(ScrollBar *pVScrollBar)
@@ -1458,10 +1458,9 @@ IMPL_LINK_NOARG( SmSymbolDialog, SymbolSetChangeHdl )
 }
 
 
-IMPL_LINK_NOARG( SmSymbolDialog, SymbolChangeHdl )
+IMPL_LINK_NOARG_TYPED( SmSymbolDialog, SymbolChangeHdl, SmShowSymbolSetWindow&, void )
 {
     SelectSymbol(m_pSymbolSetDisplay->GetSelectSymbol());
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(SmSymbolDialog, EditClickHdl, Button*, void)
@@ -1505,6 +1504,10 @@ IMPL_LINK_NOARG_TYPED(SmSymbolDialog, EditClickHdl, Button*, void)
 }
 
 
+IMPL_LINK_NOARG_TYPED( SmSymbolDialog, SymbolDblClickHdl2, SmShowSymbolSetWindow&, void )
+{
+    SymbolDblClickHdl(nullptr);
+}
 IMPL_LINK_NOARG( SmSymbolDialog, SymbolDblClickHdl )
 {
     GetClickHdl(m_pGetBtn);
@@ -1558,7 +1561,7 @@ SmSymbolDialog::SmSymbolDialog(vcl::Window *pParent, OutputDevice *pFntListDevic
 
     m_pSymbolSets->SetSelectHdl(LINK(this, SmSymbolDialog, SymbolSetChangeHdl));
     m_pSymbolSetDisplay->SetSelectHdl(LINK(this, SmSymbolDialog, SymbolChangeHdl));
-    m_pSymbolSetDisplay->SetDblClickHdl(LINK(this, SmSymbolDialog, SymbolDblClickHdl));
+    m_pSymbolSetDisplay->SetDblClickHdl(LINK(this, SmSymbolDialog, SymbolDblClickHdl2));
     m_pSymbolDisplay->SetDblClickHdl(LINK(this, SmSymbolDialog, SymbolDblClickHdl));
     m_pEditBtn->SetClickHdl(LINK(this, SmSymbolDialog, EditClickHdl));
     m_pGetBtn->SetClickHdl(LINK(this, SmSymbolDialog, GetClickHdl));
commit 008de7099b29cde9a2669ef71b3e76b0c6ca90cd
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 14:33:58 2015 +0200

    convert Link<> to typed
    
    Change-Id: I66e81dafa08b2e2a43b4b696741676e093439024

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index a4a6bbb..7b626e2 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -287,7 +287,7 @@ void CustomAnimationPane::KeyInput( const KeyEvent& rKEvt )
 
 void CustomAnimationPane::addListener()
 {
-    Link<> aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->AddEventListener (
         aLink,
         tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
@@ -300,14 +300,14 @@ void CustomAnimationPane::addListener()
 
 void CustomAnimationPane::removeListener()
 {
-    Link<> aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
 }
 
-IMPL_LINK(CustomAnimationPane,EventMultiplexerListener,
-    tools::EventMultiplexerEvent*,pEvent)
+IMPL_LINK_TYPED(CustomAnimationPane,EventMultiplexerListener,
+    tools::EventMultiplexerEvent&, rEvent, void)
 {
-    switch (pEvent->meEventId)
+    switch (rEvent.meEventId)
     {
         case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
             onSelectionChanged();
@@ -344,11 +344,10 @@ IMPL_LINK(CustomAnimationPane,EventMultiplexerListener,
             onChangeCurrentPage();
             break;
         case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
-            if( mpMainSequence.get() && pEvent->mpUserData )
+            if( mpMainSequence.get() && rEvent.mpUserData )
                 mpCustomAnimationList->update( mpMainSequence );
             break;
     }
-    return 0;
 }
 
 static sal_Int32 getPropertyType( const OUString& rProperty )
diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx
index 5760860..33c363e 100644
--- a/sd/source/ui/animations/CustomAnimationPane.hxx
+++ b/sd/source/ui/animations/CustomAnimationPane.hxx
@@ -119,7 +119,7 @@ private:
     DECL_LINK( implControlHdl, Control* );
     DECL_LINK_TYPED( implClickHdl, Button*, void );
     DECL_LINK(implPropertyHdl, void *);
-    DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
     DECL_LINK_TYPED(lateInitCallback, Timer *, void);
 
 private:
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 0948e80..4bc6613 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -905,7 +905,7 @@ void SlideTransitionPane::stopEffects()
 
 void SlideTransitionPane::addListener()
 {
-    Link<> aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->AddEventListener (
         aLink,
         tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
@@ -918,14 +918,14 @@ void SlideTransitionPane::addListener()
 
 void SlideTransitionPane::removeListener()
 {
-    Link<> aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,SlideTransitionPane,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
 }
 
-IMPL_LINK(SlideTransitionPane,EventMultiplexerListener,
-    tools::EventMultiplexerEvent*,pEvent)
+IMPL_LINK_TYPED(SlideTransitionPane,EventMultiplexerListener,
+    tools::EventMultiplexerEvent&, rEvent, void)
 {
-    switch (pEvent->meEventId)
+    switch (rEvent.meEventId)
     {
         case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
             onSelectionChanged();
@@ -966,7 +966,6 @@ IMPL_LINK(SlideTransitionPane,EventMultiplexerListener,
         default:
             break;
     }
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(SlideTransitionPane, ApplyToAllButtonClicked, Button*, void)
diff --git a/sd/source/ui/animations/SlideTransitionPane.hxx b/sd/source/ui/animations/SlideTransitionPane.hxx
index 24196b7..023ac54 100644
--- a/sd/source/ui/animations/SlideTransitionPane.hxx
+++ b/sd/source/ui/animations/SlideTransitionPane.hxx
@@ -95,7 +95,7 @@ private:
     DECL_LINK( SpeedListBoxSelected, void * );
     DECL_LINK( SoundListBoxSelected, void * );
     DECL_LINK_TYPED( LoopSoundBoxChecked, Button*, void );
-    DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
     DECL_LINK_TYPED(LateInitCallback, Timer *, void);
 
     ViewShellBase &   mrBase;
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 0a97c52..a93d010 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -862,7 +862,7 @@ void AnnotationManagerImpl::DisposeTags()
 
 void AnnotationManagerImpl::addListener()
 {
-    Link<> aLink( LINK(this,AnnotationManagerImpl,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,AnnotationManagerImpl,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->AddEventListener (
         aLink,
         tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
@@ -873,14 +873,14 @@ void AnnotationManagerImpl::addListener()
 
 void AnnotationManagerImpl::removeListener()
 {
-    Link<> aLink( LINK(this,AnnotationManagerImpl,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,AnnotationManagerImpl,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
 }
 
-IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
-    tools::EventMultiplexerEvent*,pEvent)
+IMPL_LINK_TYPED(AnnotationManagerImpl,EventMultiplexerListener,
+    tools::EventMultiplexerEvent&, rEvent, void)
 {
-    switch (pEvent->meEventId)
+    switch (rEvent.meEventId)
     {
         case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
         case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
@@ -897,7 +897,6 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
             onSelectionChanged();
             break;
     }
-    return 0;
 }
 
 void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation > xAnnotation, vcl::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu /* = false */ )
diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx
index 2947315..0563db4 100644
--- a/sd/source/ui/annotations/annotationmanagerimpl.hxx
+++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx
@@ -95,7 +95,7 @@ public:
 
     void invalidateSlots();
 
-    DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
     DECL_LINK_TYPED(UpdateTagsHdl, void *, void);
 
     void UpdateTags(bool bSynchron = false);
diff --git a/sd/source/ui/inc/EventMultiplexer.hxx b/sd/source/ui/inc/EventMultiplexer.hxx
index fc1a5c9..f5dd360 100644
--- a/sd/source/ui/inc/EventMultiplexer.hxx
+++ b/sd/source/ui/inc/EventMultiplexer.hxx
@@ -177,7 +177,7 @@ public:
             be informed about.
     */
     void AddEventListener (
-        Link<>& rCallback,
+        const Link<EventMultiplexerEvent&,void>& rCallback,
         EventMultiplexerEvent::EventId aEventTypeSet);
 
     /** Remove an event listener for the specified event types.
@@ -188,7 +188,7 @@ public:
             for.
     */
     void RemoveEventListener (
-        Link<>& rCallback,
+        const Link<EventMultiplexerEvent&,void>& rCallback,
         EventMultiplexerEvent::EventId aEventTypeSet = EID_FULL_SET);
 
     /** This method is used for out-of-line events.  An event of the
diff --git a/sd/source/ui/inc/FormShellManager.hxx b/sd/source/ui/inc/FormShellManager.hxx
index f206d11..f8870c7 100644
--- a/sd/source/ui/inc/FormShellManager.hxx
+++ b/sd/source/ui/inc/FormShellManager.hxx
@@ -114,7 +114,7 @@ private:
         When this happens then we unregister at the window of the old and
         register at the window of the new shell.
     */
-    DECL_LINK(ConfigurationUpdateHandler, ::sd::tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(ConfigurationUpdateHandler, ::sd::tools::EventMultiplexerEvent&, void);
 
     /** This call back is called by the form shell when it gets the focus.
         In this case the form shell is moved to the top of the shell stack.
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 5279349..60b54ac 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -202,7 +202,7 @@ private:
     */
     DECL_LINK( AppEventListenerHdl, void * );
 
-    DECL_LINK(EventMultiplexerListener, sd::tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerListener, sd::tools::EventMultiplexerEvent&, void);
 
     /** holds a model guard during drag and drop between BeginMovingHdl and EndMovingHdl */
     std::unique_ptr< OutlineViewModelChangeGuard > maDragAndDropModelGuard;
diff --git a/sd/source/ui/inc/view/viewoverlaymanager.hxx b/sd/source/ui/inc/view/viewoverlaymanager.hxx
index 1d65446..72dc932 100644
--- a/sd/source/ui/inc/view/viewoverlaymanager.hxx
+++ b/sd/source/ui/inc/view/viewoverlaymanager.hxx
@@ -40,7 +40,7 @@ public:
     void onZoomChanged();
     void UpdateTags();
 
-    DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
     DECL_LINK_TYPED(UpdateTagsHdl, void *, void);
 
     bool CreateTags();
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index 7b91a73..7dd6a3d 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -77,7 +77,7 @@ CurrentMasterPagesSelector::CurrentMasterPagesSelector (
     // left clicks.
     mnDefaultClickAction = SID_TP_APPLY_TO_SELECTED_SLIDES;
 
-    Link<> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
+    Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
     rBase.GetEventMultiplexer()->AddEventListener(aLink,
         sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE
         | sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL
@@ -104,7 +104,7 @@ void CurrentMasterPagesSelector::dispose()
         OSL_ASSERT(mrDocument.GetDocSh() != NULL);
     }
 
-    Link<> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
+    Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
     mrBase.GetEventMultiplexer()->RemoveEventListener(aLink);
 
     MasterPagesSelector::dispose();
@@ -254,41 +254,36 @@ void CurrentMasterPagesSelector::ProcessPopupMenu (Menu& rMenu)
     MasterPagesSelector::ProcessPopupMenu(rMenu);
 }
 
-IMPL_LINK(CurrentMasterPagesSelector,EventMultiplexerListener,
-    sd::tools::EventMultiplexerEvent*,pEvent)
+IMPL_LINK_TYPED(CurrentMasterPagesSelector,EventMultiplexerListener,
+    sd::tools::EventMultiplexerEvent&, rEvent, void)
 {
-    if (pEvent != NULL)
+    switch (rEvent.meEventId)
     {
-        switch (pEvent->meEventId)
-        {
-            case sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
-            case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL:
-            case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER:
-            case sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION:
-                UpdateSelection();
-                break;
-
-            case sd::tools::EventMultiplexerEvent::EID_PAGE_ORDER:
-                // This is tricky.  If a master page is removed, moved, or
-                // added we have to wait until both the notes master page
-                // and the standard master page have been removed, moved,
-                // or added.  We do this by looking at the number of master
-                // pages which has to be odd in the consistent state (the
-                // handout master page is always present).  If the number is
-                // even we ignore the hint.
-                if (mrBase.GetDocument()->GetMasterPageCount()%2 == 1)
-                    MasterPagesSelector::Fill();
-                break;
-
-            case sd::tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
-            case sd::tools::EventMultiplexerEvent::EID_SHAPE_INSERTED:
-            case sd::tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
-                InvalidatePreview(static_cast<const SdPage*>(pEvent->mpUserData));
-                break;
-        }
+        case sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
+        case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL:
+        case sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER:
+        case sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION:
+            UpdateSelection();
+            break;
+
+        case sd::tools::EventMultiplexerEvent::EID_PAGE_ORDER:
+            // This is tricky.  If a master page is removed, moved, or
+            // added we have to wait until both the notes master page
+            // and the standard master page have been removed, moved,
+            // or added.  We do this by looking at the number of master
+            // pages which has to be odd in the consistent state (the
+            // handout master page is always present).  If the number is
+            // even we ignore the hint.
+            if (mrBase.GetDocument()->GetMasterPageCount()%2 == 1)
+                MasterPagesSelector::Fill();
+            break;
+
+        case sd::tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
+        case sd::tools::EventMultiplexerEvent::EID_SHAPE_INSERTED:
+        case sd::tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
+           InvalidatePreview(static_cast<const SdPage*>(rEvent.mpUserData));
+            break;
     }
-
-    return 0;
 }
 
 } } // end of namespace sd::sidebar
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
index b587a3f..2a51ac1 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
@@ -73,7 +73,7 @@ private:
 
     virtual void LateInit() SAL_OVERRIDE;
 
-    DECL_LINK(EventMultiplexerListener,sd::tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerListener,sd::tools::EventMultiplexerEvent&, void);
 };
 
 } } // end of namespace sd::sidebar
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index d5010b2..38e9fea1 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -168,7 +168,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
     SetSelectHdl (LINK(this, LayoutMenu, ClickHandler));
     InvalidateContent();
 
-    Link<> aEventListenerLink (LINK(this,LayoutMenu,EventMultiplexerListener));
+    Link<::sd::tools::EventMultiplexerEvent&,void> aEventListenerLink (LINK(this,LayoutMenu,EventMultiplexerListener));
     mrBase.GetEventMultiplexer()->AddEventListener(aEventListenerLink,
         ::sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE
         | ::sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION
@@ -218,7 +218,7 @@ void LayoutMenu::Dispose()
         xComponent->dispose();
 
     Clear();
-    Link<> aLink (LINK(this,LayoutMenu,EventMultiplexerListener));
+    Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,LayoutMenu,EventMultiplexerListener));
     mrBase.GetEventMultiplexer()->RemoveEventListener (aLink);
 
     Link<> aWindowEventHandlerLink (LINK(this,LayoutMenu,WindowEventHandler));
@@ -704,9 +704,9 @@ void LayoutMenu::UpdateSelection()
         SetNoSelection();
 }
 
-IMPL_LINK(LayoutMenu, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*, pEvent)
+IMPL_LINK_TYPED(LayoutMenu, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, rEvent, void)
 {
-    switch (pEvent->meEventId)
+    switch (rEvent.meEventId)
     {
         case ::sd::tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
         case ::sd::tools::EventMultiplexerEvent::EID_SLIDE_SORTER_SELECTION:
@@ -734,8 +734,6 @@ IMPL_LINK(LayoutMenu, EventMultiplexerListener, ::sd::tools::EventMultiplexerEve
             /* Ignored */
             break;
     }
-
-    return 0;
 }
 
 IMPL_LINK(LayoutMenu, WindowEventHandler, VclWindowEvent*, pEvent)
diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx
index aa1c1d3..adef23a 100644
--- a/sd/source/ui/sidebar/LayoutMenu.hxx
+++ b/sd/source/ui/sidebar/LayoutMenu.hxx
@@ -191,7 +191,7 @@ private:
     DECL_LINK_TYPED(ClickHandler, ValueSet*, void);
     DECL_LINK_TYPED(RightClickHandler, const MouseEvent&, void);
     DECL_LINK_TYPED(StateChangeHandler, const OUString&, void);
-    DECL_LINK(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, void);
     DECL_LINK(WindowEventHandler, VclWindowEvent*);
     DECL_LINK_TYPED(OnMenuItemSelected, Menu*, bool);
 };
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 4e64787..d4f65d7 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -125,7 +125,7 @@ Listener::Listener (
             StartListening(*pMainViewShell);
         }
 
-        Link<> aLink (LINK(this, Listener, EventMultiplexerCallback));
+        Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this, Listener, EventMultiplexerCallback));
         mpBase->GetEventMultiplexer()->AddEventListener(
             aLink,
             tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
@@ -185,7 +185,7 @@ void Listener::ReleaseListeners()
 
     if (mpBase != NULL)
     {
-        Link<> aLink (LINK(this, Listener, EventMultiplexerCallback));
+        Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, Listener, EventMultiplexerCallback));
         mpBase->GetEventMultiplexer()->RemoveEventListener(
             aLink,
             tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
@@ -349,9 +349,9 @@ void Listener::Notify (
     }
 }
 
-IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent*, pEvent)
+IMPL_LINK_TYPED(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent&, rEvent, void)
 {
-    switch (pEvent->meEventId)
+    switch (rEvent.meEventId)
     {
         case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
         {
@@ -396,13 +396,13 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
         case tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
         case tools::EventMultiplexerEvent::EID_SHAPE_INSERTED:
         case tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
-            HandleShapeModification(static_cast<const SdrPage*>(pEvent->mpUserData));
+            HandleShapeModification(static_cast<const SdrPage*>(rEvent.mpUserData));
             break;
 
         case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
-            if (pEvent->mpUserData != NULL)
+            if (rEvent.mpUserData != NULL)
             {
-                const SdrObject* pObject = static_cast<const SdrObject*>(pEvent->mpUserData);
+                const SdrObject* pObject = static_cast<const SdrObject*>(rEvent.mpUserData);
                 HandleShapeModification(pObject->GetPage());
             }
             break;
@@ -410,8 +410,6 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
         default:
             break;
     }
-
-    return 0;
 }
 
 //=====  lang::XEventListener  ================================================
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.hxx b/sd/source/ui/slidesorter/controller/SlsListener.hxx
index 1e634a9..0753edd 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.hxx
@@ -176,7 +176,7 @@ private:
     void ThrowIfDisposed()
         throw (::com::sun::star::lang::DisposedException);
 
-    DECL_LINK(EventMultiplexerCallback, tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerCallback, tools::EventMultiplexerEvent&, void);
 };
 
 } } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 85eb63f..8c5c05c 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -427,7 +427,7 @@ void TableDesignWidget::updateControls()
 
 void TableDesignWidget::addListener()
 {
-    Link<> aLink( LINK(this,TableDesignWidget,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,TableDesignWidget,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->AddEventListener (
         aLink,
         tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
@@ -439,14 +439,14 @@ void TableDesignWidget::addListener()
 
 void TableDesignWidget::removeListener()
 {
-    Link<> aLink( LINK(this,TableDesignWidget,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,TableDesignWidget,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
 }
 
-IMPL_LINK(TableDesignWidget,EventMultiplexerListener,
-    tools::EventMultiplexerEvent*,pEvent)
+IMPL_LINK_TYPED(TableDesignWidget,EventMultiplexerListener,
+    tools::EventMultiplexerEvent&, rEvent, void)
 {
-    switch (pEvent->meEventId)
+    switch (rEvent.meEventId)
     {
         case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
         case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
@@ -463,7 +463,6 @@ IMPL_LINK(TableDesignWidget,EventMultiplexerListener,
             onSelectionChanged();
             break;
     }
-    return 0;
 }
 
 struct CellInfo
diff --git a/sd/source/ui/table/TableDesignPane.hxx b/sd/source/ui/table/TableDesignPane.hxx
index 065e124..419ab7c 100644
--- a/sd/source/ui/table/TableDesignPane.hxx
+++ b/sd/source/ui/table/TableDesignPane.hxx
@@ -85,7 +85,7 @@ private:
 
     void FillDesignPreviewControl();
 
-    DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
     DECL_LINK_TYPED(implValueSetHdl, ValueSet*, void);
     DECL_LINK_TYPED(implCheckBoxHdl, Button*, void);
 
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx
index 4705bea..b776c71 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -68,11 +68,11 @@ public:
     virtual ~Implementation();
 
     void AddEventListener (
-        Link<>& rCallback,
+        const Link<EventMultiplexerEvent&,void>& rCallback,
         EventMultiplexerEvent::EventId aEventTypes);
 
     void RemoveEventListener (
-        Link<>& rCallback,
+        const Link<EventMultiplexerEvent&,void>& rCallback,
         EventMultiplexerEvent::EventId aEventTypes);
 
     void CallListeners (EventMultiplexerEvent& rEvent);
@@ -120,7 +120,7 @@ protected:
 
 private:
     ViewShellBase& mrBase;
-    typedef ::std::pair<Link<>,EventMultiplexerEvent::EventId> ListenerDescriptor;
+    typedef ::std::pair<Link<EventMultiplexerEvent&,void>,EventMultiplexerEvent::EventId> ListenerDescriptor;
     typedef ::std::vector<ListenerDescriptor> ListenerList;
     ListenerList maListeners;
 
@@ -184,14 +184,14 @@ EventMultiplexer::~EventMultiplexer()
 }
 
 void EventMultiplexer::AddEventListener (
-    Link<>& rCallback,
+    const Link<EventMultiplexerEvent&,void>& rCallback,
     EventMultiplexerEvent::EventId aEventTypes)
 {
     mpImpl->AddEventListener (rCallback, aEventTypes);
 }
 
 void EventMultiplexer::RemoveEventListener (
-    Link<>& rCallback,
+    const Link<EventMultiplexerEvent&,void>& rCallback,
     EventMultiplexerEvent::EventId aEventTypes)
 {
     mpImpl->RemoveEventListener (rCallback, aEventTypes);
@@ -315,7 +315,7 @@ void EventMultiplexer::Implementation::ReleaseListeners()
 }
 
 void EventMultiplexer::Implementation::AddEventListener (
-    Link<>& rCallback,
+    const Link<EventMultiplexerEvent&,void>& rCallback,
     EventMultiplexerEvent::EventId aEventTypes)
 {
     ListenerList::iterator iListener (maListeners.begin());
@@ -335,7 +335,7 @@ void EventMultiplexer::Implementation::AddEventListener (
 }
 
 void EventMultiplexer::Implementation::RemoveEventListener (
-    Link<>& rCallback,
+    const Link<EventMultiplexerEvent&,void>& rCallback,
     EventMultiplexerEvent::EventId aEventTypes)
 {
     ListenerList::iterator iListener (maListeners.begin());
@@ -700,7 +700,7 @@ void EventMultiplexer::Implementation::CallListeners (EventMultiplexerEvent& rEv
     for (; iListener!=iListenerEnd; ++iListener)
     {
         if ((iListener->second && rEvent.meEventId))
-            iListener->first.Call(&rEvent);
+            iListener->first.Call(rEvent);
     }
 }
 
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index 2712dd4..02ffc9f 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -57,7 +57,7 @@ FormShellManager::FormShellManager (ViewShellBase& rBase)
 {
     // Register at the EventMultiplexer to be informed about changes in the
     // center pane.
-    Link<> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
+    Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
     mrBase.GetEventMultiplexer()->AddEventListener(
         aLink,
         sd::tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
@@ -73,7 +73,7 @@ FormShellManager::~FormShellManager()
     UnregisterAtCenterPane();
 
     // Unregister from the EventMultiplexer.
-    Link<> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
+    Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
     mrBase.GetEventMultiplexer()->RemoveEventListener(aLink);
 
     if (mpSubShellFactory.get() != NULL)
@@ -198,9 +198,9 @@ IMPL_LINK_NOARG_TYPED(FormShellManager, FormControlActivated, LinkParamNone*, vo
     }
 }
 
-IMPL_LINK(FormShellManager, ConfigurationUpdateHandler, sd::tools::EventMultiplexerEvent*, pEvent)
+IMPL_LINK_TYPED(FormShellManager, ConfigurationUpdateHandler, sd::tools::EventMultiplexerEvent&, rEvent, void)
 {
-    switch (pEvent->meEventId)
+    switch (rEvent.meEventId)
     {
         case sd::tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
             UnregisterAtCenterPane();
@@ -221,8 +221,6 @@ IMPL_LINK(FormShellManager, ConfigurationUpdateHandler, sd::tools::EventMultiple
         default:
             break;
     }
-
-    return 0;
 }
 
 IMPL_LINK(FormShellManager, WindowEventHandler, VclWindowEvent*, pEvent)
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 330a7ce..053989d 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -324,7 +324,7 @@ private:
     bool CheckPlugInMode (const OUString& rsName) const;
 
     DECL_LINK_TYPED(UpdateCallback, void *, void);
-    DECL_LINK(EventMultiplexerCallback, sd::tools::EventMultiplexerEvent*);
+    DECL_LINK_TYPED(EventMultiplexerCallback, sd::tools::EventMultiplexerEvent&, void);
     DECL_LINK_TYPED(SetValidCallback, void*, void);
 };
 
@@ -535,7 +535,7 @@ ToolBarManager::Implementation::Implementation (
       mnPendingSetValidCall(0),
       maToolBarRules(rpToolBarManager,rpViewShellManager)
 {
-    Link<> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
+    Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
     mpEventMultiplexer->AddEventListener(
         aLink,
         tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED
@@ -550,7 +550,7 @@ ToolBarManager::Implementation::Implementation (
 ToolBarManager::Implementation::~Implementation()
 {
     // Unregister at broadcasters.
-    Link<> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
+    Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
     mpEventMultiplexer->RemoveEventListener(aLink);
 
     // Abort pending user calls.
@@ -861,29 +861,25 @@ IMPL_LINK_NOARG_TYPED(ToolBarManager::Implementation, UpdateCallback, void*, voi
     }
 }
 
-IMPL_LINK(ToolBarManager::Implementation,EventMultiplexerCallback,
-    sd::tools::EventMultiplexerEvent*,pEvent)
+IMPL_LINK_TYPED(ToolBarManager::Implementation,EventMultiplexerCallback,
+    sd::tools::EventMultiplexerEvent&, rEvent, void)
 {
-    if (pEvent != NULL)
+    switch (rEvent.meEventId)
     {
-        switch (pEvent->meEventId)
-        {
-            case tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED:
-                if (mnPendingSetValidCall == 0)
-                    mnPendingSetValidCall
-                        = Application::PostUserEvent(LINK(this,Implementation,SetValidCallback));
-                break;
+        case tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED:
+            if (mnPendingSetValidCall == 0)
+                mnPendingSetValidCall
+                    = Application::PostUserEvent(LINK(this,Implementation,SetValidCallback));
+            break;
 
-            case tools::EventMultiplexerEvent::EID_CONTROLLER_DETACHED:
-                SetValid(false);
-                break;
+        case tools::EventMultiplexerEvent::EID_CONTROLLER_DETACHED:
+            SetValid(false);
+            break;
 
-            case tools::EventMultiplexerEvent::EID_PANE_MANAGER_DYING:
-                SetValid(false);
-                break;
-        }
+        case tools::EventMultiplexerEvent::EID_PANE_MANAGER_DYING:
+            SetValid(false);
+            break;
     }
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(ToolBarManager::Implementation, SetValidCallback, void*, void)
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index feef14d..6bb82ad7 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -131,7 +131,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
         FillOutliner();
     }
 
-    Link<> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
     mrOutlineViewShell.GetViewShellBase().GetEventMultiplexer()->AddEventListener(
         aLink,
         tools::EventMultiplexerEvent::EID_CURRENT_PAGE
@@ -171,7 +171,7 @@ OutlineView::~OutlineView()
 {
     DBG_ASSERT(maDragAndDropModelGuard.get() == 0, "sd::OutlineView::~OutlineView(), prior drag operation not finished correctly!" );
 
-    Link<> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
     mrOutlineViewShell.GetViewShellBase().GetEventMultiplexer()->RemoveEventListener( aLink );
     DisconnectFromApplication();
 
@@ -1430,32 +1430,28 @@ IMPL_LINK_NOARG(OutlineView, AppEventListenerHdl)
     return 0;
 }
 
-IMPL_LINK(OutlineView, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*, pEvent)
+IMPL_LINK_TYPED(OutlineView, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, rEvent, void)
 {
-    if (pEvent != NULL)
+    switch (rEvent.meEventId)
     {
-        switch (pEvent->meEventId)
-        {
-            case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
-                SetActualPage(mrOutlineViewShell.GetActualPage());
-                break;
+        case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
+            SetActualPage(mrOutlineViewShell.GetActualPage());
+            break;
 
-            case tools::EventMultiplexerEvent::EID_PAGE_ORDER:
-                if (dynamic_cast<Outliner&>(mrOutliner).GetIgnoreCurrentPageChangesLevel()==0)
+        case tools::EventMultiplexerEvent::EID_PAGE_ORDER:
+            if (dynamic_cast<Outliner&>(mrOutliner).GetIgnoreCurrentPageChangesLevel()==0)
+            {
+                if (((mrDoc.GetPageCount()-1)%2) == 0)
                 {
-                    if (((mrDoc.GetPageCount()-1)%2) == 0)
-                    {
-                        mrOutliner.Clear();
-                        FillOutliner();
-                        ::sd::Window* pWindow = mrOutlineViewShell.GetActiveWindow();
-                        if (pWindow != NULL)
-                            pWindow->Invalidate();
-                    }
+                    mrOutliner.Clear();
+                    FillOutliner();
+                    ::sd::Window* pWindow = mrOutlineViewShell.GetActiveWindow();
+                    if (pWindow != NULL)
+                        pWindow->Invalidate();
                 }
-                break;
-        }
+            }
+            break;
     }
-    return 0;
 }
 
 void OutlineView::IgnoreCurrentPageChanges (bool bIgnoreChanges)
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index 4cdbd33..8158015 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -422,7 +422,7 @@ ViewOverlayManager::ViewOverlayManager( ViewShellBase& rViewShellBase )
 : mrBase( rViewShellBase )
 , mnUpdateTagsEvent( 0 )
 {
-    Link<> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->AddEventListener(aLink, tools::EventMultiplexerEvent::EID_CURRENT_PAGE
         | tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED
         | tools::EventMultiplexerEvent::EID_VIEW_ADDED
@@ -434,7 +434,7 @@ ViewOverlayManager::ViewOverlayManager( ViewShellBase& rViewShellBase )
 
 ViewOverlayManager::~ViewOverlayManager()
 {
-    Link<> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
+    Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
     mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
 
     if( mnUpdateTagsEvent )
@@ -529,10 +529,10 @@ bool ViewOverlayManager::DisposeTags()
     return false;
 }
 
-IMPL_LINK(ViewOverlayManager,EventMultiplexerListener,
-    tools::EventMultiplexerEvent*,pEvent)
+IMPL_LINK_TYPED(ViewOverlayManager,EventMultiplexerListener,
+    tools::EventMultiplexerEvent&, rEvent, void)
 {
-    switch (pEvent->meEventId)
+    switch (rEvent.meEventId)
     {
         case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
         case tools::EventMultiplexerEvent::EID_VIEW_ADDED:
@@ -542,7 +542,6 @@ IMPL_LINK(ViewOverlayManager,EventMultiplexerListener,
             UpdateTags();
             break;
     }
-    return 0;
 }
 
 }
commit cdadaa55569dbd1ea0fce3fa89f8b5f16f817438
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 14:10:46 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ifdcd9121b16b7f33632cf6671449152ebee8beef

diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index fff57c2..d8dc832 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -83,7 +83,7 @@ public:
     DECL_LINK(WindowEventListener, VclWindowEvent*);
     DECL_LINK(SelectionChangeListener, void*);
     DECL_LINK_TYPED(BroadcastSelectionChange, void*, void);
-    DECL_LINK(FocusChangeListener, void*);
+    DECL_LINK_TYPED(FocusChangeListener, LinkParamNone*, void);
     DECL_LINK_TYPED(VisibilityChangeListener, LinkParamNone*, void);
     DECL_LINK_TYPED(UpdateChildrenCallback, void*, void);
 
@@ -937,7 +937,7 @@ IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, BroadcastSelect
         Any());
 }
 
-IMPL_LINK_NOARG(AccessibleSlideSorterView::Implementation, FocusChangeListener)
+IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, FocusChangeListener, LinkParamNone*, void)
 {
     sal_Int32 nNewFocusedIndex (
         mrSlideSorter.GetController().GetFocusManager().GetFocusedPageIndex());
@@ -977,7 +977,6 @@ IMPL_LINK_NOARG(AccessibleSlideSorterView::Implementation, FocusChangeListener)
         if (bSentFocus)
             mnFocusedIndex = nNewFocusedIndex;
     }
-    return 1;
 }
 
 IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, UpdateChildrenCallback, void*, void)
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index aff6a5e..94ac7d7 100644
--- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
@@ -243,7 +243,7 @@ void FocusManager::ShowFocusIndicator (
     }
 }
 
-void FocusManager::AddFocusChangeListener (const Link<>& rListener)
+void FocusManager::AddFocusChangeListener (const Link<LinkParamNone*,void>& rListener)
 {
     if (::std::find (maFocusChangeListeners.begin(), maFocusChangeListeners.end(), rListener)
         == maFocusChangeListeners.end())
@@ -252,7 +252,7 @@ void FocusManager::AddFocusChangeListener (const Link<>& rListener)
     }
 }
 
-void FocusManager::RemoveFocusChangeListener (const Link<>& rListener)
+void FocusManager::RemoveFocusChangeListener (const Link<LinkParamNone*,void>& rListener)
 {
     maFocusChangeListeners.erase (
         ::std::find (maFocusChangeListeners.begin(), maFocusChangeListeners.end(), rListener));
@@ -261,11 +261,11 @@ void FocusManager::RemoveFocusChangeListener (const Link<>& rListener)
 void FocusManager::NotifyFocusChangeListeners() const
 {
     // Create a copy of the listener list to be safe when that is modified.
-    ::std::vector<Link<>> aListeners (maFocusChangeListeners);
+    ::std::vector<Link<LinkParamNone*,void>> aListeners (maFocusChangeListeners);
 
     // Tell the selection change listeners that the selection has changed.
-    ::std::vector<Link<>>::iterator iListener (aListeners.begin());
-    ::std::vector<Link<>>::iterator iEnd (aListeners.end());
+    ::std::vector<Link<LinkParamNone*,void>>::iterator iListener (aListeners.begin());
+    ::std::vector<Link<LinkParamNone*,void>>::iterator iEnd (aListeners.end());
     for (; iListener!=iEnd; ++iListener)
     {
         iListener->Call(NULL);
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
index e6bdfff..dd022e9 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
@@ -143,14 +143,14 @@ public:
             the second and all following calls are ignored.  Each listener
             is added only once.
     */
-    void AddFocusChangeListener (const Link<>& rListener);
+    void AddFocusChangeListener (const Link<LinkParamNone*,void>& rListener);
 
     /** Remove a focus change listener.
         @param rListener
             It is save to pass a listener that was not added are has been
             removed previously.  Such calls are ignored.
     */
-    void RemoveFocusChangeListener (const Link<>& rListener);
+    void RemoveFocusChangeListener (const Link<LinkParamNone*,void>& rListener);
 
     /** Create an instance of this class to temporarily hide the focus
         indicator.  It is restored to its former visibility state when the
@@ -179,7 +179,7 @@ private:
     */
     bool mbPageIsFocused;
 
-    ::std::vector<Link<>> maFocusChangeListeners;
+    ::std::vector<Link<LinkParamNone*,void>> maFocusChangeListeners;
 
     /** When vertical wrap is active then pressing UP in the top row moves
         the focus to the bottom row, DOWN in the bottom row moves the focus
commit d360dd359936f79046193c9ea25dd0e165e1b7bf
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 14:08:51 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ibbfcfe019ea4f0a414e2760779d61f1948ac373d

diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index c0d5c25..fff57c2 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -84,7 +84,7 @@ public:
     DECL_LINK(SelectionChangeListener, void*);
     DECL_LINK_TYPED(BroadcastSelectionChange, void*, void);
     DECL_LINK(FocusChangeListener, void*);
-    DECL_LINK(VisibilityChangeListener, void*);
+    DECL_LINK_TYPED(VisibilityChangeListener, LinkParamNone*, void);
     DECL_LINK_TYPED(UpdateChildrenCallback, void*, void);
 
     void Activated();
@@ -986,10 +986,9 @@ IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, UpdateChildrenC
     UpdateChildren();
 }
 
-IMPL_LINK_NOARG(AccessibleSlideSorterView::Implementation, VisibilityChangeListener)
+IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, VisibilityChangeListener, LinkParamNone*, void)
 {
     UpdateChildren();
-    return 1;
 }
 
 } // end of namespace ::accessibility
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index 8242d24..9d7f242 100644
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -166,14 +166,14 @@ public:
             the second and all following calls are ignored.  Each listener
             is added only once.
     */
-    void AddVisibilityChangeListener (const Link<>& rListener);
+    void AddVisibilityChangeListener (const Link<LinkParamNone*,void>& rListener);
 
     /** Remove a listener that is called when the set of visible slides changes.
         @param rListener
             It is save to pass a listener that was not added or has been
             removed previously.  Such calls are ignored.
     */
-    void RemoveVisibilityChangeListener (const Link<>& rListener);
+    void RemoveVisibilityChangeListener (const Link<LinkParamNone*,void>& rListener);
 
     /** The page under the mouse is not highlighted in some contexts.  Call
         this method on context changes.
@@ -234,7 +234,7 @@ private:
     SharedILayerPainter mpBackgroundPainter;
     ::boost::scoped_ptr<ToolTip> mpToolTip;
     bool mbIsRearrangePending;
-    ::std::vector<Link<>> maVisibilityChangeListeners;
+    ::std::vector<Link<LinkParamNone*,void>> maVisibilityChangeListeners;
 
     /** Determine the visibility of all page objects.
     */
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 9e92f4b..0cf7ea0 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -486,8 +486,8 @@ void SlideSorterView::DeterminePageObjectVisibilities()
 
             // Tell the listeners that the visibility of some objects has
             // changed.
-            ::std::vector<Link<>>& aChangeListeners (maVisibilityChangeListeners);
-            for (::std::vector<Link<>>::const_iterator
+            ::std::vector<Link<LinkParamNone*,void>>& aChangeListeners (maVisibilityChangeListeners);
+            for (::std::vector<Link<LinkParamNone*,void>>::const_iterator
                      iLink(aChangeListeners.begin()),
                      iEnd(aChangeListeners.end());
                  iLink!=iEnd;
@@ -720,7 +720,7 @@ Pair SlideSorterView::GetVisiblePageRange()
     return maVisiblePageRange;
 }
 
-void SlideSorterView::AddVisibilityChangeListener (const Link<>& rListener)
+void SlideSorterView::AddVisibilityChangeListener (const Link<LinkParamNone*,void>& rListener)
 {
     if (::std::find (
         maVisibilityChangeListeners.begin(),
@@ -731,7 +731,7 @@ void SlideSorterView::AddVisibilityChangeListener (const Link<>& rListener)
     }
 }
 
-void SlideSorterView::RemoveVisibilityChangeListener(const Link<>&rListener)
+void SlideSorterView::RemoveVisibilityChangeListener(const Link<LinkParamNone*,void>&rListener)
 {
     maVisibilityChangeListeners.erase (
         ::std::find (
commit 8659487298c141aee5e7cc16c45808e3754397f6
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 14:06:06 2015 +0200

    remove unused Link<> vector
    
    Change-Id: I983f02ade797ea7399dcbb5f56ce3391cbc65591

diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index d56c056..8d1d378 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -246,8 +246,6 @@ private:
     bool mbPreModelChangeDone;
     bool mbPostModelChangePending;
 
-    ::std::vector<Link<>> maSelectionChangeListeners;
-
     /** This array stores the indices of the  selected page descriptors at
         the time when the edit mode is switched to EM_MASTERPAGE.  With this
         we can restore the selection when switching back to EM_PAGE mode.
commit 4986c64e11da9891e5ba7326668a29653aa9cb2f
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 14:04:23 2015 +0200

    convert Link<> to typed
    
    Change-Id: Id5c1ef7e094ab3796a09f3f451903fff525aaf97

diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
index 00c7db8..2714384 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
@@ -86,10 +86,9 @@ void RecentMasterPagesSelector::LateInit()
         LINK(this,RecentMasterPagesSelector,MasterPageListListener));
 }
 
-IMPL_LINK_NOARG(RecentMasterPagesSelector, MasterPageListListener)
+IMPL_LINK_NOARG_TYPED(RecentMasterPagesSelector, MasterPageListListener, LinkParamNone*, void)
 {
     MasterPagesSelector::Fill();
-    return 0;
 }
 
 void RecentMasterPagesSelector::Fill (ItemList& rItemList)
diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.hxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.hxx
index 2a74f14..33bc2c3 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.hxx
@@ -37,7 +37,7 @@ public:
         const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
 
 protected:
-    DECL_LINK(MasterPageListListener, void*);
+    DECL_LINK_TYPED(MasterPageListListener, LinkParamNone*, void);
     virtual void Fill (ItemList& rItemList) SAL_OVERRIDE;
 
     using sd::sidebar::MasterPagesSelector::Fill;
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 1168b3c..052f833 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -237,7 +237,7 @@ void RecentlyUsedMasterPages::SavePersistentValues()
     }
 }
 
-void RecentlyUsedMasterPages::AddEventListener (const Link<>& rEventListener)
+void RecentlyUsedMasterPages::AddEventListener (const Link<LinkParamNone*,void>& rEventListener)
 {
     if (::std::find (
         maListeners.begin(),
@@ -248,7 +248,7 @@ void RecentlyUsedMasterPages::AddEventListener (const Link<>& rEventListener)
     }
 }
 
-void RecentlyUsedMasterPages::RemoveEventListener (const Link<>& rEventListener)
+void RecentlyUsedMasterPages::RemoveEventListener (const Link<LinkParamNone*,void>& rEventListener)
 {
     maListeners.erase (
         ::std::find (
@@ -272,12 +272,9 @@ MasterPageContainer::Token RecentlyUsedMasterPages::GetTokenForIndex (sal_uInt32
 
 void RecentlyUsedMasterPages::SendEvent()
 {
-    ::std::vector<Link<>>::iterator aLink (maListeners.begin());
-    ::std::vector<Link<>>::iterator aEnd (maListeners.end());
-    while (aLink!=aEnd)
+    for (auto& aLink : maListeners)
     {
-        aLink->Call (NULL);
-        ++aLink;
+        aLink.Call(nullptr);
     }
 }
 
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
index 51f3a29..8853a8a 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
@@ -46,8 +46,8 @@ public:
     */
     static RecentlyUsedMasterPages& Instance();
 
-    void AddEventListener (const Link<>& rEventListener);
-    void RemoveEventListener (const Link<>& rEventListener);
+    void AddEventListener (const Link<LinkParamNone*,void>& rEventListener);
+    void RemoveEventListener (const Link<LinkParamNone*,void>& rEventListener);
 
     int GetMasterPageCount() const;
     MasterPageContainer::Token GetTokenForIndex (sal_uInt32 nIndex) const;
@@ -84,7 +84,7 @@ private:
     */
     static RecentlyUsedMasterPages* mpInstance;
 
-    ::std::vector<Link<>> maListeners;
+    ::std::vector<Link<LinkParamNone*,void>> maListeners;
 
     typedef ::std::vector<Descriptor> MasterPageList;
     MasterPageList mvMasterPages;
commit 277b9950a5a5d163073a8ab5a501bfad322eea90
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 14:02:16 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ic8def516b5a45dcb1d859eb74962a36c2b608f87

diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx
index b511251..aa1c1d3 100644
--- a/sd/source/ui/sidebar/LayoutMenu.hxx
+++ b/sd/source/ui/sidebar/LayoutMenu.hxx
@@ -189,7 +189,7 @@ private:
     /** When clicked then set the current page of the view in the center pane.
     */
     DECL_LINK_TYPED(ClickHandler, ValueSet*, void);
-    DECL_LINK(RightClickHandler, MouseEvent*);
+    DECL_LINK_TYPED(RightClickHandler, const MouseEvent&, void);
     DECL_LINK_TYPED(StateChangeHandler, const OUString&, void);
     DECL_LINK(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*);
     DECL_LINK(WindowEventHandler, VclWindowEvent*);
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 34af359..1ae6067 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -178,7 +178,7 @@ IMPL_LINK_NOARG_TYPED(MasterPagesSelector, ClickHandler, ValueSet*, void)
     ExecuteCommand(mnDefaultClickAction);
 }
 
-IMPL_LINK(MasterPagesSelector, RightClickHandler, MouseEvent*, pEvent)
+IMPL_LINK_TYPED(MasterPagesSelector, RightClickHandler, const MouseEvent&, rEvent, void)
 {
     // Here we only prepare the display of the context menu: the item under
     // the mouse is selected.  The actual display of the context menu is
@@ -190,14 +190,13 @@ IMPL_LINK(MasterPagesSelector, RightClickHandler, MouseEvent*, pEvent)
     if (pViewFrame != NULL)
     {
         SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
-        if (pDispatcher != NULL &&  pEvent != NULL)
+        if (pDispatcher != NULL)
         {
-            sal_uInt16 nIndex = PreviewValueSet::GetItemId (pEvent->GetPosPixel());
+            sal_uInt16 nIndex = PreviewValueSet::GetItemId (rEvent.GetPosPixel());
             if (nIndex > 0)
                 PreviewValueSet::SelectItem (nIndex);
         }
     }
-    return 0;
 }
 
 void MasterPagesSelector::Command (const CommandEvent& rEvent)
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx
index 8cd93cb..33a49cb 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx
@@ -192,7 +192,7 @@ private:
         of an index for a token.
     */
     DECL_LINK_TYPED(ClickHandler, ValueSet*, void);
-    DECL_LINK(RightClickHandler, MouseEvent*);
+    DECL_LINK_TYPED(RightClickHandler, const MouseEvent&, void);
     DECL_LINK(ContextMenuCallback, CommandEvent*);
     DECL_LINK_TYPED(ContainerChangeListener, MasterPageContainerChangeEvent&, void);
     DECL_LINK_TYPED(OnMenuItemSelected, Menu*, bool);
diff --git a/sd/source/ui/sidebar/PreviewValueSet.cxx b/sd/source/ui/sidebar/PreviewValueSet.cxx
index 7c1145c..25d5f29 100644
--- a/sd/source/ui/sidebar/PreviewValueSet.cxx
+++ b/sd/source/ui/sidebar/PreviewValueSet.cxx
@@ -47,7 +47,7 @@ void PreviewValueSet::SetPreviewSize (const Size& rSize)
     maPreviewSize = rSize;
 }
 
-void PreviewValueSet::SetRightMouseClickHandler (const Link<>& rLink)
+void PreviewValueSet::SetRightMouseClickHandler (const Link<const MouseEvent&,void>& rLink)
 {
     maRightMouseClickHandler = rLink;
 }
@@ -55,9 +55,9 @@ void PreviewValueSet::SetRightMouseClickHandler (const Link<>& rLink)
 void PreviewValueSet::MouseButtonDown (const MouseEvent& rEvent)
 {
     if (rEvent.IsRight())
-        maRightMouseClickHandler.Call(&const_cast<MouseEvent&>(rEvent));
+        maRightMouseClickHandler.Call(rEvent);
     else
-        ValueSet::MouseButtonDown (rEvent);
+        ValueSet::MouseButtonDown(rEvent);
 
 }
 
diff --git a/sd/source/ui/sidebar/PreviewValueSet.hxx b/sd/source/ui/sidebar/PreviewValueSet.hxx
index b48c840..86eb545 100644
--- a/sd/source/ui/sidebar/PreviewValueSet.hxx
+++ b/sd/source/ui/sidebar/PreviewValueSet.hxx
@@ -33,7 +33,7 @@ public:
     explicit PreviewValueSet (vcl::Window* pParent);
     virtual ~PreviewValueSet();
 
-    void SetRightMouseClickHandler (const Link<>& rLink);
+    void SetRightMouseClickHandler (const Link<const MouseEvent&,void>& rLink);
     virtual void Resize() SAL_OVERRIDE;
 
     void SetPreviewSize (const Size& rSize);
@@ -49,7 +49,7 @@ protected:
     virtual void MouseButtonDown (const MouseEvent& rEvent) SAL_OVERRIDE;
 
 private:
-    Link<> maRightMouseClickHandler;
+    Link<const MouseEvent&,void> maRightMouseClickHandler;
     Size maPreviewSize;
     const int mnBorderWidth;
     const int mnBorderHeight;
commit 1fccdc3435604d4521f4e395ebeb80b637da92e6
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 13:59:54 2015 +0200

    convert Link<> to typed
    
    Change-Id: Icb335b68df33eccf0b972fad64954806cd93b68d

diff --git a/sd/source/ui/inc/MasterPageObserver.hxx b/sd/source/ui/inc/MasterPageObserver.hxx
index 8ac9096..057ef8e 100644
--- a/sd/source/ui/inc/MasterPageObserver.hxx
+++ b/sd/source/ui/inc/MasterPageObserver.hxx
@@ -30,6 +30,8 @@ class SdDrawDocument;
 
 namespace sd {
 
+class MasterPageObserverEvent;
+
 /** This singleton observes all registered documents for changes in the used
     master pages and in turn informs its listeners about it.  One such
     listener is the master page selector control in the tool panel that
@@ -61,7 +63,7 @@ public:
             The event listener to call for future events.  Call
             RemoveEventListener() before the listener is destroyed.
     */
-    void AddEventListener (const Link<>& rEventListener);
+    void AddEventListener (const Link<MasterPageObserverEvent&,void>& rEventListener);
 
     /** Remove the given listener from the list of listeners.
         @param rEventListener
@@ -69,7 +71,7 @@ public:
             from this object.  Passing a listener that has not
             been registered before is safe and is silently ignored.
     */
-    void RemoveEventListener (const Link<>& rEventListener);
+    void RemoveEventListener (const Link<MasterPageObserverEvent&,void>& rEventListener);
 
 private:
     static ::osl::Mutex maMutex;
diff --git a/sd/source/ui/sidebar/MasterPageObserver.cxx b/sd/source/ui/sidebar/MasterPageObserver.cxx
index 1df0a07..9e71684 100644
--- a/sd/source/ui/sidebar/MasterPageObserver.cxx
+++ b/sd/source/ui/sidebar/MasterPageObserver.cxx
@@ -56,7 +56,7 @@ public:
             The event listener to call for future events.  Call
             RemoveEventListener() before the listener is destroyed.
     */
-    void AddEventListener (const Link<>& rEventListener);
+    void AddEventListener (const Link<MasterPageObserverEvent&,void>& rEventListener);
 
     /** Remove the given listener from the list of listeners.
         @param rEventListener
@@ -64,10 +64,10 @@ public:
             from this object.  Passing a listener that has not
             been registered before is safe and is silently ignored.
     */
-    void RemoveEventListener (const Link<>& rEventListener);
+    void RemoveEventListener (const Link<MasterPageObserverEvent&,void>& rEventListener);
 
 private:
-    ::std::vector<Link<>> maListeners;
+    ::std::vector<Link<MasterPageObserverEvent&,void>> maListeners;
 
     struct DrawDocHash {
         size_t operator()(SdDrawDocument* argument) const
@@ -127,13 +127,13 @@ void MasterPageObserver::UnregisterDocument (SdDrawDocument& rDocument)
     mpImpl->UnregisterDocument (rDocument);
 }
 
-void MasterPageObserver::AddEventListener (const Link<>& rEventListener)
+void MasterPageObserver::AddEventListener (const Link<MasterPageObserverEvent&,void>& rEventListener)
 {
 
     mpImpl->AddEventListener (rEventListener);
 }
 
-void MasterPageObserver::RemoveEventListener (const Link<>& rEventListener)
+void MasterPageObserver::RemoveEventListener (const Link<MasterPageObserverEvent&,void>& rEventListener)
 {
     mpImpl->RemoveEventListener (rEventListener);
 }
@@ -176,7 +176,7 @@ void MasterPageObserver::Implementation::UnregisterDocument (
 }
 
 void MasterPageObserver::Implementation::AddEventListener (
-    const Link<>& rEventListener)
+    const Link<MasterPageObserverEvent&,void>& rEventListener)
 {
     if (::std::find (
         maListeners.begin(),
@@ -208,7 +208,7 @@ void MasterPageObserver::Implementation::AddEventListener (
 }
 
 void MasterPageObserver::Implementation::RemoveEventListener (
-    const Link<>& rEventListener)
+    const Link<MasterPageObserverEvent&,void>& rEventListener)
 {
     maListeners.erase (
         ::std::find (
@@ -334,12 +334,9 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages (
 void MasterPageObserver::Implementation::SendEvent (
     MasterPageObserverEvent& rEvent)
 {
-    ::std::vector<Link<>>::iterator aLink (maListeners.begin());
-    ::std::vector<Link<>>::iterator aEnd (maListeners.end());
-    while (aLink!=aEnd)
+    for (auto& aLink : maListeners)
     {
-        aLink->Call (&rEvent);
-        ++aLink;
+        aLink.Call(rEvent);
     }
 }
 
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 53d9fe7..1168b3c 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -281,15 +281,15 @@ void RecentlyUsedMasterPages::SendEvent()
     }
 }
 
-IMPL_LINK(RecentlyUsedMasterPages, MasterPageChangeListener,
-    MasterPageObserverEvent*, pEvent)
+IMPL_LINK_TYPED(RecentlyUsedMasterPages, MasterPageChangeListener,
+    MasterPageObserverEvent&, rEvent, void)
 {
-    switch (pEvent->meType)
+    switch (rEvent.meType)
     {
         case MasterPageObserverEvent::ET_MASTER_PAGE_ADDED:
         case MasterPageObserverEvent::ET_MASTER_PAGE_EXISTS:
             AddMasterPage(
-                mpContainer->GetTokenForStyleName(pEvent->mrMasterPageName));
+                mpContainer->GetTokenForStyleName(rEvent.mrMasterPageName));
             break;
 
         case MasterPageObserverEvent::ET_MASTER_PAGE_REMOVED:
@@ -299,7 +299,6 @@ IMPL_LINK(RecentlyUsedMasterPages, MasterPageChangeListener,
             SendEvent();
             break;
     }
-    return 0;
 }
 
 IMPL_LINK_TYPED(RecentlyUsedMasterPages, MasterPageContainerChangeListener,
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
index 47bdf83..51f3a29 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
@@ -103,7 +103,7 @@ private:
     RecentlyUsedMasterPages& operator= (const RecentlyUsedMasterPages&) SAL_DELETED_FUNCTION;
 
     void SendEvent();
-    DECL_LINK(MasterPageChangeListener, MasterPageObserverEvent*);
+    DECL_LINK_TYPED(MasterPageChangeListener, MasterPageObserverEvent&, void);
     DECL_LINK_TYPED(MasterPageContainerChangeListener, MasterPageContainerChangeEvent&, void);
 
     /** Add a descriptor for the specified master page to the end of the
commit dbd4c01975adf306932766adcba0ecbb9d6a6e1b
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 13:53:42 2015 +0200

    convert Link<> to typed
    
    Change-Id: If1544b0e38500d11e18ca99725f9533a29b2beb7

diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index 82ad5b5..2b55982 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -84,8 +84,8 @@ public:
     static ::boost::shared_ptr<Implementation> Instance();
 
     void LateInit();
-    void AddChangeListener (const Link<>& rLink);
-    void RemoveChangeListener (const Link<>& rLink);
+    void AddChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink);
+    void RemoveChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink);
     void UpdatePreviewSizePixel();
     Size GetPreviewSizePixel (PreviewSize eSize) const;
 
@@ -158,7 +158,7 @@ private:
     Image maLargePreviewNotAvailable;
     Image maSmallPreviewNotAvailable;
 
-    ::std::vector<Link<>> maChangeListeners;
+    ::std::vector<Link<MasterPageContainerChangeEvent&,void>> maChangeListeners;
 
     // We have to remember the tasks for initialization and filling in case
     // a MasterPageContainer object is destroyed before these tasks have
@@ -228,12 +228,12 @@ MasterPageContainer::~MasterPageContainer()
 {
 }
 
-void MasterPageContainer::AddChangeListener (const Link<>& rLink)
+void MasterPageContainer::AddChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink)
 {
     mpImpl->AddChangeListener(rLink);
 }
 
-void MasterPageContainer::RemoveChangeListener (const Link<>& rLink)
+void MasterPageContainer::RemoveChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink)
 {
     mpImpl->RemoveChangeListener(rLink);
 }
@@ -548,22 +548,22 @@ void MasterPageContainer::Implementation::LateInit()
     }
 }
 
-void MasterPageContainer::Implementation::AddChangeListener (const Link<>& rLink)
+void MasterPageContainer::Implementation::AddChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink)
 {
     const ::osl::MutexGuard aGuard (maMutex);
 
-    ::std::vector<Link<>>::iterator iListener (
+    ::std::vector<Link<MasterPageContainerChangeEvent&,void>>::iterator iListener (
         ::std::find(maChangeListeners.begin(),maChangeListeners.end(),rLink));
     if (iListener == maChangeListeners.end())
         maChangeListeners.push_back(rLink);
 
 }
 
-void MasterPageContainer::Implementation::RemoveChangeListener (const Link<>& rLink)
+void MasterPageContainer::Implementation::RemoveChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink)
 {
     const ::osl::MutexGuard aGuard (maMutex);
 
-    ::std::vector<Link<>>::iterator iListener (
+    ::std::vector<Link<MasterPageContainerChangeEvent&,void>>::iterator iListener (
         ::std::find(maChangeListeners.begin(),maChangeListeners.end(),rLink));
     if (iListener != maChangeListeners.end())
         maChangeListeners.erase(iListener);
@@ -957,13 +957,13 @@ void MasterPageContainer::Implementation::FireContainerChange (
     }
     else
     {
-        ::std::vector<Link<>> aCopy(maChangeListeners.begin(),maChangeListeners.end());
-        ::std::vector<Link<>>::iterator iListener;
+        ::std::vector<Link<MasterPageContainerChangeEvent&,void>> aCopy(maChangeListeners.begin(),maChangeListeners.end());
+        ::std::vector<Link<MasterPageContainerChangeEvent&,void>>::iterator iListener;
         MasterPageContainerChangeEvent aEvent;
         aEvent.meEventType = eType;
         aEvent.maChildToken = aToken;
         for (iListener=aCopy.begin(); iListener!=aCopy.end(); ++iListener)
-            iListener->Call(&aEvent);
+            iListener->Call(aEvent);
     }
 }
 
diff --git a/sd/source/ui/sidebar/MasterPageContainer.hxx b/sd/source/ui/sidebar/MasterPageContainer.hxx
index 9b28bef..d1f27b9 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.hxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.hxx
@@ -36,6 +36,7 @@ class SdPage;
 namespace sd { namespace sidebar {
 
 class MasterPageDescriptor;
+class MasterPageContainerChangeEvent;
 
 /** This container manages the master pages used by the MasterPagesSelector
     controls.  It uses internally a singleton implementation object.
@@ -61,8 +62,8 @@ public:
     MasterPageContainer();
     virtual ~MasterPageContainer();
 
-    void AddChangeListener (const Link<>& rLink);
-    void RemoveChangeListener (const Link<>& rLink);
+    void AddChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink);
+    void RemoveChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink);
 
     enum PreviewSize { SMALL, LARGE };
     /** There are two different preview sizes, a small one and a large one.
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 716fc9e..34af359 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -98,7 +98,7 @@ MasterPagesSelector::MasterPagesSelector (
     SetBackground(sfx2::sidebar::Theme::GetWallpaper(sfx2::sidebar::Theme::Paint_PanelBackground));
     SetColor(sfx2::sidebar::Theme::GetColor(sfx2::sidebar::Theme::Paint_PanelBackground));
 
-    Link<> aChangeListener (LINK(this,MasterPagesSelector,ContainerChangeListener));
+    Link<MasterPageContainerChangeEvent&,void> aChangeListener (LINK(this,MasterPagesSelector,ContainerChangeListener));
     mpContainer->AddChangeListener(aChangeListener);
 }
 
@@ -112,7 +112,7 @@ void MasterPagesSelector::dispose()
     Clear();
     UpdateLocks(ItemList());
 
-    Link<> aChangeListener (LINK(this,MasterPagesSelector,ContainerChangeListener));
+    Link<MasterPageContainerChangeEvent&,void> aChangeListener (LINK(this,MasterPagesSelector,ContainerChangeListener));
     mpContainer->RemoveChangeListener(aChangeListener);
     PreviewValueSet::dispose();
 }
@@ -330,11 +330,9 @@ void MasterPagesSelector::ExecuteCommand (const sal_Int32 nCommandId)
     }
 }
 
-IMPL_LINK(MasterPagesSelector, ContainerChangeListener, MasterPageContainerChangeEvent*, pEvent)
+IMPL_LINK_TYPED(MasterPagesSelector, ContainerChangeListener, MasterPageContainerChangeEvent&, rEvent, void)
 {
-    if (pEvent)
-        NotifyContainerChangeEvent(*pEvent);
-    return 0;
+    NotifyContainerChangeEvent(rEvent);
 }
 
 SdPage* MasterPagesSelector::GetSelectedMasterPage()
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx
index df32909..8cd93cb 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx
@@ -194,7 +194,7 @@ private:
     DECL_LINK_TYPED(ClickHandler, ValueSet*, void);
     DECL_LINK(RightClickHandler, MouseEvent*);
     DECL_LINK(ContextMenuCallback, CommandEvent*);
-    DECL_LINK(ContainerChangeListener, MasterPageContainerChangeEvent*);
+    DECL_LINK_TYPED(ContainerChangeListener, MasterPageContainerChangeEvent&, void);
     DECL_LINK_TYPED(OnMenuItemSelected, Menu*, bool);
 
     void SetItem (
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 8990018..53d9fe7 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -96,7 +96,7 @@ RecentlyUsedMasterPages::RecentlyUsedMasterPages()
 
 RecentlyUsedMasterPages::~RecentlyUsedMasterPages()
 {
-    Link<> aLink (LINK(this,RecentlyUsedMasterPages,MasterPageContainerChangeListener));
+    Link<MasterPageContainerChangeEvent&,void> aLink (LINK(this,RecentlyUsedMasterPages,MasterPageContainerChangeListener));
     mpContainer->RemoveChangeListener(aLink);
 
     MasterPageObserver::Instance().RemoveEventListener(
@@ -105,7 +105,7 @@ RecentlyUsedMasterPages::~RecentlyUsedMasterPages()
 
 void RecentlyUsedMasterPages::LateInit()
 {
-    Link<> aLink (LINK(this,RecentlyUsedMasterPages,MasterPageContainerChangeListener));
+    Link<MasterPageContainerChangeEvent&,void> aLink (LINK(this,RecentlyUsedMasterPages,MasterPageContainerChangeListener));
     mpContainer->AddChangeListener(aLink);
 
     LoadPersistentValues ();
@@ -302,24 +302,22 @@ IMPL_LINK(RecentlyUsedMasterPages, MasterPageChangeListener,
     return 0;
 }
 
-IMPL_LINK(RecentlyUsedMasterPages, MasterPageContainerChangeListener,
-    MasterPageContainerChangeEvent*, pEvent)
+IMPL_LINK_TYPED(RecentlyUsedMasterPages, MasterPageContainerChangeListener,
+    MasterPageContainerChangeEvent&, rEvent, void)
 {
-    if (pEvent != NULL)
-        switch (pEvent->meEventType)
-        {
-            case MasterPageContainerChangeEvent::CHILD_ADDED:
-            case MasterPageContainerChangeEvent::CHILD_REMOVED:
-            case MasterPageContainerChangeEvent::INDEX_CHANGED:
-            case MasterPageContainerChangeEvent::INDEXES_CHANGED:
-                ResolveList();
-                break;
-
-            default:
-                // Ignored.
-                break;
-        }
-    return 0;
+    switch (rEvent.meEventType)
+    {
+        case MasterPageContainerChangeEvent::CHILD_ADDED:
+        case MasterPageContainerChangeEvent::CHILD_REMOVED:
+        case MasterPageContainerChangeEvent::INDEX_CHANGED:
+        case MasterPageContainerChangeEvent::INDEXES_CHANGED:
+            ResolveList();
+            break;
+
+        default:
+            // Ignored.
+            break;
+    }
 }
 
 void RecentlyUsedMasterPages::AddMasterPage (
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
index c4da8a3..47bdf83 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx
@@ -104,7 +104,7 @@ private:
 
     void SendEvent();
     DECL_LINK(MasterPageChangeListener, MasterPageObserverEvent*);
-    DECL_LINK(MasterPageContainerChangeListener, MasterPageContainerChangeEvent*);
+    DECL_LINK_TYPED(MasterPageContainerChangeListener, MasterPageContainerChangeEvent&, void);
 
     /** Add a descriptor for the specified master page to the end of the
         list of most recently used master pages.  When the page is already a
commit 118dd2fba2038891d06381e9cda0396e661e60ac
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 13:48:36 2015 +0200

    convert Link<> to typed
    
    Change-Id: I83b3a4a637db8f623b18615227a495a15078561f

diff --git a/sd/source/ui/inc/tools/SlotStateListener.hxx b/sd/source/ui/inc/tools/SlotStateListener.hxx
index 0983d6b..4d9401e 100644
--- a/sd/source/ui/inc/tools/SlotStateListener.hxx
+++ b/sd/source/ui/inc/tools/SlotStateListener.hxx
@@ -51,7 +51,7 @@ public:
         explanations about the parameters.
     */
     SlotStateListener (
-        Link<>& rCallback,
+        Link<const OUString&,void>& rCallback,
         const ::com::sun::star::uno::Reference<
             ::com::sun::star::frame::XDispatchProvider>& rxDispatchProvider,
         const OUString& rSlotName);
@@ -66,7 +66,7 @@ public:
         Changing the callback does not release the listeners.
         @throws DisposedException
     */
-    void SetCallback (const Link<>& rCallback);
+    void SetCallback (const Link<const OUString&,void>& rCallback);
 
     /** Set the frame whose slots shall be observed.  When an object of this
         class is already observing slots of another frame then these
@@ -111,7 +111,7 @@ protected:
     virtual void SAL_CALL disposing() SAL_OVERRIDE;
 
 private:
-    Link<> maCallback;
+    Link<const OUString&,void> maCallback;
 
     /** Remember the URLs that describe slots whose state changes we are
         listening to.
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 3eda44c..d5010b2 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -181,7 +181,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
     Window::SetHelpId(HID_SD_TASK_PANE_PREVIEW_LAYOUTS);
     SetAccessibleName(SdResId(STR_TASKPANEL_LAYOUT_MENU_TITLE));
 
-    Link<> aStateChangeLink (LINK(this,LayoutMenu,StateChangeHandler));
+    Link<const OUString&,void> aStateChangeLink (LINK(this,LayoutMenu,StateChangeHandler));
     mxListener = new ::sd::tools::SlotStateListener(
         aStateChangeLink,
         Reference<frame::XDispatchProvider>(mrBase.GetController()->getFrame(), UNO_QUERY),
@@ -635,10 +635,9 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
     }
 }
 
-IMPL_LINK_NOARG(LayoutMenu, StateChangeHandler)
+IMPL_LINK_NOARG_TYPED(LayoutMenu, StateChangeHandler, const OUString&, void)
 {
     InvalidateContent();
-    return 0;
 }
 
 IMPL_LINK_TYPED(LayoutMenu, OnMenuItemSelected, Menu*, pMenu, bool)
diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx
index 813682f..b511251 100644
--- a/sd/source/ui/sidebar/LayoutMenu.hxx
+++ b/sd/source/ui/sidebar/LayoutMenu.hxx
@@ -190,7 +190,7 @@ private:
     */
     DECL_LINK_TYPED(ClickHandler, ValueSet*, void);
     DECL_LINK(RightClickHandler, MouseEvent*);
-    DECL_LINK(StateChangeHandler, void *);
+    DECL_LINK_TYPED(StateChangeHandler, const OUString&, void);
     DECL_LINK(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent*);
     DECL_LINK(WindowEventHandler, VclWindowEvent*);
     DECL_LINK_TYPED(OnMenuItemSelected, Menu*, bool);
diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx
index 2167e76..a3d1be1 100644
--- a/sd/source/ui/tools/SlotStateListener.cxx
+++ b/sd/source/ui/tools/SlotStateListener.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star;
 namespace sd { namespace tools {
 
 SlotStateListener::SlotStateListener (
-    Link<>& rCallback,
+    Link<const OUString&,void>& rCallback,
     const uno::Reference<frame::XDispatchProvider>& rxDispatchProvider,
     const OUString& rSlotName)
     : SlotStateListenerInterfaceBase(maMutex),
@@ -49,7 +49,7 @@ SlotStateListener::~SlotStateListener()
     ReleaseListeners();
 }
 
-void SlotStateListener::SetCallback (const Link<>& rCallback)
+void SlotStateListener::SetCallback (const Link<const OUString&,void>& rCallback)
 {
     ThrowIfDisposed();
 
@@ -90,7 +90,7 @@ void SlotStateListener::disposing()
 {
     ReleaseListeners();
     mxDispatchProviderWeak = uno::WeakReference<frame::XDispatchProvider>(NULL);
-    maCallback = Link<>();
+    maCallback = Link<const OUString&,void>();
 }
 
 util::URL SlotStateListener::MakeURL (const OUString& rSlotName)
@@ -123,7 +123,7 @@ void SlotStateListener::statusChanged (
     ThrowIfDisposed();
     OUString sSlotName (rState.FeatureURL.Complete);
     if (maCallback.IsSet())
-        maCallback.Call(&sSlotName);
+        maCallback.Call(sSlotName);
 }
 
 void SlotStateListener::ReleaseListeners()
commit 0fd07e53efbe6ff73db51711d36f9aeaf893479e
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 13:45:33 2015 +0200

    convert Link<> to typed
    
    Change-Id: I2f5b962da2d14f68b34029cac4ec7a7ed51937c6

diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 6d53335..82a83a6 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -235,7 +235,7 @@ public:
     DECL_LINK_TYPED( LastPageHdl, Button*, void );
     DECL_LINK_TYPED( PreviewFlagHdl, Button*, void );
     DECL_LINK_TYPED( EffectPreviewIdleHdl, Idle *, void );
-    DECL_LINK( EffectPreviewClickHdl, void * );
+    DECL_LINK_TYPED( EffectPreviewClickHdl, SdDocPreviewWin&, void );
     DECL_LINK( SelectLayoutHdl, void * );
     DECL_LINK_TYPED( PageSelectHdl, SvTreeListBox*, void );
     DECL_LINK_TYPED( PresTypeHdl, Button*, void );
@@ -1128,10 +1128,9 @@ IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, EffectPreviewIdleHdl, Idle *, void)
     }
 }
 
-IMPL_LINK_NOARG(AssistentDlgImpl, EffectPreviewClickHdl)
+IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, EffectPreviewClickHdl, SdDocPreviewWin&, void)
 {
     EffectPreviewIdleHdl(nullptr);
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, PreviewFlagHdl, Button*, void)
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 4d63253..688f578 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -204,7 +204,7 @@ bool SdDocPreviewWin::Notify( NotifyEvent& rNEvt )
             if( rNEvt.GetWindow() == this )
             {
                 if(aClickHdl.IsSet())
-                    aClickHdl.Call(this);
+                    aClickHdl.Call(*this);
             }
         }
     }
diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx
index f28e7a7..8abb261 100644
--- a/sd/source/ui/inc/docprev.hxx
+++ b/sd/source/ui/inc/docprev.hxx
@@ -43,7 +43,7 @@ class SD_DLLPUBLIC SdDocPreviewWin : public Control, public SfxListener
 protected:
     GDIMetaFile*    pMetaFile;
     bool            bInEffect;
-    Link<>          aClickHdl;
+    Link<SdDocPreviewWin&,void> aClickHdl;
     SfxObjectShell* mpObj;
     sal_uInt16      mnShowPage;
     Color           maDocumentColor;
@@ -72,7 +72,7 @@ public:
 
     virtual bool    Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
 
-    void            SetClickHdl( const Link<>& rLink ) { aClickHdl = rLink; }
+    void            SetClickHdl( const Link<SdDocPreviewWin&,void>& rLink ) { aClickHdl = rLink; }
 
     virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
 
commit 54a5ae1b35680f54979890f62aae96d79b4f9874
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 13:43:05 2015 +0200

    remove unused Link<> fields
    
    Change-Id: I824cfe9c909be31e8205d05cc5c6136a17fd98bb

diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx
index 359af2f..a00e36e 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx
@@ -100,8 +100,6 @@ class ClientBox : public Control
     long m_nActiveHeight;
     long m_nExtraHeight;
     Size            m_aOutputSize;
-    Link<>          m_aClickHdl;
-    Link<>          m_aDeauthoriseHdl;
 
     VclPtr<NumericBox> m_aPinBox;
     VclPtr<PushButton> m_aDeauthoriseButton;
@@ -157,7 +155,6 @@ public:
     long PointToPos( const Point& rPos );
     void SetScrollHdl( const Link<>& rLink );
     void DoScroll( long nDelta );
-    void SetHyperlinkHdl( const Link<>& rLink ){ m_aClickHdl = rLink; }
     void RecalcAll();
     void RemoveUnlocked();
 
commit c629064294a76f212b6104713765f0c06ccf2e12
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 13:03:58 2015 +0200

    convert Link<> to typed
    
    Change-Id: I91bef82236613435fadc8fed48f37f3606f5466a

diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index ab3a154..de878b0 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -73,14 +73,14 @@ public:
 
     sal_Int32           InsertCategory( const OUString& rStr, sal_Int32  nPos = LISTBOX_APPEND );
 
-    void            SetDoubleClickLink( const Link<>& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; }
+    void                SetDoubleClickLink( const Link<CategoryListBox&,void>& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; }
 
     DECL_LINK_TYPED(implDoubleClickHdl, ListBox&, void);
 
 private:
     virtual void    UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
 
-    Link<>          maDoubleClickHdl;
+    Link<CategoryListBox&,void> maDoubleClickHdl;
 };
 
 CategoryListBox::CategoryListBox( vcl::Window* pParent )
@@ -148,7 +148,7 @@ void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt )
     if( rMEvt.IsLeft() && (rMEvt.GetClicks() == 2) )
     {
         if( maDoubleClickHdl.IsSet() )
-            maDoubleClickHdl.Call( this );
+            maDoubleClickHdl.Call( *this );
     }
     else
     {
@@ -177,7 +177,7 @@ public:
 
 private:
     DECL_LINK( implSelectHdl, Control* );
-    DECL_LINK( implDoubleClickHdl, Control* );
+    DECL_LINK_TYPED( implDoubleClickHdl, CategoryListBox&, void );
 
     void onSelectEffect();
 
@@ -314,14 +314,13 @@ IMPL_LINK( CustomAnimationCreateTabPage, implSelectHdl, Control*, pControl )
     return 0;
 }
 
-IMPL_LINK( CustomAnimationCreateTabPage, implDoubleClickHdl, Control*, pControl )
+IMPL_LINK_TYPED( CustomAnimationCreateTabPage, implDoubleClickHdl, CategoryListBox&, rControl, void )
 {
-    if( pControl == mpLBEffects )
+    if( &rControl == mpLBEffects )
     {
         if( mpLBEffects->GetSelectEntryCount() )
             mpParent->EndDialog( RET_OK );
     }
-    return 0;
 }
 
 void CustomAnimationCreateTabPage::onSelectEffect()
commit 2d9e314c0925a73f6bc876e06d798184ed028416
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 13:01:36 2015 +0200

    remove unused Link<> fields
    
    Change-Id: Ifad5e3646a519c2dd41ff62b798ebd0811377e5e

diff --git a/sd/inc/sdobjfac.hxx b/sd/inc/sdobjfac.hxx
index 65e642a..5adbc68 100644
--- a/sd/inc/sdobjfac.hxx
+++ b/sd/inc/sdobjfac.hxx
@@ -27,14 +27,10 @@ class SdrObjFactory;
 
 class SdObjectFactory
 {
-protected:
-    Link<> aOldMakeObjLink;
-    Link<> aOldMakeUserDataLink;
-
 public:
     SdObjectFactory() {}
 
-    DECL_LINK_TYPED( MakeUserData, SdrObjFactory *, void );
+    DECL_STATIC_LINK_TYPED( SdObjectFactory, MakeUserData, SdrObjFactory *, void );
 };
 
 extern SdObjectFactory aSdObjectFactory;
diff --git a/sd/source/core/sdobjfac.cxx b/sd/source/core/sdobjfac.cxx
index 6a8b24d..b25c4b8 100644
--- a/sd/source/core/sdobjfac.cxx
+++ b/sd/source/core/sdobjfac.cxx
@@ -35,7 +35,7 @@ SdObjectFactory aSdObjectFactory;
 |*
 \************************************************************************/
 
-IMPL_LINK_TYPED( SdObjectFactory, MakeUserData, SdrObjFactory *, pObjFactory, void )
+IMPL_STATIC_LINK_TYPED( SdObjectFactory, MakeUserData, SdrObjFactory *, pObjFactory, void )
 {
     if ( pObjFactory->nInventor == SdUDInventor )
     {
@@ -53,12 +53,6 @@ IMPL_LINK_TYPED( SdObjectFactory, MakeUserData, SdrObjFactory *, pObjFactory, vo
             break;
         }
     }
-
-    if ( pObjFactory->pNewData )
-        return;
-
-    if( aOldMakeUserDataLink.IsSet() )
-        aOldMakeUserDataLink.Call( this );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 6048935ff4c7cedf3aa288b9a28058c07be250c5
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 12:59:04 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ibd1baf909bc49ad0e7fa1fc9fdd2f42d59162960

diff --git a/reportdesign/source/ui/inc/ColorListener.hxx b/reportdesign/source/ui/inc/ColorListener.hxx
index b3eeca1..3088e08 100644
--- a/reportdesign/source/ui/inc/ColorListener.hxx
+++ b/reportdesign/source/ui/inc/ColorListener.hxx
@@ -33,10 +33,10 @@ namespace rptui
         void operator =(const OColorListener&) SAL_DELETED_FUNCTION;
     protected:
         OModuleClient                       m_aModuleClient;
-        Link<>                              m_aCollapsedLink;
+        Link<OColorListener&,void>          m_aCollapsedLink;
         svtools::ColorConfig                m_aColorConfig;
         svtools::ExtendedColorConfig        m_aExtendedColorConfig;
-        OUString                     m_sColorEntry;
+        OUString                            m_sColorEntry;
         sal_Int32                           m_nColor;
         sal_Int32                           m_nTextBoundaries;
         bool                            m_bCollapsed;
@@ -63,7 +63,7 @@ namespace rptui
         */
         inline bool isMarked() const { return m_bMarked; }
 
-        inline void     setCollapsedHdl(const Link<>& _aLink ){ m_aCollapsedLink = _aLink; }
+        inline void     setCollapsedHdl(const Link<OColorListener&,void>& _aLink ){ m_aCollapsedLink = _aLink; }
         inline bool isCollapsed() const { return m_bCollapsed; }
 
         /** collapse or expand
diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx
index 5e232a1..c0fee43 100644
--- a/reportdesign/source/ui/inc/SectionWindow.hxx
+++ b/reportdesign/source/ui/inc/SectionWindow.hxx
@@ -79,7 +79,7 @@ namespace rptui
         bool setReportSectionTitle(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xReport,sal_uInt16 _nResId,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection> , OReportHelper> _pGetSection, const ::std::mem_fun_t<bool, OReportHelper>& _pIsSectionOn);
         void ImplInitSettings();
 
-        DECL_LINK(Collapsed,OColorListener*);
+        DECL_LINK_TYPED(Collapsed, OColorListener&, void);
         DECL_LINK_TYPED(StartSplitHdl, Splitter*, void);
         DECL_LINK_TYPED(SplitHdl, Splitter*, void);
         DECL_LINK_TYPED(EndSplitHdl, Splitter*, void);
diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx
index 12be6c3..448913e 100644
--- a/reportdesign/source/ui/misc/ColorListener.cxx
+++ b/reportdesign/source/ui/misc/ColorListener.cxx
@@ -78,7 +78,7 @@ void OColorListener::setCollapsed(bool _bCollapsed)
     {
         m_bCollapsed = _bCollapsed;
         if ( m_aCollapsedLink.IsSet() )
-            m_aCollapsedLink.Call(this);
+            m_aCollapsedLink.Call(*this);
     }
 }
 
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index deaa0f4..2c6de37 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -296,18 +296,14 @@ void OSectionWindow::setMarked(bool _bMark)
     m_aEndMarker->setMarked(_bMark);
 }
 
-IMPL_LINK( OSectionWindow, Collapsed, OColorListener *, _pMarker )
+IMPL_LINK_TYPED( OSectionWindow, Collapsed, OColorListener&, _rMarker, void )
 {
-    if ( _pMarker )
-    {
-        bool bShow = !_pMarker->isCollapsed();
-        m_aReportSection->Show(bShow);
-        m_aEndMarker->Show(bShow);
-        m_aSplitter->Show(bShow);
+    bool bShow = !_rMarker.isCollapsed();
+    m_aReportSection->Show(bShow);
+    m_aEndMarker->Show(bShow);
+    m_aSplitter->Show(bShow);
 
-        m_pParent->resize(*this);
-    }
-    return 0L;
+    m_pParent->resize(*this);
 }
 
 void OSectionWindow::zoom(const Fraction& _aZoom)
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 4dde6f5..5bb48bc 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -183,7 +183,7 @@ void OStartMarker::MouseButtonUp( const MouseEvent& rMEvt )
 
         m_aVRuler->Show(!m_bCollapsed && m_bShowRuler);
         if ( m_aCollapsedLink.IsSet() )
-            m_aCollapsedLink.Call(this);
+            m_aCollapsedLink.Call(*this);
     }
 
     m_pParent->showProperties();
commit 363cf98b34f2a47d6b7659b680ae1c0e32f7b789
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 17 12:56:50 2015 +0200

    convert Link<> to typed
    
    Change-Id: I2362e3cc4df53f95db405bcc2449f11bc1c16e89

diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 521d574..3456657 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -267,7 +267,7 @@ bool OAddFieldWindow::PreNotify( NotifyEvent& _rNEvt )
         {
             if ( m_aCreateLink.IsSet() )
             {
-                m_aCreateLink.Call(this);
+                m_aCreateLink.Call(*this);
                 return true;
             }
         }
@@ -507,7 +507,7 @@ IMPL_LINK_NOARG_TYPED( OAddFieldWindow, OnClickHdl, Button*, void )
 IMPL_LINK_NOARG_TYPED( OAddFieldWindow, OnDoubleClickHdl, SvTreeListBox*, bool )
 {
     if ( m_aCreateLink.IsSet() )
-        m_aCreateLink.Call(this);
+        m_aCreateLink.Call(*this);
 
     return false;
 }
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 6ee1da8..55068a6 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -220,9 +220,9 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton)
 
 }
 
-IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg)
+IMPL_LINK_TYPED( FormulaDialog, OnClickHdl, OAddFieldWindow& ,_rAddFieldDlg, void)
 {
-    const uno::Sequence< beans::PropertyValue > aArgs = _pAddFieldDlg->getSelectedFieldDescriptors();
+    const uno::Sequence< beans::PropertyValue > aArgs = _rAddFieldDlg.getSelectedFieldDescriptors();
     // we use this way to create undo actions
     if ( m_pEdit && aArgs.getLength() == 1)
     {
@@ -238,10 +238,8 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg)
         }
     }
     m_pEdit = NULL;
-    _pAddFieldDlg->Hide();
+    _rAddFieldDlg.Hide();
     RefInputDoneAfter( true );
-
-    return 0L;
 }
 
 uno::Reference< sheet::XFormulaParser> FormulaDialog::getFormulaParser() const
diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx
index b9f3f03..77c2966 100644
--- a/reportdesign/source/ui/inc/AddField.hxx
+++ b/reportdesign/source/ui/inc/AddField.hxx
@@ -61,7 +61,7 @@ class  OAddFieldWindow  :public FloatingWindow
     VclPtr<FixedText>                                                           m_aHelpText;
 
     VclPtr<PushButton>                                                          m_aInsertButton;
-    Link<>                                                                      m_aCreateLink;
+    Link<OAddFieldWindow&,void>                                                 m_aCreateLink;
     OUString                                                                    m_aCommandName;
     OUString                                                                    m_sFilter;
     sal_Int32                                                                   m_nCommandType;
@@ -89,7 +89,7 @@ public:
     inline const OUString&       GetCommand()            const { return m_aCommandName; }
     inline sal_Int32                    GetCommandType()        const { return m_nCommandType; }
     inline bool                     GetEscapeProcessing()   const { return m_bEscapeProcessing; }
-    inline void SetCreateHdl(const Link<>& _aCreateLink) { m_aCreateLink = _aCreateLink; }
+    inline void SetCreateHdl(const Link<OAddFieldWindow&,void>& _aCreateLink) { m_aCreateLink = _aCreateLink; }
 
     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>              getConnection() const;
 
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index 1a02452..bc70ba7 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -58,7 +58,7 @@ class FormulaDialog : public formula::FormulaModalDialog,
 
     svl::SharedStringPool& mrStringPool;
 
-    DECL_LINK( OnClickHdl, OAddFieldWindow*);
+    DECL_LINK_TYPED( OnClickHdl, OAddFieldWindow&, void );
 public:
     FormulaDialog( vcl::Window* pParent
         , const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _xServiceFactory
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 508bed2..ca891e6 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -335,7 +335,7 @@ namespace rptui

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list