summaryrefslogtreecommitdiff
path: root/vcl/source/control/button.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/button.cxx')
-rw-r--r--vcl/source/control/button.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index a1c0dea3ccae..59fb68a01535 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -109,7 +109,7 @@ void Button::dispose()
void Button::SetCommandHandler(const OUString& aCommand)
{
maCommand = aCommand;
- SetClickHdl(Link<>(NULL, dispatchCommandHandler));
+ SetClickHdl( LINK( this, Button, dispatchCommandHandler) );
}
void Button::Click()
@@ -609,16 +609,12 @@ bool Button::set_property(const OString &rKey, const OString &rValue)
return true;
}
-sal_IntPtr Button::dispatchCommandHandler(void *, void *pCaller)
+IMPL_STATIC_LINK_TYPED( Button, dispatchCommandHandler, Button*, pButton, void )
{
- const Button *pButton = static_cast<Button*>(pCaller);
if (pButton == NULL)
- return 0;
-
- if (!comphelper::dispatchCommand(pButton->maCommand, uno::Sequence<beans::PropertyValue>()))
- return 0;
+ return;
- return 1;
+ comphelper::dispatchCommand(pButton->maCommand, uno::Sequence<beans::PropertyValue>());
}
void PushButton::ImplInitPushButtonData()