summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-07-10 11:39:11 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-07-12 07:03:35 +0200
commita8314f77a4735d50b51dacddc810a3790faf35dc (patch)
tree8638fdd9edd15506bb34d03ed03c1463d7cf9fe0
parent705d64253357313ce9630e533fd6b6823fc50dfc (diff)
icon choice ctrl a11y: Drop extra check
`AccessibleIconChoiceCtrl::getAccessibleChildCount` returns the the number of elements in the `SvxIconChoiceCtrl_Impl::maEntries` vector, and `SvtIconChoiceCtrl->GetEntry` returns the the element at the given index. Given the index check above, a valid entry should always be there, so drop the extra check that would throw a RuntimeException in `AccessibleIconChoiceCtrl::getAccessibleChild`. The `pEntry` isn't otherwise used right here anyway. Change-Id: I446b6d8d92780d484ebf5fc531bfa51a7c87cac7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170372 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx6
1 files changed, 0 insertions, 6 deletions
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index 950e5aa62b7d..84283e20ee2c 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -160,12 +160,6 @@ namespace accessibility
throw IndexOutOfBoundsException();
VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl();
- SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry(i);
- if ( !pEntry )
- throw RuntimeException("getAccessibleChild: Entry "
- + OUString::number(i) + " not found",
- getXWeak());
-
return new AccessibleIconChoiceCtrlEntry( *pCtrl, i, this );
}