diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-18 15:10:41 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-20 06:37:36 +0000 |
commit | 99bfc363a6f6779d0be2284f85a9131254bce1f9 (patch) | |
tree | 3da30adea892bae0f5e76031d8561e114c2da8d9 /framework/source/dispatch | |
parent | e3c3b7fde3c017bd7d25f04fabf9b4528e37fb49 (diff) |
convert Link<> to typed
Change-Id: I10b050dc4aae45e646761a82520caa96969bc511
Reviewed-on: https://gerrit.libreoffice.org/18700
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework/source/dispatch')
-rw-r--r-- | framework/source/dispatch/windowcommanddispatch.cxx | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/framework/source/dispatch/windowcommanddispatch.cxx b/framework/source/dispatch/windowcommanddispatch.cxx index dcdc4651c2d8..e3bd9bdf5aad 100644 --- a/framework/source/dispatch/windowcommanddispatch.cxx +++ b/framework/source/dispatch/windowcommanddispatch.cxx @@ -92,27 +92,23 @@ void WindowCommandDispatch::impl_stopListening() } } -IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, void*, pParam) +IMPL_LINK_TYPED(WindowCommandDispatch, impl_notifyCommand, VclWindowEvent&, rEvent, void) { - if ( ! pParam) - return 0L; - - const VclWindowEvent* pEvent = static_cast<VclWindowEvent*>(pParam); - if (pEvent->GetId() == VCLEVENT_OBJECT_DYING) + if (rEvent.GetId() == VCLEVENT_OBJECT_DYING) { impl_stopListening(); - return 0L; + return; } - if (pEvent->GetId() != VCLEVENT_WINDOW_COMMAND) - return 0L; + if (rEvent.GetId() != VCLEVENT_WINDOW_COMMAND) + return; - const CommandEvent* pCommand = static_cast<CommandEvent*>(pEvent->GetData()); + const CommandEvent* pCommand = static_cast<CommandEvent*>(rEvent.GetData()); if (pCommand->GetCommand() != CommandEventId::ShowDialog) - return 0L; + return; const CommandDialogData* pData = pCommand->GetDialogData(); if ( ! pData) - return 0L; + return; const ShowDialogId nCommand = pData->GetDialogId(); OUString sCommand; @@ -128,12 +124,10 @@ IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, void*, pParam) break; default : - return 0L; + return; } impl_dispatchCommand(sCommand); - - return 0L; } void WindowCommandDispatch::impl_dispatchCommand(const OUString& sCommand) |