diff options
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblemenubar.cxx')
-rw-r--r-- | accessibility/source/standard/vclxaccessiblemenubar.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/accessibility/source/standard/vclxaccessiblemenubar.cxx b/accessibility/source/standard/vclxaccessiblemenubar.cxx index 3313f93bf616..36209fefa6b4 100644 --- a/accessibility/source/standard/vclxaccessiblemenubar.cxx +++ b/accessibility/source/standard/vclxaccessiblemenubar.cxx @@ -73,18 +73,13 @@ bool VCLXAccessibleMenuBar::IsFocused() -IMPL_LINK( VCLXAccessibleMenuBar, WindowEventListener, VclSimpleEvent*, pEvent ) +IMPL_LINK_TYPED( VCLXAccessibleMenuBar, WindowEventListener, VclWindowEvent&, rEvent, void ) { - OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "VCLXAccessibleMenuBar::WindowEventListener: unknown window event!" ); - if ( pEvent && pEvent->ISA( VclWindowEvent ) ) + OSL_ENSURE( rEvent.GetWindow(), "VCLXAccessibleMenuBar::WindowEventListener: no window!" ); + if ( !rEvent.GetWindow()->IsAccessibilityEventsSuppressed() || ( rEvent.GetId() == VCLEVENT_OBJECT_DYING ) ) { - OSL_ENSURE( static_cast<VclWindowEvent*>(pEvent)->GetWindow(), "VCLXAccessibleMenuBar::WindowEventListener: no window!" ); - if ( !static_cast<VclWindowEvent*>(pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) ) - { - ProcessWindowEvent( *static_cast<VclWindowEvent*>(pEvent) ); - } + ProcessWindowEvent( rEvent ); } - return 0; } |