Avoid underflow of unsigned integer which leads a false error message

Change-Id: Ica65a96efe44fb46e25c224298aaff4cd7a40fa6
Reviewed-on: https://gerrit.libreoffice.org/42120
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
This commit is contained in:
Tamás Zolnai
2017-09-08 03:34:26 +02:00
parent 3fa8ff7734
commit fc674ad1b7

View File

@@ -870,7 +870,7 @@ void ScDPOutput::CalcSizes()
++nPageSize; // filter button above the page fields
}
if ( aStartPos.Col() + pRowFields.size() + nColCount - 1 > MAXCOL ||
if ( aStartPos.Col() + static_cast<long>(pRowFields.size()) + nColCount - 1 > MAXCOL ||
aStartPos.Row() + nPageSize + nHeaderSize + pColFields.size() + nRowCount > MAXROW )
{
bSizeOverflow = true;