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 /toolkit | |
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 'toolkit')
-rw-r--r-- | toolkit/source/awt/stylesettings.cxx | 16 | ||||
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 13 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 13 |
3 files changed, 17 insertions, 25 deletions
diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx index c3553d5502be..844d36a88698 100644 --- a/toolkit/source/awt/stylesettings.cxx +++ b/toolkit/source/awt/stylesettings.cxx @@ -65,23 +65,23 @@ namespace toolkit { } - DECL_LINK( OnWindowEvent, const VclWindowEvent* ); + DECL_LINK_TYPED( OnWindowEvent, VclWindowEvent&, void ); }; - IMPL_LINK( WindowStyleSettings_Data, OnWindowEvent, const VclWindowEvent*, i_pEvent ) + IMPL_LINK_TYPED( WindowStyleSettings_Data, OnWindowEvent, VclWindowEvent&, rEvent, void ) { - if ( !i_pEvent || ( i_pEvent->GetId() != VCLEVENT_WINDOW_DATACHANGED ) ) - return 0L; - const DataChangedEvent* pDataChangedEvent = static_cast< const DataChangedEvent* >( i_pEvent->GetData() ); + if ( rEvent.GetId() != VCLEVENT_WINDOW_DATACHANGED ) + return; + const DataChangedEvent* pDataChangedEvent = static_cast< const DataChangedEvent* >( rEvent.GetData() ); if ( !pDataChangedEvent || ( pDataChangedEvent->GetType() != DataChangedEventType::SETTINGS ) ) - return 0L; + return; if ( !( pDataChangedEvent->GetFlags() & AllSettingsFlags::STYLE ) ) - return 0L; + return; EventObject aEvent( *pOwningWindow ); aStyleChangeListeners.notifyEach( &XStyleChangeListener::styleSettingsChanged, aEvent ); - return 1L; + return; } diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index e5addcbe7787..61098cd1488f 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -102,23 +102,20 @@ uno::Sequence< OUString > VCLXAccessibleComponent::getSupportedServiceNames() th return aNames; } -IMPL_LINK( VCLXAccessibleComponent, WindowEventListener, VclSimpleEvent*, pEvent ) +IMPL_LINK_TYPED( VCLXAccessibleComponent, WindowEventListener, VclWindowEvent&, rEvent, void ) { - DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" ); - /* Ignore VCLEVENT_WINDOW_ENDPOPUPMODE, because the UNO accessibility wrapper * might have been destroyed by the previous VCLEventListener (if no AT tool * is running), e.g. sub-toolbars in impress. */ - if ( pEvent && pEvent->ISA( VclWindowEvent ) && mxWindow.is() /* #122218# */ && (pEvent->GetId() != VCLEVENT_WINDOW_ENDPOPUPMODE) ) + if ( mxWindow.is() /* #122218# */ && (rEvent.GetId() != VCLEVENT_WINDOW_ENDPOPUPMODE) ) { - DBG_ASSERT( static_cast<VclWindowEvent*>(pEvent)->GetWindow(), "Window???" ); - if( !static_cast<VclWindowEvent*>(pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) ) + DBG_ASSERT( rEvent.GetWindow(), "Window???" ); + if( !rEvent.GetWindow()->IsAccessibilityEventsSuppressed() || ( rEvent.GetId() == VCLEVENT_OBJECT_DYING ) ) { - ProcessWindowEvent( *static_cast<VclWindowEvent*>(pEvent) ); + ProcessWindowEvent( rEvent ); } } - return 0; } IMPL_LINK( VCLXAccessibleComponent, WindowChildEventListener, VclSimpleEvent*, pEvent ) diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 2d50217551f0..866fef255f65 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -403,18 +403,13 @@ void VCLXWindow::notifyWindowRemoved( vcl::Window& _rWindow ) } } -IMPL_LINK( VCLXWindow, WindowEventListener, VclSimpleEvent*, pEvent ) +IMPL_LINK_TYPED( VCLXWindow, WindowEventListener, VclWindowEvent&, rEvent, void ) { if ( mpImpl->mnListenerLockLevel ) - return 0L; + return; - DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" ); - if ( pEvent && pEvent->ISA( VclWindowEvent ) ) - { - DBG_ASSERT( static_cast<VclWindowEvent*>(pEvent)->GetWindow() && GetWindow(), "Window???" ); - ProcessWindowEvent( *static_cast<VclWindowEvent*>(pEvent) ); - } - return 0; + DBG_ASSERT( rEvent.GetWindow() && GetWindow(), "Window???" ); + ProcessWindowEvent( rEvent ); } namespace |