diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-16 16:10:05 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-17 08:19:34 +0200 |
commit | 1e2119fd0211b671cad7ba7005a99a1da1a0caf5 (patch) | |
tree | c4298af25e9a082066ad98a69c5c6c281a360ac5 /sd/source | |
parent | f4f05ab199101b9f11718ddc82e139815c1fc521 (diff) |
convert Link<> to typed
Change-Id: I3d35a0bb75b6989dd13371543d1bdf3ef5f47641
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgass.cxx | 22 | ||||
-rw-r--r-- | sd/source/ui/inc/dlgass.hxx | 3 |
3 files changed, 17 insertions, 13 deletions
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index 169c774f01af..ab3a154721f9 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -75,7 +75,7 @@ public: void SetDoubleClickLink( const Link<>& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; } - DECL_LINK(implDoubleClickHdl, void *); + DECL_LINK_TYPED(implDoubleClickHdl, ListBox&, void); private: virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE; @@ -137,10 +137,9 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt ) } } -IMPL_LINK_NOARG(CategoryListBox, implDoubleClickHdl) +IMPL_LINK_NOARG_TYPED(CategoryListBox, implDoubleClickHdl, ListBox&, void) { CaptureMouse(); - return 0; } void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt ) diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 014d25080142..6d53335105be 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -109,7 +109,7 @@ private: class AssistentDlgImpl : public SfxListener { public: - AssistentDlgImpl( vcl::Window* pWindow, const Link<>& rFinishLink, bool bAutoPilot ); + AssistentDlgImpl( vcl::Window* pWindow, const Link<ListBox&,void>& rFinishLink, bool bAutoPilot ); virtual ~AssistentDlgImpl(); /// Local mutex used to serialize concurrent method calls. @@ -319,7 +319,7 @@ public: }; -AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<>& rFinishLink, bool bAutoPilot ) : +AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<ListBox&,void>& rFinishLink, bool bAutoPilot ) : mpTemplateRegion(NULL), mpLayoutRegion(NULL), mbUserDataDirty(false), @@ -1101,11 +1101,11 @@ IMPL_LINK_NOARG(AssistentDlgImpl, SelectEffectHdl) return 0; } -IMPL_LINK_TYPED( AssistentDlgImpl, OpenButtonHdl, Button*, pButton, void ) +IMPL_LINK_NOARG_TYPED( AssistentDlgImpl, OpenButtonHdl, Button*, void ) { // Clear the selection and forward the call. mpPage1OpenLB->SetNoSelection(); - mpPage1OpenLB->GetDoubleClickHdl().Call(pButton); + mpPage1OpenLB->GetDoubleClickHdl().Call(*mpPage1OpenLB); } IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, EffectPreviewIdleHdl, Idle *, void) @@ -1723,15 +1723,20 @@ AssistentDlg::AssistentDlg(vcl::Window* pParent, bool bAutoPilot) : mpImpl = new AssistentDlgImpl( this, LINK(this,AssistentDlg, FinishHdl2), bAutoPilot ); // button assignment - mpImpl->mpFinishButton->SetClickHdl(LINK(this,AssistentDlg,FinishHdl)); + mpImpl->mpFinishButton->SetClickHdl( LINK(this,AssistentDlg,FinishHdl) ); } IMPL_LINK_NOARG_TYPED(AssistentDlg, FinishHdl, Button*, void) { - FinishHdl2(NULL); + FinishHdl(); } -IMPL_LINK_NOARG(AssistentDlg, FinishHdl2) +IMPL_LINK_NOARG_TYPED(AssistentDlg, FinishHdl2, ListBox&, void) +{ + FinishHdl(); +} + +void AssistentDlg::FinishHdl() { if( GetStartType() == ST_OPEN ) { @@ -1746,7 +1751,7 @@ IMPL_LINK_NOARG(AssistentDlg, FinishHdl2) if ( aFileDlg.Execute() == ERRCODE_NONE ) aFileToOpen = aFileDlg.GetPath(); if (aFileToOpen.isEmpty()) - return 1; + return; else { //add the selected file to the recent-file-listbox and select the new entry @@ -1764,7 +1769,6 @@ IMPL_LINK_NOARG(AssistentDlg, FinishHdl2) // end mpImpl->EndDialog(RET_OK); EndDialog(RET_OK); - return 0; } AssistentDlg::~AssistentDlg() diff --git a/sd/source/ui/inc/dlgass.hxx b/sd/source/ui/inc/dlgass.hxx index c3685c22d598..426683d5461a 100644 --- a/sd/source/ui/inc/dlgass.hxx +++ b/sd/source/ui/inc/dlgass.hxx @@ -46,7 +46,8 @@ public: virtual void dispose() SAL_OVERRIDE; DECL_LINK_TYPED( FinishHdl, Button*, void ); - DECL_LINK( FinishHdl2, void* ); + DECL_LINK_TYPED( FinishHdl2, ListBox&, void ); + void FinishHdl(); SfxObjectShellLock GetDocument(); OutputType GetOutputMedium() const; |