[Libreoffice-commits] core.git: 20 commits - cui/source editeng/source extensions/source forms/source fpicker/source include/editeng include/sfx2 include/svtools include/svx include/vcl sc/inc sc/source sd/inc sd/source sfx2/inc sfx2/source starmath/inc starmath/source svtools/inc svtools/source svx/source sw/source vcl/inc vcl/opengl vcl/source vcl/unx

Noel Grandin noel at peralex.com
Tue Sep 15 23:39:32 PDT 2015


 cui/source/dialogs/linkdlg.cxx                |    9 +---
 cui/source/inc/linkdlg.hxx                    |    2 
 editeng/source/editeng/editdoc.hxx            |    4 -
 editeng/source/editeng/editeng.cxx            |    4 -
 editeng/source/editeng/impedit.hxx            |   44 +++++++++----------
 editeng/source/editeng/impedit2.cxx           |    3 -
 editeng/source/editeng/impedit3.cxx           |    2 
 editeng/source/outliner/outlin2.cxx           |    4 -
 extensions/source/update/ui/updatecheckui.cxx |   14 +++---
 forms/source/richtext/richtextengine.cxx      |    5 --
 forms/source/richtext/richtextengine.hxx      |    2 
 fpicker/source/office/iodlg.cxx               |   24 ----------
 fpicker/source/office/iodlg.hxx               |    5 --
 include/editeng/editeng.hxx                   |    4 -
 include/editeng/outliner.hxx                  |    4 -
 include/sfx2/linksrc.hxx                      |    2 
 include/sfx2/lnkbase.hxx                      |    4 -
 include/svtools/transfer.hxx                  |    2 
 include/svtools/treelistbox.hxx               |    4 -
 include/svx/svdedxv.hxx                       |    4 -
 include/vcl/menu.hxx                          |    7 +--
 include/vcl/svapp.hxx                         |    4 -
 include/vcl/vclevent.hxx                      |   41 ------------------
 sc/inc/arealink.hxx                           |    2 
 sc/inc/externalrefmgr.hxx                     |    2 
 sc/inc/tablink.hxx                            |    4 -
 sc/source/ui/docshell/arealink.cxx            |    2 
 sc/source/ui/docshell/externalrefmgr.cxx      |    4 -
 sc/source/ui/docshell/tablink.cxx             |   13 ++---
 sc/source/ui/inc/viewdata.hxx                 |    3 -
 sc/source/ui/view/gridwin.cxx                 |    8 +--
 sc/source/ui/view/viewdata.cxx                |   12 +----
 sd/inc/drawdoc.hxx                            |    2 
 sd/source/core/drawdoc4.cxx                   |    8 +--
 sd/source/ui/func/fuinsfil.cxx                |    4 -
 sd/source/ui/inc/OutlineView.hxx              |    2 
 sd/source/ui/view/Outliner.cxx                |    6 +-
 sd/source/ui/view/outlview.cxx                |   15 ++----
 sfx2/inc/srchdlg.hxx                          |    8 +--
 sfx2/source/appl/fileobj.cxx                  |    6 +-
 sfx2/source/appl/fileobj.hxx                  |    4 -
 sfx2/source/appl/helpinterceptor.cxx          |    6 --
 sfx2/source/appl/helpinterceptor.hxx          |    4 -
 sfx2/source/appl/impldde.cxx                  |    4 -
 sfx2/source/appl/impldde.hxx                  |    2 
 sfx2/source/appl/linksrc.cxx                  |    2 
 sfx2/source/appl/lnkbase2.cxx                 |   17 +++----
 sfx2/source/appl/newhelp.cxx                  |   31 +++++--------
 sfx2/source/appl/newhelp.hxx                  |   33 +++++++-------
 sfx2/source/control/itemdel.cxx               |    9 +---
 sfx2/source/dialog/srchdlg.cxx                |    2 
 sfx2/source/dialog/templdlg.cxx               |   20 ++++----
 sfx2/source/inc/templdgi.hxx                  |   14 +++---
 starmath/inc/edit.hxx                         |    2 
 starmath/source/edit.cxx                      |   15 ++----
 svtools/inc/table/tablecontrol.hxx            |    2 
 svtools/source/contnr/treelistbox.cxx         |    7 +--
 svtools/source/misc/transfer2.cxx             |    6 +-
 svtools/source/table/tablecontrol.cxx         |    5 --
 svtools/source/table/tablecontrol_impl.hxx    |    4 -
 svtools/source/table/tabledatawindow.hxx      |    4 -
 svx/source/svdraw/svdedxv.cxx                 |    5 --
 sw/source/uibase/dbui/dbtree.cxx              |    2 
 vcl/inc/idlemgr.hxx                           |    4 -
 vcl/inc/svdata.hxx                            |    1 
 vcl/inc/vcleventlisteners.hxx                 |   58 ++++++++++++++++++++++++++
 vcl/inc/window.h                              |    1 
 vcl/opengl/salbmp.cxx                         |    1 
 vcl/source/app/idlemgr.cxx                    |   10 ++--
 vcl/source/app/svapp.cxx                      |    4 -
 vcl/source/app/vclevent.cxx                   |   47 ++++++++-------------
 vcl/source/window/menu.cxx                    |   20 ++++++--
 vcl/source/window/menubarwindow.cxx           |   10 ++--
 vcl/source/window/menubarwindow.hxx           |    8 +--
 vcl/unx/gtk/window/gtksalmenu.cxx             |    2 
 75 files changed, 308 insertions(+), 357 deletions(-)

New commits:
commit 69a06ca6bf45c4e2aceb06262bfa1e7be6f565e8
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Sep 16 08:38:23 2015 +0200

    convert Link<> to typed
    
    Change-Id: I9ce05712af8300c8bcea6ea0f670b57cce1ca43d

diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 2449258..1efd13b 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1508,12 +1508,12 @@ Link<> EditEngine::GetNotifyHdl() const
     return pImpEditEngine->GetNotifyHdl();
 }
 
-void EditEngine::SetStatusEventHdl( const Link<>& rLink )
+void EditEngine::SetStatusEventHdl( const Link<EditStatus&, void>& rLink )
 {
     pImpEditEngine->SetStatusEventHdl( rLink );
 }
 
-Link<> EditEngine::GetStatusEventHdl() const
+Link<EditStatus&, void> EditEngine::GetStatusEventHdl() const
 {
     return pImpEditEngine->GetStatusEventHdl();
 }
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 91d5b49..04adb48 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -479,7 +479,7 @@ private:
     // If it is detected at one point that the StatusHdl has to be called, but
     // this should not happen immediately (critical section):
     Timer               aStatusTimer;
-    Link<>              aStatusHdlLink;
+    Link<EditStatus&, void>  aStatusHdlLink;
     Link<>              aNotifyHdl;
     Link<>              aImportHdl;
     Link<>              aBeginMovingParagraphsHdl;
@@ -835,8 +835,8 @@ public:
     EditPaM         InsertParagraph( sal_Int32 nPara );
     EditSelection*  SelectParagraph( sal_Int32 nPara );
 
-    void            SetStatusEventHdl( const Link<>& rLink ) { aStatusHdlLink = rLink; }
-    Link<>          GetStatusEventHdl() const               { return aStatusHdlLink; }
+    void            SetStatusEventHdl( const Link<EditStatus&, void>& rLink ) { aStatusHdlLink = rLink; }
+    Link<EditStatus&, void> GetStatusEventHdl() const               { return aStatusHdlLink; }
 
     void            SetNotifyHdl( const Link<>& rLink )     { aNotifyHdl = rLink; }
     Link<>          GetNotifyHdl() const            { return aNotifyHdl; }
@@ -848,11 +848,11 @@ public:
     bool            IsVisualCursorTravelingEnabled();
     bool            DoVisualCursorTraveling( const ContentNode* pNode );
 
-    EditSelection ConvertSelection( sal_Int32 nStartPara, sal_Int32 nStartPos, sal_Int32 nEndPara, sal_Int32 nEndPos );
-    inline EPaM             CreateEPaM( const EditPaM& rPaM );
-    inline EditPaM          CreateEditPaM( const EPaM& rEPaM );
-    inline ESelection       CreateESel( const EditSelection& rSel );
-    inline EditSelection    CreateSel( const ESelection& rSel );
+    EditSelection         ConvertSelection( sal_Int32 nStartPara, sal_Int32 nStartPos, sal_Int32 nEndPara, sal_Int32 nEndPos );
+    inline EPaM           CreateEPaM( const EditPaM& rPaM );
+    inline EditPaM        CreateEditPaM( const EPaM& rEPaM );
+    inline ESelection     CreateESel( const EditSelection& rSel );
+    inline EditSelection  CreateSel( const ESelection& rSel );
 
 
     void                SetStyleSheetPool( SfxStyleSheetPool* pSPool );
@@ -861,7 +861,7 @@ public:
     void                SetStyleSheet( EditSelection aSel, SfxStyleSheet* pStyle );
     void                SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle );
     const SfxStyleSheet* GetStyleSheet( sal_Int32 nPara ) const;
-    SfxStyleSheet* GetStyleSheet( sal_Int32 nPara );
+    SfxStyleSheet*      GetStyleSheet( sal_Int32 nPara );
 
     void                UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle );
     void                RemoveStyleFromParagraphs( SfxStyleSheet* pStyle );
@@ -910,7 +910,7 @@ public:
     void DoOnlineSpelling( ContentNode* pThisNodeOnly = 0, bool bSpellAtCursorPos = false, bool bInteruptable = true );
     EESpellState        Spell( EditView* pEditView, bool bMultipleDoc );
     EESpellState        HasSpellErrors();
-    void ClearSpellErrors();
+    void                ClearSpellErrors();
     EESpellState        StartThesaurus( EditView* pEditView );
     css::uno::Reference< css::linguistic2::XSpellAlternatives >
                         ImpSpell( EditView* pEditView );
@@ -926,11 +926,11 @@ public:
                                 const vcl::Font *pFont,  sal_uInt16 nFontWhichId );
 
     // returns true if input sequence checking should be applied
-    bool            IsInputSequenceCheckingRequired( sal_Unicode nChar, const EditSelection& rCurSel ) const;
+    bool                IsInputSequenceCheckingRequired( sal_Unicode nChar, const EditSelection& rCurSel ) const;
 
     //find the next error within the given selection - forward only!
     css::uno::Reference< css::linguistic2::XSpellAlternatives >
-                       ImpFindNextError(EditSelection& rSelection);
+                        ImpFindNextError(EditSelection& rSelection);
     //spell and return a sentence
     bool                SpellSentence(EditView& rView, svx::SpellPortions& rToFill, bool bIsGrammarChecking );
     //put spelling back to start of current sentence - needed after switch of grammar support
@@ -950,13 +950,13 @@ public:
                         svx::SpellPortions& rToFill,
                         bool bIsField );
 
-    bool            Search( const SvxSearchItem& rSearchItem, EditView* pView );
-    bool            ImpSearch( const SvxSearchItem& rSearchItem, const EditSelection& rSearchSelection, const EditPaM& rStartPos, EditSelection& rFoundSel );
-    sal_Int32           StartSearchAndReplace( EditView* pEditView, const SvxSearchItem& rSearchItem );
-    bool            HasText( const SvxSearchItem& rSearchItem );
+    bool                    Search( const SvxSearchItem& rSearchItem, EditView* pView );
+    bool                    ImpSearch( const SvxSearchItem& rSearchItem, const EditSelection& rSearchSelection, const EditPaM& rStartPos, EditSelection& rFoundSel );
+    sal_Int32               StartSearchAndReplace( EditView* pEditView, const SvxSearchItem& rSearchItem );
+    bool                    HasText( const SvxSearchItem& rSearchItem );
 
-    void                SetEditTextObjectPool( SfxItemPool* pP )    { pTextObjectPool = pP; }
-    SfxItemPool*        GetEditTextObjectPool() const               { return pTextObjectPool; }
+    void                    SetEditTextObjectPool( SfxItemPool* pP )    { pTextObjectPool = pP; }
+    SfxItemPool*            GetEditTextObjectPool() const               { return pTextObjectPool; }
 
     const SvxNumberFormat * GetNumberFormat( const ContentNode* pNode ) const;
     sal_Int32               GetSpaceBeforeAndMinLabelWidth( const ContentNode *pNode, sal_Int32 *pnSpaceBefore = 0, sal_Int32 *pnMinLabelWidth = 0 ) const;
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index e5f10c0..1b2c779 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4024,7 +4024,7 @@ void ImpEditEngine::CallStatusHdl()
         // since other Flags might be set in the handler...
         EditStatus aTmpStatus( aStatus );
         aStatus.Clear();
-        aStatusHdlLink.Call( &aTmpStatus );
+        aStatusHdlLink.Call( aTmpStatus );
         aStatusTimer.Stop();    // If called by hand ...
     }
 }
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 3c79be0..e4e55ac 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -129,12 +129,12 @@ void Outliner::SetNotifyHdl( const Link<>& rLink )
 
 }
 
-void Outliner::SetStatusEventHdl( const Link<>& rLink )
+void Outliner::SetStatusEventHdl( const Link<EditStatus&, void>& rLink )
 {
     pEditEngine->SetStatusEventHdl( rLink );
 }
 
-Link<> Outliner::GetStatusEventHdl() const
+Link<EditStatus&, void> Outliner::GetStatusEventHdl() const
 {
     return pEditEngine->GetStatusEventHdl();
 }
diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx
index 3d4ebcd..b04e121 100644
--- a/forms/source/richtext/richtextengine.cxx
+++ b/forms/source/richtext/richtextengine.cxx
@@ -131,14 +131,13 @@ namespace frm
     }
 
 
-    IMPL_LINK( RichTextEngine, EditEngineStatusChanged, EditStatus*, _pStatus )
+    IMPL_LINK_TYPED( RichTextEngine, EditEngineStatusChanged, EditStatus&, _rStatus, void )
     {
         for ( ::std::vector< IEngineStatusListener* >::const_iterator aLoop = m_aStatusListeners.begin();
               aLoop != m_aStatusListeners.end();
               ++aLoop
             )
-            (*aLoop)->EditEngineStatusChanged( *_pStatus );
-        return 0L;
+            (*aLoop)->EditEngineStatusChanged( _rStatus );
     }
 
 
diff --git a/forms/source/richtext/richtextengine.hxx b/forms/source/richtext/richtextengine.hxx
index 3c32ece..98ddf5e 100644
--- a/forms/source/richtext/richtextengine.hxx
+++ b/forms/source/richtext/richtextengine.hxx
@@ -67,7 +67,7 @@ namespace frm
         RichTextEngine& operator=( const RichTextEngine& ) SAL_DELETED_FUNCTION;
 
     private:
-        DECL_LINK( EditEngineStatusChanged, EditStatus* );
+        DECL_LINK_TYPED( EditEngineStatusChanged, EditStatus&, void );
     };
 
 
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 11e81cd..8f2bc4a 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -366,8 +366,8 @@ public:
     sal_uLong       Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
     sal_uLong       Write( SvStream& rOutput, EETextFormat );
 
-    void            SetStatusEventHdl( const Link<>& rLink );
-    Link<>          GetStatusEventHdl() const;
+    void            SetStatusEventHdl( const Link<EditStatus&, void>& rLink );
+    Link<EditStatus&, void> GetStatusEventHdl() const;
 
     void            SetNotifyHdl( const Link<>& rLink );
     Link<>          GetNotifyHdl() const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 900df4b..8c60669 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -780,8 +780,8 @@ public:
 
     void            SetNotifyHdl( const Link<>& rLink );
 
-    void            SetStatusEventHdl( const Link<>& rLink );
-    Link<>          GetStatusEventHdl() const;
+    void            SetStatusEventHdl( const Link<EditStatus&, void>& rLink );
+    Link<EditStatus&, void> GetStatusEventHdl() const;
 
     void            Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
     void            Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index a34b9a8..5dc3514 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -115,8 +115,8 @@ protected:
     void ImpMakeTextCursorAreaVisible();
 
     // handler for AutoGrowing text with active Outliner
-    DECL_LINK(ImpOutlinerStatusEventHdl,EditStatus*);
-    DECL_LINK_TYPED(ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,void);
+    DECL_LINK_TYPED(ImpOutlinerStatusEventHdl, EditStatus&, void);
+    DECL_LINK_TYPED(ImpOutlinerCalcFieldValueHdl, EditFieldInfo*, void);
 
     // link for EndTextEditHdl
     DECL_LINK_TYPED(EndTextEditHdl, SdrUndoManager*, void);
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 46af420..39fb5b2 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -211,8 +211,7 @@ private:
     bool                bPagebreak:1;               // Page break preview mode
     bool                bSelCtrlMouseClick:1;       // special selection handling for ctrl-mouse-click
 
-    DECL_DLLPRIVATE_STATIC_LINK (ScViewData, EmptyEditHdl, void*);
-    DECL_DLLPRIVATE_LINK (EditEngineHdl, EditStatus*);
+    DECL_DLLPRIVATE_LINK_TYPED( EditEngineHdl, EditStatus&, void );
 
     SAL_DLLPRIVATE void          CalcPPT();
     SAL_DLLPRIVATE void          CreateTabData( SCTAB nNewTab );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1dbe306..006c00c 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5591,16 +5591,14 @@ struct SpellCheckStatus
 
     SpellCheckStatus() : mbModified(false) {};
 
-    DECL_LINK (EventHdl, EditStatus*);
+    DECL_LINK_TYPED( EventHdl, EditStatus&, void );
 };
 
-IMPL_LINK(SpellCheckStatus, EventHdl, EditStatus*, pStatus)
+IMPL_LINK_TYPED(SpellCheckStatus, EventHdl, EditStatus&, rStatus, void)
 {
-    EditStatusFlags nStatus = pStatus->GetStatusWord();
+    EditStatusFlags nStatus = rStatus.GetStatusWord();
     if (nStatus & EditStatusFlags::WRONGWORDCHANGED)
         mbModified = true;
-
-    return 0;
 }
 
 }
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 1e64916..a789d7c 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1100,14 +1100,9 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
     //  needed, wenn position changed
 }
 
-IMPL_STATIC_LINK_NOARG(ScViewData, EmptyEditHdl)
+IMPL_LINK_TYPED( ScViewData, EditEngineHdl, EditStatus&, rStatus, void )
 {
-    return 0;
-}
-
-IMPL_LINK( ScViewData, EditEngineHdl, EditStatus *, pStatus )
-{
-    EditStatusFlags nStatus = pStatus->GetStatusWord();
+    EditStatusFlags nStatus = rStatus.GetStatusWord();
     if (nStatus & (EditStatusFlags::HSCROLL | EditStatusFlags::TEXTHEIGHTCHANGED | EditStatusFlags::TEXTWIDTHCHANGED | EditStatusFlags::CURSOROUT))
     {
         EditGrowY();
@@ -1120,7 +1115,6 @@ IMPL_LINK( ScViewData, EditEngineHdl, EditStatus *, pStatus )
                 pEditView[eWhich]->ShowCursor(false);
         }
     }
-    return 0;
 }
 
 void ScViewData::EditGrowX()
@@ -1401,7 +1395,7 @@ void ScViewData::ResetEditView()
         }
 
     if (pEngine)
-        pEngine->SetStatusEventHdl( LINK( this, ScViewData, EmptyEditHdl ) );
+        pEngine->SetStatusEventHdl( Link<EditStatus&,void>() );
 }
 
 void ScViewData::KillEditView()
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index df95971..a3b4690 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -191,7 +191,7 @@ private:
 
                         DECL_DLLPRIVATE_LINK_TYPED(WorkStartupHdl, Timer *, void);
                         DECL_DLLPRIVATE_LINK_TYPED(OnlineSpellingHdl, Idle *, void);
-                        DECL_DLLPRIVATE_LINK(OnlineSpellEventHdl, EditStatus*);
+                        DECL_DLLPRIVATE_LINK_TYPED(OnlineSpellEventHdl, EditStatus&, void);
 
     std::vector< OUString > maAnnotationAuthors;
     std::vector<com::sun::star::uno::Reference<
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 2f38ed5..3121a1a 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -882,7 +882,7 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj)
         mbHasOnlineSpellErrors = false;
         ::sd::Outliner* pOutl = GetInternalOutliner();
         pOutl->SetUpdateMode(true);
-        Link<> aEvtHdl = pOutl->GetStatusEventHdl();
+        Link<EditStatus&,void> aEvtHdl = pOutl->GetStatusEventHdl();
         pOutl->SetStatusEventHdl(LINK(this, SdDrawDocument, OnlineSpellEventHdl));
 
         sal_uInt16 nOldOutlMode = pOutl->GetMode();
@@ -955,12 +955,10 @@ void SdDrawDocument::RemoveObject(SdrObject* pObj, SdPage* /*pPage*/)
 }
 
 // Callback for ExecuteSpellPopup()
-IMPL_LINK(SdDrawDocument, OnlineSpellEventHdl, EditStatus*, pEditStat)
+IMPL_LINK_TYPED(SdDrawDocument, OnlineSpellEventHdl, EditStatus&, rEditStat, void)
 {
-    EditStatusFlags nStat = pEditStat->GetStatusWord();
+    EditStatusFlags nStat = rEditStat.GetStatusWord();
     mbHasOnlineSpellErrors = bool(nStat & EditStatusFlags::WRONGWORDCHANGED);
-
-    return 0;
 }
 
 // Callback for ExecuteSpellPopup()
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 9359bf4..991d4f8 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -705,8 +705,8 @@ bool FuInsertFile::InsSDDinOlMode(SfxMedium* pMedium)
         Link<::Outliner*,void> aOldEndMovingHdl = pOutliner->GetEndMovingHdl();
         pOutliner->SetEndMovingHdl( Link<::Outliner*,void>());
 
-        Link<> aOldStatusEventHdl       = pOutliner->GetStatusEventHdl();
-        pOutliner->SetStatusEventHdl(Link<>());
+        Link<EditStatus&,void> aOldStatusEventHdl = pOutliner->GetStatusEventHdl();
+        pOutliner->SetStatusEventHdl(Link<EditStatus&,void>());
 
         pOutliner->Clear();
         pOlView->FillOutliner();
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 0daad3d..03d58c5 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -98,7 +98,7 @@ public:
     DECL_LINK_TYPED( ParagraphInsertedHdl, Outliner *, void );
     DECL_LINK_TYPED( ParagraphRemovingHdl, Outliner *, void );
     DECL_LINK_TYPED( DepthChangedHdl, Outliner *, void );
-    DECL_LINK( StatusEventHdl, void * );
+    DECL_LINK_TYPED( StatusEventHdl, EditStatus&, void );
     DECL_LINK_TYPED( BeginMovingHdl, Outliner *, void );
     DECL_LINK_TYPED( EndMovingHdl, Outliner *, void );
     DECL_LINK_TYPED( RemovingPagesHdl, OutlinerView *, bool );
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index f0b35ed..c1964de 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -306,7 +306,7 @@ void Outliner::EndSpelling()
     bool bViewIsDrawViewShell(pViewShell && pViewShell->ISA(DrawViewShell));
     if (bViewIsDrawViewShell)
     {
-        SetStatusEventHdl(Link<>());
+        SetStatusEventHdl(Link<EditStatus&,void>());
         mpView = pViewShell->GetView();
         mpView->UnmarkAllObj (mpView->GetSdrPageView());
         mpView->SdrEndTextEdit();
@@ -741,7 +741,7 @@ void Outliner::DetectChange()
             || aPosition.mePageKind != pDrawViewShell->GetPageKind()))
     {
         // Either the edit mode or the page kind has changed.
-        SetStatusEventHdl(Link<>());
+        SetStatusEventHdl(Link<EditStatus&,void>());
 
         SdrPageView* pPageView = mpView->GetSdrPageView();
         if (pPageView != NULL)
@@ -1193,7 +1193,7 @@ void Outliner::SetViewMode (PageKind ePageKind)
         // Restore old edit mode.
         pDrawViewShell->ChangeEditMode(mpImpl->meOriginalEditMode, false);
 
-        SetStatusEventHdl(Link<>());
+        SetStatusEventHdl(Link<EditStatus&,void>());
         OUString sViewURL;
         switch (ePageKind)
         {
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 17fe875..1ad94d2 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -774,14 +774,14 @@ IMPL_LINK_TYPED( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
 /**
  * Handler for StatusEvents
  */
-IMPL_LINK_NOARG(OutlineView, StatusEventHdl)
+IMPL_LINK_NOARG_TYPED(OutlineView, StatusEventHdl, EditStatus&, void)
 {
     ::sd::Window*   pWin = mrOutlineViewShell.GetActiveWindow();
     OutlinerView*   pOutlinerView = GetViewByWindow(pWin);
-    Rectangle     aVis          = pOutlinerView->GetVisArea();
-    Rectangle aText = Rectangle(Point(0,0),
-                                Size(mnPaperWidth,
-                                     mrOutliner.GetTextHeight()));
+    Rectangle       aVis          = pOutlinerView->GetVisArea();
+    Rectangle       aText = Rectangle(Point(0,0),
+                                      Size(mnPaperWidth,
+                                      mrOutliner.GetTextHeight()));
     Rectangle aWin(Point(0,0), pWin->GetOutputSizePixel());
     aWin = pWin->PixelToLogic(aWin);
 
@@ -794,8 +794,6 @@ IMPL_LINK_NOARG(OutlineView, StatusEventHdl)
                                        Point(aVis.TopLeft()));
         mrOutlineViewShell.UpdateScrollBars();
     }
-
-    return 0;
 }
 
 IMPL_LINK_NOARG(OutlineView, BeginDropHdl)
@@ -1363,13 +1361,12 @@ void OutlineView::SetLinks()
  */
 void OutlineView::ResetLinks() const
 {
-    Link<> aEmptyLink;
     mrOutliner.SetParaInsertedHdl(Link<::Outliner*,void>());
     mrOutliner.SetParaRemovingHdl(Link<::Outliner*,void>());
     mrOutliner.SetDepthChangedHdl(Link<::Outliner*,void>());
     mrOutliner.SetBeginMovingHdl(Link<::Outliner*,void>());
     mrOutliner.SetEndMovingHdl(Link<::Outliner*,void>());
-    mrOutliner.SetStatusEventHdl(aEmptyLink);
+    mrOutliner.SetStatusEventHdl(Link<EditStatus&,void>());
     mrOutliner.SetRemovingPagesHdl(Link<OutlinerView*,bool>());
     mrOutliner.SetIndentingPagesHdl(Link<OutlinerView*,bool>());
     mrOutliner.SetDrawPortionHdl(Link<DrawPortionInfo*,void>());
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index b277bcd..a672ad6 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -72,7 +72,7 @@ class SmEditWindow : public vcl::Window, public DropTargetHelper
     virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
     virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE;
 
-    DECL_LINK(EditStatusHdl ,EditStatus *);
+    DECL_LINK_TYPED(EditStatusHdl, EditStatus&, void);
     DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void);
 
     void CreateEditView();
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 4996e44..d7d7d0e 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -141,7 +141,7 @@ void SmEditWindow::dispose()
         EditEngine *pEditEngine = pEditView->GetEditEngine();
         if (pEditEngine)
         {
-            pEditEngine->SetStatusEventHdl( Link<>() );
+            pEditEngine->SetStatusEventHdl( Link<EditStatus&,void>() );
             pEditEngine->RemoveView( pEditView.get() );
         }
         pEditView.reset();
@@ -570,15 +570,10 @@ void SmEditWindow::CreateEditView()
 }
 
 
-IMPL_LINK( SmEditWindow, EditStatusHdl, EditStatus *, /*pStat*/ )
+IMPL_LINK_NOARG_TYPED( SmEditWindow, EditStatusHdl, EditStatus&, void )
 {
-    if (!pEditView)
-        return 1;
-    else
-    {
+    if (pEditView)
         Resize();
-        return 0;
-    }
 }
 
 IMPL_LINK_TYPED( SmEditWindow, ScrollHdl, ScrollBar *, /*pScrollBar*/, void )
@@ -718,7 +713,7 @@ void SmEditWindow::LoseFocus()
 {
     EditEngine *pEditEngine = GetEditEngine();
     if (pEditEngine)
-        pEditEngine->SetStatusEventHdl( Link<>() );
+        pEditEngine->SetStatusEventHdl( Link<EditStatus&,void>() );
 
     Window::LoseFocus();
 
@@ -1099,7 +1094,7 @@ void SmEditWindow::DeleteEditView( SmViewShell & /*rView*/ )
         std::unique_ptr<EditEngine> xEditEngine(pEditView->GetEditEngine());
         if (xEditEngine)
         {
-            xEditEngine->SetStatusEventHdl( Link<>() );
+            xEditEngine->SetStatusEventHdl( Link<EditStatus&,void>() );
             xEditEngine->RemoveView( pEditView.get() );
         }
         pEditView.reset();
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index ececaa6..29b1b9b 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -476,17 +476,16 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, bool /*bNoP
     return pOutlView;
 }
 
-IMPL_LINK(SdrObjEditView,ImpOutlinerStatusEventHdl,EditStatus*,pEditStat)
+IMPL_LINK_TYPED(SdrObjEditView,ImpOutlinerStatusEventHdl, EditStatus&, rEditStat, void)
 {
     if(pTextEditOutliner )
     {
         SdrTextObj* pTextObj = dynamic_cast< SdrTextObj * >( mxTextEditObj.get() );
         if( pTextObj )
         {
-            pTextObj->onEditOutlinerStatusEvent( pEditStat );
+            pTextObj->onEditOutlinerStatusEvent( &rEditStat );
         }
     }
-    return 0;
 }
 
 IMPL_LINK_TYPED(SdrObjEditView,ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,pFI,void)
commit d30aedb2a381e89a5a3466f06c95ff7636c9306d
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 15:33:36 2015 +0200

    convert Link<> to typed
    
    Change-Id: Id5be64f38fa448271a5364c86c32ffddfc309bbf

diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 4e97c61..38065fa 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -747,7 +747,7 @@ private:
     boost::ptr_vector<ContentNode> maContents;
 
     SfxItemPool*    pItemPool;
-    Link<>          aModifyHdl;
+    Link<LinkParamNone*,void>      aModifyHdl;
 
     SvxFont         aDefFont;           //faster than ever from the pool!!
     sal_uInt16      nDefTab;
@@ -769,7 +769,7 @@ public:
     bool            IsModified() const      { return bModified; }
     void            SetModified( bool b );
 
-    void            SetModifyHdl( const Link<>& rLink ) { aModifyHdl = rLink; }
+    void            SetModifyHdl( const Link<LinkParamNone*,void>& rLink ) { aModifyHdl = rLink; }
 
     void            CreateDefFont( bool bUseStyles );
     const SvxFont&  GetDefFont() { return aDefFont; }
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 87556e5..91d5b49 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -657,10 +657,10 @@ private:
     inline VirtualDevice*   GetVirtualDevice( const MapMode& rMapMode, DrawModeFlags nDrawMode );
     inline void             EraseVirtualDevice() { pVirtDev.disposeAndClear(); }
 
-    DECL_LINK_TYPED(StatusTimerHdl, Timer *, void);
-    DECL_LINK_TYPED(IdleFormatHdl, Idle *, void);
-    DECL_LINK_TYPED(OnlineSpellHdl, Timer *, void);
-    DECL_LINK( DocModified, void* );
+    DECL_LINK_TYPED( StatusTimerHdl, Timer *, void);
+    DECL_LINK_TYPED( IdleFormatHdl, Idle *, void);
+    DECL_LINK_TYPED( OnlineSpellHdl, Timer *, void);
+    DECL_LINK_TYPED( DocModified, LinkParamNone*, void );
 
     void                CheckIdleFormatter();
 
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 90e131b..87507f6 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4370,10 +4370,9 @@ void ImpEditEngine::LeaveBlockNotifications()
     }
 }
 
-IMPL_LINK_NOARG(ImpEditEngine, DocModified)
+IMPL_LINK_NOARG_TYPED(ImpEditEngine, DocModified, LinkParamNone*, void)
 {
     aModifyHdl.Call( NULL /*GetEditEnginePtr()*/ ); // NULL, because also used for Outliner
-    return 0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 7beefb1fe6e56bfaf24d4660e11baf5abfa3b675
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 15:30:24 2015 +0200

    convert Link<> to typed
    
    Change-Id: If80d43267ce498f713a318f281e5fe86d787d601

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index b5124e9..8649a4d 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -476,7 +476,7 @@ TriState StyleTreeListBox_Impl::NotifyMoving(SvTreeListEntry*  pTarget,
         return TRISTATE_FALSE;
     aParent = GetEntryText(pTarget);
     aStyle  = GetEntryText(pEntry);
-    const bool bRet = (bool)aDropLink.Call(this);
+    const bool bRet = aDropLink.Call(*this);
     rpNewParent = pTarget;
     lPos=0;
     IntlWrapper aIntlWrapper( Application::GetSettings().GetLanguageTag() );
@@ -1864,13 +1864,13 @@ SfxObjectShell* SfxCommonTemplateDialog_Impl::SaveSelection()
     return pDocShell;
 }
 
-IMPL_LINK( SfxCommonTemplateDialog_Impl, DropHdl, StyleTreeListBox_Impl *, pBox )
+IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, DropHdl, StyleTreeListBox_Impl&, rBox, bool )
 {
-    bDontUpdate=true;
+    bDontUpdate = true;
     const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
     const SfxStyleFamily eFam = pItem->GetFamily();
-    long ret= pStyleSheetPool->SetParent(eFam,pBox->GetStyle(), pBox->GetParent())? 1L: 0L;
-    bDontUpdate=false;
+    bool ret = pStyleSheetPool->SetParent(eFam, rBox.GetStyle(), rBox.GetParent());
+    bDontUpdate = false;
     return ret;
 }
 
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index d0c7716..0406451 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -98,9 +98,9 @@ class StyleTreeListBox_Impl : public DropListBox_Impl
 private:
     SvTreeListEntry* pCurEntry;
     Link<LinkParamNone*,void> aDoubleClickLink;
-    Link<> aDropLink;
+    Link<StyleTreeListBox_Impl&,bool> aDropLink;
     OUString  aParent;
-    OUString aStyle;
+    OUString  aStyle;
 
 protected:
     virtual void Command(const CommandEvent& rMEvt) SAL_OVERRIDE;
@@ -120,7 +120,7 @@ public:
     {
         aDoubleClickLink = rLink;
     }
-    void SetDropHdl(const Link<> &rLink)
+    void SetDropHdl(const Link<StyleTreeListBox_Impl&,bool> &rLink)
     {
         aDropLink = rLink;
     }
@@ -219,7 +219,7 @@ protected:
     DECL_LINK_TYPED( FmtSelectHdl, SvTreeListBox*, void );
     DECL_LINK_TYPED( ApplyHdl, LinkParamNone*, void );
     DECL_LINK_TYPED( TreeListApplyHdl, SvTreeListBox*, bool );
-    DECL_LINK( DropHdl, StyleTreeListBox_Impl* );
+    DECL_LINK_TYPED( DropHdl, StyleTreeListBox_Impl&, bool );
     DECL_LINK_TYPED( TimeOut, Idle*, void );
 
     virtual void EnableItem(sal_uInt16 /*nMesId*/, bool /*bCheck*/ = true)
commit 16e0ee6e6a4eb1802e06dd1d682b1a3b1affeb5c
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 15:28:04 2015 +0200

    convert Link<> to typed
    
    Change-Id: I8eb0df9a20a748286385fb6c9d4d03c2ad153989

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index fb78251..b5124e9 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -431,7 +431,7 @@ PopupMenu* StyleTreeListBox_Impl::CreateContextMenu()
 */
 bool StyleTreeListBox_Impl::DoubleClickHdl()
 {
-    aDoubleClickLink.Call(this);
+    aDoubleClickLink.Call(nullptr);
     return false;
 }
 
@@ -453,7 +453,7 @@ bool StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt )
         const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
         if ( !rKeyCode.GetModifier() && KEY_RETURN == rKeyCode.GetCode() )
         {
-            aDoubleClickLink.Call( this );
+            aDoubleClickLink.Call( nullptr );
             nRet = true;
         }
     }
@@ -2088,11 +2088,12 @@ void SfxCommonTemplateDialog_Impl::ResetFocus()
 
 IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, TreeListApplyHdl, SvTreeListBox *, bool )
 {
-    return ApplyHdl(NULL) == 1;
+    ApplyHdl(nullptr);
+    return false;
 }
 
 // Double-click on a style sheet in the ListBox is applied.
-IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, /*pControl*/ )
+IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, ApplyHdl, LinkParamNone*, void )
 {
     // only if that region is allowed
     if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
@@ -2105,7 +2106,6 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, /*pControl*/ )
                      0, 0, &nModifier );
     }
     ResetFocus();
-    return 0;
 }
 
 // Selection of a template during the Watercan-Status
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 0ece9f5..d0c7716 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -97,7 +97,7 @@ class StyleTreeListBox_Impl : public DropListBox_Impl
 {
 private:
     SvTreeListEntry* pCurEntry;
-    Link<> aDoubleClickLink;
+    Link<LinkParamNone*,void> aDoubleClickLink;
     Link<> aDropLink;
     OUString  aParent;
     OUString aStyle;
@@ -116,7 +116,7 @@ public:
 
     void Recalc();
 
-    void SetDoubleClickHdl(const Link<> &rLink)
+    void SetDoubleClickHdl(const Link<LinkParamNone*,void> &rLink)
     {
         aDoubleClickLink = rLink;
     }
@@ -217,7 +217,7 @@ protected:
 
     DECL_LINK( FilterSelectHdl, ListBox* );
     DECL_LINK_TYPED( FmtSelectHdl, SvTreeListBox*, void );
-    DECL_LINK( ApplyHdl, Control* );
+    DECL_LINK_TYPED( ApplyHdl, LinkParamNone*, void );
     DECL_LINK_TYPED( TreeListApplyHdl, SvTreeListBox*, bool );
     DECL_LINK( DropHdl, StyleTreeListBox_Impl* );
     DECL_LINK_TYPED( TimeOut, Idle*, void );
commit 5496f2a3ee8e76dda6d1c393308be1e9bbb90d6e
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 15:05:45 2015 +0200

    convert Link<> to typed
    
    Change-Id: I8275f9a100e5ed93f44596fe428a39e902c12dfc

diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 1721012..06079c6 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -872,13 +872,13 @@ public:
 
      @return true if the handler was inserted successfully, false if it couldn't be inserted.
     */
-    static bool                 InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority );
+    static bool                 InsertIdleHdl( const Link<Application*,void>& rLink, sal_uInt16 nPriority );
 
     /** Remove an idle handler from the application.
 
      @param     rLink           const reference to the idle handler to remove
     */
-    static void                 RemoveIdleHdl( const Link<>& rLink );
+    static void                 RemoveIdleHdl( const Link<Application*,void>& rLink );
 
     /*** Get the DisplayConnection.
 
diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx
index 9166d4b..4808a37 100644
--- a/sfx2/source/control/itemdel.cxx
+++ b/sfx2/source/control/itemdel.cxx
@@ -30,11 +30,11 @@
 
 class SfxItemDisruptor_Impl: private boost::noncopyable
 {
-    SfxPoolItem *pItem;
-    Link<>       aLink;
+    SfxPoolItem *           pItem;
+    Link<Application*,void> aLink;
 
 private:
-    DECL_LINK( Delete, void* );
+    DECL_LINK_TYPED( Delete, Application*, void );
 
 public:
     SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt );
@@ -69,10 +69,9 @@ SfxItemDisruptor_Impl::~SfxItemDisruptor_Impl()
     delete pItem;
 }
 
-IMPL_LINK_NOARG(SfxItemDisruptor_Impl, Delete)
+IMPL_LINK_NOARG_TYPED(SfxItemDisruptor_Impl, Delete, Application*, void)
 {
     delete this;
-    return 0;
 }
 
 void DeleteItemOnIdle(SfxPoolItem* pItem)
diff --git a/vcl/inc/idlemgr.hxx b/vcl/inc/idlemgr.hxx
index e83b9ef..6d80153 100644
--- a/vcl/inc/idlemgr.hxx
+++ b/vcl/inc/idlemgr.hxx
@@ -37,8 +37,8 @@ public:
                     ImplIdleMgr();
                     ~ImplIdleMgr();
 
-    bool            InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority );
-    void            RemoveIdleHdl( const Link<>& rLink );
+    bool            InsertIdleHdl( const Link<Application*,void>& rLink, sal_uInt16 nPriority );
+    void            RemoveIdleHdl( const Link<Application*,void>& rLink );
 
     void            RestartIdler()
                         { if ( maTimer.IsActive() ) maTimer.Start(); }
diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx
index 9463acd..31b59e4 100644
--- a/vcl/source/app/idlemgr.cxx
+++ b/vcl/source/app/idlemgr.cxx
@@ -23,9 +23,9 @@
 
 struct ImplIdleData
 {
-    Link<>      maIdleHdl;
-    sal_uInt16      mnPriority;
-    bool        mbTimeout;
+    Link<Application*,void>  maIdleHdl;
+    sal_uInt16               mnPriority;
+    bool                     mbTimeout;
 };
 
 #define IMPL_IDLETIMEOUT         350
@@ -52,7 +52,7 @@ ImplIdleMgr::~ImplIdleMgr()
     delete mpIdleList;
 }
 
-bool ImplIdleMgr::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority )
+bool ImplIdleMgr::InsertIdleHdl( const Link<Application*,void>& rLink, sal_uInt16 nPriority )
 {
     size_t nPos = (size_t)-1;
     size_t n = mpIdleList->size();
@@ -86,7 +86,7 @@ bool ImplIdleMgr::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority )
     return true;
 }
 
-void ImplIdleMgr::RemoveIdleHdl( const Link<>& rLink )
+void ImplIdleMgr::RemoveIdleHdl( const Link<Application*,void>& rLink )
 {
     if (mbInDestruction)
         return;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0295b91..350e829 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -930,7 +930,7 @@ void Application::RemoveUserEvent( ImplSVEvent * nUserEvent )
     }
 }
 
-bool Application::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPrio )
+bool Application::InsertIdleHdl( const Link<Application*,void>& rLink, sal_uInt16 nPrio )
 {
     ImplSVData* pSVData = ImplGetSVData();
 
@@ -941,7 +941,7 @@ bool Application::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPrio )
     return pSVData->maAppData.mpIdleMgr->InsertIdleHdl( rLink, nPrio );
 }
 
-void Application::RemoveIdleHdl( const Link<>& rLink )
+void Application::RemoveIdleHdl( const Link<Application*,void>& rLink )
 {
     ImplSVData* pSVData = ImplGetSVData();
 
commit 3368bca3c29592af8190cfd8829d76ed768651b7
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 14:24:40 2015 +0200

    convert Link<> to typed
    
    Change-Id: I38996f9ab99efd10dcfabd532cabfbb7691ef357

diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 6950867..3a102be 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2929,7 +2929,7 @@ IMPL_LINK_NOARG(SfxHelpWindow_Impl, OpenHdl)
 
 
 
-IMPL_LINK( SfxHelpWindow_Impl, SelectFactoryHdl, SfxHelpIndexWindow_Impl* , pWin )
+IMPL_LINK_TYPED( SfxHelpWindow_Impl, SelectFactoryHdl, SfxHelpIndexWindow_Impl* , pWin, void )
 {
     if ( sTitle.isEmpty() )
         sTitle = GetParent()->GetText();
@@ -2943,8 +2943,6 @@ IMPL_LINK( SfxHelpWindow_Impl, SelectFactoryHdl, SfxHelpIndexWindow_Impl* , pWin
     if ( pWin )
         ShowStartPage();
     pIndexWin->ClearSearchPage();
-
-    return 0;
 }
 
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 61e143a..175b6f5f3b 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -287,9 +287,9 @@ private:
 
     Idle                aIdle;
 
-    Link<>              aSelectFactoryLink;
+    Link<SfxHelpIndexWindow_Impl*,void> aSelectFactoryLink;
     Link<>              aPageDoubleClickLink;
-    Link<IndexTabPage_Impl&,void>  aIndexKeywordLink;
+    Link<IndexTabPage_Impl&,void>       aIndexKeywordLink;
     OUString            sKeyword;
 
     VclPtr<SfxHelpWindow_Impl>     pParentWin;
@@ -330,7 +330,7 @@ public:
     virtual void        DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
 
     void                SetDoubleClickHdl( const Link<>& rLink );
-    inline void         SetSelectFactoryHdl( const Link<>& rLink ) { aSelectFactoryLink = rLink; }
+    inline void         SetSelectFactoryHdl( const Link<SfxHelpIndexWindow_Impl*,void>& rLink ) { aSelectFactoryLink = rLink; }
     void                SetFactory( const OUString& rFactory, bool bActive );
     inline OUString     GetFactory() const { return pIPage->GetFactory(); }
     OUString            GetSelectEntry() const;
@@ -523,7 +523,7 @@ friend class SfxHelpIndexWindow_Impl;
 
     DECL_LINK_TYPED(    SelectHdl, ToolBox*, void );
     DECL_LINK(OpenHdl, void *);
-    DECL_LINK(          SelectFactoryHdl, SfxHelpIndexWindow_Impl* );
+    DECL_LINK_TYPED(    SelectFactoryHdl, SfxHelpIndexWindow_Impl*, void );
     DECL_LINK_TYPED(    ChangeHdl, HelpListener_Impl&, void );
 
 public:
commit 7edf29b33f39a067f77a0ef19b5786dc2fa10b9e
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 14:16:26 2015 +0200

    convert Link<> to typed
    
    Change-Id: I1cd4adb0b9ae24298a3978fdbfa0091e76f65044

diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 4da5f15..6950867 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1045,7 +1045,7 @@ IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, ClickHdl, Button*, void)
     SearchHdl(NULL);
 }
 
-IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
+IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, SearchHdl, LinkParamNone*, void)
 {
     OUString aSearchText = comphelper::string::strip(m_pSearchED->GetText(), ' ');
     if ( !aSearchText.isEmpty() )
@@ -1081,7 +1081,6 @@ IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
             aBox->Execute();
         }
     }
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, OpenHdl, Button*, void)
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 9ac7c85..61e143a 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -170,7 +170,7 @@ public:
 class SearchBox_Impl : public ComboBox
 {
 private:
-    Link<>              aSearchLink;
+    Link<LinkParamNone*,void>  aSearchLink;
 
 public:
     SearchBox_Impl(vcl::Window* pParent, WinBits nStyle)
@@ -182,7 +182,7 @@ public:
     virtual bool        PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     virtual void        Select() SAL_OVERRIDE;
 
-    inline void         SetSearchLink( const Link<>& rLink ) { aSearchLink = rLink; }
+    inline void         SetSearchLink( const Link<LinkParamNone*,void>& rLink ) { aSearchLink = rLink; }
 };
 
 class SearchResultsBox_Impl : public ListBox
@@ -214,7 +214,7 @@ private:
     void                ClearSearchResults();
     void                RememberSearchText( const OUString& rSearchText );
 
-    DECL_LINK(SearchHdl, void *);
+    DECL_LINK_TYPED(SearchHdl, LinkParamNone*, void);
     DECL_LINK_TYPED(ClickHdl, Button*, void);
     DECL_LINK_TYPED(OpenHdl, Button*, void);
     DECL_LINK(ModifyHdl, void *);
commit a72445099566348a56410a0df7b04af35ab684b5
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 14:14:50 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ied94f9defc1650822b8d09713e3d2f6fa2b8611d

diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 934b90e..4da5f15 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -719,7 +719,7 @@ void IndexTabPage_Impl::InitializeIndex()
     m_pIndexCB->SetUpdateMode( true );
 
     if ( !sKeyword.isEmpty() )
-        aKeywordLink.Call( this );
+        aKeywordLink.Call( *this );
 }
 
 #undef INSERT_DATA
@@ -749,7 +749,7 @@ IMPL_LINK_TYPED( IndexTabPage_Impl, IdleHdl, Idle*, pIdle, void )
 IMPL_LINK_TYPED( IndexTabPage_Impl, TimeoutHdl, Timer*, pTimer, void)
 {
     if(&aKeywordTimer == pTimer && !sKeyword.isEmpty())
-        aKeywordLink.Call(this);
+        aKeywordLink.Call(*this);
 }
 
 void IndexTabPage_Impl::ActivatePage()
@@ -1616,7 +1616,7 @@ IMPL_LINK_NOARG_TYPED(SfxHelpIndexWindow_Impl, SelectFactoryHdl, Idle *, void)
     }
 }
 
-IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, KeywordHdl)
+IMPL_LINK_NOARG_TYPED(SfxHelpIndexWindow_Impl, KeywordHdl, IndexTabPage_Impl&, void)
 {
     // keyword found on index?
     bool bIndex = pIPage->HasKeyword();
@@ -1636,8 +1636,6 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, KeywordHdl)
         pIPage->OpenKeyword();
     else if ( !pSPage->OpenKeyword( sKeyword ) )
         pParentWin->ShowStartPage();
-
-    return 0;
 }
 
 void SfxHelpIndexWindow_Impl::Resize()
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index ce422d8..9ac7c85 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -127,7 +127,7 @@ private:
 
     Idle                aFactoryIdle;
     Timer               aKeywordTimer;
-    Link<>              aKeywordLink;
+    Link<IndexTabPage_Impl&,void> aKeywordLink;
 
     OUString            sFactory;
     OUString            sKeyword;
@@ -154,12 +154,12 @@ public:
     inline OUString     GetFactory() const { return sFactory; }
     OUString            GetSelectEntry() const;
     inline void         SetFocusOnBox() { m_pIndexCB->GrabFocus(); }
-    inline bool     HasFocusOnEdit() const { return m_pIndexCB->HasChildPathFocus(); }
+    inline bool         HasFocusOnEdit() const { return m_pIndexCB->HasChildPathFocus(); }
 
-    inline void         SetKeywordHdl( const Link<>& rLink ) { aKeywordLink = rLink; }
+    inline void         SetKeywordHdl( const Link<IndexTabPage_Impl&,void>& rLink ) { aKeywordLink = rLink; }
     void                SetKeyword( const OUString& rKeyword );
-    bool            HasKeyword() const;
-    bool            HasKeywordIgnoreCase();
+    bool                HasKeyword() const;
+    bool                HasKeywordIgnoreCase();
     void                OpenKeyword();
 
     inline void         SelectExecutableEntry() { m_pIndexCB->SelectExecutableEntry(); }
@@ -289,7 +289,7 @@ private:
 
     Link<>              aSelectFactoryLink;
     Link<>              aPageDoubleClickLink;
-    Link<>              aIndexKeywordLink;
+    Link<IndexTabPage_Impl&,void>  aIndexKeywordLink;
     OUString            sKeyword;
 
     VclPtr<SfxHelpWindow_Impl>     pParentWin;
@@ -316,7 +316,7 @@ private:
     DECL_LINK(SelectHdl, void *);
     DECL_LINK_TYPED(InitHdl, Idle *, void);
     DECL_LINK_TYPED(SelectFactoryHdl, Idle *, void);
-    DECL_LINK(KeywordHdl, void *);
+    DECL_LINK_TYPED(KeywordHdl, IndexTabPage_Impl&, void);
     DECL_LINK_TYPED(ContentTabPageDoubleClickHdl, SvTreeListBox*, bool);
 
 public:
commit 11c4f58fb12810740cdd8409e4991a92efde6c97
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 14:10:46 2015 +0200

    convert Link<> to typed
    
    Change-Id: I2573b42143078c4e72ab201392c69ee296f4974e

diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 1f02356..8fd24a1 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -519,12 +519,12 @@ IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, UpdateWaitingHdl, Idle*, void )
     m_pTbLinks->SetUpdateMode(true);
 }
 
-IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
+IMPL_LINK_TYPED( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink&, _rLink, void )
 {
     sal_uLong nPos;
     GetSelEntry( &nPos );
 
-    if( _pLink && _pLink->WasLastEditOK() )
+    if( _rLink.WasLastEditOK() )
     {
         // StarImpress/Draw swap the LinkObjects themselves!
         // So search for the link in the manager; if it does not exist
@@ -532,7 +532,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
         // edited link needs to be refreshed.
         bool bLinkFnd = false;
         for( size_t n = pLinkMgr->GetLinks().size(); n;  )
-            if( _pLink == &(*pLinkMgr->GetLinks()[ --n ]) )
+            if( &_rLink == &(*pLinkMgr->GetLinks()[ --n ]) )
             {
                 bLinkFnd = true;
                 break;
@@ -543,7 +543,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
             m_pTbLinks->SetUpdateMode(false);
             m_pTbLinks->GetModel()->Remove( m_pTbLinks->GetEntry( nPos ) );
             SvTreeListEntry* pToUnselect = m_pTbLinks->FirstSelected();
-            InsertEntry( *_pLink, nPos, true );
+            InsertEntry( _rLink, nPos, true );
             if(pToUnselect)
                 m_pTbLinks->Select(pToUnselect, false);
             m_pTbLinks->SetUpdateMode(true);
@@ -557,7 +557,6 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
         if (pLinkMgr && pLinkMgr->GetPersist())
             pLinkMgr->GetPersist()->SetModified();
     }
-    return 0;
 }
 
 OUString SvBaseLinksDlg::ImplGetStateStr( const SvBaseLink& rLnk )
diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx
index 22f9a0d..429cef0 100644
--- a/cui/source/inc/linkdlg.hxx
+++ b/cui/source/inc/linkdlg.hxx
@@ -72,7 +72,7 @@ class SvBaseLinksDlg : public ModalDialog
     DECL_LINK_TYPED( ChangeSourceClickHdl, Button *, void );
     DECL_LINK_TYPED( BreakLinkClickHdl, Button *, void );
     DECL_LINK_TYPED( UpdateWaitingHdl, Idle *, void );
-    DECL_LINK( EndEditHdl, sfx2::SvBaseLink* );
+    DECL_LINK_TYPED( EndEditHdl, sfx2::SvBaseLink&, void );
     sfx2::SvBaseLink* GetSelEntry( sal_uLong* pPos );
     OUString ImplGetStateStr( const sfx2::SvBaseLink& );
     void SetType( sfx2::SvBaseLink& rLink, sal_uLong nPos, SfxLinkUpdateMode nType );
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 164b26d..cb7e4a6 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -146,7 +146,7 @@ public:
     void            Disconnect();
 
     // Link impl: DECL_LINK( MyEndDialogHdl, SvBaseLink* ); <= param is this
-    virtual void    Edit( vcl::Window*, const Link<>& rEndEditHdl );
+    virtual void    Edit( vcl::Window*, const Link<SvBaseLink&,void>& rEndEditHdl );
 
     // should the link appear in the dialog? (to the left in the link in the...)
     bool            IsVisible() const           { return bVisible; }
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx
index f55dc97..97b2388 100644
--- a/sc/inc/arealink.hxx
+++ b/sc/inc/arealink.hxx
@@ -54,7 +54,7 @@ public:
     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
         const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) SAL_OVERRIDE;
 
-    virtual void    Edit( vcl::Window*, const Link<>& rEndEditHdl ) SAL_OVERRIDE;
+    virtual void    Edit( vcl::Window*, const Link<SvBaseLink&,void>& rEndEditHdl ) SAL_OVERRIDE;
 
     bool    Refresh( const OUString& rNewFile, const OUString& rNewFilter,
                     const OUString& rNewArea, sal_uLong nNewRefresh );
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index c99bacc..be51351 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -70,7 +70,7 @@ public:
     virtual void Closed() SAL_OVERRIDE;
     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
         const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue) SAL_OVERRIDE;
-    virtual void Edit(vcl::Window* pParent, const Link<>& rEndEditHdl) SAL_OVERRIDE;
+    virtual void Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl) SAL_OVERRIDE;
 
     void SetDoReferesh(bool b);
 
diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx
index 6d096ce..eebc502 100644
--- a/sc/inc/tablink.hxx
+++ b/sc/inc/tablink.hxx
@@ -52,7 +52,7 @@ public:
     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
         const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) SAL_OVERRIDE;
 
-    virtual void    Edit( vcl::Window*, const Link<>& rEndEditHdl ) SAL_OVERRIDE;
+    virtual void    Edit( vcl::Window*, const Link<SvBaseLink&,void>& rEndEditHdl ) SAL_OVERRIDE;
 
     bool    Refresh(const OUString& rNewFile, const OUString& rNewFilter,
                     const OUString* pNewOptions /* = NULL */, sal_uLong nNewRefresh );
@@ -66,7 +66,7 @@ public:
     bool    IsUsed() const;
 
     DECL_LINK_TYPED( RefreshHdl, Timer*, void );
-    DECL_LINK( TableEndEditHdl, ::sfx2::SvBaseLink* );
+    DECL_LINK_TYPED( TableEndEditHdl, ::sfx2::SvBaseLink&, void );
 };
 
 class ScDocument;
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index b4c33ef..c982dcb 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -84,7 +84,7 @@ ScAreaLink::~ScAreaLink()
     delete pImpl;
 }
 
-void ScAreaLink::Edit(vcl::Window* pParent, const Link<>& /* rEndEditHdl */ )
+void ScAreaLink::Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& /* rEndEditHdl */ )
 {
     //  use own dialog instead of SvBaseLink::Edit...
     //  DefModalDialogParent setzen, weil evtl. aus der DocShell beim ConvertFrom
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 870947c..96d1743 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1327,9 +1327,9 @@ void ScExternalRefLink::Closed()
     return SUCCESS;
 }
 
-void ScExternalRefLink::Edit(vcl::Window* pParent, const Link<>& /*rEndEditHdl*/)
+void ScExternalRefLink::Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& /*rEndEditHdl*/)
 {
-    SvBaseLink::Edit(pParent, Link<>());
+    SvBaseLink::Edit(pParent, Link<SvBaseLink&,void>());
 }
 
 void ScExternalRefLink::SetDoReferesh(bool b)
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 3239b5a..a391691 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -47,9 +47,9 @@
 
 struct TableLink_Impl
 {
-    ScDocShell*          m_pDocSh;
-    VclPtr<vcl::Window>  m_pOldParent;
-    Link<>               m_aEndEditLink;
+    ScDocShell*            m_pDocSh;
+    VclPtr<vcl::Window>    m_pOldParent;
+    Link<sfx2::SvBaseLink&,void> m_aEndEditLink;
 
     TableLink_Impl() : m_pDocSh( NULL ), m_pOldParent( NULL ) {}
 };
@@ -105,7 +105,7 @@ ScTableLink::~ScTableLink()
     delete pImpl;
 }
 
-void ScTableLink::Edit( vcl::Window* pParent, const Link<>& rEndEditHdl )
+void ScTableLink::Edit( vcl::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl )
 {
     //  DefModalDialogParent setzen, weil evtl. aus der DocShell beim ConvertFrom
     //  ein Optionen-Dialog kommt...
@@ -418,13 +418,12 @@ IMPL_LINK_NOARG_TYPED(ScTableLink, RefreshHdl, Timer *, void)
     Refresh( aFileName, aFilterName, NULL, GetRefreshDelay() );
 }
 
-IMPL_LINK( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink*, pLink )
+IMPL_LINK_TYPED( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink&, rLink, void )
 {
     if ( pImpl->m_aEndEditLink.IsSet() )
-        pImpl->m_aEndEditLink.Call( pLink );
+        pImpl->m_aEndEditLink.Call( rLink );
     bInEdit = false;
     Application::SetDefDialogParent( pImpl->m_pOldParent );
-    return 0;
 }
 
 // === ScDocumentLoader ==================================================
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index a899d9e..6027539 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -44,7 +44,7 @@ class  ImplDdeItem;
 
 struct BaseLink_Impl
 {
-    Link<>              m_aEndEditLink;
+    Link<SvBaseLink&,void> m_aEndEditLink;
     LinkManager*        m_pLinkMgr;
     VclPtr<vcl::Window> m_pParentWin;
     FileDialogHelper*   m_pFileDlg;
@@ -254,7 +254,7 @@ IMPL_LINK_TYPED( SvBaseLink, EndEditHdl, const OUString&, _rNewName, void )
         sNewName.clear();
     bWasLastEditOK = !sNewName.isEmpty();
     if ( pImpl->m_aEndEditLink.IsSet() )
-        pImpl->m_aEndEditLink.Call( this );
+        pImpl->m_aEndEditLink.Call( *this );
 }
 
 
@@ -472,7 +472,7 @@ SvBaseLink::UpdateResult SvBaseLink::DataChanged( const OUString &, const ::com:
     return SUCCESS;
 }
 
-void SvBaseLink::Edit( vcl::Window* pParent, const Link<>& rEndEditHdl )
+void SvBaseLink::Edit( vcl::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl )
 {
     pImpl->m_pParentWin = pParent;
     pImpl->m_aEndEditLink = rEndEditHdl;
@@ -506,7 +506,7 @@ void SvBaseLink::Edit( vcl::Window* pParent, const Link<>& rEndEditHdl )
         ExecuteEdit( OUString() );
         bWasLastEditOK = false;
         if ( pImpl->m_aEndEditLink.IsSet() )
-            pImpl->m_aEndEditLink.Call( this );
+            pImpl->m_aEndEditLink.Call( *this );
     }
 }
 
commit 34c55149476dbdc369382098eab92874b296310e
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 13:51:46 2015 +0200

    convert Link<> to typed
    
    Change-Id: I1956a7b3cf1d6f3757e6586b793d4355e0697ca9

diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index c522046..7a44fc1 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -292,21 +292,17 @@ HelpListener_Impl::HelpListener_Impl( HelpInterceptor_Impl* pInter )
 
 
 void SAL_CALL HelpListener_Impl::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event )
-
     throw( ::com::sun::star::uno::RuntimeException, std::exception )
-
 {
     INetURLObject aObj( Event.FeatureURL.Complete );
     aFactory = aObj.GetHost();
-    aChangeLink.Call( this );
+    aChangeLink.Call( *this );
 }
 
 
 
 void SAL_CALL HelpListener_Impl::disposing( const ::com::sun::star::lang::EventObject& )
-
     throw( ::com::sun::star::uno::RuntimeException, std::exception )
-
 {
     pInterceptor->removeStatusListener( this, ::com::sun::star::util::URL() );
     pInterceptor = NULL;
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index 47d9c74..8a03f37 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -119,7 +119,7 @@ class HelpListener_Impl : public ::cppu::WeakImplHelper< ::com::sun::star::frame
 {
 private:
     HelpInterceptor_Impl*   pInterceptor;
-    Link<>                  aChangeLink;
+    Link<HelpListener_Impl&,void> aChangeLink;
     OUString                aFactory;
 
 public:
@@ -130,7 +130,7 @@ public:
     virtual void SAL_CALL   disposing( const ::com::sun::star::lang::EventObject& obj )
                                 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
 
-    void                    SetChangeHdl( const Link<>& rLink ) { aChangeLink = rLink; }
+    void                    SetChangeHdl( const Link<HelpListener_Impl&,void>& rLink ) { aChangeLink = rLink; }
     OUString                GetFactory() const { return aFactory; }
 };
 // HelpStatusListener_Impl -----------------------------------------------------
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 35a081b..934b90e 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2952,10 +2952,9 @@ IMPL_LINK( SfxHelpWindow_Impl, SelectFactoryHdl, SfxHelpIndexWindow_Impl* , pWin
 
 
 
-IMPL_LINK( SfxHelpWindow_Impl, ChangeHdl, HelpListener_Impl*, pListener )
+IMPL_LINK_TYPED( SfxHelpWindow_Impl, ChangeHdl, HelpListener_Impl&, rListener, void )
 {
-    SetFactory( pListener->GetFactory() );
-    return 0;
+    SetFactory( rListener.GetFactory() );
 }
 
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 33fec1f..ce422d8 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -524,7 +524,7 @@ friend class SfxHelpIndexWindow_Impl;
     DECL_LINK_TYPED(    SelectHdl, ToolBox*, void );
     DECL_LINK(OpenHdl, void *);
     DECL_LINK(          SelectFactoryHdl, SfxHelpIndexWindow_Impl* );
-    DECL_LINK(          ChangeHdl, HelpListener_Impl* );
+    DECL_LINK_TYPED(    ChangeHdl, HelpListener_Impl&, void );
 
 public:
     SfxHelpWindow_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >& rFrame,
commit 50ca487b2f4d7377b3357299025e8c50058ef596
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 13:49:49 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ic978fd8f03705c341ecb44685d840a6a240fee2d

diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx
index 0a2fbc1..c288e98 100644
--- a/include/sfx2/linksrc.hxx
+++ b/include/sfx2/linksrc.hxx
@@ -85,7 +85,7 @@ public:
     virtual bool        IsDataComplete() const;
 
     // Link impl: DECL_LINK( MyEndEditHdl, sfx2::FileDialogHelper* ); <= param is the dialog
-    virtual void        Edit( vcl::Window *, SvBaseLink *, const Link<>& rEndEditHdl );
+    virtual void        Edit( vcl::Window *, SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl );
 
 
     void                AddDataAdvise( SvBaseLink *, const rtl::OUString & rMimeType,
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 4ee235b..164b26d 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -78,7 +78,7 @@ private:
     bool                    bUseCache : 1;  // for Graphics Links!
     bool                    bWasLastEditOK : 1;
 
-    DECL_LINK( EndEditHdl, OUString* );
+    DECL_LINK_TYPED( EndEditHdl, const OUString&, void );
 
     bool                    ExecuteEdit( const OUString& _rNewName );
 
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index b8c28b8..cb87302 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -392,7 +392,7 @@ OUString impl_getFilter( const OUString& _rURL )
     return sFilter;
 }
 
-void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Link<>& rEndEditHdl )
+void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Link<const OUString&, void>& rEndEditHdl )
 {
     aEndEditLink = rEndEditHdl;
     OUString sFile, sRange, sTmpFilter;
@@ -419,7 +419,7 @@ void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Li
                     sFile += aDlg.GetCurrentFilter();
 
                     if ( aEndEditLink.IsSet() )
-                        aEndEditLink.Call( &sFile );
+                        aEndEditLink.Call( sFile );
                 }
                 else
                     sFile.clear();
@@ -526,7 +526,7 @@ IMPL_LINK_TYPED( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileD
     }
 
     if ( aEndEditLink.IsSet() )
-        aEndEditLink.Call( &sFile );
+        aEndEditLink.Call( sFile );
 }
 
 /*  [Description]
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index c90da04..02a8c3e 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -31,7 +31,7 @@ class SvFileObject : public sfx2::SvLinkSource
     OUString            sFileNm;
     OUString            sFilter;
     OUString            sReferer;
-    Link<>              aEndEditLink;
+    Link<const OUString&, void>  aEndEditLink;
     SfxMediumRef        xMed;
     ImplSVEvent*        nPostUserEventId;
     SfxMediumRef*       pDelMed;
@@ -69,7 +69,7 @@ public:
                             bool bSynchron = false ) SAL_OVERRIDE;
 
     virtual bool Connect( sfx2::SvBaseLink* ) SAL_OVERRIDE;
-    virtual void Edit( vcl::Window *, sfx2::SvBaseLink *, const Link<>& rEndEditHdl ) SAL_OVERRIDE;
+    virtual void Edit( vcl::Window *, sfx2::SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl ) SAL_OVERRIDE;
 
     // Ask whether you can access data directly or whether it has to be triggered
     virtual bool IsPending() const SAL_OVERRIDE;
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index d0a270c..920ebe0 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -266,13 +266,13 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink )
     return true;
 }
 
-void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<>& rEndEditHdl )
+void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<const OUString&, void>& rEndEditHdl )
 {
     ScopedVclPtrInstance< SvDDELinkEditDialog > aDlg(pParent, pBaseLink);
     if ( RET_OK == aDlg->Execute() && rEndEditHdl.IsSet() )
     {
         OUString sCommand = aDlg->GetCmd();
-        rEndEditHdl.Call( &sCommand );
+        rEndEditHdl.Call( sCommand );
     }
 }
 
diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx
index 0185c0a..d4db1e1 100644
--- a/sfx2/source/appl/impldde.hxx
+++ b/sfx2/source/appl/impldde.hxx
@@ -59,7 +59,7 @@ public:
                                 bool bSynchron = false ) SAL_OVERRIDE;
 
     virtual bool    Connect( SvBaseLink * ) SAL_OVERRIDE;
-    virtual void    Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<>& rEndEditHdl ) SAL_OVERRIDE;
+    virtual void    Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<const OUString&, void>& rEndEditHdl ) SAL_OVERRIDE;
 
     virtual bool    IsPending() const SAL_OVERRIDE;
     virtual bool    IsDataComplete() const SAL_OVERRIDE;
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index 1ce7a44..f0c9ff4 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -435,7 +435,7 @@ bool SvLinkSource::GetData( ::com::sun::star::uno::Any &, const OUString &, bool
     return false;
 }
 
-void SvLinkSource::Edit( vcl::Window *, SvBaseLink *, const Link<>& )
+void SvLinkSource::Edit( vcl::Window *, SvBaseLink *, const Link<const OUString&, void>& )
 {
 }
 
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 87ace2f..a899d9e 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -247,17 +247,14 @@ SvBaseLink::~SvBaseLink()
     delete pImpl;
 }
 
-IMPL_LINK( SvBaseLink, EndEditHdl, OUString*, _pNewName )
+IMPL_LINK_TYPED( SvBaseLink, EndEditHdl, const OUString&, _rNewName, void )
 {
-    OUString sNewName;
-    if ( _pNewName )
-        sNewName = *_pNewName;
+    OUString sNewName = _rNewName;
     if ( !ExecuteEdit( sNewName ) )
         sNewName.clear();
     bWasLastEditOK = !sNewName.isEmpty();
     if ( pImpl->m_aEndEditLink.IsSet() )
         pImpl->m_aEndEditLink.Call( this );
-    return 0;
 }
 
 
@@ -484,7 +481,7 @@ void SvBaseLink::Edit( vcl::Window* pParent, const Link<>& rEndEditHdl )
         _GetRealObject( xObj.Is() );
 
     bool bAsync = false;
-    Link<> aLink = LINK( this, SvBaseLink, EndEditHdl );
+    Link<const OUString&, void> aLink = LINK( this, SvBaseLink, EndEditHdl );
 
     if( OBJECT_CLIENT_SO & nObjType && pImplData->ClientType.bIntrnlLnk )
     {
commit 87004ba29ac513d92da1608679cb065404f51215
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 13:18:30 2015 +0200

    convert Link<> to typed
    
    Change-Id: Ie9b937c100b44dd914b55d75530e6b6a5fbe2969

diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index 444a8b74..34ac2ab 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -44,7 +44,7 @@ private:
     VclPtr<PushButton>         m_pFindBtn;
 
     Link<SearchDialog&,void>   m_aFindHdl;
-    Link<>              m_aCloseHdl;
+    Link<SearchDialog*,void>   m_aCloseHdl;
 
     OUString            m_sConfigName;
     OString             m_sWinState;
@@ -62,7 +62,7 @@ public:
     virtual void dispose() SAL_OVERRIDE;
 
     void         SetFindHdl( const Link<SearchDialog&,void>& rLink ) { m_aFindHdl = rLink; }
-    void         SetCloseHdl( const Link<>& rLink ) { m_aCloseHdl = rLink; }
+    void         SetCloseHdl( const Link<SearchDialog*,void>& rLink ) { m_aCloseHdl = rLink; }
 
     OUString     GetSearchText() const { return m_pSearchEdit->GetText(); }
     void         SetSearchText( const OUString& _rText ) { m_pSearchEdit->SetText( _rText ); }
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 8ef07fa..35a081b 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2342,10 +2342,9 @@ void SfxHelpTextWindow_Impl::FindHdl(sfx2::SearchDialog* pDlg)
 
 
 
-IMPL_LINK( SfxHelpTextWindow_Impl, CloseHdl, sfx2::SearchDialog*, /*pDlg*/ )
+IMPL_LINK_NOARG_TYPED( SfxHelpTextWindow_Impl, CloseHdl, sfx2::SearchDialog*, void )
 {
     pSrchDlg.clear();
-    return 0;
 }
 
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 2738a91..33fec1f 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -454,7 +454,7 @@ private:
     DECL_LINK_TYPED(        SelectHdl, Idle *, void);
     DECL_LINK_TYPED(        NotifyHdl, LinkParamNone*, void );
     DECL_LINK_TYPED(        FindHdl, sfx2::SearchDialog&, void );
-    DECL_LINK(              CloseHdl, sfx2::SearchDialog* );
+    DECL_LINK_TYPED(        CloseHdl, sfx2::SearchDialog*, void );
     DECL_LINK_TYPED(        CheckHdl, Button*, void );
     void                    FindHdl(sfx2::SearchDialog*);
 
commit 1323f9ff9b2bbe07ce107e0c7c2559274d56e020
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 13:16:58 2015 +0200

    convert Link<> to typed
    
    Change-Id: I39b8eac11eb59594c7fbca8c5fd3b1383167f577

diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index fd35c93..444a8b74 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -43,7 +43,7 @@ private:
     VclPtr<CheckBox>           m_pBackwardsBox;
     VclPtr<PushButton>         m_pFindBtn;
 
-    Link<>              m_aFindHdl;
+    Link<SearchDialog&,void>   m_aFindHdl;
     Link<>              m_aCloseHdl;
 
     OUString            m_sConfigName;
@@ -61,7 +61,7 @@ public:
     virtual ~SearchDialog();
     virtual void dispose() SAL_OVERRIDE;
 
-    void         SetFindHdl( const Link<>& rLink ) { m_aFindHdl = rLink; }
+    void         SetFindHdl( const Link<SearchDialog&,void>& rLink ) { m_aFindHdl = rLink; }
     void         SetCloseHdl( const Link<>& rLink ) { m_aCloseHdl = rLink; }
 
     OUString     GetSearchText() const { return m_pSearchEdit->GetText(); }
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 9e60bd7..8ef07fa 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2256,7 +2256,11 @@ IMPL_LINK_NOARG_TYPED( SfxHelpTextWindow_Impl, NotifyHdl, LinkParamNone*, void )
 
 
 
-IMPL_LINK( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog*, pDlg )
+IMPL_LINK_TYPED( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog&, rDlg, void )
+{
+    FindHdl(&rDlg);
+}
+void SfxHelpTextWindow_Impl::FindHdl(sfx2::SearchDialog* pDlg)
 {
     bool bWrapAround = ( NULL == pDlg );
     if ( bWrapAround )
@@ -2334,8 +2338,6 @@ IMPL_LINK( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog*, pDlg )
     {
         OSL_FAIL( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" );
     }
-
-    return 0;
 }
 
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 89c7d55..2738a91 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -453,9 +453,10 @@ private:
 
     DECL_LINK_TYPED(        SelectHdl, Idle *, void);
     DECL_LINK_TYPED(        NotifyHdl, LinkParamNone*, void );
-    DECL_LINK(              FindHdl, sfx2::SearchDialog* );
+    DECL_LINK_TYPED(        FindHdl, sfx2::SearchDialog&, void );
     DECL_LINK(              CloseHdl, sfx2::SearchDialog* );
     DECL_LINK_TYPED(        CheckHdl, Button*, void );
+    void                    FindHdl(sfx2::SearchDialog*);
 
 public:
     SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent );
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 9f4d099..8a57056 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -140,7 +140,7 @@ IMPL_LINK_NOARG_TYPED(SearchDialog, FindHdl, Button*, void)
         m_pSearchEdit->RemoveEntryAt(nPos);
     if ( nPos > 0 )
         m_pSearchEdit->InsertEntry( sSrchTxt, 0 );
-    m_aFindHdl.Call( this );
+    m_aFindHdl.Call( *this );
 }
 
 void SearchDialog::SetFocusOnEdit()
commit 95be2bbe0fa82f4602fba2dedc73667d117bb5dc
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 13:08:53 2015 +0200

    remove unused Link<> fields
    
    Change-Id: I9898e04da6bebd1e08ab141e43439908fe1860b0

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index a482e9b0..b684ae9 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1220,18 +1220,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
             OSL_FAIL("SvtFileDialog, OpenHdl_Impl: invalid mode!");
     }
 
-    // notify interested parties
-    long nRet;
-
-    if ( _aOKHdl.IsSet() )
-        nRet = _aOKHdl.Call( this );
-    else
-        nRet = 1;
-
-    if ( nRet )
-    {
-        EndDialog( RET_OK );
-    }
+    EndDialog( RET_OK );
 }
 
 
@@ -1475,16 +1464,7 @@ void SvtFileDialog::OpenMultiSelection_Impl()
     if ( nCount && pEntry )
         _aPath = SvtFileView::GetURL( pEntry );
 
-    // notify interested parties
-    long nRet;
-
-    if ( _aOKHdl.IsSet() )
-        nRet = _aOKHdl.Call( this );
-    else
-        nRet = 1;
-
-    if ( nRet )
-        EndDialog( RET_OK );
+    EndDialog( RET_OK );
 }
 
 
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index f214c3d..93c4934 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -137,11 +137,6 @@ private:
 protected:
     virtual bool                Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
 
-    // originally from VclFileDialog
-    Link<>                      _aOKHdl;
-    Link<>                      _aFileSelectHdl;
-    Link<>                      _aFilterSelectHdl;
-
     OUString                    _aPath;
     OUString                    _aDefExt;
 
commit ffb4d56c20b6866e5d0a732ba74b5cd3aace0770
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 13:04:06 2015 +0200

    remove unused Link field
    
    Change-Id: If79a5031d60bd88fa8a3ad4d0ab1664c18f46a67

diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 289b935..6f643dc1 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -651,7 +651,7 @@ namespace svt { namespace table
 
     void TableControl::Select()
     {
-        ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, [this] () { m_pImpl->getSelectHandler().Call(this); } );
+        ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, nullptr );
 
         if ( m_pImpl->isAccessibleAlive() )
         {
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 6a4e122..b589a10 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -134,8 +134,6 @@ namespace svt { namespace table
         RowPos                  m_nAnchor;
         bool                    m_bUpdatingColWidths;
 
-        Link<>                  m_aSelectHdl;
-
         AccessibleFactoryAccess     m_aFactoryAccess;
         IAccessibleTableControl*    m_pAccessibleTable;
 
@@ -246,8 +244,6 @@ namespace svt { namespace table
         */
         bool        markAllRowsAsSelected();
 
-        Link<> const& getSelectHandler() const { return m_aSelectHdl; }
-
         void commitAccessibleEvent( sal_Int16 const i_eventID, const com::sun::star::uno::Any& i_newValue, const com::sun::star::uno::Any& i_oldValue );
         void commitCellEvent( sal_Int16 const i_eventID, const com::sun::star::uno::Any& i_newValue, const com::sun::star::uno::Any& i_oldValue );
         void commitTableEvent( sal_Int16 const i_eventID, const com::sun::star::uno::Any& i_newValue, const com::sun::star::uno::Any& i_oldValue );
commit 192bd9054a97de3aed0c8f8a385b1d4a865c36ba
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 13:02:10 2015 +0200

    convert Link<> to typed
    
    Change-Id: I55596ac8fd5cc0a052b821fca48523f9f5a5a294

diff --git a/svtools/inc/table/tablecontrol.hxx b/svtools/inc/table/tablecontrol.hxx
index 6fe21b3..004cd48 100644
--- a/svtools/inc/table/tablecontrol.hxx
+++ b/svtools/inc/table/tablecontrol.hxx
@@ -171,7 +171,7 @@ namespace svt { namespace table
 
 
     private:
-        DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* );
+        DECL_DLLPRIVATE_LINK_TYPED( ImplSelectHdl, LinkParamNone*, void );
 
     private:
         TableControl( const TableControl& ) SAL_DELETED_FUNCTION;
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 4a9632c..289b935 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -643,10 +643,9 @@ namespace svt { namespace table
     }
 
 
-    IMPL_LINK_NOARG(TableControl, ImplSelectHdl)
+    IMPL_LINK_NOARG_TYPED(TableControl, ImplSelectHdl, LinkParamNone*, void)
     {
         Select();
-        return 1;
     }
 
 
diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx
index f59e99f..784dce4 100644
--- a/svtools/source/table/tabledatawindow.hxx
+++ b/svtools/source/table/tabledatawindow.hxx
@@ -37,7 +37,7 @@ namespace svt { namespace table
         friend class TableFunctionSet;
     private:
         TableControl_Impl&  m_rTableControl;
-        Link<>              m_aSelectHdl;
+        Link<LinkParamNone*,void> m_aSelectHdl;
         sal_uLong           m_nTipWindowHandle;
 
     public:
@@ -45,7 +45,7 @@ namespace svt { namespace table
         virtual ~TableDataWindow();
         virtual void dispose() SAL_OVERRIDE;
 
-        inline void SetSelectHdl(const Link<>& rLink)
+        inline void SetSelectHdl(const Link<LinkParamNone*,void>& rLink)
         {
             m_aSelectHdl = rLink;
         }
commit c52baea785109ff546159128c7502533477c9331
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 12:18:40 2015 +0200

    clean up VclEventListeners and VclEventListeners2
    
    Move them inside the vcl module. there is no need to expose their
    implementation.
    Make the VclEventListeners2 implementation similar to the
    VclEventListeners implemenation - I can't see the benefit of this extra
    complication with invalidated iterators, given the very small number
    of listeners typically on such a list.
    
    Change-Id: I040ddd24b10d2109af13ee25b5181703af17a109

diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 089cd8b..4566082 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -404,7 +404,8 @@ public:
 
 namespace vcl { namespace MenuInvalidator {
 
-VCL_DLLPUBLIC VclEventListeners2* GetMenuInvalidateListeners();
+VCL_DLLPUBLIC void AddMenuInvalidateListener(const Link<>&);
+VCL_DLLPUBLIC void CallMenuInvalidateListeners(VclSimpleEvent* pEvent);
 VCL_DLLPUBLIC void Invalidated();
 
 }}
diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx
index f9e8b51..e564100 100644
--- a/include/vcl/vclevent.hxx
+++ b/include/vcl/vclevent.hxx
@@ -29,9 +29,6 @@
 
 #include <com/sun/star/uno/Reference.hxx>
 
-#include <list>
-#include <vector>
-
 class Menu;
 
 namespace com { namespace sun { namespace star {
@@ -252,44 +249,6 @@ private:
     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible;
 };
 
-class VCL_DLLPUBLIC VclEventListeners
-{
-public:
-    void Call( VclSimpleEvent* pEvent ) const;
-    void addListener( const Link<>& rListener );
-    void removeListener( const Link<>& rListener );
-private:
-    std::vector<Link<>> m_aListeners;
-};
-
-class VCL_DLLPUBLIC VclEventListeners2 : public vcl::DeletionNotifier
-{
-    std::list< Link<> >                             m_aListeners;
-
-    struct ListenerIt
-    {
-        std::list< Link<> >::iterator   m_aIt;
-        bool                            m_bWasInvalidated;
-
-        ListenerIt(const std::list<Link<>>::iterator& rIt)
-            : m_aIt(rIt)
-            , m_bWasInvalidated( false )
-        {}
-    };
-
-    std::vector< ListenerIt >      m_aIterators;
-
-
-public:
-    VclEventListeners2();
-    ~VclEventListeners2();
-
-    void addListener( const Link<>& );
-    void removeListener( const Link<>& );
-
-    void callListeners( VclSimpleEvent* );
-};
-
 #endif // INCLUDED_VCL_VCLEVENT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 0d8e02c..e7496aa 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -35,6 +35,7 @@
 #include "vcl/keycod.hxx"
 #include "vcl/svapp.hxx"
 #include "vcl/vclevent.hxx"
+#include "vcleventlisteners.hxx"
 
 #include "unotools/options.hxx"
 
diff --git a/vcl/inc/vcleventlisteners.hxx b/vcl/inc/vcleventlisteners.hxx
new file mode 100644
index 0000000..8e3b026
--- /dev/null
+++ b/vcl/inc/vcleventlisteners.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_VCLEVENTLISTENERS_HXX
+#define INCLUDED_VCL_INC_VCLEVENTLISTENERS_HXX
+
+#include <tools/link.hxx>
+#include <tools/rtti.hxx>
+#include <vcl/dllapi.h>
+#include <vcl/impdel.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/window.hxx>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <vector>
+
+class VCL_DLLPUBLIC VclEventListeners
+{
+public:
+    void Call( VclSimpleEvent* pEvent ) const;
+    void addListener( const Link<>& rListener );
+    void removeListener( const Link<>& rListener );
+private:
+    std::vector<Link<>> m_aListeners;
+};
+
+class VCL_DLLPUBLIC VclEventListeners2 : public vcl::DeletionNotifier
+{
+    std::vector<Link<>>   m_aListeners;
+public:
+    VclEventListeners2();
+    ~VclEventListeners2();
+
+    void addListener( const Link<>& );
+    void removeListener( const Link<>& );
+    void callListeners( VclSimpleEvent* );
+};
+
+#endif // INCLUDED_VCL_INC_VCLEVENTLISTENERS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 2e56cc7..4745bf6 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -37,6 +37,7 @@
 #include <vcl/vclevent.hxx>
 #include <vcl/vclptr.hxx>
 #include <vcl/rendersettings.hxx>
+#include "vcleventlisteners.hxx"
 #include <vector>
 
 struct SalPaintEvent;
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index fefa381..05c1000 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -27,6 +27,7 @@
 #include "vcl/salbtype.hxx"
 #include "svdata.hxx"
 #include "salgdi.hxx"
+#include "vcleventlisteners.hxx"
 
 #include "opengl/zone.hxx"
 #include "opengl/program.hxx"
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index bc3ca53..7cb291d 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -21,6 +21,7 @@
 #include "vcl/window.hxx"
 
 #include "svdata.hxx"
+#include "vcleventlisteners.hxx"
 
 #include <com/sun/star/accessibility/XAccessible.hpp>
 
@@ -94,47 +95,35 @@ VclEventListeners2::~VclEventListeners2()
 {
 }
 
-void VclEventListeners2::addListener( const Link<>& i_rLink )
+void VclEventListeners2::addListener( const Link<>& rListener )
 {
     // ensure uniqueness
-    for( std::list< Link<> >::const_iterator it = m_aListeners.begin(); it != m_aListeners.end(); ++it )
-    {
-        if( *it == i_rLink )
-            return;
-    }
-    m_aListeners.push_back( i_rLink );
+    if (std::find(m_aListeners.begin(), m_aListeners.end(), rListener) == m_aListeners.end())
+       m_aListeners.push_back( rListener );
 }
 
-void VclEventListeners2::removeListener( const Link<>& i_rLink )
+void VclEventListeners2::removeListener( const Link<>& rListener )
 {
-    size_t n = m_aIterators.size();
-    for( size_t i = 0; i < n; i++ )
-    {
-        if( m_aIterators[i].m_aIt != m_aListeners.end() && *m_aIterators[i].m_aIt == i_rLink )
-        {
-            m_aIterators[i].m_bWasInvalidated = true;
-            ++m_aIterators[i].m_aIt;
-        }
-    }
-    m_aListeners.remove( i_rLink );
+    m_aListeners.erase( std::remove(m_aListeners.begin(), m_aListeners.end(), rListener ), m_aListeners.end() );
 }
 
-void VclEventListeners2::callListeners( VclSimpleEvent* i_pEvent )
+void VclEventListeners2::callListeners( VclSimpleEvent* pEvent )
 {
     vcl::DeletionListener aDel( this );
 
-    m_aIterators.push_back(ListenerIt(m_aListeners.begin()));
-    size_t nIndex = m_aIterators.size() - 1;
-    while( ! aDel.isDeleted() && m_aIterators[ nIndex ].m_aIt != m_aListeners.end() )
+    // Copy the list, because this can be destroyed when calling a Link...
+    std::vector<Link<>> aCopy( m_aListeners );
+    std::vector<Link<>>::iterator aIter( aCopy.begin() );
+    std::vector<Link<>>::const_iterator aEnd( aCopy.end() );
+
+    while ( aIter != aEnd && ! aDel.isDeleted() )
     {
-        m_aIterators[ nIndex ].m_aIt->Call( i_pEvent );
-        if( m_aIterators[ nIndex ].m_bWasInvalidated )
-            // check if the current element was removed and the iterator increased in the meantime
-            m_aIterators[ nIndex ].m_bWasInvalidated = false;
-        else
-            ++m_aIterators[ nIndex ].m_aIt;
+        Link<> &rLink = *aIter;
+        // check this hasn't been removed in some re-enterancy scenario fdo#47368
+        if( std::find(m_aListeners.begin(), m_aListeners.end(), rLink) != m_aListeners.end() )
+            rLink.Call( pEvent );
+        ++aIter;
     }
-    m_aIterators.pop_back();
 }
 
 
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index e49ff60..e5acc2e 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3240,16 +3240,24 @@ ImplMenuDelData::~ImplMenuDelData()
 
 namespace vcl { namespace MenuInvalidator {
     static VclEventListeners2* pMenuInvalidateListeners = NULL;
-    VclEventListeners2* GetMenuInvalidateListeners()
+    void AddMenuInvalidateListener(const Link<>& rLink)
     {
         if(!pMenuInvalidateListeners)
             pMenuInvalidateListeners = new VclEventListeners2();
-        return pMenuInvalidateListeners;
+        pMenuInvalidateListeners->addListener(rLink);
+    }
+    void CallMenuInvalidateListeners(VclSimpleEvent* pEvent)
+    {
+        if(pMenuInvalidateListeners)
+            pMenuInvalidateListeners->callListeners(pEvent);
     }
     void Invalidated()
     {
-        VclSimpleEvent aEvent(0);
-        GetMenuInvalidateListeners()->callListeners(&aEvent);
+        if(pMenuInvalidateListeners)
+        {
+            VclSimpleEvent aEvent(0);
+            pMenuInvalidateListeners->callListeners(&aEvent);
+        }
     };
 } }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 0dce1c4..ba2c894 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -414,7 +414,7 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame )
 {
     SolarMutexGuard aGuard;
     {
-        vcl::MenuInvalidator::GetMenuInvalidateListeners()->addListener(*getRefreshLinkInstance());
+        vcl::MenuInvalidator::AddMenuInvalidateListener(*getRefreshLinkInstance());
     }
 
     assert(mbMenuBar);
commit 91d06b09ae019f09bca54718c1c24907762aa3ea
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 11:51:30 2015 +0200

    convert Link<> to typed
    
    Change-Id: I58b31530b4a29851abe9eccdf8f832b9d0348c2c

diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx
index 675b191..b58031d 100644
--- a/include/svtools/transfer.hxx
+++ b/include/svtools/transfer.hxx
@@ -515,7 +515,7 @@ public:
 
     using TransferableHelper::StartDrag;
     void                StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions,
-                                   const Link<>& rCallbck,
+                                   const Link<sal_Int8,void>& rCallbck,
                                    sal_Int32 nDragPointer = DND_POINTER_NONE,
                                    sal_Int32 nDragImage = DND_IMAGE_NONE );
 };
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 76113ad..b64b4ad 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -307,7 +307,7 @@ private:
     // called for a deleted object.
     SVT_DLLPRIVATE static void AddBoxToDDList_Impl( const SvTreeListBox& rB );
     SVT_DLLPRIVATE static void RemoveBoxFromDDList_Impl( const SvTreeListBox& rB );
-    DECL_DLLPRIVATE_LINK( DragFinishHdl_Impl, sal_Int8* );
+    DECL_DLLPRIVATE_LINK_TYPED( DragFinishHdl_Impl, sal_Int8, void );
 
 protected:
 
@@ -347,7 +347,7 @@ protected:
     // The Remove will be called from the handler, which then calls DragFinish.
     // The Remove is also called in the DTOR of the SvTreeListBox -
     // so it can't be called for a deleted object.
-    Link<> GetDragFinishedHdl() const;
+    Link<sal_Int8,void> GetDragFinishedHdl() const;
 
     // For asynchronous D'n'D
     sal_Int8        ExecuteDrop( const ExecuteDropEvent& rEvt, SvTreeListBox* pSourceView );
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index f86ff4a..66d3a49 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1364,20 +1364,19 @@ void SvTreeListBox::RemoveBoxFromDDList_Impl( const SvTreeListBox& rB )
     SortLBoxes::get().erase( nVal );
 }
 
-IMPL_LINK( SvTreeListBox, DragFinishHdl_Impl, sal_Int8*, pAction )
+IMPL_LINK_TYPED( SvTreeListBox, DragFinishHdl_Impl, sal_Int8, nAction, void )
 {
     sal_uLong nVal = reinterpret_cast<sal_uLong>(this);
     std::set<sal_uLong> &rSortLBoxes = SortLBoxes::get();
     std::set<sal_uLong>::const_iterator it = rSortLBoxes.find(nVal);
     if( it != rSortLBoxes.end() )
     {
-        DragFinished( *pAction );
+        DragFinished( nAction );
         rSortLBoxes.erase( it );
     }
-    return 0;
 }
 
-Link<> SvTreeListBox::GetDragFinishedHdl() const
+Link<sal_Int8,void> SvTreeListBox::GetDragFinishedHdl() const
 {
     AddBoxToDDList_Impl( *this );
     return LINK( const_cast<SvTreeListBox*>(this), SvTreeListBox, DragFinishHdl_Impl );
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index b74bcd5..dc4122f 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -358,7 +358,7 @@ typedef ::std::list< TDataCntnrEntry_Impl > TDataCntnrEntryList;
 struct TransferDataContainer_Impl
 {
     TDataCntnrEntryList aFmtList;
-    Link<> aFinshedLnk;
+    Link<sal_Int8,void> aFinshedLnk;
     INetBookmark* pBookmk;
     Graphic* pGrf;
 
@@ -579,7 +579,7 @@ bool TransferDataContainer::HasAnyData() const
 
 void TransferDataContainer::StartDrag(
         vcl::Window* pWindow, sal_Int8 nDragSourceActions,
-        const Link<>& rLnk, sal_Int32 nDragPointer, sal_Int32 nDragImage )
+        const Link<sal_Int8,void>& rLnk, sal_Int32 nDragPointer, sal_Int32 nDragImage )
 {
     pImpl->aFinshedLnk = rLnk;
     TransferableHelper::StartDrag( pWindow, nDragSourceActions,
@@ -591,7 +591,7 @@ void TransferDataContainer::StartDrag(
 void TransferDataContainer::DragFinished( sal_Int8 nDropAction )
 {
     if( pImpl->aFinshedLnk.IsSet() )
-        pImpl->aFinshedLnk.Call( &nDropAction );
+        pImpl->aFinshedLnk.Call( nDropAction );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 0defde0..290aa7f 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -512,7 +512,7 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
 
         pContainer->CopyString( SotClipboardFormatId::STRING, sDBName );
         pContainer->StartDrag( this, DND_ACTION_COPY | DND_ACTION_LINK,
-                                Link<>() );
+                                Link<sal_Int8,void>() );
     }
 }
 
commit 44404a0c8ae8a7a12e7d9133323d0f7e32061c03
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 10:50:45 2015 +0200

    convert Link<> to typed
    
    Change-Id: If6334d32abbec379acbb9def98fdf6cb5144238b

diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 9847eac..b046ab6 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -144,7 +144,7 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper
 
 private:
                     DECL_LINK_TYPED(ClickHdl, MenuBar::MenuBarButtonCallbackArg&, bool);
-                    DECL_LINK( HighlightHdl, MenuBar::MenuBarButtonCallbackArg* );
+                    DECL_LINK_TYPED(HighlightHdl, MenuBar::MenuBarButtonCallbackArg&, bool);
                     DECL_LINK_TYPED(WaitTimeOutHdl, Idle *, void);
                     DECL_LINK_TYPED(TimeOutHdl, Timer *, void);
                     DECL_LINK_TYPED(UserEventHdl, void *, void);
@@ -601,14 +601,14 @@ IMPL_LINK_NOARG_TYPED(UpdateCheckUI, ClickHdl, MenuBar::MenuBarButtonCallbackArg
 }
 
 
-IMPL_LINK( UpdateCheckUI, HighlightHdl, MenuBar::MenuBarButtonCallbackArg*, pData )
+IMPL_LINK_TYPED( UpdateCheckUI, HighlightHdl, MenuBar::MenuBarButtonCallbackArg&, rData, bool )
 {
-    if ( pData->bHighlight )
+    if ( rData.bHighlight )
         maWaitIdle.Start();
     else
         RemoveBubbleWindow( false );
 
-    return 0;
+    return false;
 }
 
 
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 654880a..089cd8b 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -488,7 +488,7 @@ public:
     // set the highlight link for additional button with ID nId
     // highlight link will be called with a MenuBarButtonHighlightArg
     // the bHighlight member of that struct shall contain the new state
-    void SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<>& );
+    void SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& );
     // returns the rectangle occupied by the additional button named nId
     // coordinates are relative to the systemwindiow the menubar is attached to
     // if the menubar is unattached an empty rectangle is returned
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 574bdf7..e49ff60 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2737,7 +2737,7 @@ sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link<MenuBar:
     return pMenuWin ? pMenuWin->AddMenuBarButton(i_rImage, i_rLink, i_rToolTip) : 0;
 }
 
-void MenuBar::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<>& rLink )
+void MenuBar::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& rLink )
 {
     MenuBarWindow* pMenuWin = getMenuBarWindow();
     if (!pMenuWin)
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 7116eb1..5380b05 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -270,7 +270,7 @@ IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent*, pEvent )
     std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( aArg.nId );
     if( it != m_aAddButtons.end() )
     {
-        it->second.m_aHighlightLink.Call( &aArg );
+        it->second.m_aHighlightLink.Call( aArg );
     }
     return 0;
 }
@@ -1150,7 +1150,7 @@ sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link<Me
     return nId;
 }
 
-void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<>& rLink )
+void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& rLink )
 {
     std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( nId );
     if( it != m_aAddButtons.end() )
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index 34c3aa1..f460a77 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -69,7 +69,7 @@ private:
     {
         sal_uInt16    m_nId;
         Link<MenuBar::MenuBarButtonCallbackArg&,bool>  m_aSelectLink;
-        Link<>        m_aHighlightLink;
+        Link<MenuBar::MenuBarButtonCallbackArg&,bool>  m_aHighlightLink;
 
         AddButtonEntry() : m_nId( 0 ) {}
     };
@@ -143,7 +143,7 @@ public:
 
     /// Add an arbitrary button to the menubar that will appear next to the close button.
     sal_uInt16 AddMenuBarButton(const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString&);
-    void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<>&);
+    void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&);
     Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId);
     void RemoveMenuBarButton(sal_uInt16 nId);
     bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId);
commit c4fb1122b3b6c55d479c68c14101972254aa72a8
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Sep 15 10:47:17 2015 +0200

    convert Link<> to typed
    
    Change-Id: I628de57f87b4ba20a797d345bdf71cf10cf148fc

diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 5c83bd8..9847eac 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -143,7 +143,7 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper
     sal_uInt16              mnIconID;
 
 private:
-                    DECL_LINK(ClickHdl, void *);
+                    DECL_LINK_TYPED(ClickHdl, MenuBar::MenuBarButtonCallbackArg&, bool);
                     DECL_LINK( HighlightHdl, MenuBar::MenuBarButtonCallbackArg* );
                     DECL_LINK_TYPED(WaitTimeOutHdl, Idle *, void);
                     DECL_LINK_TYPED(TimeOutHdl, Timer *, void);
@@ -578,7 +578,7 @@ void UpdateCheckUI::RemoveBubbleWindow( bool bRemoveIcon )
 }
 
 
-IMPL_LINK_NOARG(UpdateCheckUI, ClickHdl)
+IMPL_LINK_NOARG_TYPED(UpdateCheckUI, ClickHdl, MenuBar::MenuBarButtonCallbackArg&, bool)
 {
     SolarMutexGuard aGuard;
 
@@ -597,7 +597,7 @@ IMPL_LINK_NOARG(UpdateCheckUI, ClickHdl)
         }
     }
 
-    return 0;
+    return false;
 }
 
 
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index b1c1b9b..654880a 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -484,7 +484,7 @@ public:
     // add an arbitrary button to the menubar (will appear next to closer)
     // passed link will be call with a MenuBarButtonCallbackArg on press
     // passed string will be set as tooltip
-    sal_uInt16 AddMenuBarButton( const Image&, const Link<>&, const OUString& );
+    sal_uInt16 AddMenuBarButton( const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString& );
     // set the highlight link for additional button with ID nId
     // highlight link will be called with a MenuBarButtonHighlightArg
     // the bHighlight member of that struct shall contain the new state
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index e627377..574bdf7 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2731,7 +2731,7 @@ bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId )
         return false;
 }
 
-sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link<>& i_rLink, const OUString& i_rToolTip )
+sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& i_rLink, const OUString& i_rToolTip )
 {
     MenuBarWindow* pMenuWin = getMenuBarWindow();
     return pMenuWin ? pMenuWin->AddMenuBarButton(i_rImage, i_rLink, i_rToolTip) : 0;
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 7728943..7116eb1 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -246,7 +246,7 @@ IMPL_LINK_NOARG_TYPED(MenuBarWindow, CloseHdl, ToolBox *, void)
             aArg.nId = it->first;
             aArg.bHighlight = (aCloseBtn->GetHighlightItemId() == it->first);
             aArg.pMenuBar = dynamic_cast<MenuBar*>(pMenu);
-            it->second.m_aSelectLink.Call( &aArg );
+            it->second.m_aSelectLink.Call( aArg );
         }
     }
 }
@@ -1125,7 +1125,7 @@ css::uno::Reference<css::accessibility::XAccessible> MenuBarWindow::CreateAccess
     return xAcc;
 }
 
-sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link<>& i_rLink, const OUString& i_rToolTip )
+sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& i_rLink, const OUString& i_rToolTip )
 {
     // find first free button id
     sal_uInt16 nId = IID_DOCUMENTCLOSE;
@@ -1203,7 +1203,7 @@ bool MenuBarWindow::HandleMenuButtonEvent( sal_uInt16 i_nButtonId )
         aArg.nId = it->first;
         aArg.bHighlight = true;
         aArg.pMenuBar = dynamic_cast<MenuBar*>(pMenu);
-        return it->second.m_aSelectLink.Call( &aArg );
+        return it->second.m_aSelectLink.Call( aArg );
     }
     return false;
 }
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index da15f86..34c3aa1 100644
--- a/vcl/source/window/menubarwindow.hxx

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list