diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-11 09:48:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-15 10:22:27 +0200 |
commit | 7d30c7b93848f46f6ba3bfee7e93b12ac75af6a6 (patch) | |
tree | 969cf0efd8ce44140ab991ef5c654eaca4117311 | |
parent | 71ab742c8e36dc10b2dbccfb3bacbffbfaed1178 (diff) |
cid#1607343 silence Overflowed constant
and
cid#1607447 Overflowed constant
Change-Id: If9be20f1e6a42343844c887c1e16d4c066ff3949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173365
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index bb9e58009d50..86bdf100a73e 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -2076,7 +2076,7 @@ void ChartController::sendPopupRequest(std::u16string_view rCID, tools::Rectangl // Get dimension index from CID size_t nStartPos = rCID.rfind('.'); - nStartPos++; + nStartPos = (nStartPos == std::u16string_view::npos) ? 0 : (nStartPos + 1); sal_Int32 nEndPos = rCID.size(); std::u16string_view sDimensionIndex = rCID.substr(nStartPos, nEndPos - nStartPos); sal_Int32 nDimensionIndex = o3tl::toInt32(sDimensionIndex); diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 2d87abed4789..f1443b9c5109 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -3602,8 +3602,9 @@ void ScInterpreter::ScGetPivotData() aFilters.resize(nFilterCount); sal_uInt16 i = nFilterCount; - while (i-- > 0) + while (i > 0) { + --i; /* TODO: also, in case of numeric the entire filter match should * not be on a (even if locale independent) formatted string down * below in pDPObj->GetPivotData(). */ |