summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh4.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-26 09:50:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 10:37:51 +0200
commit8bc951daf79decbd8a599a409c6d33c5456710e0 (patch)
tree61d220d83e90a176fbcbe667827eee4b9631a4ca /sc/source/ui/docshell/docsh4.cxx
parent10eefdfa6c0250c6069e641e404f34e5a91fe993 (diff)
long->sal_Int32 in tools/gen.hxx
which triggered a lot of changes in sw/ Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6 Reviewed-on: https://gerrit.libreoffice.org/48806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r--sc/source/ui/docshell/docsh4.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 81f321dd5c51..ebd9651ff537 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2120,14 +2120,14 @@ tools::Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const
namespace {
SAL_WARN_UNUSED_RESULT
-long SnapHorizontal( const ScDocument& rDoc, SCTAB nTab, long nVal, SCCOL& rStartCol )
+sal_Int32 SnapHorizontal( const ScDocument& rDoc, SCTAB nTab, sal_Int32 nVal, SCCOL& rStartCol )
{
SCCOL nCol = 0;
- long nTwips = static_cast<long>(nVal / HMM_PER_TWIPS);
- long nSnap = 0;
+ sal_Int32 nTwips = static_cast<long>(nVal / HMM_PER_TWIPS);
+ sal_Int32 nSnap = 0;
while ( nCol<MAXCOL )
{
- long nAdd = rDoc.GetColWidth(nCol, nTab);
+ sal_Int32 nAdd = rDoc.GetColWidth(nCol, nTab);
if ( nSnap + nAdd/2 < nTwips || nCol < rStartCol )
{
nSnap += nAdd;
@@ -2136,17 +2136,17 @@ long SnapHorizontal( const ScDocument& rDoc, SCTAB nTab, long nVal, SCCOL& rStar
else
break;
}
- nVal = static_cast<long>( nSnap * HMM_PER_TWIPS );
+ nVal = nSnap * HMM_PER_TWIPS;
rStartCol = nCol;
return nVal;
}
SAL_WARN_UNUSED_RESULT
-long SnapVertical( const ScDocument& rDoc, SCTAB nTab, long nVal, SCROW& rStartRow )
+sal_Int32 SnapVertical( const ScDocument& rDoc, SCTAB nTab, sal_Int32 nVal, SCROW& rStartRow )
{
SCROW nRow = 0;
- long nTwips = static_cast<long>(nVal / HMM_PER_TWIPS);
- long nSnap = 0;
+ sal_Int32 nTwips = static_cast<sal_Int32>(nVal / HMM_PER_TWIPS);
+ sal_Int32 nSnap = 0;
bool bFound = false;
for (SCROW i = nRow; i <= MAXROW; ++i)
@@ -2159,7 +2159,7 @@ long SnapVertical( const ScDocument& rDoc, SCTAB nTab, long nVal, SCROW& rStartR
}
nRow = i;
- long nAdd = rDoc.GetRowHeight(i, nTab);
+ sal_Int32 nAdd = rDoc.GetRowHeight(i, nTab);
if ( nSnap + nAdd/2 < nTwips || nRow < rStartRow )
{
nSnap += nAdd;
@@ -2174,7 +2174,7 @@ long SnapVertical( const ScDocument& rDoc, SCTAB nTab, long nVal, SCROW& rStartR
if (!bFound)
nRow = MAXROW; // all hidden down to the bottom
- nVal = static_cast<long>( nSnap * HMM_PER_TWIPS );
+ nVal = nSnap * HMM_PER_TWIPS;
rStartRow = nRow;
return nVal;
}