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>
This commit is contained in:
Caolán McNamara
2021-01-26 21:13:30 +01:00
parent be766f8464
commit d04b408944
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -1886,7 +1886,7 @@ public:
* grid, return the first visible row whose top position is below the
* specified height.
*/
SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const;
SCROW GetRowForHeight( SCTAB nTab, tools::Long nHeight ) const;
sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const;
SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
@@ -1910,7 +1910,7 @@ public:
void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
tools::Long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
tools::Long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
+1 -1
View File
@@ -826,7 +826,7 @@ public:
*
* @return SCROW last row of the range within specified height.
*/
SCROW GetRowForHeight(sal_uLong nHeight) const;
SCROW GetRowForHeight(tools::Long nHeight) const;
sal_uInt16 GetOriginalWidth( SCCOL nCol ) const;
sal_uInt16 GetOriginalHeight( SCROW nRow ) const;
+1 -1
View File
@@ -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);
}
+4 -4
View File
@@ -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)