summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-10-28 08:36:53 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-10-28 12:13:48 +0100
commitd8ab848c05c66695eba558530b0955221a3be886 (patch)
treee5601e0f59c07ad04a38d4902163eae0a2299ad2 /accessibility
parent49f2b76f962c5cdbfb33f6f8fa08210676067af2 (diff)
a11y: Return early in OAccessibleMenuBaseComponent::GetChildAt
Change-Id: Ia44d7341665e499549fd359f0daa69958647171d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175711 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/standard/accessiblemenubasecomponent.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index 5369ac3bd2c9..5c9e1e47b637 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -334,7 +334,6 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChild( sal_Int64 i )
Reference< XAccessible > OAccessibleMenuBaseComponent::GetChildAt( const awt::Point& rPoint )
{
- Reference< XAccessible > xChild;
for ( sal_Int64 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i )
{
Reference< XAccessible > xAcc = getAccessibleChild( i );
@@ -347,14 +346,13 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChildAt( const awt::Po
Point aPos = VCLUnoHelper::ConvertToVCLPoint(rPoint);
if ( aRect.Contains( aPos ) )
{
- xChild = std::move(xAcc);
- break;
+ return xAcc;
}
}
}
}
- return xChild;
+ return nullptr;
}