summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-26 14:50:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-26 21:13:30 +0100
commitd04b4089449c0fdcaea5dcde9e8469a3ed9eedbc (patch)
tree79cf224b7c8101e2c31c3028ef784b4ec97070fc /sc/source/core
parentbe766f8464c07623d8a6539c73652680dff23fd6 (diff)
cid#1472493 silence Unintended sign extension
Change-Id: Ib6bda68c1f6efe5492ca7444044b4c900b81e24e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109965 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/document.cxx2
-rw-r--r--sc/source/core/data/table2.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 5bbdd06266ee..8dfbe0be3252 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4188,7 +4188,7 @@ sal_uLong ScDocument::GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
return 0;
}
-SCROW ScDocument::GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const
+SCROW ScDocument::GetRowForHeight( SCTAB nTab, tools::Long nHeight ) const
{
return maTabs[nTab]->GetRowForHeight(nHeight);
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index a980774c7b9d..e8b0211a5f58 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3966,9 +3966,9 @@ sal_uLong ScTable::GetRowOffset( SCROW nRow, bool bHiddenAsZero ) const
return n;
}
-SCROW ScTable::GetRowForHeight(sal_uLong nHeight) const
+SCROW ScTable::GetRowForHeight(tools::Long nHeight) const
{
- sal_uLong nSum = 0;
+ tools::Long nSum = 0;
ScFlatBoolRowSegments::RangeData aData;
@@ -4002,8 +4002,8 @@ SCROW ScTable::GetRowForHeight(sal_uLong nHeight) const
SCROW nCommon = nLastCommon - nRow + 1;
// how much further to go ?
- sal_uLong nPixelsLeft = nHeight - nSum;
- sal_uLong nCommonPixels = aRowHeightRange.mnValue * nCommon;
+ tools::Long nPixelsLeft = nHeight - nSum;
+ tools::Long nCommonPixels = aRowHeightRange.mnValue * nCommon;
// are we in the zone ?
if (nCommonPixels > nPixelsLeft)