summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-19 09:11:34 +0200
committerNoel Grandin <noel@peralex.com>2015-08-26 11:15:35 +0200
commit167bc621ef825ed5b961502fe9324a675ee34e42 (patch)
tree523838d8adc14a62f846529ee6eab3343b2fe87b /include
parent46a27805fb707544a844a961a3743b8b992282f0 (diff)
Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
Diffstat (limited to 'include')
-rw-r--r--include/editeng/edtdlg.hxx13
-rw-r--r--include/sfx2/basedlgs.hxx2
-rw-r--r--include/sfx2/checkin.hxx2
-rw-r--r--include/sfx2/dinfdlg.hxx12
-rw-r--r--include/sfx2/infobar.hxx2
-rw-r--r--include/sfx2/mgetempl.hxx4
-rw-r--r--include/sfx2/newstyle.hxx1
-rw-r--r--include/sfx2/passwd.hxx2
-rw-r--r--include/sfx2/printopt.hxx6
-rw-r--r--include/sfx2/sfxbasecontroller.hxx8
-rw-r--r--include/sfx2/sidebar/TabBar.hxx6
-rw-r--r--include/sfx2/styledlg.hxx2
-rw-r--r--include/sfx2/tabdlg.hxx16
-rw-r--r--include/sfx2/templateabstractview.hxx2
-rw-r--r--include/sfx2/templateinfodlg.hxx2
-rw-r--r--include/sfx2/viewfrm.hxx2
-rw-r--r--include/svtools/PlaceEditDialog.hxx4
-rw-r--r--include/svtools/ServerDetailsControls.hxx2
-rw-r--r--include/svtools/addresstemplate.hxx4
-rw-r--r--include/svtools/calendar.hxx3
-rw-r--r--include/svtools/editbrowsebox.hxx2
-rw-r--r--include/svtools/filectrl.hxx2
-rw-r--r--include/svtools/prnsetup.hxx4
-rw-r--r--include/svtools/tabbar.hxx5
-rw-r--r--include/svtools/wizardmachine.hxx6
-rw-r--r--include/svx/compressgraphicdialog.hxx2
-rw-r--r--include/svx/ctredlin.hxx8
-rw-r--r--include/svx/dlgctl3d.hxx2
-rw-r--r--include/svx/float3d.hxx10
-rw-r--r--include/svx/fontworkgallery.hxx2
-rw-r--r--include/svx/gridctrl.hxx2
-rw-r--r--include/svx/hdft.hxx4
-rw-r--r--include/svx/optgrid.hxx4
-rw-r--r--include/svx/passwd.hxx2
-rw-r--r--include/svx/rubydialog.hxx6
-rw-r--r--include/svx/srchdlg.hxx14
-rw-r--r--include/vcl/btndlg.hxx3
-rw-r--r--include/vcl/button.hxx8
-rw-r--r--include/vcl/layout.hxx2
39 files changed, 92 insertions, 91 deletions
diff --git a/include/editeng/edtdlg.hxx b/include/editeng/edtdlg.hxx
index 6dc82f44756e..8081dc7f1d98 100644
--- a/include/editeng/edtdlg.hxx
+++ b/include/editeng/edtdlg.hxx
@@ -36,6 +36,7 @@ namespace com { namespace sun { namespace star { namespace linguistic2
namespace vcl { class Window; }
class ResId;
class SvxSpellWrapper;
+class Button;
class AbstractThesaurusDialog : public VclAbstractDialog
{
@@ -57,13 +58,13 @@ class AbstractHangulHanjaConversionDialog : public VclAbstractTerminatedDialog
virtual void SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) = 0;
virtual void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) = 0;
virtual void SetOptionsChangedHdl( const Link<>& _rHdl ) = 0;
- virtual void SetIgnoreHdl( const Link<>& _rHdl ) = 0;
- virtual void SetIgnoreAllHdl( const Link<>& _rHdl ) = 0;
- virtual void SetChangeHdl( const Link<>& _rHdl ) = 0;
- virtual void SetChangeAllHdl( const Link<>& _rHdl ) = 0;
+ virtual void SetIgnoreHdl( const Link<Button*,void>& _rHdl ) = 0;
+ virtual void SetIgnoreAllHdl( const Link<Button*,void>& _rHdl ) = 0;
+ virtual void SetChangeHdl( const Link<Button*,void>& _rHdl ) = 0;
+ virtual void SetChangeAllHdl( const Link<Button*,void>& _rHdl ) = 0;
virtual void SetClickByCharacterHdl( const Link<>& _rHdl ) = 0;
- virtual void SetConversionFormatChangedHdl( const Link<>& _rHdl ) = 0;
- virtual void SetFindHdl( const Link<>& _rHdl ) = 0;
+ virtual void SetConversionFormatChangedHdl( const Link<Button*,void>& _rHdl ) = 0;
+ virtual void SetFindHdl( const Link<Button*,void>& _rHdl ) = 0;
virtual bool GetUseBothDirections() const= 0;
virtual editeng::HangulHanjaConversion::ConversionDirection
GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const = 0;
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 20ca10173822..4287d1df9a2a 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -200,7 +200,7 @@ protected:
SingleTabDlgImpl* pImpl;
- DECL_DLLPRIVATE_LINK(OKHdl_Impl, void *);
+ DECL_DLLPRIVATE_LINK_TYPED(OKHdl_Impl, Button*, void);
};
#endif
diff --git a/include/sfx2/checkin.hxx b/include/sfx2/checkin.hxx
index 54d2dffa2174..76608286a3fc 100644
--- a/include/sfx2/checkin.hxx
+++ b/include/sfx2/checkin.hxx
@@ -21,7 +21,7 @@ class SfxCheckinDialog : public ModalDialog
VclPtr<OKButton> m_pOKBtn;
- DECL_DLLPRIVATE_LINK(OKHdl, void *);
+ DECL_DLLPRIVATE_LINK_TYPED(OKHdl, Button*, void);
public:
SfxCheckinDialog( vcl::Window* pParent );
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 055aa3a0bfb2..2d8ba49c809c 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -207,9 +207,9 @@ private:
bool bEnableUseUserData : 1,
bHandleDelete : 1;
- DECL_LINK(DeleteHdl, void *);
- DECL_LINK(SignatureHdl, void *);
- DECL_STATIC_LINK(SfxDocumentPage, ChangePassHdl, void *);
+ DECL_LINK_TYPED(DeleteHdl, Button*, void);
+ DECL_LINK_TYPED(SignatureHdl, Button*, void);
+ DECL_STATIC_LINK_TYPED(SfxDocumentPage, ChangePassHdl, Button*, void);
void ImplUpdateSignatures();
void ImplCheckPasswordState();
@@ -338,7 +338,7 @@ class CustomPropertiesEditButton : public PushButton
public:
CustomPropertiesEditButton(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine);
- DECL_LINK(ClickHdl, void *);
+ DECL_LINK_TYPED(ClickHdl, Button*, void);
};
class CustomPropertiesRemoveButton : public ImageButton
@@ -427,7 +427,7 @@ private:
Link<void*,void> m_aRemovedHdl;
DECL_STATIC_LINK( CustomPropertiesWindow, TypeHdl, CustomPropertiesTypeBox* );
- DECL_LINK( RemoveHdl, CustomPropertiesRemoveButton* );
+ DECL_LINK_TYPED( RemoveHdl, Button*, void );
DECL_LINK( EditLoseFocusHdl, CustomPropertiesEdit* );
DECL_LINK( BoxLoseFocusHdl, CustomPropertiesTypeBox* );
//add lose focus handlers of Date/TimeField?
@@ -500,7 +500,7 @@ class SfxCustomPropertiesPage : public SfxTabPage
private:
VclPtr<CustomPropertiesControl> m_pPropertiesCtrl;
- DECL_LINK(AddHdl, void *);
+ DECL_LINK_TYPED(AddHdl, Button*, void);
using TabPage::DeactivatePage;
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index f42319020d4c..f4bd188e63da 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -63,7 +63,7 @@ class SfxInfoBarWindow : public vcl::Window
void addButton(PushButton* pButton);
private:
- DECL_LINK( CloseHandler, void* );
+ DECL_LINK_TYPED( CloseHandler, Button*, void );
};
class SfxInfoBarContainerWindow : public vcl::Window
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index f8f4b5556be6..607833f66af8 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -72,9 +72,9 @@ friend class SfxStyleDialog;
DECL_LINK( GetFocusHdl, Edit * );
DECL_LINK( LoseFocusHdl, Edit * );
DECL_LINK( EditStyleSelectHdl_Impl, void * );
- DECL_LINK( EditStyleHdl_Impl, void * );
+ DECL_LINK_TYPED( EditStyleHdl_Impl, Button*, void );
DECL_LINK( EditLinkStyleSelectHdl_Impl, void * );
- DECL_LINK( EditLinkStyleHdl_Impl, void * );
+ DECL_LINK_TYPED( EditLinkStyleHdl_Impl, Button*, void );
void UpdateName_Impl(ListBox *, const OUString &rNew);
void SetDescriptionText_Impl();
diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index 1a23a8d78683..61724dfc52aa 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -40,6 +40,7 @@ private:
SfxStyleSheetBasePool& rPool;
DECL_DLLPRIVATE_LINK( OKHdl, Control * );
+ DECL_DLLPRIVATE_LINK_TYPED( OKClickHdl, Button *, void );
DECL_DLLPRIVATE_LINK( ModifyHdl, ComboBox * );
public:
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index 647776241eaa..0998ab06546b 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -77,7 +77,7 @@ private:
bool mbAsciiOnly;
DECL_DLLPRIVATE_LINK(EditModifyHdl, Edit*);
- DECL_DLLPRIVATE_LINK(OKHdl, void *);
+ DECL_DLLPRIVATE_LINK_TYPED(OKHdl, Button *, void);
void SetPasswdText();
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index f969b5ff645f..b876bc4bf480 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -76,9 +76,9 @@ private:
DECL_DLLPRIVATE_LINK( ToggleOutputPrinterRBHdl, RadioButton* pButton );
DECL_DLLPRIVATE_LINK( ToggleOutputPrintFileRBHdl, RadioButton* pButton );
- DECL_DLLPRIVATE_LINK( ClickReduceTransparencyCBHdl, CheckBox* pBox );
- DECL_DLLPRIVATE_LINK( ClickReduceGradientsCBHdl, CheckBox* pBox );
- DECL_DLLPRIVATE_LINK( ClickReduceBitmapsCBHdl, CheckBox* pBox );
+ DECL_DLLPRIVATE_LINK_TYPED( ClickReduceTransparencyCBHdl, Button*, void );
+ DECL_DLLPRIVATE_LINK_TYPED( ClickReduceGradientsCBHdl, Button*, void );
+ DECL_DLLPRIVATE_LINK_TYPED( ClickReduceBitmapsCBHdl, Button*, void );
DECL_DLLPRIVATE_LINK( ToggleReduceGradientsStripesRBHdl, RadioButton* pButton );
DECL_DLLPRIVATE_LINK( ToggleReduceBitmapsResolutionRBHdl, RadioButton* pButton );
diff --git a/include/sfx2/sfxbasecontroller.hxx b/include/sfx2/sfxbasecontroller.hxx
index 7b5ca737e450..93955c11900b 100644
--- a/include/sfx2/sfxbasecontroller.hxx
+++ b/include/sfx2/sfxbasecontroller.hxx
@@ -194,13 +194,7 @@ private:
SAL_DLLPRIVATE SfxViewFrame& GetViewFrame_Impl() const;
SAL_DLLPRIVATE void ShowInfoBars( );
- DECL_LINK( CheckOutHandler, void * );
-
-
-// private variables
-
-
-private:
+ DECL_LINK_TYPED( CheckOutHandler, Button*, void );
IMPL_SfxBaseController_DataContainer* m_pData ;
diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx
index 3dcf7910e464..036f149d8637 100644
--- a/include/sfx2/sidebar/TabBar.hxx
+++ b/include/sfx2/sidebar/TabBar.hxx
@@ -98,9 +98,9 @@ private:
class Item
{
public:
- DECL_LINK(HandleClick, Button*);
+ DECL_LINK_TYPED(HandleClick, Button*, void);
VclPtr<RadioButton> mpButton;
- ::rtl::OUString msDeckId;
+ OUString msDeckId;
::std::function<void (const ::rtl::OUString&rsDeckId)> maDeckActivationFunctor;
bool mbIsHidden;
bool mbIsHiddenByDefault;
@@ -116,7 +116,7 @@ private:
void Layout();
void UpdateButtonIcons();
- DECL_LINK(OnToolboxClicked, void*);
+ DECL_LINK_TYPED(OnToolboxClicked, Button*, void);
SidebarController* pParentSidebarController;
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index e837c87d6ae1..5e43ceffb86b 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -31,7 +31,7 @@ class SFX2_DLLPUBLIC SfxStyleDialog: public SfxTabDialog
{
private:
SfxStyleSheetBase* pStyle;
- DECL_DLLPRIVATE_LINK( CancelHdl, Button * );
+ DECL_DLLPRIVATE_LINK_TYPED( CancelHdl, Button *, void );
sal_uInt16 m_nOrganizerId;
protected:
virtual void RefreshInputSet() SAL_OVERRIDE;
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 719a5995dddd..3f5fa9949501 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -89,13 +89,13 @@ friend class SfxTabDialogController;
bool bItemsReset;
bool bStandardPushed;
- DECL_DLLPRIVATE_LINK( ActivatePageHdl, TabControl * );
- DECL_DLLPRIVATE_LINK_TYPED( DeactivatePageHdl, TabControl *, bool );
- DECL_DLLPRIVATE_LINK(OkHdl, void *);
- DECL_DLLPRIVATE_LINK(ResetHdl, void *);
- DECL_DLLPRIVATE_LINK(BaseFmtHdl, void *);
- DECL_DLLPRIVATE_LINK(UserHdl, void *);
- DECL_DLLPRIVATE_LINK(CancelHdl, void *);
+ DECL_DLLPRIVATE_LINK(ActivatePageHdl, TabControl * );
+ DECL_DLLPRIVATE_LINK_TYPED(DeactivatePageHdl, TabControl *, bool );
+ DECL_DLLPRIVATE_LINK_TYPED(OkHdl, Button*, void);
+ DECL_DLLPRIVATE_LINK_TYPED(ResetHdl, Button*, void);
+ DECL_DLLPRIVATE_LINK_TYPED(BaseFmtHdl, Button*, void);
+ DECL_DLLPRIVATE_LINK_TYPED(UserHdl, Button*, void);
+ DECL_DLLPRIVATE_LINK_TYPED(CancelHdl, Button*, void);
SAL_DLLPRIVATE void Init_Impl(bool bFmtFlag);
protected:
@@ -201,7 +201,7 @@ public:
const SfxItemSet* GetExampleSet() const { return pExampleSet; }
SfxItemSet* GetExampleSet() { return pExampleSet; }
- void SetApplyHandler(const Link<>& _rHdl);
+ void SetApplyHandler(const Link<Button*,void>& _rHdl);
SAL_DLLPRIVATE void Start_Impl();
diff --git a/include/sfx2/templateabstractview.hxx b/include/sfx2/templateabstractview.hxx
index 026868b6faf9..d1c365ad6bc0 100644
--- a/include/sfx2/templateabstractview.hxx
+++ b/include/sfx2/templateabstractview.hxx
@@ -127,7 +127,7 @@ public:
protected:
- DECL_LINK(ShowRootRegionHdl, void*);
+ DECL_LINK_TYPED(ShowRootRegionHdl, Button*, void);
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) SAL_OVERRIDE;
diff --git a/include/sfx2/templateinfodlg.hxx b/include/sfx2/templateinfodlg.hxx
index 97a711c58028..3f665a6cc6e3 100644
--- a/include/sfx2/templateinfodlg.hxx
+++ b/include/sfx2/templateinfodlg.hxx
@@ -34,7 +34,7 @@ public:
protected:
- DECL_LINK (CloseHdl, void*);
+ DECL_LINK_TYPED(CloseHdl, Button*, void);
private:
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index c5e844ac31b1..8a70bcafc6a9 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -78,7 +78,7 @@ private:
protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
- DECL_LINK( SwitchReadOnlyHandler, void * );
+ DECL_LINK_TYPED( SwitchReadOnlyHandler, Button*, void );
SAL_DLLPRIVATE void KillDispatcher_Impl();
virtual ~SfxViewFrame();
diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx
index 066689ed211e..992c5e8afb45 100644
--- a/include/svtools/PlaceEditDialog.hxx
+++ b/include/svtools/PlaceEditDialog.hxx
@@ -81,8 +81,8 @@ private:
void InitDetails( );
void UpdateLabel( );
- DECL_LINK ( OKHdl, Button * );
- DECL_LINK ( DelHdl, Button * );
+ DECL_LINK_TYPED ( OKHdl, Button *, void );
+ DECL_LINK_TYPED ( DelHdl, Button *, void );
DECL_LINK_TYPED ( EditHdl, DetailsContainer*, void );
DECL_LINK ( ModifyHdl, void* );
DECL_LINK ( SelectTypeHdl, void * );
diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index de35aa7ea68c..6fe3363a0dcb 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -146,7 +146,7 @@ class CmisDetailsContainer : public DetailsContainer
private:
void selectRepository( );
- DECL_LINK ( RefreshReposHdl, void * );
+ DECL_LINK_TYPED ( RefreshReposHdl, Button*, void );
DECL_LINK ( SelectRepoHdl, void * );
};
diff --git a/include/svtools/addresstemplate.hxx b/include/svtools/addresstemplate.hxx
index 815d57d36468..f7fa977f7a2f 100644
--- a/include/svtools/addresstemplate.hxx
+++ b/include/svtools/addresstemplate.hxx
@@ -127,11 +127,11 @@ namespace svt
DECL_LINK(OnFieldScroll, ScrollBar*);
DECL_LINK(OnFieldSelect, ListBox*);
- DECL_LINK(OnAdministrateDatasources, void*);
+ DECL_LINK_TYPED(OnAdministrateDatasources, Button*, void);
DECL_STATIC_LINK(AddressBookSourceDialog, OnComboGetFocus, ComboBox*);
DECL_LINK(OnComboLoseFocus, ComboBox*);
DECL_LINK(OnComboSelect, ComboBox*);
- DECL_LINK(OnOkClicked, void*);
+ DECL_LINK_TYPED(OnOkClicked, Button*, void);
DECL_LINK(OnDelayedInitialize, void*);
};
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index ef4e48bf4eed..a9546b529a3b 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -37,6 +37,7 @@ class DataChangedEvent;
class FloatingWindow;
class PushButton;
class ImplCFieldFloatWin;
+class Button;
/*************************************************************************
@@ -358,7 +359,7 @@ private:
bool mbNone;
DECL_DLLPRIVATE_LINK_TYPED( ImplSelectHdl, Calendar*, void );
- DECL_DLLPRIVATE_LINK( ImplClickHdl, PushButton* );
+ DECL_DLLPRIVATE_LINK_TYPED( ImplClickHdl, Button*, void );
DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, void* );
public:
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 262d9c180f4c..62d0aeabbb93 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -302,7 +302,7 @@ namespace svt
CheckBox& GetBox() {return *pBox;};
private:
- DECL_LINK( OnClick, void* );
+ DECL_LINK_TYPED( OnClick, Button*, void );
};
diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx
index f82f67b5155d..c3b58a6c0c76 100644
--- a/include/svtools/filectrl.hxx
+++ b/include/svtools/filectrl.hxx
@@ -71,7 +71,7 @@ protected:
SVT_DLLPRIVATE void GetFocus() SAL_OVERRIDE;
SVT_DLLPRIVATE void StateChanged( StateChangedType nType ) SAL_OVERRIDE;
SVT_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
- DECL_DLLPRIVATE_LINK( ButtonHdl, void* );
+ DECL_DLLPRIVATE_LINK_TYPED( ButtonHdl, Button*, void );
public:
FileControl( vcl::Window* pParent, WinBits nStyle, FileControlMode = FileControlMode::NONE );
diff --git a/include/svtools/prnsetup.hxx b/include/svtools/prnsetup.hxx
index e1ca5db312c6..3c7c5848a788 100644
--- a/include/svtools/prnsetup.hxx
+++ b/include/svtools/prnsetup.hxx
@@ -53,7 +53,7 @@ private:
SVT_DLLPRIVATE void ImplSetInfo();
- DECL_DLLPRIVATE_LINK( ImplPropertiesHdl, void* );
+ DECL_DLLPRIVATE_LINK_TYPED( ImplPropertiesHdl, Button*, void );
DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl, void* );
DECL_DLLPRIVATE_LINK_TYPED( ImplStatusHdl, Timer*, void );
@@ -70,7 +70,7 @@ public:
virtual short Execute() SAL_OVERRIDE;
- void SetOptionsHdl( const Link<>& rLink );
+ void SetOptionsHdl( const Link<Button*,void>& rLink );
};
diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx
index 664738fbc857..99539e054ad6 100644
--- a/include/svtools/tabbar.hxx
+++ b/include/svtools/tabbar.hxx
@@ -260,6 +260,7 @@ carried out over an item resp. over which item the mouse click has
been carried out.
*/
+class Button;
// - WinBits -
@@ -370,9 +371,9 @@ private:
SVT_DLLPRIVATE void ImplPrePaint(vcl::RenderContext& rRenderContext);
SVT_DLLPRIVATE ImplTabBarItem* ImplGetLastTabBarItem( sal_uInt16 nItemCount );
- DECL_DLLPRIVATE_LINK(ImplClickHdl, ImplTabButton*);
+ DECL_DLLPRIVATE_LINK_TYPED(ImplClickHdl, Button*, void);
- DECL_DLLPRIVATE_LINK(ImplAddClickHandler, void*);
+ DECL_DLLPRIVATE_LINK_TYPED(ImplAddClickHandler, Button*, void);
ImplTabBarItem* seek( size_t i );
ImplTabBarItem* prev();
diff --git a/include/svtools/wizardmachine.hxx b/include/svtools/wizardmachine.hxx
index 673f3f8717d6..7f6f35992222 100644
--- a/include/svtools/wizardmachine.hxx
+++ b/include/svtools/wizardmachine.hxx
@@ -350,9 +350,9 @@ namespace svt
TabPage* GetOrCreatePage( const WizardState i_nState );
private:
- DECL_DLLPRIVATE_LINK(OnNextPage, void*);
- DECL_DLLPRIVATE_LINK(OnPrevPage, void*);
- DECL_DLLPRIVATE_LINK(OnFinish, void*);
+ DECL_DLLPRIVATE_LINK_TYPED(OnNextPage, Button*, void);
+ DECL_DLLPRIVATE_LINK_TYPED(OnPrevPage, Button*, void);
+ DECL_DLLPRIVATE_LINK_TYPED(OnFinish, Button*, void);
SVT_DLLPRIVATE void implResetDefault(vcl::Window* _pWindow);
SVT_DLLPRIVATE void implUpdateTitle();
diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx
index d933405411ad..1d3f33c3f8c8 100644
--- a/include/svx/compressgraphicdialog.hxx
+++ b/include/svx/compressgraphicdialog.hxx
@@ -69,7 +69,7 @@ private:
DECL_LINK( ToggleCompressionRB, void* );
DECL_LINK( ToggleReduceResolutionRB, void* );
- DECL_LINK( CalculateClickHdl, void* );
+ DECL_LINK_TYPED( CalculateClickHdl, Button*, void );
void Update();
void UpdateNewWidthMF();
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 9a00f6f92801..9bcf102a0365 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -200,11 +200,11 @@ private:
bool bModified;
DECL_LINK( SelDateHdl, ListBox* );
- DECL_LINK( RowEnableHdl, CheckBox* );
- DECL_LINK( TimeHdl, ImageButton* );
+ DECL_LINK_TYPED( RowEnableHdl, Button*, void );
+ DECL_LINK_TYPED( TimeHdl, Button*, void );
DECL_LINK( ModifyHdl, void* );
DECL_LINK( ModifyDate, void* );
- DECL_LINK( RefHandle, PushButton* );
+ DECL_LINK_TYPED( RefHandle, Button*, void );
protected:
@@ -299,7 +299,7 @@ private:
bool bEnableRejectAll;
bool bEnableUndo;
- DECL_LINK( PbClickHdl, PushButton* );
+ DECL_LINK_TYPED( PbClickHdl, Button*, void );
public:
SvxTPView(vcl::Window * pParent, VclBuilderContainer *pTopLevel);
diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx
index 669154bdbcb5..80e442ea62de 100644
--- a/include/svx/dlgctl3d.hxx
+++ b/include/svx/dlgctl3d.hxx
@@ -178,7 +178,7 @@ protected:
DECL_LINK( InternalInteractiveChange, void*);
DECL_LINK( InternalSelectionChange, void*);
DECL_LINK( ScrollBarMove, void*);
- DECL_LINK( ButtonPress, void*);
+ DECL_LINK_TYPED( ButtonPress, Button*, void);
// initialize local parameters
void Init();
diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx
index 778327099501..9d0a688ecf84 100644
--- a/include/svx/float3d.hxx
+++ b/include/svx/float3d.hxx
@@ -189,11 +189,11 @@ private:
bool bOnly3DChanged;
- DECL_LINK( ClickViewTypeHdl, void * );
- DECL_LINK( ClickUpdateHdl, void * );
- DECL_LINK( ClickAssignHdl, void * );
- DECL_LINK( ClickHdl, PushButton * );
- DECL_LINK( ClickColorHdl, PushButton * );
+ DECL_LINK_TYPED( ClickViewTypeHdl, Button*, void );
+ DECL_LINK_TYPED( ClickUpdateHdl, Button*, void );
+ DECL_LINK_TYPED( ClickAssignHdl, Button*, void );
+ DECL_LINK_TYPED( ClickHdl, Button*, void );
+ DECL_LINK_TYPED( ClickColorHdl, Button*, void );
DECL_LINK( SelectHdl, void * );
DECL_LINK( ModifyHdl, void * );
void ClickLight(PushButton &rBtn);
diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
index f570f82ea7a7..7ecd2a075801 100644
--- a/include/svx/fontworkgallery.hxx
+++ b/include/svx/fontworkgallery.hxx
@@ -70,7 +70,7 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED FontWorkGalleryDialog : public ModalDialog
SdrView* mpSdrView;
DECL_LINK( DoubleClickFavoriteHdl, void * );
- DECL_LINK( ClickOKHdl, void * );
+ DECL_LINK_TYPED( ClickOKHdl, Button*, void );
SdrObject** mppSdrObject;
SdrModel* mpDestModel;
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 1600c45a5bad..6ff1dfeec8da 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -199,7 +199,7 @@ public:
virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE;
private:
- DECL_LINK(OnClick, Button*);
+ DECL_LINK_TYPED(OnClick, Button*, void);
sal_uInt16 ArrangeControls();
void PositionDataSource(sal_Int32 nRecord);
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index 78f3b9ef3e9c..7e0b45d31dac 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -94,11 +94,11 @@ protected:
bool mbEnableDrawingLayerFillStyles : 1;
void InitHandler();
- DECL_LINK( TurnOnHdl, CheckBox*);
+ DECL_LINK_TYPED( TurnOnHdl, Button*, void);
DECL_LINK(DistModify, void *);
DECL_LINK(HeightModify, void *);
DECL_LINK(BorderModify, void *);
- DECL_LINK(BackgroundHdl, void *);
+ DECL_LINK_TYPED(BackgroundHdl, Button*, void);
void UpdateExample();
DECL_LINK(RangeHdl, void *);
diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index 68b8072ebfa0..010e022c9858 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -141,9 +141,9 @@ protected:
private:
bool bAttrModified;
- DECL_LINK( ClickRotateHdl_Impl, void * );
+ DECL_LINK_TYPED( ClickRotateHdl_Impl, Button*, void );
DECL_LINK( ChangeDrawHdl_Impl, MetricField * );
- DECL_LINK( ChangeGridsnapHdl_Impl, void * );
+ DECL_LINK_TYPED( ChangeGridsnapHdl_Impl, Button*, void );
DECL_LINK( ChangeDivisionHdl_Impl, NumericField * );
};
diff --git a/include/svx/passwd.hxx b/include/svx/passwd.hxx
index daeb5928d091..469f0db0b154 100644
--- a/include/svx/passwd.hxx
+++ b/include/svx/passwd.hxx
@@ -47,7 +47,7 @@ private:
bool bEmpty;
- DECL_LINK(ButtonHdl, void *);
+ DECL_LINK_TYPED(ButtonHdl, Button*, void);
DECL_LINK(EditModifyHdl, void *);
public:
diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx
index 7729ab54449f..3a7cbdbbfbab 100644
--- a/include/svx/rubydialog.hxx
+++ b/include/svx/rubydialog.hxx
@@ -128,9 +128,9 @@ class SvxRubyDialog : public SfxModelessDialog
SfxBindings* pBindings;
SvxRubyData_Impl* pImpl;
- DECL_LINK(ApplyHdl_Impl, void *);
- DECL_LINK(CloseHdl_Impl, void *);
- DECL_LINK(StylistHdl_Impl, void *);
+ DECL_LINK_TYPED(ApplyHdl_Impl, Button*, void);
+ DECL_LINK_TYPED(CloseHdl_Impl, Button*, void);
+ DECL_LINK_TYPED(StylistHdl_Impl, Button*, void);
DECL_LINK(ScrollHdl_Impl, ScrollBar*);
DECL_LINK(PositionHdl_Impl, ListBox*);
DECL_LINK(AdjustHdl_Impl, ListBox*);
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 7ddfbf60c3c6..3de80404ff45 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -231,15 +231,17 @@ private:
mutable sal_Int32 nTransliterationFlags;
DECL_LINK( ModifyHdl_Impl, ComboBox* );
- DECL_LINK( FlagHdl_Impl, Control* );
- DECL_LINK( CommandHdl_Impl, Button* );
- DECL_LINK(TemplateHdl_Impl, void *);
+ DECL_LINK_TYPED( FlagHdl_Impl, Button*, void );
+ DECL_LINK_TYPED( CommandHdl_Impl, Button*, void );
+ DECL_LINK_TYPED(TemplateHdl_Impl, Button*, void);
DECL_LINK( FocusHdl_Impl, Control* );
+ DECL_LINK( LBSelectHdl_Impl, Control* );
DECL_LINK(LoseFocusHdl_Impl, void *);
- DECL_LINK(FormatHdl_Impl, void *);
- DECL_LINK(NoFormatHdl_Impl, void *);
- DECL_LINK(AttributeHdl_Impl, void *);
+ DECL_LINK_TYPED(FormatHdl_Impl, Button*, void);
+ DECL_LINK_TYPED(NoFormatHdl_Impl, Button*, void);
+ DECL_LINK_TYPED(AttributeHdl_Impl, Button*, void);
DECL_LINK_TYPED( TimeoutHdl_Impl, Timer*, void );
+ void ClickHdl_Impl(void* pCtrl);
void Construct_Impl();
void InitControls_Impl();
diff --git a/include/vcl/btndlg.hxx b/include/vcl/btndlg.hxx
index 33b86e93396f..5ab5a50382da 100644
--- a/include/vcl/btndlg.hxx
+++ b/include/vcl/btndlg.hxx
@@ -29,6 +29,7 @@
struct ImplBtnDlgItem;
class PushButton;
+class Button;
#define BUTTONDIALOG_BUTTON_NOTFOUND ((sal_uInt16)0xFFFF)
@@ -95,7 +96,7 @@ private:
SAL_DLLPRIVATE void ImplInitButtonDialogData();
SAL_DLLPRIVATE VclPtr<PushButton> ImplCreatePushButton( ButtonDialogFlags nBtnFlags );
SAL_DLLPRIVATE ImplBtnDlgItem* ImplGetItem( sal_uInt16 nId ) const;
- DECL_DLLPRIVATE_LINK( ImplClickHdl, PushButton* pBtn );
+ DECL_DLLPRIVATE_LINK_TYPED( ImplClickHdl, Button* pBtn, void );
SAL_DLLPRIVATE void ImplPosControls();
};
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 2c485e4ee508..6dc7a32932d8 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -39,7 +39,7 @@ class VCL_DLLPUBLIC Button : public Control
{
private:
std::unique_ptr<ImplCommonButtonData> mpButtonData;
- Link<> maClickHdl;
+ Link<Button*,void> maClickHdl;
/// Command URL (like .uno:Save) in case the button should handle it.
OUString maCommand;
@@ -69,8 +69,8 @@ public:
virtual void Click();
- void SetClickHdl( const Link<>& rLink ) { maClickHdl = rLink; }
- const Link<>& GetClickHdl() const { return maClickHdl; }
+ void SetClickHdl( const Link<Button*,void>& rLink ) { maClickHdl = rLink; }
+ const Link<Button*,void>& GetClickHdl() const { return maClickHdl; }
/// Setup handler for UNO commands so that commands like .uno:Something are handled automagically by this button.
void SetCommandHandler(const OUString& aCommand);
@@ -94,7 +94,7 @@ public:
protected:
/// Handler for click, in case we want the button to handle uno commands (.uno:Something).
- static sal_IntPtr dispatchCommandHandler(void *, void *pCaller);
+ DECL_STATIC_LINK_TYPED(Button, dispatchCommandHandler, Button*, void);
};
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index b8472efc19e8..d9a643f8f5cd 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -679,7 +679,7 @@ private:
std::map< VclPtr<const vcl::Window>, short> m_aResponses;
OUString m_sPrimaryString;
OUString m_sSecondaryString;
- DECL_DLLPRIVATE_LINK(ButtonHdl, Button *);
+ DECL_DLLPRIVATE_LINK_TYPED(ButtonHdl, Button *, void);
void setButtonHandlers(VclButtonBox *pButtonBox);
short get_response(const vcl::Window *pWindow) const;
void create_owned_areas();