diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-09-05 16:29:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-09-06 09:22:35 +0200 |
commit | 13de5fc5396db63d4bd2f3e5fb4dc66c7ddd601f (patch) | |
tree | 65cfc0257c723084bb2f9db4ab9444b83c338c98 /accessibility | |
parent | 503a9252f1d51cc32095e09b11f6c95a57328019 (diff) |
simplify VclEventId::TabpageRemoved handling
Change-Id: I9fe97a8d71fb898c0603ec76f7b86afb19c60654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/standard/vclxaccessibletabcontrol.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
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; } } } |