sw a11y: Drop local XAccessible var

Just return the result directly instead of
first assigning it to a local variable.

Change-Id: Iaf7e6409d2843507b2c725a537145c7789ad15b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210614
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2026-09-10 18:31:44 +02:00
parent a2ad4fc380
commit 59bab7c98b
+6 -14
View File
@@ -722,8 +722,6 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint
ThrowIfDisposed();
uno::Reference< XAccessible > xAcc;
vcl::Window *pWin = GetWindow();
if (!pWin)
{
@@ -741,19 +739,13 @@ uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint
const SwAccessibleChild aChild( GetChildAtPixel( aPixPoint, *(GetMap()) ) );
if( aChild.GetSwFrame() )
{
xAcc = GetMap()->GetContext( aChild.GetSwFrame() );
}
else if( aChild.GetDrawObject() )
{
xAcc = GetMap()->GetContext( aChild.GetDrawObject(), this );
}
else if ( aChild.GetWindow() )
{
xAcc = aChild.GetWindow()->GetAccessible();
}
return GetMap()->GetContext(aChild.GetSwFrame());
if (aChild.GetDrawObject())
return GetMap()->GetContext(aChild.GetDrawObject(), this);
if (aChild.GetWindow())
return aChild.GetWindow()->GetAccessible();
return xAcc;
return {};
}
/**