summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-21 08:03:25 +0200
committerNoel Grandin <noel@peralex.com>2015-09-21 08:03:52 +0200
commit1e67e94f1a308ca60d4934e9fe9d5c048225ebe8 (patch)
treec3bdf0fcec6912bc84e835fe48a80ee9f9391106 /toolkit
parentc916152d8562cab868d4c522748ac30029fad179 (diff)
convert Link<> to typed
Change-Id: If3e2b00092440ebd42ae5b73ae2b0e44c3702683
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx12
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx27
2 files changed, 18 insertions, 21 deletions
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 61098cd1488f..b83169d28640 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -118,21 +118,19 @@ IMPL_LINK_TYPED( VCLXAccessibleComponent, WindowEventListener, VclWindowEvent&,
}
}
-IMPL_LINK( VCLXAccessibleComponent, WindowChildEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( VCLXAccessibleComponent, WindowChildEventListener, VclWindowEvent&, rEvent, void )
{
- DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) && mxWindow.is() /* #i68079# */ )
+ if ( mxWindow.is() /* #i68079# */ )
{
- DBG_ASSERT( static_cast<VclWindowEvent*>(pEvent)->GetWindow(), "Window???" );
- if( !static_cast<VclWindowEvent*>(pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() )
+ DBG_ASSERT( rEvent.GetWindow(), "Window???" );
+ if( !rEvent.GetWindow()->IsAccessibilityEventsSuppressed() )
{
// #103087# to prevent an early release of the component
uno::Reference< accessibility::XAccessibleContext > xTmp = this;
- ProcessWindowChildEvent( *static_cast<VclWindowEvent*>(pEvent) );
+ ProcessWindowChildEvent( rEvent );
}
}
- return 0;
}
uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::GetChildAccessible( const VclWindowEvent& rVclWindowEvent )
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 00f7999b1d20..09751da5e772 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -160,12 +160,12 @@ class VCLXToolkit : public VCLXToolkit_Impl,
::cppu::OInterfaceContainerHelper m_aTopWindowListeners;
::cppu::OInterfaceContainerHelper m_aKeyHandlers;
::cppu::OInterfaceContainerHelper m_aFocusListeners;
- ::Link<> m_aEventListenerLink;
+ ::Link<VclSimpleEvent&,void> m_aEventListenerLink;
::Link<VclWindowEvent&,bool> m_aKeyListenerLink;
bool m_bEventListener;
bool m_bKeyListener;
- DECL_LINK(eventListenerHandler, ::VclSimpleEvent const *);
+ DECL_LINK_TYPED(eventListenerHandler, ::VclSimpleEvent&, void);
DECL_LINK_TYPED(keyListenerHandler, ::VclWindowEvent&, bool);
@@ -1695,46 +1695,45 @@ void SAL_CALL VCLXToolkit::fireFocusLost(
}
-IMPL_LINK(VCLXToolkit, eventListenerHandler, ::VclSimpleEvent const *, pEvent)
+IMPL_LINK_TYPED(VCLXToolkit, eventListenerHandler, ::VclSimpleEvent&, rEvent, void)
{
- switch (pEvent->GetId())
+ switch (rEvent.GetId())
{
case VCLEVENT_WINDOW_SHOW:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowOpened);
+ &rEvent, &css::awt::XTopWindowListener::windowOpened);
break;
case VCLEVENT_WINDOW_HIDE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowClosed);
+ &rEvent, &css::awt::XTopWindowListener::windowClosed);
break;
case VCLEVENT_WINDOW_ACTIVATE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowActivated);
+ &rEvent, &css::awt::XTopWindowListener::windowActivated);
break;
case VCLEVENT_WINDOW_DEACTIVATE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowDeactivated);
+ &rEvent, &css::awt::XTopWindowListener::windowDeactivated);
break;
case VCLEVENT_WINDOW_CLOSE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowClosing);
+ &rEvent, &css::awt::XTopWindowListener::windowClosing);
break;
case VCLEVENT_WINDOW_GETFOCUS:
- callFocusListeners(pEvent, true);
+ callFocusListeners(&rEvent, true);
break;
case VCLEVENT_WINDOW_LOSEFOCUS:
- callFocusListeners(pEvent, false);
+ callFocusListeners(&rEvent, false);
break;
case VCLEVENT_WINDOW_MINIMIZE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowMinimized);
+ &rEvent, &css::awt::XTopWindowListener::windowMinimized);
break;
case VCLEVENT_WINDOW_NORMALIZE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowNormalized);
+ &rEvent, &css::awt::XTopWindowListener::windowNormalized);
break;
}
- return 0;
}
IMPL_LINK_TYPED(VCLXToolkit, keyListenerHandler, ::VclWindowEvent&, rEvent, bool)