summaryrefslogtreecommitdiff
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-10-05 20:59:42 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-10-06 17:13:42 +0200
commite32ab825cb0566b55011f630ed7b79df0fd6e04c (patch)
treec27ab50e0627d79571f9d2f40e930fa29c9a3b8e /chart2/source/tools
parentcc19fb1550234b3e1eae3fb50fbf791d84b0ebe1 (diff)
cid#1608393 silence Overflowed constant
this code seems to be duplicated in sw/source/core/unocore/XMLRangeHelper.cxx too Change-Id: Ib41edfa33a72f32dff1f6720e6b0f356e9773f18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174556 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r--chart2/source/tools/XMLRangeHelper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/chart2/source/tools/XMLRangeHelper.cxx b/chart2/source/tools/XMLRangeHelper.cxx
index 1a7e789d3098..419c75924926 100644
--- a/chart2/source/tools/XMLRangeHelper.cxx
+++ b/chart2/source/tools/XMLRangeHelper.cxx
@@ -131,8 +131,9 @@ void lcl_getSingleCellAddressFromXMLString(
rOutCell.bRelativeRow = true;
// parse rest for column
+ assert(i <= 6);
sal_Int32 nPower = 1;
- while( rtl::isAsciiAlpha( pStrArray[ i ] ))
+ while( i >= 0 && rtl::isAsciiAlpha( pStrArray[ i ] ))
{
nColumn += (rtl::toAsciiUpperCase(pStrArray[ i ]) - aLetterA + 1) * nPower;
i--;