wina11y: Simplify AccessBridgeUpdateOldTopWindows
Use an OAccessible var instead of an XAccessible one, which drops the need to query for the XAccessibleConetxt interface. Change-Id: I331890f6d2b1d507ad72108a10538fabb1372cfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188606 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
@@ -149,16 +149,9 @@ static void AccessBridgeUpdateOldTopWindows( const Reference< XMSAAService > &xA
|
||||
for (tools::Long i = 0; i < nTopWindowCount; i++)
|
||||
{
|
||||
vcl::Window* pTopWindow = Application::GetTopWindow( i );
|
||||
css::uno::Reference< css::accessibility::XAccessible > xAccessible = pTopWindow->GetAccessible();
|
||||
if ( xAccessible.is() )
|
||||
{
|
||||
css::uno::Reference< css::accessibility::XAccessibleContext > xAC( xAccessible->getAccessibleContext() );
|
||||
if ( xAC.is())
|
||||
{
|
||||
if ( !xAC->getAccessibleName().isEmpty() )
|
||||
xAccMgr->handleWindowOpened(reinterpret_cast<sal_Int64>(pTopWindow));
|
||||
}
|
||||
}
|
||||
rtl::Reference<comphelper::OAccessible> pAccessible = pTopWindow->GetAccessible();
|
||||
if (pAccessible.is() && !pAccessible->getAccessibleName().isEmpty())
|
||||
xAccMgr->handleWindowOpened(reinterpret_cast<sal_Int64>(pTopWindow));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user