[Libreoffice-commits] core.git: compilerplugins/clang cui/source embeddedobj/test extensions/source fpicker/test include/sfx2 include/svtools include/svx include/tools include/vcl sc/workben slideshow/test svx/source sw/qa toolkit/source tubes/source vcl/workben xmlsecurity/source xmlsecurity/workben

Noel Grandin noel at peralex.com
Wed Oct 21 00:45:10 PDT 2015


 compilerplugins/clang/store/constantfunction.cxx     |    2 
 cui/source/inc/dlgname.hxx                           |    2 
 cui/source/options/optgdlg.hxx                       |    3 -
 embeddedobj/test/MainThreadExecutor/xexecutor.cxx    |    4 -
 embeddedobj/test/mtexecutor/mainthreadexecutor.cxx   |    3 -
 embeddedobj/test/mtexecutor/mainthreadexecutor.hxx   |    2 
 extensions/source/plugin/aqua/sysplug.mm             |    4 -
 extensions/source/plugin/inc/plugin/aqua/sysplug.hxx |    2 
 fpicker/test/svdem.cxx                               |    4 -
 include/sfx2/linksrc.hxx                             |    1 
 include/sfx2/lnkbase.hxx                             |    1 
 include/svtools/treelist.hxx                         |    2 
 include/svtools/wizdlg.hxx                           |    6 --
 include/svx/hdft.hxx                                 |    4 -
 include/tools/link.hxx                               |   45 -------------------
 include/vcl/dialog.hxx                               |    1 
 sc/workben/result.cxx                                |    3 -
 sc/workben/test.cxx                                  |   43 +++++++-----------
 slideshow/test/demoshow.cxx                          |    5 --
 svx/source/dialog/hdft.cxx                           |    9 ---
 sw/qa/tiledrendering/tiledrendering.cxx              |   11 +---
 toolkit/source/awt/scrollabledialog.cxx              |    4 -
 tubes/source/contacts.cxx                            |   25 ++++------
 vcl/workben/vcldemo.cxx                              |    5 --
 xmlsecurity/source/dialogs/certificatechooser.cxx    |    1 
 xmlsecurity/workben/signaturetest.cxx                |   21 ++------
 26 files changed, 58 insertions(+), 155 deletions(-)

New commits:
commit 382eb1a23c390154619c385414bdbe6f6e461173
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 20 17:22:00 2015 +0200

    remove untyped Link<>
    
    Change-Id: I809f9e10309ceadda0a82c3818277323b34ec61b
    Reviewed-on: https://gerrit.libreoffice.org/19491
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/compilerplugins/clang/store/constantfunction.cxx b/compilerplugins/clang/store/constantfunction.cxx
index 064d9785..5dcbcc2 100644
--- a/compilerplugins/clang/store/constantfunction.cxx
+++ b/compilerplugins/clang/store/constantfunction.cxx
@@ -425,7 +425,7 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) {
                 pFunctionDecl->getLocStart(), compiler.getSourceManager(), compiler.getLangOpts()) };
         aImmediateMacro = name;
         if (name == "TYPEINIT_FACTORY" || name == "TYPEINFO" || name == "TYPEINFO_OVERRIDE"
-            || name.startswith("IMPL_LINK") || name == "DECL_LINK")
+            || name.startswith("IMPL_LINK_") )
         {
             return true;
         }
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
index ec76529..736154c 100644
--- a/cui/source/inc/dlgname.hxx
+++ b/cui/source/inc/dlgname.hxx
@@ -49,7 +49,7 @@ public:
         field is changed.  The Link result determines whether the OK
         Button is enabled (> 0) or disabled (== 0).
 
-        @param rLink a Callback declared with DECL_LINK and implemented with
+        @param rLink a Callback declared with DECL_LINK_TYPED and implemented with
                IMPL_LINK, that is executed on modification.
 
         @param bCheckImmediately If true, the Link is called directly after
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 695d03c..658b89c 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -61,9 +61,6 @@ private:
     DECL_LINK_TYPED( TwoFigureHdl, Edit&, void );
     DECL_LINK_TYPED( TwoFigureConfigHdl, SpinField&, void );
     DECL_LINK_TYPED( TwoFigureConfigFocusHdl, Control&, void );
-#ifdef WNT
-    DECL_LINK( OnFileDlgToggled, void* );
-#endif
 protected:
     virtual sfxpg       DeactivatePage( SfxItemSet* pSet = NULL ) override;
 
diff --git a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
index 24fd827..2164f76 100644
--- a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
+++ b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx
@@ -29,7 +29,7 @@ void MainThreadExecutor_Impl::execute()
     Application::PostUserEvent( LINK( this, MainThreadExecutor_Impl, executor ), NULL );
 }
 
-IMPL_LINK_NOARG( MainThreadExecutor_Impl, executor )
+IMPL_LINK_NOARG_TYPED( MainThreadExecutor_Impl, executor, void*, void )
 {
     if ( m_xJob.is() )
     {
@@ -40,8 +40,6 @@ IMPL_LINK_NOARG( MainThreadExecutor_Impl, executor )
 
     m_bExecuted = sal_True;
     delete this;
-
-    return 0;
 }
 
 MainThreadExecutor_Impl::MainThreadExecutor_Impl( const uno::Reference< task::XJob >& xJob,
diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
index 0976074..45f650d 100644
--- a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
+++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx
@@ -77,12 +77,11 @@ uno::Any SAL_CALL MainThreadExecutor::execute( const uno::Sequence< beans::Named
 }
 
 
-IMPL_STATIC_LINK( MainThreadExecutor, worker, MainThreadExecutorRequest*, pThreadExecutorRequest )
+IMPL_STATIC_LINK_TYPED( MainThreadExecutor, worker, MainThreadExecutorRequest*, pThreadExecutorRequest, void )
 {
     pThreadExecutorRequest->doIt();
 
     delete pThreadExecutorRequest;
-    return 0;
 }
 
 
diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.hxx b/embeddedobj/test/mtexecutor/mainthreadexecutor.hxx
index 4eecd48..095f983 100644
--- a/embeddedobj/test/mtexecutor/mainthreadexecutor.hxx
+++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.hxx
@@ -59,7 +59,7 @@ public:
     static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_staticCreateSelfInstance(
             const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager );
 
-    DECL_STATIC_LINK( MainThreadExecutor, worker, MainThreadExecutorRequest* );
+    DECL_STATIC_LINK_TYPED( MainThreadExecutor, worker, MainThreadExecutorRequest*, void );
 
     // XJob
        virtual css::uno::Any SAL_CALL execute( const css::uno::Sequence< css::beans::NamedValue >& Arguments ) throw (css::lang::IllegalArgumentException, css::uno::Exception, css::uno::RuntimeException);
diff --git a/extensions/source/plugin/aqua/sysplug.mm b/extensions/source/plugin/aqua/sysplug.mm
index 56ce650..a9b54a8 100644
--- a/extensions/source/plugin/aqua/sysplug.mm
+++ b/extensions/source/plugin/aqua/sysplug.mm
@@ -384,7 +384,7 @@ sal_Bool MacPluginComm::retrieveFunction( const char* i_pName, void** o_ppFunc )
     return (*o_ppFunc != NULL);
 }
 
-IMPL_LINK_NOARG(MacPluginComm, NullTimerHdl)
+IMPL_LINK_NOARG_TYPED(MacPluginComm, NullTimerHdl, Timer*, void)
 {
     // note: this is a Timer handler, we are already protected by the SolarMutex
 
@@ -399,8 +399,6 @@ IMPL_LINK_NOARG(MacPluginComm, NullTimerHdl)
         if( rPlugData.m_pPlugView ) // for safety do not dispatch null events before first NPP_SetWindow
             (*m_aNPPfuncs.event)( &(*it)->getNPPInstance(), &aRec );
     }
-
-    return 0;
 }
 
 
diff --git a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
index a9b7522..3a1638a 100644
--- a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
+++ b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
@@ -139,7 +139,7 @@ public:
     void                drawView( XPlugin_Impl* );
 private:
     sal_Bool                retrieveFunction( const char* i_pName, void** i_ppFunc ) const;
-    DECL_LINK( NullTimerHdl, void* );
+    DECL_LINK_TYPED( NullTimerHdl, Timer*, void );
 
 private:
     CFBundleRef         m_xBundle;
diff --git a/fpicker/test/svdem.cxx b/fpicker/test/svdem.cxx
index 05f3e74..b35c194 100644
--- a/fpicker/test/svdem.cxx
+++ b/fpicker/test/svdem.cxx
@@ -173,7 +173,7 @@ void MyWin::Resize()
 
 
 
-IMPL_LINK( MyWin, Test, PushButton*, pBtn )
+IMPL_LINK_TYPED( MyWin, Test, PushButton*, pBtn, void )
 {
 printf("Test\n");
     if ( pBtn == &aOKBtn )
@@ -182,8 +182,6 @@ printf("Test\n");
         pDlg->Execute();
         printf("ok\n");
     }
-
-    return 0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx
index c288e98..3b26d3a 100644
--- a/include/sfx2/linksrc.hxx
+++ b/include/sfx2/linksrc.hxx
@@ -84,7 +84,6 @@ public:
                         // sal_True => data complete loaded
     virtual bool        IsDataComplete() const;
 
-    // Link impl: DECL_LINK( MyEndEditHdl, sfx2::FileDialogHelper* ); <= param is the dialog
     virtual void        Edit( vcl::Window *, SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl );
 
 
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index cb7e4a6..a4255cf 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -145,7 +145,6 @@ public:
     bool            Update();
     void            Disconnect();
 
-    // Link impl: DECL_LINK( MyEndDialogHdl, SvBaseLink* ); <= param is this
     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...)
diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx
index 873b9bb..fdd7879 100644
--- a/include/svtools/treelist.hxx
+++ b/include/svtools/treelist.hxx
@@ -210,8 +210,6 @@ public:
 
     // The Model calls the Clone Link to clone Entries.
     // Thus we do not need to derive from the Model if we derive from SvTreeListEntry.
-    // Declaration of the Clone Handler:
-    // DECL_LINK(CloneHdl,SvTreeListEntry*);
     // The Handler needs to return a SvTreeListEntry*
     SvTreeListEntry*    Clone( SvTreeListEntry* pEntry, sal_uLong& nCloneCount ) const;
     void                SetCloneLink( const Link<SvTreeListEntry*,SvTreeListEntry*>& rLink )
diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx
index 44f1c69..be3de09 100644
--- a/include/svtools/wizdlg.hxx
+++ b/include/svtools/wizdlg.hxx
@@ -166,20 +166,18 @@ void MyWizardDlg::ActivatePage()
 MyWizardDlg-Prev/Next-Handler
 -----------------------------
 
-IMPL_LINK( MyWizardDlg, ImplPrevHdl, PushButton*, pBtn )
+IMPL_LINK_TYPED( MyWizardDlg, ImplPrevHdl, PushButton*, pBtn, void )
 {
     ShowPrevPage();
     if ( !GetCurLevel() )
         pBtn->Disable();
-    return 0;
 }
 
-IMPL_LINK( MyWizardDlg, ImplNextHdl, PushButton*, pBtn )
+IMPL_LINK_TYPED( MyWizardDlg, ImplNextHdl, PushButton*, pBtn, void )
 {
     ShowNextPage();
     if ( GetCurLevel() < 3 )
         pBtn->Disable();
-    return 0;
 }
 
 *************************************************************************/
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index 06b2eec..a95c5b7 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -99,11 +99,9 @@ protected:
     DECL_LINK_TYPED(HeightModify, Edit&, void);
     DECL_LINK_TYPED(BorderModify, Edit&, void);
     DECL_LINK_TYPED(BackgroundHdl, Button*, void);
-
-    void            UpdateExample();
-    DECL_LINK(RangeHdl, void *);
     DECL_LINK_TYPED(RangeFocusHdl, Control&, void);
     void RangeHdl();
+    void            UpdateExample();
 
 private:
     SVX_DLLPRIVATE void         ResetBackground_Impl( const SfxItemSet& rSet );
diff --git a/include/tools/link.hxx b/include/tools/link.hxx
index 548dbfb..cbac102 100644
--- a/include/tools/link.hxx
+++ b/include/tools/link.hxx
@@ -24,49 +24,6 @@
 
 #include <sal/types.h>
 
-#define DECL_LINK(Member, ArgType) \
-    static sal_IntPtr LinkStub##Member(void *, void *); \
-    sal_IntPtr Member(ArgType)
-
-#define DECL_STATIC_LINK(Class, Member, ArgType) \
-    static sal_IntPtr LinkStub##Member(void *, void *); \
-    static sal_IntPtr Member(Class *, ArgType)
-
-#define DECL_DLLPRIVATE_LINK(Member, ArgType) \
-    SAL_DLLPRIVATE static sal_IntPtr LinkStub##Member(void *, void *); \
-    SAL_DLLPRIVATE sal_IntPtr Member(ArgType)
-
-#define DECL_DLLPRIVATE_STATIC_LINK(Class, Member, ArgType) \
-    SAL_DLLPRIVATE static sal_IntPtr LinkStub##Member(void *, void *); \
-    SAL_DLLPRIVATE static sal_IntPtr Member(Class *, ArgType)
-
-#define IMPL_LINK(Class, Member, ArgType, ArgName) \
-    sal_IntPtr Class::LinkStub##Member(void * instance, void * data) { \
-        return static_cast<Class *>(instance)->Member( \
-            static_cast<ArgType>(data)); \
-    } \
-    sal_IntPtr Class::Member(ArgType ArgName)
-
-#define IMPL_LINK_NOARG(Class, Member) \
-    sal_IntPtr Class::LinkStub##Member(void * instance, void * data) { \
-        return static_cast<Class *>(instance)->Member(data); \
-    } \
-    sal_IntPtr Class::Member(SAL_UNUSED_PARAMETER void *)
-
-#define IMPL_STATIC_LINK(Class, Member, ArgType, ArgName) \
-    sal_IntPtr Class::LinkStub##Member(void * instance, void * data) { \
-        return Member( \
-            static_cast<Class *>(instance), static_cast<ArgType>(data)); \
-    } \
-    sal_IntPtr Class::Member(SAL_UNUSED_PARAMETER Class *, ArgType ArgName)
-
-#define IMPL_STATIC_LINK_NOARG(Class, Member) \
-    sal_IntPtr Class::LinkStub##Member(void * instance, void * data) { \
-        return Member(static_cast<Class *>(instance), data); \
-    } \
-    sal_IntPtr Class::Member( \
-        SAL_UNUSED_PARAMETER Class *, SAL_UNUSED_PARAMETER void *)
-
 #define DECL_LINK_TYPED(Member, ArgType, RetType) \
     static RetType LinkStub##Member(void *, ArgType); \
     RetType Member(ArgType)
@@ -113,7 +70,7 @@
 #define LINK(Instance, Class, Member) ::tools::detail::makeLink( \
     static_cast<Class *>(Instance), &Class::LinkStub##Member)
 
-template<typename Arg = void *, typename Ret = sal_IntPtr>
+template<typename Arg, typename Ret>
 class SAL_WARN_UNUSED Link {
 public:
     typedef Ret Stub(void *, Arg);
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 668ab71..e25e514 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -101,7 +101,6 @@ public:
 
     // Dialog::Execute replacement API
 public:
-    // Link impl: DECL_LINK( MyEndDialogHdl, Dialog* ); <= param is dialog just ended
     virtual void    StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl );
     long            GetResult() const;
 private:
diff --git a/sc/workben/result.cxx b/sc/workben/result.cxx
index 7d43f8d..e497aa4 100644
--- a/sc/workben/result.cxx
+++ b/sc/workben/result.cxx
@@ -50,11 +50,10 @@ void ScAddInResult::NewValue()
         (*aListeners[n])->modified( aEvent );
 }
 
-IMPL_LINK( ScAddInResult, TimeoutHdl, Timer*, pT )
+IMPL_LINK_TYPED( ScAddInResult, TimeoutHdl, Timer*, pT, void )
 {
     NewValue();
     pT->Start();
-    return 0;
 }
 
 ScAddInResult::~ScAddInResult()
diff --git a/sc/workben/test.cxx b/sc/workben/test.cxx
index 6da55df..26f114d 100644
--- a/sc/workben/test.cxx
+++ b/sc/workben/test.cxx
@@ -76,11 +76,11 @@ private:
 public:
             MyWindow( vcl::Window *pParent );
 
-        DECL_LINK(CountHdl, PushButton*);
-        DECL_LINK(TextHdl, PushButton*);
-        DECL_LINK(BlaHdl, PushButton*);
-        DECL_LINK(TabHdl, PushButton*);
-        DECL_LINK(ViewHdl, PushButton*);
+        DECL_LINK_TYPED(CountHdl, PushButton*, void);
+        DECL_LINK_TYPED(TextHdl, PushButton*, void);
+        DECL_LINK_TYPED(BlaHdl, PushButton*, void);
+        DECL_LINK_TYPED(TabHdl, PushButton*, void);
+        DECL_LINK_TYPED(ViewHdl, PushButton*, void);
 };
 
 class ScTestListener : public XSelectionChangeListener, public UsrObject
@@ -1501,7 +1501,7 @@ void lcl_Pivot( FixedText& aTimeText )  // 30
     }
 }
 
-IMPL_LINK_NOARG(MyWindow, CountHdl)
+IMPL_LINK_NOARG_TYPED(MyWindow, CountHdl, PushButton*, void)
 {
 
     long nCount = aCountField.GetValue();
@@ -1606,11 +1606,9 @@ IMPL_LINK_NOARG(MyWindow, CountHdl)
             lcl_Pivot(aTimeText);
             break;
     }
-
-    return 0;
 }
 
-IMPL_LINK_NOARG(MyWindow, TextHdl)
+IMPL_LINK_NOARG_TYPED(MyWindow, TextHdl, PushButton*, void)
 {
     sal_uInt16 nCol = (sal_uInt16)aColField.GetValue();
     sal_uInt16 nRow = (sal_uInt16)aRowField.GetValue();
@@ -1653,11 +1651,9 @@ IMPL_LINK_NOARG(MyWindow, TextHdl)
             }
         }
     }
-
-    return 0;
 }
 
-IMPL_LINK_NOARG(MyWindow, BlaHdl)
+IMPL_LINK_NOARG_TYPED(MyWindow, BlaHdl, PushButton*, void)
 {
     aTimeText.SetText("...");
 
@@ -1725,10 +1721,9 @@ IMPL_LINK_NOARG(MyWindow, BlaHdl)
 
         xGlobalCell = xCell;
     }
-    return 0;
 }
 
-IMPL_LINK_NOARG(MyWindow, TabHdl)
+IMPL_LINK_NOARG_TYPED(MyWindow, TabHdl, PushButton*, void)
 {
     String aResult;
 
@@ -1795,8 +1790,6 @@ IMPL_LINK_NOARG(MyWindow, TabHdl)
     }
 
     aTimeText.SetText(aResult);
-
-    return 0;
 }
 
 void lcl_FillCells(XCellCollectionRef xColl)
@@ -1819,16 +1812,16 @@ void lcl_FillCells(XCellCollectionRef xColl)
     }
 }
 
-IMPL_LINK_NOARG(MyWindow, ViewHdl)
+IMPL_LINK_NOARG_TYPED(MyWindow, ViewHdl, PushButton*, void)
 {
     XSpreadsheetDocumentRef xDoc = lcl_GetDocument();           // calc model
     XInterfaceRef xInt = lcl_GetView();
-    if (!xInt) return 0;
+    if (!xInt) return;
     XDocumentViewRef xView = (XDocumentView*)xInt->queryInterface(XDocumentView::getSmartUik());
-    if (!xView) return 0;
+    if (!xView) return;
 
     XInterfaceRef xSelInt = xView->getSelection();
-    if (!xSelInt) return 0;
+    if (!xSelInt) return;
 
     XAutoFormattableRef xAuto = (XAutoFormattable*)xSelInt->
                                     queryInterface(XAutoFormattable::getSmartUik());
@@ -1870,12 +1863,12 @@ IMPL_LINK_NOARG(MyWindow, ViewHdl)
 
     XCellRangeSourceRef xSrc = (XCellRangeSource*)
                                     xInt->queryInterface(XCellRangeSource::getSmartUik());
-    if (!xSrc) return 0;
+    if (!xSrc) return;
     XCellRangeRef xRange = xSrc->getReferredCells();
-    if (!xRange) return 0;
+    if (!xRange) return;
     XCellCollectionRef xColl = (XCellCollection*)
                                     xRange->queryInterface(XCellCollection::getSmartUik());
-    if (!xColl) return 0;
+    if (!xColl) return;
 
     XActionLockableRef xLock = (XActionLockable*)
                         xDoc->queryInterface(XActionLockable::getSmartUik());
@@ -1888,9 +1881,7 @@ IMPL_LINK_NOARG(MyWindow, ViewHdl)
         xLock->removeActionLock();                      // don't paint in between
 
     XStarCalcViewRef xCalc = (XStarCalcView*)xInt->queryInterface(XStarCalcView::getSmartUik());
-    if (!xCalc) return 0;
-
-    return 0;
+    if (!xCalc) return;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx
index 507ecc6..b18efdd 100644
--- a/slideshow/test/demoshow.cxx
+++ b/slideshow/test/demoshow.cxx
@@ -390,7 +390,7 @@ public:
 
 private:
     void init();
-    DECL_LINK( updateHdl, Timer* );
+    DECL_LINK_TYPED( updateHdl, Timer*, void );
 
     ChildWindow                                maLeftChild;
     ChildWindow                                maRightTopChild;
@@ -463,13 +463,12 @@ void DemoWindow::init()
     }
 }
 
-IMPL_LINK_NOARG(DemoWindow, updateHdl)
+IMPL_LINK_NOARG_TYPED(DemoWindow, updateHdl, Timer*, void)
 {
     init();
 
     if( mxShow.is() )
         mxShow->update(0);
-    return 0;
 }
 
 void DemoWindow::Paint( const Rectangle& /*rRect*/ )
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 925d43d..b1e9c1b 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -466,7 +466,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet )
     m_pLMEdit->SaveValue();
     m_pRMEdit->SaveValue();
     m_pCntSharedBox->SaveValue();
-    RangeHdl( 0 );
+    RangeHdl();
 
     const SfxPoolItem* pItem = 0;
     SfxObjectShell* pShell;
@@ -1046,7 +1046,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
         m_pBspWin->SetVert( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
     }
     ResetBackground_Impl( rSet );
-    RangeHdl( 0 );
+    RangeHdl();
 }
 
 SfxTabPage::sfxpg SvxHFPage::DeactivatePage( SfxItemSet* _pSet )
@@ -1056,11 +1056,6 @@ SfxTabPage::sfxpg SvxHFPage::DeactivatePage( SfxItemSet* _pSet )
     return LEAVE_PAGE;
 }
 
-IMPL_LINK_NOARG(SvxHFPage, RangeHdl)
-{
-    RangeHdl();
-    return 0;
-}
 IMPL_LINK_NOARG_TYPED(SvxHFPage, RangeFocusHdl, Control&, void)
 {
     RangeHdl();
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 62c9baf..6db48a1 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -107,11 +107,11 @@ public:
         ModalDialog::dispose();
     }
 
-    DECL_LINK ( RenderHdl, Button * );
-    DECL_LINK ( ChooseDocumentHdl, Button * );
+    DECL_LINK_TYPED( RenderHdl, Button *, void );
+    DECL_LINK_TYPED( ChooseDocumentHdl, Button *, void );
 };
 
-IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, )
+IMPL_LINK_NOARG_TYPED( TiledRenderingDialog, RenderHdl, Button *, void)
 {
     int contextWidth = mpContextWidth->GetValue();
     int contextHeight = mpContextHeight->GetValue();
@@ -143,11 +143,9 @@ IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, )
         // update the dialog size
         setOptimalLayoutSize();
     }
-
-    return 1;
 }
 
-IMPL_LINK ( TiledRenderingDialog,  ChooseDocumentHdl, Button *, )
+IMPL_LINK_NOARG_TYPED( TiledRenderingDialog,  ChooseDocumentHdl, Button *, void )
 {
     FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
     uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
@@ -156,7 +154,6 @@ IMPL_LINK ( TiledRenderingDialog,  ChooseDocumentHdl, Button *, )
         OUString aFileUrl =xFP->getFiles().getConstArray()[0];
         mpApp->Open(aFileUrl);
     }
-    return 1;
 }
 
 void TiledRenderingApp::Open(OUString & aFileUrl)
diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx
index 4d6fc4d..cd408d3 100644
--- a/toolkit/source/awt/scrollabledialog.cxx
+++ b/toolkit/source/awt/scrollabledialog.cxx
@@ -115,8 +115,8 @@ void ScrollableWrapper<T>::lcl_Scroll( long nX, long nY )
     }
 }
 
-//Can't use IMPL_LINK with the template
-//IMPL_LINK( ScrollableWrapper, ScrollBarHdl, ScrollBar*, pSB )
+//Can't use IMPL_LINK_TYPED with the template
+//IMPL_LINK_TYPED( ScrollableWrapper, ScrollBarHdl, ScrollBar*, pSB, void )
 
 template< class T>
 void ScrollableWrapper<T>::LinkStubScrollBarHdl( void* pThis, ScrollBar* pCaller)
diff --git a/tubes/source/contacts.cxx b/tubes/source/contacts.cxx
index 0838880..6f8ae2c 100644
--- a/tubes/source/contacts.cxx
+++ b/tubes/source/contacts.cxx
@@ -31,11 +31,11 @@ class TubeContacts : public ModelessDialog
     ListBox*                mpList;
     Collaboration*          mpCollaboration;
 
-    DECL_LINK( BtnDemoHdl, void * );
-    DECL_LINK( BtnConnectHdl, void * );
-    DECL_LINK( BtnGroupHdl, void * );
-    DECL_LINK( BtnInviteHdl, void * );
-    DECL_LINK( BtnListenHdl, void * );
+    DECL_LINK_TYPED( BtnDemoHdl, Button*, void );
+    DECL_LINK_TYPED( BtnConnectHdl, Button*, void );
+    DECL_LINK_TYPED( BtnGroupHdl, Button*, void );
+    DECL_LINK_TYPED( BtnInviteHdl, Button*, void );
+    DECL_LINK_TYPED( BtnListenHdl, Button*, void );
 
     AccountContactPairV maACs;
 
@@ -175,34 +175,29 @@ public:
     }
 };
 
-IMPL_LINK_NOARG( TubeContacts, BtnDemoHdl )
+IMPL_LINK_NOARG_TYPED( TubeContacts, BtnDemoHdl, Button*, void )
 {
     StartDemoSession();
-    return 0;
 }
 
-IMPL_LINK_NOARG( TubeContacts, BtnConnectHdl )
+IMPL_LINK_NOARG_TYPED( TubeContacts, BtnConnectHdl, Button*, void )
 {
     StartBuddySession();
-    return 0;
 }
 
-IMPL_LINK_NOARG( TubeContacts, BtnGroupHdl )
+IMPL_LINK_NOARG_TYPED( TubeContacts, BtnGroupHdl, Button*, void )
 {
     StartGroupSession();
-    return 0;
 }
 
-IMPL_LINK_NOARG( TubeContacts, BtnInviteHdl )
+IMPL_LINK_NOARG_TYPED( TubeContacts, BtnInviteHdl, Button*, void )
 {
     Invite();
-    return 0;
 }
 
-IMPL_LINK_NOARG( TubeContacts, BtnListenHdl )
+IMPL_LINK_NOARG_TYPED( TubeContacts, BtnListenHdl, Button*, void )
 {
     Listen();
-    return 0;
 }
 
 } // anonymous namespace
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 9ae1cd1..03493cd 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -169,7 +169,7 @@ public:
     FloatingWindow *mpButtonWin;
     AutoTimer       maBounce;
     int             mnBounceX, mnBounceY;
-    DECL_LINK(BounceTimerCb, void *);
+    DECL_LINK_TYPED(BounceTimerCb, Timer*, void);
 #endif
 
     bool MouseButtonDown(const MouseEvent& rMEvt);
@@ -1164,7 +1164,7 @@ public:
 };
 
 #if FIXME_BOUNCE_BUTTON
-IMPL_LINK_NOARG(DemoRenderer,BounceTimerCb)
+IMPL_LINK_NOARG_TYPED(DemoRenderer,BounceTimerCb,Timer*,void)
 {
     mpButton->Check(mnBounceX>0);
     mpButton->SetPressed(mnBounceY>0);
@@ -1182,7 +1182,6 @@ IMPL_LINK_NOARG(DemoRenderer,BounceTimerCb)
     // All smoke and mirrors to test sub-region invalidation underneath
     Rectangle aRect(aCur, mpButtonWin->GetSizePixel());
     Invalidate(aRect);
-    return 0;
 }
 #endif
 
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 8a9138e..24b13fc 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -119,7 +119,6 @@ short CertificateChooser::Execute()
     return ModalDialog::Execute();
 }
 
-// IMPL_LINK_NOARG(CertificateChooser, Initialize)
 void CertificateChooser::ImplInitialize()
 {
     if ( !mbInitialized )
diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index e97e6f3..d16e946 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -123,13 +123,9 @@ private:
     FixedLine   maHintLine;
     FixedText   maHintText;
 
-    DECL_LINK(  CryptoCheckBoxHdl, CheckBox* );
-    DECL_LINK(  SignButtonHdl, Button* );
-    DECL_LINK(  VerifyButtonHdl, Button* );
-    DECL_LINK(  DigitalSignaturesWithServiceHdl, Button* );
-    DECL_LINK(  VerifyDigitalSignaturesHdl, Button* );
-    DECL_LINK(  DigitalSignaturesWithTokenHdl, Button* );
-    DECL_LINK(  StartVerifySignatureHdl, void* );
+    DECL_LINK_TYPED(  CryptoCheckBoxHdl, CheckBox*, void );
+    DECL_LINK_TYPED(  DigitalSignaturesWithServiceHdl, Button*, void );
+    DECL_LINK_TYPED(  VerifyDigitalSignaturesHdl, Button*, void );
 
 public:
                 MyWin( vcl::Window* pParent, WinBits nWinStyle );
@@ -255,7 +251,7 @@ MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) :
 
 }
 
-IMPL_LINK_NOARG(MyWin, CryptoCheckBoxHdl)
+IMPL_LINK_NOARG_TYPED(MyWin, CryptoCheckBoxHdl, CheckBox*, void)
 {
     if ( maCryptoCheckBox.IsChecked() )
     {
@@ -267,10 +263,9 @@ IMPL_LINK_NOARG(MyWin, CryptoCheckBoxHdl)
         maEditTokenName.Enable();
         maFixedTextTokenName.Enable();
     }
-    return 1;
 }
 
-IMPL_LINK_NOARG(MyWin, DigitalSignaturesWithServiceHdl)
+IMPL_LINK_NOARG_TYPED(MyWin, DigitalSignaturesWithServiceHdl, Button*, void)
 {
     OUString aDocFileName = maEditDOCFileName.GetText();
     uno::Reference < embed::XStorage > xStore = ::comphelper::OStorageHelper::GetStorageFromURL(
@@ -279,11 +274,9 @@ IMPL_LINK_NOARG(MyWin, DigitalSignaturesWithServiceHdl)
     uno::Reference< security::XDocumentDigitalSignatures > xD(
         security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext()) );
     xD->signDocumentContent( xStore, NULL );
-
-    return 0;
 }
 
-IMPL_LINK_NOARG(MyWin, VerifyDigitalSignaturesHdl)
+IMPL_LINK_NOARG_TYPED(MyWin, VerifyDigitalSignaturesHdl, Button*, void)
 {
     OUString aDocFileName = maEditDOCFileName.GetText();
     uno::Reference < embed::XStorage > xStore = ::comphelper::OStorageHelper::GetStorageFromURL(
@@ -303,8 +296,6 @@ IMPL_LINK_NOARG(MyWin, VerifyDigitalSignaturesHdl)
         aText.append( "valid" );
         ScopedVclPtr<InfoBox>::Create( this, aText )->Execute();
     }
-
-    return 0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list