summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-16 16:27:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-17 11:25:21 +0200
commit2e8acde112e1c6754df26902e79a78346ba45a2d (patch)
tree2d836747a7aafdd0b64ab9aabf01be59e94745d4 /tools
parent006a7b50546c57e260245d4630de565705f2fc38 (diff)
remove UL/L suffixes from integer constants on the RHS of expressions
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/b3dtrans.cxx8
-rw-r--r--tools/source/generic/poly.cxx16
-rw-r--r--tools/source/stream/stream.cxx12
-rw-r--r--tools/source/stream/strmwnt.cxx4
-rw-r--r--tools/source/stream/vcompat.cxx2
5 files changed, 21 insertions, 21 deletions
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index a28abe320868..1162f24993f6 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -270,13 +270,13 @@ void B3dTransformationSet::CalcViewport()
// fill parameters for ViewportTransformation
// Translation
- maTranslate.setX((double)maSetBound.Left() + ((maSetBound.GetWidth() - 1L) / 2.0));
- maTranslate.setY((double)maSetBound.Top() + ((maSetBound.GetHeight() - 1L) / 2.0));
+ maTranslate.setX((double)maSetBound.Left() + ((maSetBound.GetWidth() - 1) / 2.0));
+ maTranslate.setY((double)maSetBound.Top() + ((maSetBound.GetHeight() - 1) / 2.0));
maTranslate.setZ(ZBUFFER_DEPTH_RANGE / 2.0);
// Scaling
- maScale.setX((maSetBound.GetWidth() - 1L) / 2.0);
- maScale.setY((maSetBound.GetHeight() - 1L) / -2.0);
+ maScale.setX((maSetBound.GetWidth() - 1) / 2.0);
+ maScale.setY((maSetBound.GetHeight() - 1) / -2.0);
maScale.setZ(ZBUFFER_DEPTH_RANGE / 2.0);
}
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index e42457e0860c..74e265bdb01f 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -291,7 +291,7 @@ void ImplPolygon::ImplCreateFlagArray()
inline double ImplGetParameter( const Point& rCenter, const Point& rPt, double fWR, double fHR )
{
const long nDX = rPt.X() - rCenter.X();
- double fAngle = atan2( -rPt.Y() + rCenter.Y(), ( ( nDX == 0L ) ? 0.000000001 : nDX ) );
+ double fAngle = atan2( -rPt.Y() + rCenter.Y(), ( ( nDX == 0 ) ? 0.000000001 : nDX ) );
return atan2(fWR*sin(fAngle), fHR*cos(fAngle));
}
@@ -1396,7 +1396,7 @@ bool Polygon::IsInside( const Point& rPoint ) const
DBG_ASSERT( !mpImplPolygon->mpFlagAry, "IsInside could fail with beziers!" );
const tools::Rectangle aBound( GetBoundRect() );
- const Line aLine( rPoint, Point( aBound.Right() + 100L, rPoint.Y() ) );
+ const Line aLine( rPoint, Point( aBound.Right() + 100, rPoint.Y() ) );
sal_uInt16 nCount = mpImplPolygon->mnPoints;
sal_uInt16 nPCounter = 0;
@@ -1813,14 +1813,14 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
if(bCurve)
{
// #127979# Reduce source point count hard to the limit of the tools Polygon
- if(nB2DLocalCount > ((0x0000ffff / 3L) - 1L))
+ if(nB2DLocalCount > ((0x0000ffff / 3L) - 1))
{
OSL_FAIL("Polygon::Polygon: Too many points in given B2DPolygon, need to reduce hard to maximum of tools Polygon (!)");
- nB2DLocalCount = ((0x0000ffff / 3L) - 1L);
+ nB2DLocalCount = ((0x0000ffff / 3L) - 1);
}
// calculate target point count
- const sal_uInt32 nLoopCount(bClosed ? nB2DLocalCount : (nB2DLocalCount ? nB2DLocalCount - 1L : 0L ));
+ const sal_uInt32 nLoopCount(bClosed ? nB2DLocalCount : (nB2DLocalCount ? nB2DLocalCount - 1 : 0L ));
if(nLoopCount)
{
@@ -1889,7 +1889,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
else
{
// add last point as closing point
- const basegfx::B2DPoint aClosingPoint(rPolygon.getB2DPoint(nB2DLocalCount - 1L));
+ const basegfx::B2DPoint aClosingPoint(rPolygon.getB2DPoint(nB2DLocalCount - 1));
const Point aEnd(FRound(aClosingPoint.getX()), FRound(aClosingPoint.getY()));
mpImplPolygon->mpPointAry[nArrayInsert] = aEnd;
mpImplPolygon->mpFlagAry[nArrayInsert] = PolyFlags::Normal;
@@ -1907,10 +1907,10 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
else
{
// #127979# Reduce source point count hard to the limit of the tools Polygon
- if(nB2DLocalCount > (0x0000ffff - 1L))
+ if(nB2DLocalCount > (0x0000ffff - 1))
{
OSL_FAIL("Polygon::Polygon: Too many points in given B2DPolygon, need to reduce hard to maximum of tools Polygon (!)");
- nB2DLocalCount = (0x0000ffff - 1L);
+ nB2DLocalCount = (0x0000ffff - 1);
}
if(nB2DLocalCount)
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 5dac2b27d163..7de1f413b88b 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1610,9 +1610,9 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, std::size_t bufSize,
nEndOfData = bufSize;
bOwnsData = false;
pBuf = static_cast<sal_uInt8 *>(pBuffer);
- nResize = 0L;
+ nResize = 0;
nSize = bufSize;
- nPos = 0L;
+ nPos = 0;
SetBufferSize( 0 );
}
@@ -1620,7 +1620,7 @@ SvMemoryStream::SvMemoryStream( std::size_t nInitSize, std::size_t nResizeOffset
{
m_isWritable = true;
bOwnsData = true;
- nEndOfData = 0L;
+ nEndOfData = 0;
nResize = nResizeOffset;
nPos = 0;
pBuf = nullptr;
@@ -1826,9 +1826,9 @@ bool SvMemoryStream::ReAllocateMemory( long nDiff )
{
memcpy( pNewBuf, pBuf, (size_t)nNewSize );
if( nPos > nNewSize )
- nPos = 0L;
+ nPos = 0;
if( nEndOfData >= nNewSize )
- nEndOfData = nNewSize-1L;
+ nEndOfData = nNewSize-1;
}
else
{
@@ -1871,7 +1871,7 @@ void* SvMemoryStream::SwitchBuffer()
void* pRetVal = pBuf;
pBuf = nullptr;
- nEndOfData = 0L;
+ nEndOfData = 0;
nResize = 64;
nPos = 0;
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 5b7009eda1a5..1635ed42a3a8 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -175,7 +175,7 @@ sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos)
if( nNewPos == 0xFFFFFFFF )
{
SetError(::GetSvError( GetLastError() ) );
- nNewPos = 0L;
+ nNewPos = 0;
}
}
else
@@ -278,7 +278,7 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode )
DWORD nOpenAction;
DWORD nShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
- DWORD nAccessMode = 0L;
+ DWORD nAccessMode = 0;
UINT nOldErrorMode = SetErrorMode( SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX );
if( nMode & StreamMode::SHARE_DENYREAD)
diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx
index cd75978a8c73..7e03ef43a0c8 100644
--- a/tools/source/stream/vcompat.cxx
+++ b/tools/source/stream/vcompat.cxx
@@ -32,7 +32,7 @@ VersionCompat::VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16
if( StreamMode::WRITE == mnStmMode )
{
mpRWStm->WriteUInt16( mnVersion );
- mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4UL;
+ mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4;
mpRWStm->SeekRel( 4 );
}
else