summaryrefslogtreecommitdiff
path: root/accessibility/source/extended
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/extended')
-rw-r--r--accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx24
-rw-r--r--accessibility/source/extended/accessibletabbarbase.cxx28
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx11
-rw-r--r--accessibility/source/extended/listboxaccessible.cxx13
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx5
5 files changed, 29 insertions, 52 deletions
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
index 34d9e974e9d2..34b8362ebc4a 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
@@ -116,7 +116,7 @@ namespace accessibility
virtual void LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter ) SAL_OVERRIDE;
virtual void Dying() SAL_OVERRIDE;
- DECL_LINK( OnWindowEvent, const VclSimpleEvent* );
+ DECL_LINK_TYPED( OnWindowEvent, VclWindowEvent&, void );
private:
AccessibleToolPanelTabBar& m_rAntiImpl;
@@ -228,30 +228,24 @@ namespace accessibility
m_rAntiImpl.dispose();
}
- IMPL_LINK( AccessibleToolPanelTabBar_Impl, OnWindowEvent, const VclSimpleEvent*, i_pEvent )
+ IMPL_LINK_TYPED( AccessibleToolPanelTabBar_Impl, OnWindowEvent, VclWindowEvent&, rWindowEvent, void )
{
- ENSURE_OR_RETURN( !isDisposed(), "AccessibleToolPanelTabBar_Impl::OnWindowEvent: already disposed!", 0L );
+ ENSURE_OR_RETURN_VOID( !isDisposed(), "AccessibleToolPanelTabBar_Impl::OnWindowEvent: already disposed!" );
- const VclWindowEvent* pWindowEvent( dynamic_cast< const VclWindowEvent* >( i_pEvent ) );
- if ( !pWindowEvent )
- return 0L;
+ const bool bForwardButton = ( rWindowEvent.GetWindow() == &m_pTabBar->GetScrollButton( true ) );
+ const bool bBackwardButton = ( rWindowEvent.GetWindow() == &m_pTabBar->GetScrollButton( false ) );
+ ENSURE_OR_RETURN_VOID( bForwardButton || bBackwardButton, "AccessibleToolPanelTabBar_Impl::OnWindowEvent: where does this come from?" );
- const bool bForwardButton = ( pWindowEvent->GetWindow() == &m_pTabBar->GetScrollButton( true ) );
- const bool bBackwardButton = ( pWindowEvent->GetWindow() == &m_pTabBar->GetScrollButton( false ) );
- ENSURE_OR_RETURN( bForwardButton || bBackwardButton, "AccessibleToolPanelTabBar_Impl::OnWindowEvent: where does this come from?", 0L );
-
- const bool bShow = ( i_pEvent->GetId() == VCLEVENT_WINDOW_SHOW );
- const bool bHide = ( i_pEvent->GetId() == VCLEVENT_WINDOW_HIDE );
+ const bool bShow = ( rWindowEvent.GetId() == VCLEVENT_WINDOW_SHOW );
+ const bool bHide = ( rWindowEvent.GetId() == VCLEVENT_WINDOW_HIDE );
if ( !bShow && !bHide )
// not interested in events other than visibility changes
- return 0L;
+ return;
const Reference< XAccessible > xButtonAccessible( m_pTabBar->GetScrollButton( bForwardButton ).GetAccessible() );
const Any aOldChild( bHide ? xButtonAccessible : Reference< XAccessible >() );
const Any aNewChild( bShow ? xButtonAccessible : Reference< XAccessible >() );
m_rAntiImpl.NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldChild, aNewChild );
-
- return 1L;
}
// MethodGuard
diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx
index 18c6ae50b1a3..a8a6c87439f7 100644
--- a/accessibility/source/extended/accessibletabbarbase.cxx
+++ b/accessibility/source/extended/accessibletabbarbase.cxx
@@ -43,26 +43,20 @@ AccessibleTabBarBase::~AccessibleTabBarBase()
DELETEZ( m_pExternalLock );
}
-IMPL_LINK( AccessibleTabBarBase, WindowEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( AccessibleTabBarBase, WindowEventListener, VclWindowEvent&, rEvent, void )
{
- VclWindowEvent* pWinEvent = dynamic_cast< VclWindowEvent* >( pEvent );
- OSL_ENSURE( pWinEvent, "AccessibleTabBarBase::WindowEventListener - unknown window event" );
- if( pWinEvent )
+ vcl::Window* pEventWindow = rEvent.GetWindow();
+ OSL_ENSURE( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" );
+
+ if( ( rEvent.GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) &&
+ ( (sal_uInt16)reinterpret_cast<sal_IntPtr>(rEvent.GetData()) == TabBar::PAGE_NOT_FOUND ) &&
+ ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) )
{
- vcl::Window* pEventWindow = pWinEvent->GetWindow();
- OSL_ENSURE( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" );
-
- if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) &&
- ( (sal_uInt16)reinterpret_cast<sal_IntPtr>(pWinEvent->GetData()) == TabBar::PAGE_NOT_FOUND ) &&
- ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) )
- {
- return 0;
- }
-
- if ( !pEventWindow->IsAccessibilityEventsSuppressed() || (pWinEvent->GetId() == VCLEVENT_OBJECT_DYING) )
- ProcessWindowEvent( *pWinEvent );
+ return;
}
- return 0;
+
+ if ( !pEventWindow->IsAccessibilityEventsSuppressed() || (rEvent.GetId() == VCLEVENT_OBJECT_DYING) )
+ ProcessWindowEvent( rEvent );
}
void AccessibleTabBarBase::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index d233aa62429a..4dc268fbd8e8 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -251,15 +251,10 @@ namespace accessibility
}
}
- IMPL_LINK( AccessibleTabListBoxTable, WindowEventListener, VclSimpleEvent*, pEvent )
+ IMPL_LINK_TYPED( AccessibleTabListBoxTable, WindowEventListener, VclWindowEvent&, rEvent, void )
{
- OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) )
- {
- OSL_ENSURE( static_cast<VclWindowEvent*>( pEvent )->GetWindow() && m_pTabListBox, "no event window" );
- ProcessWindowEvent( *static_cast<VclWindowEvent*>(pEvent) );
- }
- return 0;
+ OSL_ENSURE( rEvent.GetWindow() && m_pTabListBox, "no event window" );
+ ProcessWindowEvent( rEvent );
}
// helpers --------------------------------------------------------------------
diff --git a/accessibility/source/extended/listboxaccessible.cxx b/accessibility/source/extended/listboxaccessible.cxx
index e7e428c376f3..fdc340ebcd00 100644
--- a/accessibility/source/extended/listboxaccessible.cxx
+++ b/accessibility/source/extended/listboxaccessible.cxx
@@ -41,17 +41,12 @@ namespace accessibility
}
}
- IMPL_LINK( ListBoxAccessibleBase, WindowEventListener, VclSimpleEvent*, pEvent )
+ IMPL_LINK_TYPED( ListBoxAccessibleBase, WindowEventListener, VclWindowEvent&, rEvent, void )
{
- OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "ListBoxAccessibleBase::WindowEventListener: unexpected WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) )
- {
- OSL_ENSURE( static_cast< VclWindowEvent* >( pEvent )->GetWindow() , "ListBoxAccessibleBase::WindowEventListener: no event window!" );
- OSL_ENSURE( static_cast< VclWindowEvent* >( pEvent )->GetWindow() == m_pWindow, "ListBoxAccessibleBase::WindowEventListener: where did this come from?" );
+ OSL_ENSURE( rEvent.GetWindow() , "ListBoxAccessibleBase::WindowEventListener: no event window!" );
+ OSL_ENSURE( rEvent.GetWindow() == m_pWindow, "ListBoxAccessibleBase::WindowEventListener: where did this come from?" );
- ProcessWindowEvent( *static_cast< VclWindowEvent* >( pEvent ) );
- }
- return 0;
+ ProcessWindowEvent( rEvent );
}
void ListBoxAccessibleBase::disposing()
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 657b4fefcdd4..b78aa7e44a70 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1646,9 +1646,9 @@ void Document::Notify(::SfxBroadcaster &, ::SfxHint const & rHint)
}
}
-IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
+IMPL_LINK_TYPED(Document, WindowEventHandler, ::VclWindowEvent&, rEvent, void)
{
- switch (pEvent->GetId())
+ switch (rEvent.GetId())
{
case VCLEVENT_WINDOW_RESIZE:
{
@@ -1750,7 +1750,6 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
break;
}
}
- return 0;
}
void Document::init()