cid#1606687 silence Overflowed integer argument

Change-Id: I692ac9745c0f2811e7e8d155d0aeeee578d358fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175068
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-10-15 13:05:28 +01:00
parent 3163717d4c
commit 8f55160f25

View file

@ -1221,14 +1221,13 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
}
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[nCurr],
rParm.nOldWish, nOldWidth, true );
bool bGoOn = !aRowSpanPos.empty();
sal_uInt16 j = nCurr;
while( bGoOn )
while (!aRowSpanPos.empty() && j > 0)
{
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[--j],
j = o3tl::sanitizing_dec(j);
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[j],
rParm.nOldWish, nOldWidth, true );
lcl_AdjustWidthsInLine( rLines[j], aCopy, rParm, 0 );
bGoOn = !aRowSpanPos.empty() && j > 0;
}
aRowSpanPos.clear();
}