editeng/source/rtf/rtfitem.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 225682b69a491600d8a5a574e2af8b01cac8a9e3 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Aug 4 20:04:54 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Aug 9 11:21:19 2025 +0200 cid#1660387 silence Overflowed integer argument Change-Id: I6ff28966b7a32ec7fa801ba8806d2fbc262ea0d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189155 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 17aafa8a558e..ab08b92682f8 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -1829,7 +1829,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) // Calculate the ratio of default TabWidth / Tabs and // calculate the corresponding new number. // ?? how did one come up with 13 ?? - sal_uInt16 nTabCount = (SVX_TAB_DEFDIST * 13 ) / sal_uInt16(nValue); + int nTabCount = (SVX_TAB_DEFDIST * 13 ) / nValue; /* cmc, make sure we have at least one, or all hell breaks loose in everybody exporters, #i8247# @@ -1839,7 +1839,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) // we want Defaulttabs SvxTabStopItem aNewTab(nTabCount, sal_uInt16(nValue), SvxTabAdjust::Default, wid); - while( nTabCount ) + while (nTabCount > 0) const_cast<SvxTabStop&>(aNewTab[ --nTabCount ]).GetAdjustment() = SvxTabAdjust::Default; pAttrPool->SetUserDefaultItem( aNewTab );
