summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-02-23 14:08:11 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2022-02-24 07:21:12 +0100
commitdc4c55c51d52340c84e21da92d61d3488a253cd3 (patch)
tree5ba32193f29a847d4a7ee6f0f00c9bf5fe2c4632 /accessibility
parent5693f0caa0bb589696ac36b9e0ca42b5e26924d0 (diff)
a11y: Simplify AccessibleGridControlTable::getAccessibleCellAt
Call 'AccessibleGridControlTable::getAccessibleChild' with the calculated child index instead of duplicating the handling to retrieve/create the proper accessible object. Change-Id: I8135f379f304d0e8ac61806eba9b3bd6c644f3a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130443 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/AccessibleGridControlTable.cxx12
1 files changed, 1 insertions, 11 deletions
diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx
index 8938ba83a122..da634269b049 100644
--- a/accessibility/source/extended/AccessibleGridControlTable.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTable.cxx
@@ -181,18 +181,8 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellA
ensureIsAlive();
ensureIsValidAddress( nRow, nColumn );
- sal_Int32 nCount = getAccessibleChildCount();
sal_Int32 nChildIndex = nRow*m_aTable.GetColumnCount() + nColumn;
- if(m_aCellVector.empty() || m_aCellVector.size() != static_cast<unsigned>(nCount))
- {
- m_aCellVector.resize(nCount);
- }
- if(!m_aCellVector[nChildIndex].is())
- {
- rtl::Reference<AccessibleGridControlTableCell> pCell = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumn);
- m_aCellVector[nChildIndex] = pCell;
- }
- return m_aCellVector[nChildIndex];
+ return getAccessibleChild(nChildIndex);
}
sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleSelected(