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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/source/contnr/treelist.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 4 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 40 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 4 |
6 files changed, 27 insertions, 27 deletions
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 844dc178cc65..4c3253f045d6 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -342,7 +342,7 @@ void SvTreeList::Move( SvTreeListEntry* pSrcEntry, SvTreeListEntry* pDstEntry ) if ( !pDstEntry ) { pParent = pRootItem; - nPos = 0UL; + nPos = 0; } else { diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index ad4eaef311b7..6173d089be73 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1378,7 +1378,7 @@ void ToolbarMenu::Command( const CommandEvent& rCEvt ) const CommandWheelData* pData = rCEvt.GetWheelData(); if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) ) { - implCursorUpDown( pData->GetDelta() > 0L, false ); + implCursorUpDown( pData->GetDelta() > 0, false ); } } } diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index c35159f9f00d..f8573997d1ab 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -1216,7 +1216,7 @@ bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) { - sal_uLong nFreedSize = 0UL; + sal_uLong nFreedSize = 0; if( nSizeToFree ) { diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index d50453192f8a..a70e87ce8b18 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -464,7 +464,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) ); // mirrored horizontically - if( aSz.Width() < 0L ) + if( aSz.Width() < 0 ) { aPt.X() += aSz.Width() + 1; aSz.Width() = -aSz.Width(); @@ -472,7 +472,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, } // mirrored vertically - if( aSz.Height() < 0L ) + if( aSz.Height() < 0 ) { aPt.Y() += aSz.Height() + 1; aSz.Height() = -aSz.Height(); diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 3eb47fbc867f..99b62c3a8c42 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -338,7 +338,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib fRevScaleX = (double) ( aBitmapWidth - 1 ) / (double)( aUnrotatedWidth - 1 ); // create horizontal mapping table long x; - for( x = 0, nTmpX = aBitmapWidth - 1L, nTmp = aBitmapWidth - 2L >= 0 ? aBitmapWidth -2L : 0L; x < aUnrotatedWidth; x++ ) + for( x = 0, nTmpX = aBitmapWidth - 1, nTmp = aBitmapWidth - 2 >= 0 ? aBitmapWidth -2 : 0L; x < aUnrotatedWidth; x++ ) { fTmp = x * fRevScaleX; @@ -377,7 +377,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib fRevScaleY = (double) ( aBitmapHeight - 1 ) / (double)( aUnrotatedHeight - 1 ); // create vertical mapping table long y; - for( y = 0, nTmpY = aBitmapHeight - 1L, nTmp = aBitmapHeight - 2L >= 0 ? aBitmapHeight - 2L : 0L; y < aUnrotatedHeight; y++ ) + for( y = 0, nTmpY = aBitmapHeight - 1, nTmp = aBitmapHeight - 2 >= 0 ? aBitmapHeight - 2 : 0L; y < aUnrotatedHeight; y++ ) { fTmp = y * fRevScaleY; @@ -419,8 +419,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib const double fCosAngle = cos( nRot10 * F_PI1800 ); const double fSinAngle = sin( nRot10 * F_PI1800 ); - const long aTargetWidth = nEndX - nStartX + 1L; - const long aTargetHeight = nEndY - nStartY + 1L; + const long aTargetWidth = nEndX - nStartX + 1; + const long aTargetHeight = nEndY - nStartY + 1; std::unique_ptr<long[]> pCosX(new long[ aTargetWidth ]); std::unique_ptr<long[]> pSinX(new long[ aTargetWidth ]); std::unique_ptr<long[]> pCosY(new long[ aTargetHeight ]); @@ -472,8 +472,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ x ] - nSinY ) >> 8; nUnRotY = ( pSinX[ x ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { nTmpX = pMapIX[ nUnRotX ]; nTmpFX = pMapFX[ nUnRotX ]; @@ -514,8 +514,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ x ] - nSinY ) >> 8; nUnRotY = ( pSinX[ x ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { nTmpX = pMapIX[ nUnRotX ]; nTmpFX = pMapFX[ nUnRotX ]; @@ -653,8 +653,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8; nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { nTmpX = pMapIX[ nUnRotX ]; nTmpFX = pMapFX[ nUnRotX ]; @@ -752,8 +752,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8; nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { nTmpX = pMapIX[ nUnRotX ]; nTmpFX = pMapFX[ nUnRotX ]; @@ -808,11 +808,11 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib aTestB = pMAcc->GetBestMatchingColor( Color( COL_BLACK ) ); // create new horizontal mapping table - for( long nX = 0UL; nX < aUnrotatedWidth; nX++ ) + for( long nX = 0; nX < aUnrotatedWidth; nX++ ) pMapLX[ nX ] = FRound( (double) pMapIX[ nX ] + pMapFX[ nX ] / 1048576.0 ); // create new vertical mapping table - for( long nY = 0UL; nY < aUnrotatedHeight; nY++ ) + for( long nY = 0; nY < aUnrotatedHeight; nY++ ) pMapLY[ nY ] = FRound( (double) pMapIY[ nY ] + pMapFY[ nY ] / 1048576.0 ); // do mask rotation @@ -826,8 +826,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8; nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { if( pMAcc ) { @@ -936,7 +936,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, } else { - nStartX = -1L; // invalid + nStartX = -1; // invalid } } else @@ -944,12 +944,12 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, aOutPoint = pOutputDevice->PixelToLogic( aOutputPointPix ); aOutSize = pOutputDevice->PixelToLogic( aOutputSizePix ); nStartX = nStartY = 0; - nEndX = aOutputSizePix.Width() - 1L; - nEndY = aOutputSizePix.Height() - 1L; + nEndX = aOutputSizePix.Width() - 1; + nEndY = aOutputSizePix.Height() - 1; } // do transformation - if( nStartX >= 0L ) + if( nStartX >= 0 ) { const bool bSimple = ( 1 == nW || 1 == nH ); diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 9ec51dfce12e..c26c4c079fae 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -473,7 +473,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) else if( HTML_ISALPHA( nNextCh ) ) { OUStringBuffer sEntityBuffer( MAX_ENTITY_LEN ); - sal_Int32 nPos = 0L; + sal_Int32 nPos = 0; do { sEntityBuffer.appendUtf32( nNextCh ); @@ -731,7 +731,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) if( sal_Unicode(EOF) == (nNextCh = GetNextChar()) && rInput.IsEof() ) { - if( !aToken.isEmpty() || sTmpBuffer.getLength() > 1L ) + if( !aToken.isEmpty() || sTmpBuffer.getLength() > 1 ) { // Have seen s.th. aside from blanks? aToken += sTmpBuffer.makeStringAndClear(); |