cid#1606904 silence Overflowed constant

and

cid#1606871 silence Overflowed constant

Change-Id: Ibfa7b63bf6879b24dc28df9d889c6692ec5a4e23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172512
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2024-08-28 13:12:51 +02:00
parent 17181dfd0f
commit 25552416c0
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -924,7 +924,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
// my laziness says 'do it here'...)
sal_Int32 nRow = GetRowAtYPosPixel(_rPosPixel.Y());
sal_uInt16 nColPos = GetColumnAtXPosPixel(_rPosPixel.X());
sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : sal_uInt16(nColPos-1);
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
bool bCurrentRowVirtual = IsCurrentAppending() && IsModified();
+2 -1
View File
@@ -235,8 +235,9 @@ static std::unique_ptr<SwPrintUIOptions> lcl_GetPrintUIOptions(
{
sal_uInt16 nMax = nCurrentPage;
const SwPageFrame *pPage = dynamic_cast<const SwPageFrame*>(pFrame->Lower());
while (pPage && nMax-- > 0)
while (pPage && nMax > 0)
{
nMax--;
if (pPage->getFrameArea().Height() == 0)
nCurrentPage--;
pPage = static_cast<const SwPageFrame*>(pPage->GetNext());