include/toolkit/awt/vclxaccessiblecomponent.hxx | 2 - toolkit/source/awt/vclxaccessiblecomponent.cxx | 31 +++++++++++------------- 2 files changed, 16 insertions(+), 17 deletions(-)
New commits: commit dd8c7d034271b15a6bfa8f48338dbee268757e66 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Dec 12 12:55:57 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Dec 12 23:00:39 2024 +0100 a11y: Rename VCLXAccessibleComponent::m_x{EventSource -> Window} Change-Id: I3724481e81a5f2987567b51424da479879ca78ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178364 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx b/include/toolkit/awt/vclxaccessiblecomponent.hxx index 551c7dcb607b..0afe07d9df70 100644 --- a/include/toolkit/awt/vclxaccessiblecomponent.hxx +++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx @@ -47,7 +47,7 @@ class TOOLKIT_DLLPUBLIC VCLXAccessibleComponent { private: rtl::Reference<VCLXWindow> m_xVCLXWindow; - VclPtr<vcl::Window> m_xEventSource; + VclPtr<vcl::Window> m_xWindow; DECL_DLLPRIVATE_LINK( WindowEventListener, VclWindowEvent&, void ); DECL_DLLPRIVATE_LINK( WindowChildEventListener, VclWindowEvent&, void ); diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index ba136aac3360..a42cab94d83f 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -47,11 +47,12 @@ VCLXAccessibleComponent::VCLXAccessibleComponent( VCLXWindow* pVCLXWindow ) m_xVCLXWindow = pVCLXWindow; DBG_ASSERT( pVCLXWindow->GetWindow(), "VCLXAccessibleComponent - no window!" ); - m_xEventSource = pVCLXWindow->GetWindow(); - if ( m_xEventSource ) + m_xWindow = pVCLXWindow->GetWindow(); + if (m_xWindow) { - m_xEventSource->AddEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); - m_xEventSource->AddChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); + m_xWindow->AddEventListener(LINK(this, VCLXAccessibleComponent, WindowEventListener)); + m_xWindow->AddChildEventListener( + LINK(this, VCLXAccessibleComponent, WindowChildEventListener)); } } @@ -62,11 +63,12 @@ VCLXWindow* VCLXAccessibleComponent::GetVCLXWindow() const void VCLXAccessibleComponent::DisconnectEvents() { - if ( m_xEventSource ) + if (m_xWindow) { - m_xEventSource->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); - m_xEventSource->RemoveChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); - m_xEventSource.clear(); + m_xWindow->RemoveEventListener(LINK(this, VCLXAccessibleComponent, WindowEventListener)); + m_xWindow->RemoveChildEventListener( + LINK(this, VCLXAccessibleComponent, WindowChildEventListener)); + m_xWindow.clear(); } } @@ -98,7 +100,7 @@ IMPL_LINK( VCLXAccessibleComponent, WindowEventListener, VclWindowEvent&, rEvent * might have been destroyed by the previous VCLEventListener (if no AT tool * is running), e.g. sub-toolbars in impress. */ - if (m_xEventSource && (rEvent.GetId() != VclEventId::WindowEndPopupMode)) + if (m_xWindow && (rEvent.GetId() != VclEventId::WindowEndPopupMode)) { DBG_ASSERT( rEvent.GetWindow(), "Window???" ); if( !rEvent.GetWindow()->IsAccessibilityEventsSuppressed() || ( rEvent.GetId() == VclEventId::ObjectDying ) ) @@ -110,7 +112,7 @@ IMPL_LINK( VCLXAccessibleComponent, WindowEventListener, VclWindowEvent&, rEvent IMPL_LINK( VCLXAccessibleComponent, WindowChildEventListener, VclWindowEvent&, rEvent, void ) { - if (m_xEventSource) + if (m_xWindow) { DBG_ASSERT( rEvent.GetWindow(), "Window???" ); if( !rEvent.GetWindow()->IsAccessibilityEventsSuppressed() ) @@ -375,10 +377,7 @@ void VCLXAccessibleComponent::disposing() m_xVCLXWindow.clear(); } -vcl::Window* VCLXAccessibleComponent::GetWindow() const -{ - return m_xEventSource; -} +vcl::Window* VCLXAccessibleComponent::GetWindow() const { return m_xWindow; } void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) { @@ -750,8 +749,8 @@ void VCLXAccessibleComponent::grabFocus( ) OExternalLockGuard aGuard( this ); sal_Int64 nStates = getAccessibleStateSet(); - if (m_xEventSource && (nStates & accessibility::AccessibleStateType::FOCUSABLE)) - m_xEventSource->GrabFocus(); + if (m_xWindow && (nStates & accessibility::AccessibleStateType::FOCUSABLE)) + m_xWindow->GrabFocus(); } sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( )