sc/source/ui/Accessibility/AccessiblePreviewTable.cxx | 4 ++-- sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit fbc871f642e22e7f4115de78712b99fbb8e8b53a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Sep 5 09:00:37 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Sep 5 11:12:14 2022 +0200 cid#1513506 Unintended sign extension and cid#1513508 Unintentional integer overflow cid#1513510 Unintentional integer overflow cid#1513512 Unintentional integer overflow fallout from: commit 206543c7bef58fc559852553a3b2faba0b604259 Date: Fri Sep 2 13:06:08 2022 +0200 [API CHANGE] tdf#150683 a11y: Switch a11y child index to 64 bit Change-Id: I98c025e3309b775a3c809d93a8e133bbcd9fb4df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139402 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index feaabfa820d1..236102484dcc 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -367,7 +367,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRow( sal_Int64 nChildI FillTableInfo(); - if ( !mpTableInfo || nChildIndex < 0 || nChildIndex >= static_cast<sal_Int32>(mpTableInfo->GetRows()) * mpTableInfo->GetCols() ) + if ( !mpTableInfo || nChildIndex < 0 || nChildIndex >= static_cast<sal_Int64>(mpTableInfo->GetRows()) * mpTableInfo->GetCols() ) throw lang::IndexOutOfBoundsException(); sal_Int32 nRow = nChildIndex / mpTableInfo->GetCols(); @@ -381,7 +381,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumn( sal_Int64 nChi FillTableInfo(); - if ( !mpTableInfo || nChildIndex < 0 || nChildIndex >= static_cast<sal_Int32>(mpTableInfo->GetRows()) * mpTableInfo->GetCols() ) + if ( !mpTableInfo || nChildIndex < 0 || nChildIndex >= static_cast<sal_Int64>(mpTableInfo->GetRows()) * mpTableInfo->GetCols() ) throw lang::IndexOutOfBoundsException(); sal_Int32 nCol = nChildIndex % static_cast<sal_Int32>(mpTableInfo->GetCols()); diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 23f017e5675c..38e9fb7b7fde 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -1606,9 +1606,9 @@ bool ScAccessibleSpreadsheet::CheckChildIndex(sal_Int64 nIndex) const ScAddress ScAccessibleSpreadsheet::GetChildIndexAddress(sal_Int64 nIndex) const { - sal_Int32 nRowAll = GetRowAll(); - sal_uInt16 nColAll = GetColAll(); - if (nIndex < 0 || nIndex >= nRowAll * nColAll ) + sal_Int64 nRowAll = GetRowAll(); + sal_Int64 nColAll = GetColAll(); + if (nIndex < 0 || nIndex >= nRowAll * nColAll) { return ScAddress(); }