[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 26 20:14:18 UTC 2021
sc/inc/document.hxx | 4 ++--
sc/inc/table.hxx | 2 +-
sc/source/core/data/document.cxx | 2 +-
sc/source/core/data/table2.cxx | 8 ++++----
4 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit d04b4089449c0fdcaea5dcde9e8469a3ed9eedbc
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jan 26 14:50:33 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 26 21:13:30 2021 +0100
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 at redhat.com>
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index e7ebb3653138..c49cfa6ccfa5 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -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,
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 1962290cb862..9dbca1bb1ae7 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -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;
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)
More information about the Libreoffice-commits
mailing list