a11y: Drop redundant call to get VCLXAccessibleComponent context

VCLXAccessibleComponent by now implements both,
the XAccessible and XAccessibleContext interfaces,
so calling VCLXAccessibleComponent::getAccessibleContext
(implemented in the OAccessibleComponentHelper base class)
is redundant.

Change-Id: I1cee73b042ec38612bee0cc97590d58faccb96d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185850
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2025-06-25 07:40:36 +02:00
parent 22049f633b
commit 4f16e857f4
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -1037,9 +1037,8 @@ atk_object_wrapper_new( const css::uno::Reference< css::accessibility::XAccessib
}
// tdf#141197 if we have a sysobj child then include that in the hierarchy
rtl::Reference<VCLXAccessibleComponent> pVCLAccComponent
= dynamic_cast<VCLXAccessibleComponent*>(rxAccessible->getAccessibleContext().get());
if (pVCLAccComponent.is())
if (VCLXAccessibleComponent* pVCLAccComponent
= dynamic_cast<VCLXAccessibleComponent*>(rxAccessible.get()))
{
VclPtr<vcl::Window> xWindow = pVCLAccComponent->GetWindow();
if (xWindow && xWindow->GetType() == WindowType::SYSTEMCHILDWINDOW)
@@ -78,8 +78,8 @@ void AccFrameEventListener::HandleChildChangedEvent(Any oldValue, Any newValue)
{
if(xChild.is())
{
VCLXAccessibleComponent* pVCLAccComponent = dynamic_cast<VCLXAccessibleComponent*>(
m_xAccessible->getAccessibleContext().get());
VCLXAccessibleComponent* pVCLAccComponent
= dynamic_cast<VCLXAccessibleComponent*>(m_xAccessible.get());
assert(pVCLAccComponent);
const SystemEnvData* systemdata = pVCLAccComponent->GetWindow()->GetSystemData();