summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-22 20:06:25 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-23 11:53:59 +0200
commitcb78012a9ba17e264605e10c49303d2bf5e1460d (patch)
tree9c3a8ec629cdf72e4825468544f65d8c33e1374e /accessibility
parentf007378b74c1d316a510f4fe2491ec7724958c1c (diff)
cid#1539071 Division or modulo by zero
Change-Id: Icc730f5097609a845e287e580881a8466b0b128d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154793 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index 7157febc3ea3..fe2d51b0ee3f 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -320,11 +320,11 @@ namespace accessibility
ensureIsAlive();
- sal_Int32 nRows = implGetSelRowCount();
- if ( nRows == 0 )
+ const sal_Int32 nColCount = implGetColumnCount();
+
+ if (nColCount == 0)
throw IndexOutOfBoundsException();
- const sal_Int32 nColCount = implGetColumnCount();
const sal_Int32 nRow = implGetSelRow(nSelectedChildIndex / nColCount);
const sal_Int32 nColumn = nSelectedChildIndex % nColCount;
return getAccessibleCellAt( nRow, nColumn );