accessibility/source/standard/vclxaccessibletabcontrol.cxx | 14 ++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
New commits: commit 13de5fc5396db63d4bd2f3e5fb4dc66c7ddd601f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Sep 5 16:29:19 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Sep 6 09:22:35 2023 +0200 simplify VclEventId::TabpageRemoved handling Change-Id: I9fe97a8d71fb898c0603ec76f7b86afb19c60654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156572 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index a0990d51febd..e03e913041f8 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -181,18 +181,14 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin { if ( m_pTabControl ) { + OExternalLockGuard aGuard( this ); sal_uInt16 nPageId = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData())); - for ( sal_Int64 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i ) + for ( sal_Int64 i = 0, nCount = m_aAccessibleChildren.size(); i < nCount; ++i ) { - Reference< XAccessible > xChild( getAccessibleChild( i ) ); - if ( xChild.is() ) + if ( m_aAccessibleChildren[i] && m_aAccessibleChildren[i]->GetPageId() == nPageId ) { - VCLXAccessibleTabPage* pVCLXAccessibleTabPage = static_cast< VCLXAccessibleTabPage* >( xChild.get() ); - if ( pVCLXAccessibleTabPage && pVCLXAccessibleTabPage->GetPageId() == nPageId ) - { - RemoveChild( i ); - break; - } + RemoveChild( i ); + break; } } }