summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-10-22 12:17:03 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-10-22 15:42:46 +0200
commit51a482bc0452003dbbd396cb39bb9c2b1261df64 (patch)
tree1a51b25b6465053657c124ca12d09536fb7d6f49 /accessibility
parentf85366c407e71fc4e382c449504940aaedab354f (diff)
a11y: Return early in AccessibleTabBar::getAccessibleAtPoint
Just return `xAcc` right away instead of first assigning it to a local variable. Change-Id: If11c88266b4ec72b2d5d927e3f28a14bf0cdc304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175404 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/accessibletabbar.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx
index 55318298d1ae..2b1522f30a28 100644
--- a/accessibility/source/extended/accessibletabbar.cxx
+++ b/accessibility/source/extended/accessibletabbar.cxx
@@ -354,7 +354,6 @@ namespace accessibility
{
OExternalLockGuard aGuard( this );
- Reference< XAccessible > xChild;
for( sal_Int64 i = 0; i < getAccessibleChildCount(); ++i )
{
Reference< XAccessible > xAcc = getAccessibleChild( i );
@@ -367,14 +366,13 @@ namespace accessibility
Point aPos = VCLUnoHelper::ConvertToVCLPoint(rPoint);
if ( aRect.Contains( aPos ) )
{
- xChild = std::move(xAcc);
- break;
+ return xAcc;
}
}
}
}
- return xChild;
+ return nullptr;
}
void AccessibleTabBar::grabFocus( )