diff options
-rw-r--r-- | accessibility/inc/extended/accessibletablistboxtable.hxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/accessibility/inc/extended/accessibletablistboxtable.hxx b/accessibility/inc/extended/accessibletablistboxtable.hxx index 68e71f0e83d1..78a679f45393 100644 --- a/accessibility/inc/extended/accessibletablistboxtable.hxx +++ b/accessibility/inc/extended/accessibletablistboxtable.hxx @@ -59,7 +59,13 @@ private: sal_Int32 implGetSelRowCount() const; /** Returns the row index from cell index. */ - sal_Int32 implGetRow( sal_Int32 _nIndex ) const { return _nIndex / implGetColumnCount(); } + sal_Int32 implGetRow( sal_Int32 _nIndex ) const + { + auto nColCount = implGetColumnCount(); + assert(nColCount != 0); + return _nIndex / nColCount; + } + /** Returns the absolute row index of the nSelRow-th selected row. */ sal_Int32 implGetSelRow( sal_Int32 _nSelRow ) const; |