diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-16 16:27:55 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:19:24 -0500 |
commit | 116fca4a4cb01cfb646f2271daccaac76b90d423 (patch) | |
tree | 389df9824b7b4751395e3ad853df64aa5d98df1b /tools | |
parent | 6f65e937ff26d1a880e6db55d04d9cf1190bb440 (diff) |
remove UL/L suffixes from integer constants on the RHS of expressions
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 2e8acde112e1c6754df26902e79a78346ba45a2d)
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/45452
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 2887aefa4d4f60ba8b0cd7efd5d3a73ffb209781)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/b3dtrans.cxx | 8 | ||||
-rw-r--r-- | tools/source/generic/poly.cxx | 16 | ||||
-rw-r--r-- | tools/source/stream/stream.cxx | 12 | ||||
-rw-r--r-- | tools/source/stream/strmwnt.cxx | 4 | ||||
-rw-r--r-- | tools/source/stream/vcompat.cxx | 4 |
5 files changed, 22 insertions, 22 deletions
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx index d12330145fdf..0db5581a9bed 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 69e698b6d07a..1a5d0ce2dbe6 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)); } @@ -1422,7 +1422,7 @@ bool Polygon::IsInside( const Point& rPoint ) const DBG_ASSERT( !mpImplPolygon->mpFlagAry, "IsInside could fail with beziers!" ); const 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; @@ -1849,14 +1849,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) { @@ -1925,7 +1925,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] = (sal_uInt8)POLY_NORMAL; @@ -1943,10 +1943,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 d778180c4594..a467467d299d 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1630,9 +1630,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 ); } @@ -1640,7 +1640,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; @@ -1843,9 +1843,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 { @@ -1888,7 +1888,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 204602fff220..096f075b9cbb 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 490fc6f6c746..7e03ef43a0c8 100644 --- a/tools/source/stream/vcompat.cxx +++ b/tools/source/stream/vcompat.cxx @@ -32,8 +32,8 @@ VersionCompat::VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16 if( StreamMode::WRITE == mnStmMode ) { mpRWStm->WriteUInt16( mnVersion ); - mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4UL; - mpRWStm->SeekRel( 4L ); + mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4; + mpRWStm->SeekRel( 4 ); } else { |