diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-20 17:22:00 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-21 07:44:43 +0000 |
commit | 382eb1a23c390154619c385414bdbe6f6e461173 (patch) | |
tree | dbd1970c3d36903b78ed4c754f5faf14f57755c7 /include | |
parent | 652933e8fe46b24049ad0a6e61811727b1965aea (diff) |
remove untyped Link<>
Change-Id: I809f9e10309ceadda0a82c3818277323b34ec61b
Reviewed-on: https://gerrit.libreoffice.org/19491
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/linksrc.hxx | 1 | ||||
-rw-r--r-- | include/sfx2/lnkbase.hxx | 1 | ||||
-rw-r--r-- | include/svtools/treelist.hxx | 2 | ||||
-rw-r--r-- | include/svtools/wizdlg.hxx | 6 | ||||
-rw-r--r-- | include/svx/hdft.hxx | 4 | ||||
-rw-r--r-- | include/tools/link.hxx | 45 | ||||
-rw-r--r-- | include/vcl/dialog.hxx | 1 |
7 files changed, 4 insertions, 56 deletions
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx index c288e98b4783..3b26d3a5e2c4 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 cb7e4a6d66df..a4255cfb8d0c 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 873b9bb822bb..fdd7879e075d 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 44f1c6973e21..be3de098c17d 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 06b2eec8166d..a95c5b745788 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 548dbfb611f5..cbac102810d1 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 668ab71eb407..e25e514f5c66 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: |