diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-19 09:11:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-26 11:15:35 +0200 |
commit | 167bc621ef825ed5b961502fe9324a675ee34e42 (patch) | |
tree | 523838d8adc14a62f846529ee6eab3343b2fe87b /basic | |
parent | 46a27805fb707544a844a961a3743b8b992282f0 (diff) |
Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/inputbox.cxx | 14 | ||||
-rw-r--r-- | basic/source/runtime/iosys.cxx | 14 |
2 files changed, 8 insertions, 20 deletions
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index 6f62e49e97f4..b925c6cd4b8f 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -40,8 +40,8 @@ class SvRTLInputBox : public ModalDialog void InitButtons( const Size& rDlgSize ); void PositionEdit( const Size& rDlgSize ); void PositionPrompt( const OUString& rPrompt, const Size& rDlgSize ); - DECL_LINK( OkHdl, Button * ); - DECL_LINK( CancelHdl, Button * ); + DECL_LINK_TYPED( OkHdl, Button *, void ); + DECL_LINK_TYPED( CancelHdl, Button *, void ); public: SvRTLInputBox( vcl::Window* pParent, const OUString& rPrompt, const OUString& rTitle, @@ -129,22 +129,16 @@ void SvRTLInputBox::PositionPrompt(const OUString& rPrompt,const Size& rDlgSize) } -IMPL_LINK( SvRTLInputBox, OkHdl, Button *, pButton ) +IMPL_LINK_NOARG_TYPED( SvRTLInputBox, OkHdl, Button *, void ) { - (void)pButton; - aText = aEdit->GetText(); EndDialog( 1 ); - return 0; } -IMPL_LINK( SvRTLInputBox, CancelHdl, Button *, pButton ) +IMPL_LINK_NOARG_TYPED( SvRTLInputBox, CancelHdl, Button *, void ) { - (void)pButton; - aText.clear(); EndDialog(); - return 0; } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index c069c6f92c51..7be2228bba72 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -70,8 +70,8 @@ class SbiInputDialog : public ModalDialog { VclPtr<OKButton> aOk; VclPtr<CancelButton> aCancel; OUString aText; - DECL_LINK( Ok, vcl::Window * ); - DECL_LINK( Cancel, vcl::Window * ); + DECL_LINK_TYPED( Ok, Button *, void ); + DECL_LINK_TYPED( Cancel, Button *, void ); public: SbiInputDialog( vcl::Window*, const OUString& ); virtual ~SbiInputDialog() { disposeOnce(); } @@ -115,21 +115,15 @@ void SbiInputDialog::dispose() ModalDialog::dispose(); } -IMPL_LINK( SbiInputDialog, Ok, vcl::Window *, pWindow ) +IMPL_LINK_NOARG_TYPED( SbiInputDialog, Ok, Button *, void ) { - (void)pWindow; - aText = aInput->GetText(); EndDialog( 1 ); - return 0; } -IMPL_LINK( SbiInputDialog, Cancel, vcl::Window *, pWindow ) +IMPL_LINK_NOARG_TYPED( SbiInputDialog, Cancel, Button *, void ) { - (void)pWindow; - EndDialog(); - return 0; } SbiStream::SbiStream() |