summaryrefslogtreecommitdiff
path: root/vcl/source
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 /vcl/source
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 'vcl/source')
-rw-r--r--vcl/source/bitmap/bitmapscalesuper.cxx68
-rw-r--r--vcl/source/control/longcurr.cxx2
-rw-r--r--vcl/source/control/spinfld.cxx2
-rw-r--r--vcl/source/filter/graphicfilter2.cxx2
-rw-r--r--vcl/source/filter/igif/gifread.cxx24
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.cxx6
-rw-r--r--vcl/source/filter/jpeg/transupp.c2
-rw-r--r--vcl/source/filter/sgfbram.cxx6
-rw-r--r--vcl/source/filter/sgvmain.cxx16
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx2
-rw-r--r--vcl/source/gdi/alpha.cxx12
-rw-r--r--vcl/source/gdi/animate.cxx10
-rw-r--r--vcl/source/gdi/bitmap.cxx142
-rw-r--r--vcl/source/gdi/bitmap3.cxx12
-rw-r--r--vcl/source/gdi/dibtools.cxx24
-rw-r--r--vcl/source/gdi/gdimtf.cxx2
-rw-r--r--vcl/source/gdi/impanmvw.cxx4
-rw-r--r--vcl/source/gdi/impvect.cxx14
-rw-r--r--vcl/source/gdi/pngwrite.cxx2
-rw-r--r--vcl/source/gdi/svmconverter.cxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx30
-rw-r--r--vcl/source/outdev/outdev.cxx2
-rw-r--r--vcl/source/outdev/rect.cxx16
-rw-r--r--vcl/source/outdev/text.cxx4
-rw-r--r--vcl/source/outdev/textline.cxx2
-rw-r--r--vcl/source/outdev/transparent.cxx12
-rw-r--r--vcl/source/outdev/wallpaper.cxx14
-rw-r--r--vcl/source/window/menufloatingwindow.cxx2
-rw-r--r--vcl/source/window/scrwnd.cxx22
29 files changed, 229 insertions, 229 deletions
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index 057a337eee8d..9141805188dd 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -30,11 +30,11 @@ namespace {
void generateMap(long nW, long nDstW, bool bHMirr, long* pMapIX, long* pMapFX)
{
- const double fRevScaleX = (nDstW > 1L) ? (double) (nW - 1) / (nDstW - 1) : 0.0;
+ const double fRevScaleX = (nDstW > 1) ? (double) (nW - 1) / (nDstW - 1) : 0.0;
- long nTemp = nW - 2L;
- long nTempX = nW - 1L;
- for (long nX = 0L; nX < nDstW; nX++)
+ long nTemp = nW - 2;
+ long nTempX = nW - 1;
+ for (long nX = 0; nX < nDstW; nX++)
{
double fTemp = nX * fRevScaleX;
if (bHMirr)
@@ -102,7 +102,7 @@ public:
void scalePallete8bit(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
@@ -111,7 +111,7 @@ void scalePallete8bit(ScaleContext &rCtx, long nStartY, long nEndY)
Scanline pLine0 = rCtx.mpSrc->GetScanline( nTempY );
Scanline pLine1 = rCtx.mpSrc->GetScanline( ++nTempY );
- for(long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ )
+ for(long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
{
long nTempX = rCtx.mpMapIX[ nX ];
long nTempFX = rCtx.mpMapFX[ nX ];
@@ -139,14 +139,14 @@ void scalePallete8bit(ScaleContext &rCtx, long nStartY, long nEndY)
void scalePalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
long nTempY = rCtx.mpMapIY[ nY ];
long nTempFY = rCtx.mpMapFY[ nY ];
- for( long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
{
long nTempX = rCtx.mpMapIX[ nX ];
long nTempFX = rCtx.mpMapFX[ nX ];
@@ -173,7 +173,7 @@ void scalePalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
void scale24bitBGR(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
@@ -182,20 +182,20 @@ void scale24bitBGR(ScaleContext &rCtx, long nStartY, long nEndY)
Scanline pLine0 = rCtx.mpSrc->GetScanline( nTempY );
Scanline pLine1 = rCtx.mpSrc->GetScanline( ++nTempY );
- for( long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
{
- long nOff = 3L * rCtx.mpMapIX[ nX ];
+ long nOff = 3 * rCtx.mpMapIX[ nX ];
long nTempFX = rCtx.mpMapFX[ nX ];
Scanline pTmp0 = pLine0 + nOff ;
- Scanline pTmp1 = pTmp0 + 3L;
+ Scanline pTmp1 = pTmp0 + 3;
sal_uInt8 cB0 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cG0 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cR0 = MAP( *pTmp0, *pTmp1, nTempFX );
- pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3L;
+ pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3;
sal_uInt8 cB1 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cG1 = MAP( *pTmp0, *pTmp1, nTempFX );
@@ -212,7 +212,7 @@ void scale24bitBGR(ScaleContext &rCtx, long nStartY, long nEndY)
void scale24bitRGB(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
@@ -221,20 +221,20 @@ void scale24bitRGB(ScaleContext &rCtx, long nStartY, long nEndY)
Scanline pLine0 = rCtx.mpSrc->GetScanline( nTempY );
Scanline pLine1 = rCtx.mpSrc->GetScanline( ++nTempY );
- for( long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
{
- long nOff = 3L * rCtx.mpMapIX[ nX ];
+ long nOff = 3 * rCtx.mpMapIX[ nX ];
long nTempFX = rCtx.mpMapFX[ nX ];
Scanline pTmp0 = pLine0 + nOff;
- Scanline pTmp1 = pTmp0 + 3L;
+ Scanline pTmp1 = pTmp0 + 3;
sal_uInt8 cR0 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cG0 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cB0 = MAP( *pTmp0, *pTmp1, nTempFX );
- pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3L;
+ pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3;
sal_uInt8 cR1 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cG1 = MAP( *pTmp0, *pTmp1, nTempFX );
@@ -251,14 +251,14 @@ void scale24bitRGB(ScaleContext &rCtx, long nStartY, long nEndY)
void scaleNonPalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
long nTempY = rCtx.mpMapIY[ nY ];
long nTempFY = rCtx.mpMapFY[ nY ];
- for( long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ )
{
long nTempX = rCtx.mpMapIX[ nX ];
long nTempFX = rCtx.mpMapFX[ nX ];
@@ -285,7 +285,7 @@ void scaleNonPalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
@@ -305,7 +305,7 @@ void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY)
nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] );
}
- for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
{
long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
@@ -410,7 +410,7 @@ void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY)
void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
@@ -430,7 +430,7 @@ void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] );
}
- for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
{
long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
@@ -537,7 +537,7 @@ void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
@@ -558,7 +558,7 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY)
nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] );
}
- for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
{
long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
@@ -584,7 +584,7 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY)
for(long i = 0; i<= nLineRange; i++)
{
Scanline pTmpY = rCtx.mpSrc->GetScanline( nLineStart + i );
- Scanline pTmpX = pTmpY + 3L * nRowStart;
+ Scanline pTmpX = pTmpY + 3 * nRowStart;
long nSumRowR = 0;
long nSumRowG = 0;
long nSumRowB = 0;
@@ -660,7 +660,7 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY)
void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
@@ -680,7 +680,7 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY)
nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] );
}
- for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
{
long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
@@ -705,7 +705,7 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY)
for(long i = 0; i<= nLineRange; i++)
{
Scanline pTmpY = rCtx.mpSrc->GetScanline( nLineStart + i );
- Scanline pTmpX = pTmpY + 3L * nRowStart;
+ Scanline pTmpX = pTmpY + 3 * nRowStart;
long nSumRowR = 0;
long nSumRowG = 0;
long nSumRowB = 0;
@@ -781,7 +781,7 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY)
void scaleNonPalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
{
- const long nStartX = 0, nEndX = rCtx.mnDestW - 1L;
+ const long nStartX = 0, nEndX = rCtx.mnDestW - 1;
const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
@@ -801,7 +801,7 @@ void scaleNonPalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] );
}
- for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ )
+ for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ )
{
long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX;
long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ;
@@ -932,7 +932,7 @@ bool BitmapScaleSuper::filter(Bitmap& rBitmap)
const double fScaleThresh = 0.6;
- if (nDstW <= 1L || nDstH <= 1L)
+ if (nDstW <= 1 || nDstH <= 1)
return false;
Bitmap::ScopedReadAccess pReadAccess(rBitmap);
@@ -941,7 +941,7 @@ bool BitmapScaleSuper::filter(Bitmap& rBitmap)
Bitmap::ScopedWriteAccess pWriteAccess(aOutBmp);
const long nStartY = 0;
- const long nEndY = nDstH - 1L;
+ const long nEndY = nDstH - 1;
if (pReadAccess && pWriteAccess)
{
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 174b84f9d264..8dd0ec192870 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -61,7 +61,7 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt
if ( !aInteger.IsZero() )
{
aFraction += aTmp;
- aTmp = 1000000000L;
+ aTmp = 1000000000;
}
if ( rNumber.IsNeg() )
aFraction *= -1;
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 9ceb2b2f5164..0459160a9b03 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -553,7 +553,7 @@ bool SpinField::EventNotify(NotifyEvent& rNEvt)
const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData();
if (pData->GetMode() == CommandWheelMode::SCROLL)
{
- if (pData->GetDelta() < 0L)
+ if (pData->GetDelta() < 0)
Down();
else
Up();
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 51ef11b62455..780d11d24eba 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -1035,7 +1035,7 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo )
}
else
{
- rStm.SeekRel( -4L );
+ rStm.SeekRel( -4 );
n32 = 0;
rStm.ReadUInt32( n32 );
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 9b98fceca699..ef2cb32ed7fe 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -264,7 +264,7 @@ bool GIFReader::ReadGlobalHeader()
void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount )
{
- sal_uLong nLen = 3UL * nCount;
+ sal_uLong nLen = 3 * nCount;
const sal_uInt64 nMaxPossible = rIStm.remainingSize();
if (nLen > nMaxPossible)
nLen = nMaxPossible;
@@ -275,7 +275,7 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount )
{
sal_uInt8* pTmp = pBuf.get();
- for (sal_uLong i = 0UL; i < nCount; ++i)
+ for (sal_uLong i = 0; i < nCount; ++i)
{
BitmapColor& rColor = (*pPal)[i];
@@ -285,11 +285,11 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount )
}
// if possible accommodate some standard colours
- if( nCount < 256UL )
+ if( nCount < 256 )
{
(*pPal)[ 255UL ] = Color( COL_WHITE );
- if( nCount < 255UL )
+ if( nCount < 255 )
(*pPal)[ 254UL ] = Color( COL_BLACK );
}
}
@@ -478,18 +478,18 @@ bool GIFReader::ReadLocalHeader()
sal_uLong GIFReader::ReadNextBlock()
{
- sal_uLong nRet = 0UL;
+ sal_uLong nRet = 0;
sal_uLong nRead;
sal_uInt8 cBlockSize;
rIStm.ReadUChar( cBlockSize );
if ( rIStm.IsEof() )
- nRet = 4UL;
+ nRet = 4;
else if ( NO_PENDING( rIStm ) )
{
if ( cBlockSize == 0 )
- nRet = 2UL;
+ nRet = 2;
else
{
rIStm.ReadBytes( aSrcBuf.data(), cBlockSize );
@@ -497,7 +497,7 @@ sal_uLong GIFReader::ReadNextBlock()
if( NO_PENDING( rIStm ) )
{
if( bOverreadBlock )
- nRet = 3UL;
+ nRet = 3;
else
{
bool bEOI;
@@ -519,7 +519,7 @@ sal_uLong GIFReader::ReadNextBlock()
void GIFReader::FillImages( const sal_uInt8* pBytes, sal_uLong nCount )
{
- for( sal_uLong i = 0UL; i < nCount; i++ )
+ for( sal_uLong i = 0; i < nCount; i++ )
{
if( nImageX >= nImageWidth )
{
@@ -796,7 +796,7 @@ bool GIFReader::ProcessGIF()
{
bRead = true;
- if ( nRet == 1UL )
+ if ( nRet == 1 )
{
bImGraphicReady = true;
eActAction = NEXT_BLOCK_READING;
@@ -804,14 +804,14 @@ bool GIFReader::ProcessGIF()
}
else
{
- if( nRet == 2UL )
+ if( nRet == 2 )
{
pDecomp.reset();
CreateNewBitmaps();
eActAction = MARKER_READING;
ClearImageExtensions();
}
- else if( nRet == 3UL )
+ else if( nRet == 3 )
{
eActAction = NEXT_BLOCK_READING;
bOverreadBlock = true;
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index 1cf302312b22..d5636c53d2ec 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -147,7 +147,7 @@ void* JPEGWriter::GetScanline( long nY )
if( mpReadAccess->HasPalette() )
{
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aColor = mpReadAccess->GetPaletteColor( mpReadAccess->GetPixelIndex( nY, nX ) );
*pTmp++ = aColor.GetRed();
@@ -160,7 +160,7 @@ void* JPEGWriter::GetScanline( long nY )
}
else
{
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aColor = mpReadAccess->GetPixel( nY, nX );
*pTmp++ = aColor.GetRed();
@@ -207,7 +207,7 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
for ( long nY = 0; bIsGrey && ( nY < mpReadAccess->Height() ); nY++ )
{
BitmapColor aColor;
- for( long nX = 0L; bIsGrey && ( nX < nWidth ); nX++ )
+ for( long nX = 0; bIsGrey && ( nX < nWidth ); nX++ )
{
aColor = mpReadAccess->HasPalette() ? mpReadAccess->GetPaletteColor( mpReadAccess->GetPixelIndex( nY, nX ) )
: mpReadAccess->GetPixel( nY, nX );
diff --git a/vcl/source/filter/jpeg/transupp.c b/vcl/source/filter/jpeg/transupp.c
index 7e72c21719ac..58f2219f790a 100644
--- a/vcl/source/filter/jpeg/transupp.c
+++ b/vcl/source/filter/jpeg/transupp.c
@@ -30,7 +30,7 @@ jdiv_round_up (long a, long b)
/* Compute a/b rounded up to next integer, ie, ceil(a/b) */
/* Assumes a >= 0, b > 0 */
{
- return (a + b - 1L) / b;
+ return (a + b - 1) / b;
}
#if JPEG_LIB_VERSION >= 70
diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx
index 10bb23b2f886..8dcda618c817 100644
--- a/vcl/source/filter/sgfbram.cxx
+++ b/vcl/source/filter/sgfbram.cxx
@@ -238,7 +238,7 @@ bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead)
pBuf[i]=aPcx.GetByte(rInp);
}
for(sal_uInt16 i=nWdtInp;i<nWdtOut;i++) pBuf[i]=0; // up to 3 bytes
- rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // write backwards
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1)*(sal_uLong)nWdtOut); // write backwards
rOut.WriteBytes(pBuf.get(), nWdtOut);
}
} else if (nColors==16) {
@@ -286,7 +286,7 @@ bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead)
}
}
for(sal_uInt16 i=nWdtInp*4;i<nWdtOut;i++) pBuf[i]=0; // up to 3 bytes
- rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // write backwards
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1)*(sal_uLong)nWdtOut); // write backwards
rOut.WriteBytes(pBuf.get(), nWdtOut);
}
} else if (nColors==256) {
@@ -315,7 +315,7 @@ bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead)
for(sal_uInt16 i=0;i<rHead.Xsize;i++)
pBuf[i]=aPcx.GetByte(rInp);
for(sal_uInt16 i=rHead.Xsize;i<nWdtOut;i++) pBuf[i]=0; // up to 3 bytes
- rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // write backwards
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1)*(sal_uLong)nWdtOut); // write backwards
rOut.WriteBytes(pBuf.get(), nWdtOut);
}
}
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index 9b99f445f71a..b26e120874f8 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -829,7 +829,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
ReadGrupType( rInp, aGrup );
if (!rInp.GetError()) {
rInp.Seek(rInp.Tell()+aGrup.Last); // object appendix
- if(aGrup.GetSubPtr()!=0L) nGrpCnt++; // DrawObjkList(rInp,rOut );
+ if(aGrup.GetSubPtr()!=0) nGrpCnt++; // DrawObjkList(rInp,rOut );
}
} break;
default: {
@@ -839,7 +839,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
}
} // if rInp
if (!rInp.GetError()) {
- if (aObjk.Next==0L) {
+ if (aObjk.Next==0) {
if (nGrpCnt==0) bEnd=true;
else nGrpCnt--;
}
@@ -859,11 +859,11 @@ void SkipObjkList(SvStream& rInp)
GrupType aGrup;
ReadGrupType( rInp, aGrup );
rInp.Seek(rInp.Tell()+aGrup.Last); // object appendix
- if(aGrup.GetSubPtr()!=0L) SkipObjkList(rInp);
+ if(aGrup.GetSubPtr()!=0) SkipObjkList(rInp);
} else {
ObjkOverSeek(rInp,aObjk); // to next object
}
- } while (aObjk.Next!=0L && !rInp.GetError());
+ } while (aObjk.Next!=0 && !rInp.GetError());
}
bool SgfFilterSDrw( SvStream& rInp, GDIMetaFile& rMtf )
@@ -883,7 +883,7 @@ bool SgfFilterSDrw( SvStream& rInp, GDIMetaFile& rMtf )
do { // read standard page
ReadPageType( rInp, aPage );
if (aPage.nList!=0) SkipObjkList(rInp);
- } while (aPage.Next!=0L && !rInp.GetError());
+ } while (aPage.Next!=0 && !rInp.GetError());
nCharPos=rInp.Tell();
ReadPageType( rInp, aPage );
@@ -892,17 +892,17 @@ bool SgfFilterSDrw( SvStream& rInp, GDIMetaFile& rMtf )
Num=aPage.StdPg;
if (Num!=0) {
rInp.Seek(nStdPos);
- while(Num>1 && aPage.Next!=0L && !rInp.GetError()) { // search standard page
+ while(Num>1 && aPage.Next!=0 && !rInp.GetError()) { // search standard page
ReadPageType( rInp, aPage );
if (aPage.nList!=0) SkipObjkList(rInp);
Num--;
}
ReadPageType( rInp, aPage );
- if(Num==1 && aPage.nList!=0L) DrawObjkList( rInp,*pOutDev );
+ if(Num==1 && aPage.nList!=0) DrawObjkList( rInp,*pOutDev );
rInp.Seek(nCharPos);
ReadPageType( rInp, aPage );
}
- if (aPage.nList!=0L) DrawObjkList(rInp,*pOutDev );
+ if (aPage.nList!=0) DrawObjkList(rInp,*pOutDev );
rMtf.Stop();
rMtf.WindStart();
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index c0fd6e5fca56..a3f4885d1706 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -168,7 +168,7 @@ private:
void WMFRecord_SetTextColor(const Color & rColor);
void WMFRecord_SetWindowExt(const Size & rSize);
void WMFRecord_SetWindowOrg(const Point & rPoint);
- void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0UL );
+ void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0 );
void WMFRecord_TextOut(const Point & rPoint, const OUString & rString);
void WMFRecord_IntersectClipRect( const tools::Rectangle& rRect);
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 4f3200bbe41c..285d0bfb0bf9 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -97,8 +97,8 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
const long nHeight = std::min( pMaskAcc->Height(), pAcc->Height() );
const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- for( long nY = 0L; nY < nHeight; nY++ )
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nY = 0; nY < nHeight; nY++ )
+ for( long nX = 0; nX < nWidth; nX++ )
if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite )
pAcc->SetPixel( nY, nX, aReplace );
}
@@ -116,11 +116,11 @@ bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransp
if( pAcc->GetScanlineFormat() == ScanlineFormat::N8BitPal )
{
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
Scanline pScan = pAcc->GetScanline( nY );
- for( long nX = 0L; nX < nWidth; nX++, pScan++ )
+ for( long nX = 0; nX < nWidth; nX++, pScan++ )
{
if( *pScan == cSearchTransparency )
*pScan = cReplaceTransparency;
@@ -131,9 +131,9 @@ bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransp
{
BitmapColor aReplace( cReplaceTransparency );
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
if( pAcc->GetPixel( nY, nX ).GetIndex() == cSearchTransparency )
pAcc->SetPixel( nY, nX, aReplace );
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 2dab4e98c59a..aa49f7803848 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -29,7 +29,7 @@
#define MIN_TIMEOUT 2
#define INC_TIMEOUT 0
-sal_uLong Animation::mnAnimCount = 0UL;
+sal_uLong Animation::mnAnimCount = 0;
BitmapChecksum AnimationBitmap::GetChecksum() const
{
@@ -261,7 +261,7 @@ bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
{
maTimer.Stop();
mbIsInAnimation = false;
- mnPos = 0UL;
+ mnPos = 0;
}
if( !pMatch )
@@ -326,7 +326,7 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDes
else
{
const size_t nOldPos = mnPos;
- const_cast<Animation*>(this)->mnPos = mbLoopTerminated ? ( nCount - 1UL ) : mnPos;
+ const_cast<Animation*>(this)->mnPos = mbLoopTerminated ? ( nCount - 1 ) : mnPos;
delete new ImplAnimView( const_cast<Animation*>(this), pOut, rDestPt, rDestSz, 0 );
const_cast<Animation*>(this)->mnPos = nOldPos;
}
@@ -415,7 +415,7 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer *, void)
{
Stop();
mbLoopTerminated = true;
- mnPos = nAnimCount - 1UL;
+ mnPos = nAnimCount - 1;
maBitmapEx = maList[ mnPos ]->aBmpEx;
return;
}
@@ -680,7 +680,7 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation )
if( nCount )
{
- const sal_uInt32 nDummy32 = 0UL;
+ const sal_uInt32 nDummy32 = 0;
// If no BitmapEx was set we write the first Bitmap of
// the Animation
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index ab49663c87b8..db70c3969904 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -478,8 +478,8 @@ bool Bitmap::Invert()
const long nWidth = pAcc->Width();
const long nHeight = pAcc->Height();
- for( long nX = 0L; nX < nWidth; nX++ )
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nX = 0; nX < nWidth; nX++ )
+ for( long nY = 0; nY < nHeight; nY++ )
pAcc->SetPixel( nY, nX, pAcc->GetPixel( nY, nX ).Invert() );
}
@@ -505,12 +505,12 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags )
{
const long nWidth = pAcc->Width();
const long nHeight = pAcc->Height();
- const long nWidth1 = nWidth - 1L;
+ const long nWidth1 = nWidth - 1;
const long nWidth_2 = nWidth >> 1;
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
- for( long nX = 0L, nOther = nWidth1; nX < nWidth_2; nX++, nOther-- )
+ for( long nX = 0, nOther = nWidth1; nX < nWidth_2; nX++, nOther-- )
{
const BitmapColor aTemp( pAcc->GetPixel( nY, nX ) );
@@ -532,10 +532,10 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags )
const long nScanSize = pAcc->GetScanlineSize();
std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[ nScanSize ]);
const long nHeight = pAcc->Height();
- const long nHeight1 = nHeight - 1L;
+ const long nHeight1 = nHeight - 1;
const long nHeight_2 = nHeight >> 1;
- for( long nY = 0L, nOther = nHeight1; nY < nHeight_2; nY++, nOther-- )
+ for( long nY = 0, nOther = nHeight1; nY < nHeight_2; nY++, nOther-- )
{
memcpy( pBuffer.get(), pAcc->GetScanline( nY ), nScanSize );
memcpy( pAcc->GetScanline( nY ), pAcc->GetScanline( nOther ), nScanSize );
@@ -553,13 +553,13 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags )
if( pAcc )
{
const long nWidth = pAcc->Width();
- const long nWidth1 = nWidth - 1L;
+ const long nWidth1 = nWidth - 1;
const long nHeight = pAcc->Height();
long nHeight_2 = nHeight >> 1;
- for( long nY = 0L, nOtherY = nHeight - 1L; nY < nHeight_2; nY++, nOtherY-- )
+ for( long nY = 0, nOtherY = nHeight - 1; nY < nHeight_2; nY++, nOtherY-- )
{
- for( long nX = 0L, nOtherX = nWidth1; nX < nWidth; nX++, nOtherX-- )
+ for( long nX = 0, nOtherX = nWidth1; nX < nWidth; nX++, nOtherX-- )
{
const BitmapColor aTemp( pAcc->GetPixel( nY, nX ) );
@@ -571,7 +571,7 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags )
// ggf. noch mittlere Zeile horizontal spiegeln
if( nHeight & 1 )
{
- for( long nX = 0L, nOtherX = nWidth1, nWidth_2 = nWidth >> 1; nX < nWidth_2; nX++, nOtherX-- )
+ for( long nX = 0, nOtherX = nWidth1, nWidth_2 = nWidth >> 1; nX < nWidth_2; nX++, nOtherX-- )
{
const BitmapColor aTemp( pAcc->GetPixel( nHeight_2, nX ) );
pAcc->SetPixel( nHeight_2, nX, pAcc->GetPixel( nHeight_2, nOtherX ) );
@@ -593,12 +593,12 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
{
bool bRet = false;
- nAngle10 %= 3600L;
- nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10;
+ nAngle10 %= 3600;
+ nAngle10 = ( nAngle10 < 0 ) ? ( 3599L + nAngle10 ) : nAngle10;
if( !nAngle10 )
bRet = true;
- else if( 1800L == nAngle10 )
+ else if( 1800 == nAngle10 )
bRet = Mirror( BmpMirrorFlags::Horizontal | BmpMirrorFlags::Vertical );
else
{
@@ -609,7 +609,7 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
{
const Size aSizePix( GetSizePixel() );
- if( ( 900L == nAngle10 ) || ( 2700L == nAngle10 ) )
+ if( ( 900 == nAngle10 ) || ( 2700 == nAngle10 ) )
{
const Size aNewSizePix( aSizePix.Height(), aSizePix.Width() );
Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
@@ -618,22 +618,22 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
if( pWriteAcc )
{
const long nWidth = aSizePix.Width();
- const long nWidth1 = nWidth - 1L;
+ const long nWidth1 = nWidth - 1;
const long nHeight = aSizePix.Height();
- const long nHeight1 = nHeight - 1L;
+ const long nHeight1 = nHeight - 1;
const long nNewWidth = aNewSizePix.Width();
const long nNewHeight = aNewSizePix.Height();
- if( 900L == nAngle10 )
+ if( 900 == nAngle10 )
{
- for( long nY = 0L, nOtherX = nWidth1; nY < nNewHeight; nY++, nOtherX-- )
- for( long nX = 0L, nOtherY = 0L; nX < nNewWidth; nX++ )
+ for( long nY = 0, nOtherX = nWidth1; nY < nNewHeight; nY++, nOtherX-- )
+ for( long nX = 0, nOtherY = 0; nX < nNewWidth; nX++ )
pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nOtherY++, nOtherX ) );
}
- else if( 2700L == nAngle10 )
+ else if( 2700 == nAngle10 )
{
- for( long nY = 0L, nOtherX = 0L; nY < nNewHeight; nY++, nOtherX++ )
- for( long nX = 0L, nOtherY = nHeight1; nX < nNewWidth; nX++ )
+ for( long nY = 0, nOtherX = 0; nY < nNewHeight; nY++, nOtherX++ )
+ for( long nX = 0, nOtherY = nHeight1; nX < nNewWidth; nX++ )
pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nOtherY--, nOtherX ) );
}
@@ -690,17 +690,17 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
pSinY[ nY ] = FRound( fSinAngle * fTmp );
}
- for( nY = 0L; nY < nNewHeight; nY++ )
+ for( nY = 0; nY < nNewHeight; nY++ )
{
long nSinY = pSinY[ nY ];
long nCosY = pCosY[ nY ];
- for( nX = 0L; nX < nNewWidth; nX++ )
+ for( nX = 0; nX < nNewWidth; nX++ )
{
nRotX = ( pCosX[ nX ] - nSinY ) >> 6;
nRotY = ( pSinX[ nX ] + nCosY ) >> 6;
- if ( ( nRotX > -1L ) && ( nRotX < nWidth ) && ( nRotY > -1L ) && ( nRotY < nHeight ) )
+ if ( ( nRotX > -1 ) && ( nRotX < nWidth ) && ( nRotY > -1 ) && ( nRotY < nHeight ) )
pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nRotY, nRotX ) );
else
pWriteAcc->SetPixel( nY, nX, aFillColor );
@@ -880,7 +880,7 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
pWriteAcc->SetPixel( nDstY, nDstX, pReadAcc->GetPixel( nSrcY, nSrcX ) );
pWriteAcc.reset();
- bRet = ( nWidth > 0L ) && ( nHeight > 0L );
+ bRet = ( nWidth > 0 ) && ( nHeight > 0 );
}
pReadAcc.reset();
@@ -903,12 +903,12 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
const long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
const long nSrcX = aRectSrc.Left();
const long nSrcY = aRectSrc.Top();
- const long nSrcEndX1 = nSrcX + nWidth - 1L;
- const long nSrcEndY1 = nSrcY + nHeight - 1L;
+ const long nSrcEndX1 = nSrcX + nWidth - 1;
+ const long nSrcEndY1 = nSrcY + nHeight - 1;
const long nDstX = aRectDst.Left();
const long nDstY = aRectDst.Top();
- const long nDstEndX1 = nDstX + nWidth - 1L;
- const long nDstEndY1 = nDstY + nHeight - 1L;
+ const long nDstEndX1 = nDstX + nWidth - 1;
+ const long nDstEndY1 = nDstY + nHeight - 1;
if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) )
{
@@ -987,7 +987,7 @@ bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const t
pWriteAcc->SetPixel( nDstY, nDstX, pReadAcc->GetPixel( nSrcY, nSrcX ) );
pWriteAcc.reset();
- bRet = ( nWidth > 0L ) && ( nHeight > 0L );
+ bRet = ( nWidth > 0 ) && ( nHeight > 0 );
}
pReadAcc.reset();
@@ -1010,12 +1010,12 @@ bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const t
const long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
const long nSrcX = aRectSrc.Left();
const long nSrcY = aRectSrc.Top();
- const long nSrcEndX1 = nSrcX + nWidth - 1L;
- const long nSrcEndY1 = nSrcY + nHeight - 1L;
+ const long nSrcEndX1 = nSrcX + nWidth - 1;
+ const long nSrcEndY1 = nSrcY + nHeight - 1;
const long nDstX = aRectDst.Left();
const long nDstY = aRectDst.Top();
- const long nDstEndX1 = nDstX + nWidth - 1L;
- const long nDstEndY1 = nDstY + nHeight - 1L;
+ const long nDstEndX1 = nDstX + nWidth - 1;
+ const long nDstEndY1 = nDstY + nHeight - 1;
if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) )
{
@@ -1084,7 +1084,7 @@ bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor )
if( pInitColor )
aColor = pWriteAcc->GetBestMatchingColor( *pInitColor );
- for( nY = 0L; nY < nHeight; nY++ )
+ for( nY = 0; nY < nHeight; nY++ )
{
pWriteAcc->CopyScanline( nY, *pReadAcc );
@@ -1150,12 +1150,12 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
aWhite.GetIndex() == 1 )
{
// optimized for 1Bit-MSB destination palette
- for( nY = 0L; nY < nHeight; nY++ )
+ for( nY = 0; nY < nHeight; nY++ )
{
Scanline pSrc = pReadAcc->GetScanline( nY );
Scanline pDst = pWriteAcc->GetScanline( nY );
long nShift = 0;
- for( nX = 0L, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 )
+ for( nX = 0, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 )
{
if( cTest == ( ( pSrc[ nX >> 1 ] >> nShift ) & 0x0f ) )
pDst[ nX >> 3 ] |= 1 << ( 7 - ( nX & 7 ) );
@@ -1166,11 +1166,11 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
}
else
{
- for( nY = 0L; nY < nHeight; nY++ )
+ for( nY = 0; nY < nHeight; nY++ )
{
Scanline pSrc = pReadAcc->GetScanline( nY );
long nShift = 0;
- for( nX = 0L, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 )
+ for( nX = 0, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 )
{
if( cTest == ( ( pSrc[ nX >> 1 ] >> nShift ) & 0x0f ) )
pWriteAcc->SetPixel( nY, nX, aWhite );
@@ -1189,11 +1189,11 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
aWhite.GetIndex() == 1 )
{
// optimized for 1Bit-MSB destination palette
- for( nY = 0L; nY < nHeight; nY++ )
+ for( nY = 0; nY < nHeight; nY++ )
{
Scanline pSrc = pReadAcc->GetScanline( nY );
Scanline pDst = pWriteAcc->GetScanline( nY );
- for( nX = 0L; nX < nWidth; nX++ )
+ for( nX = 0; nX < nWidth; nX++ )
{
if( cTest == pSrc[ nX ] )
pDst[ nX >> 3 ] |= 1 << ( 7 - ( nX & 7 ) );
@@ -1204,10 +1204,10 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
}
else
{
- for( nY = 0L; nY < nHeight; nY++ )
+ for( nY = 0; nY < nHeight; nY++ )
{
Scanline pSrc = pReadAcc->GetScanline( nY );
- for( nX = 0L; nX < nWidth; nX++ )
+ for( nX = 0; nX < nWidth; nX++ )
{
if( cTest == pSrc[ nX ] )
pWriteAcc->SetPixel( nY, nX, aWhite );
@@ -1220,9 +1220,9 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
else
{
// not optimized
- for( nY = 0L; nY < nHeight; nY++ )
+ for( nY = 0; nY < nHeight; nY++ )
{
- for( nX = 0L; nX < nWidth; nX++ )
+ for( nX = 0; nX < nWidth; nX++ )
{
if( aTest == pReadAcc->GetPixel( nY, nX ) )
pWriteAcc->SetPixel( nY, nX, aWhite );
@@ -1245,9 +1245,9 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
if( pReadAcc->HasPalette() )
{
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aCol = pReadAcc->GetPaletteColor( pReadAcc->GetPixelIndex( nY, nX ) );
nR = aCol.GetRed();
@@ -1267,9 +1267,9 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
}
else
{
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aCol = pReadAcc->GetPixel( nY, nX );
nR = aCol.GetRed();
@@ -1349,7 +1349,7 @@ vcl::Region Bitmap::CreateRegion( const Color& rColor, const tools::Rectangle& r
while( ( nX <= nRight ) && ( aMatch == pReadAcc->GetPixel( nY, nX ) ) )
nX++;
- //aSubRect.Right() = nX - 1L;
+ //aSubRect.Right() = nX - 1;
aNewLine.push_back(nX - 1);
//aRegion.ImplAddRect( aSubRect );
@@ -1450,11 +1450,11 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
// Set all entries to false
std::fill( pFlags.get(), pFlags.get()+nMaxColors, false );
- for( long nY = 0L; nY < nHeight; nY++ )
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nY = 0; nY < nHeight; nY++ )
+ for( long nX = 0; nX < nWidth; nX++ )
pFlags[ pAcc->GetPixelIndex( nY, nX ) ] = true;
- for( sal_uInt16 i = 0UL; i < nMaxColors; i++ )
+ for( sal_uInt16 i = 0; i < nMaxColors; i++ )
{
// Hurray, we do have an unused entry
if( !pFlags[ i ] )
@@ -1469,8 +1469,8 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
else
aReplace = rReplaceColor;
- for( long nY = 0L; nY < nHeight; nY++ )
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nY = 0; nY < nHeight; nY++ )
+ for( long nX = 0; nX < nWidth; nX++ )
if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite )
pAcc->SetPixel( nY, nX, aReplace );
@@ -1494,9 +1494,9 @@ bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
const long nWidth = std::min( pAlphaAcc->Width(), pAcc->Width() );
const long nHeight = std::min( pAlphaAcc->Height(), pAcc->Height() );
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aCol = pAcc->GetColor( nY, nX );
pNewAcc->SetPixel( nY, nX, aCol.Merge( rMergeColor, 255 - pAlphaAcc->GetPixelIndex( nY, nX ) ) );
@@ -1575,9 +1575,9 @@ bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal
BitmapColor aCol;
const BitmapColor aReplace( pAcc->GetBestMatchingColor( rReplaceColor ) );
- for( long nY = 0L, nHeight = pAcc->Height(); nY < nHeight; nY++ )
+ for( long nY = 0, nHeight = pAcc->Height(); nY < nHeight; nY++ )
{
- for( long nX = 0L, nWidth = pAcc->Width(); nX < nWidth; nX++ )
+ for( long nX = 0, nWidth = pAcc->Width(); nX < nWidth; nX++ )
{
aCol = pAcc->GetPixel( nY, nX );
@@ -1628,7 +1628,7 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
else
pTols = reinterpret_cast<long*>(_pTols);
- for( i = 0UL; i < nColorCount; i++ )
+ for( i = 0; i < nColorCount; i++ )
{
const Color& rCol = pSearchColors[ i ];
const long nTol = pTols[ i ];
@@ -1647,7 +1647,7 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
{
const BitmapColor& rCol = pAcc->GetPaletteColor( nEntry );
- for( i = 0UL; i < nColorCount; i++ )
+ for( i = 0; i < nColorCount; i++ )
{
if( pMinR[ i ] <= rCol.GetRed() && pMaxR[ i ] >= rCol.GetRed() &&
pMinG[ i ] <= rCol.GetGreen() && pMaxG[ i ] >= rCol.GetGreen() &&
@@ -1664,16 +1664,16 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
BitmapColor aCol;
std::unique_ptr<BitmapColor[]> pReplaces(new BitmapColor[ nColorCount ]);
- for( i = 0UL; i < nColorCount; i++ )
+ for( i = 0; i < nColorCount; i++ )
pReplaces[ i ] = pAcc->GetBestMatchingColor( pReplaceColors[ i ] );
- for( long nY = 0L, nHeight = pAcc->Height(); nY < nHeight; nY++ )
+ for( long nY = 0, nHeight = pAcc->Height(); nY < nHeight; nY++ )
{
- for( long nX = 0L, nWidth = pAcc->Width(); nX < nWidth; nX++ )
+ for( long nX = 0, nWidth = pAcc->Width(); nX < nWidth; nX++ )
{
aCol = pAcc->GetPixel( nY, nX );
- for( i = 0UL; i < nColorCount; i++ )
+ for( i = 0; i < nColorCount; i++ )
{
if( pMinR[ i ] <= aCol.GetRed() && pMaxR[ i ] >= aCol.GetRed() &&
pMinG[ i ] <= aCol.GetGreen() && pMaxG[ i ] >= aCol.GetGreen() &&
@@ -1734,7 +1734,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
{
case BmpCombine::And:
{
- for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nY = 0; nY < nHeight; nY++ ) for( long nX = 0; nX < nWidth; nX++ )
{
if( pMaskAcc->GetPixel( nY, nX ) != aMaskBlack && pAcc->GetPixel( nY, nX ) != aBlack )
pAcc->SetPixel( nY, nX, aWhite );
@@ -1746,7 +1746,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
case BmpCombine::Or:
{
- for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nY = 0; nY < nHeight; nY++ ) for( long nX = 0; nX < nWidth; nX++ )
{
if( pMaskAcc->GetPixel( nY, nX ) != aMaskBlack || pAcc->GetPixel( nY, nX ) != aBlack )
pAcc->SetPixel( nY, nX, aWhite );
@@ -1783,8 +1783,8 @@ bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
const long nWidth = std::min( pAlphaAcc->Width(), pAcc->Width() );
const long nHeight = std::min( pAlphaAcc->Height(), pAcc->Height() );
- for( long nY = 0L; nY < nHeight; ++nY )
- for( long nX = 0L; nX < nWidth; ++nX )
+ for( long nY = 0; nY < nHeight; ++nY )
+ for( long nX = 0; nX < nWidth; ++nX )
pAcc->SetPixel( nY, nX,
pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor,
255 - pAlphaAcc->GetPixelIndex( nY, nX ) ) );
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index bae9d2ac0e3b..48b11eec4f93 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -37,7 +37,7 @@
#include "octree.hxx"
#include "BitmapScaleConvolution.hxx"
-#define RGB15( _def_cR, _def_cG, _def_cB ) (((sal_uLong)(_def_cR)<<10UL)|((sal_uLong)(_def_cG)<<5UL)|(sal_uLong)(_def_cB))
+#define RGB15( _def_cR, _def_cG, _def_cB ) (((sal_uLong)(_def_cR)<<10)|((sal_uLong)(_def_cG)<<5)|(sal_uLong)(_def_cB))
#define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0,255))
#define CALC_ERRORS \
@@ -1227,9 +1227,9 @@ bool Bitmap::ImplDitherMatrix()
if( pReadAcc->HasPalette() )
{
- for( sal_uLong nY = 0UL; nY < nHeight; nY++ )
+ for( sal_uLong nY = 0; nY < nHeight; nY++ )
{
- for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ )
+ for( sal_uLong nX = 0, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ )
{
const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixelIndex( nY, nX ) ) );
const sal_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
@@ -1244,9 +1244,9 @@ bool Bitmap::ImplDitherMatrix()
}
else
{
- for( sal_uLong nY = 0UL; nY < nHeight; nY++ )
+ for( sal_uLong nY = 0; nY < nHeight; nY++ )
{
- for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ )
+ for( sal_uLong nX = 0, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ )
{
const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) );
const sal_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
@@ -1777,7 +1777,7 @@ bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount )
if( pWAcc )
{
- const sal_uLong nSize = 32768UL * sizeof( sal_uLong );
+ const sal_uLong nSize = 32768 * sizeof( sal_uLong );
sal_uLong* pColBuf = static_cast<sal_uLong*>(rtl_allocateMemory( nSize ));
const long nWidth = pWAcc->Width();
const long nHeight = pWAcc->Height();
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 002f617cdb1b..f2dc2c25f474 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -355,7 +355,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA
const sal_uLong nWidth = rAcc.Width();
sal_uLong nCountByte;
sal_uLong nRunByte;
- sal_uLong nX = 0UL;
+ sal_uLong nX = 0;
sal_uInt8 cTmp;
bool bEndDecoding = false;
@@ -375,7 +375,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA
{
nCountByte = nRunByte >> 1;
- for( sal_uLong i = 0UL; i < nCountByte; i++ )
+ for( sal_uLong i = 0; i < nCountByte; i++ )
{
if (pRLE == pEndRLE)
return false;
@@ -410,7 +410,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA
}
else
{
- for( sal_uLong i = 0UL; i < nRunByte; i++ )
+ for( sal_uLong i = 0; i < nRunByte; i++ )
{
if (pRLE == pEndRLE)
return false;
@@ -433,7 +433,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA
else if( !nRunByte )
{
nY--;
- nX = 0UL;
+ nX = 0;
}
else if( nRunByte == 1 )
bEndDecoding = true;
@@ -460,7 +460,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA
{
nRunByte = nCountByte >> 1;
- for( sal_uLong i = 0UL; i < nRunByte; i++ )
+ for( sal_uLong i = 0; i < nRunByte; i++ )
{
if( nX < nWidth )
rAcc.SetPixelIndex(nY, nX++, SanitizePaletteIndex(cTmp >> 4, rPalette, bForceToMonoWhileReading));
@@ -474,7 +474,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA
}
else
{
- for( sal_uLong i = 0UL; ( i < nCountByte ) && ( nX < nWidth ); i++ )
+ for( sal_uLong i = 0; ( i < nCountByte ) && ( nX < nWidth ); i++ )
rAcc.SetPixelIndex(nY, nX++, SanitizePaletteIndex(cTmp, rPalette, bForceToMonoWhileReading));
}
}
@@ -611,7 +611,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
{
if( !nShift )
{
- nShift = 2UL;
+ nShift = 2;
cTmp = *pTmp++;
}
@@ -1030,14 +1030,14 @@ bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& rOffset )
rIStm.ReadUInt16( nTmp16 );
rIStm.SeekRel( 8 );
rIStm.ReadUInt32( nTmp32 );
- rOffset = nTmp32 - 28UL;
+ rOffset = nTmp32 - 28;
bRet = ( 0x4D42 == nTmp16 );
}
else // 0x4D42 == nTmp16, 'MB' from BITMAPFILEHEADER
{
rIStm.SeekRel( 8 ); // we are on bfSize member of BITMAPFILEHEADER, forward to bfOffBits
rIStm.ReadUInt32( nTmp32 ); // read bfOffBits
- rOffset = nTmp32 - 14UL; // adapt offset by sizeof(BITMAPFILEHEADER)
+ rOffset = nTmp32 - 14; // adapt offset by sizeof(BITMAPFILEHEADER)
bRet = rIStm.GetError() == ERRCODE_NONE;
}
@@ -1094,7 +1094,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess const & rAcc, bool bRLE4 )
for ( long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = pBuf.get();
- nX = nBufCount = 0UL;
+ nX = nBufCount = 0;
while( nX < nWidth )
{
@@ -1117,7 +1117,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess const & rAcc, bool bRLE4 )
else
{
cLast = cPix;
- nSaveIndex = nX - 1UL;
+ nSaveIndex = nX - 1;
bFound = false;
while( ( nX < nWidth ) && ( nCount < 256 )
@@ -1150,7 +1150,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess const & rAcc, bool bRLE4 )
}
else
{
- for( sal_uLong i = 0UL; i < nCount; i++ )
+ for( sal_uLong i = 0; i < nCount; i++ )
*pTmp++ = rAcc.GetPixelIndex( nY, nSaveIndex++ );
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index d339f7f5ff46..5fe087fa478e 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2701,7 +2701,7 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
ImplMetaReadData aReadData;
aReadData.meActualCharSet = rIStm.GetStreamCharSet();
- for( sal_uInt32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ )
+ for( sal_uInt32 nAction = 0; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ )
{
MetaAction* pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
if( pAction )
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 3da968663d6e..59519b291f2e 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -171,9 +171,9 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : nullptr);
aVDev->SetOutputSizePixel( maSzPix, false );
- nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL );
+ nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1 );
- for( sal_uLong i = 0UL; i <= nPos; i++ )
+ for( sal_uLong i = 0; i <= nPos; i++ )
draw( i, aVDev.get() );
if (xOldClip)
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index b8cf13fe727f..a40ad29224ae 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -161,7 +161,7 @@ void ImplPointArray::ImplSetSize( sal_uLong nSize )
const sal_uLong nTotal = nSize * sizeof( Point );
mnSize = nSize;
- mnRealSize = 0UL;
+ mnRealSize = 0;
if( mpArray )
rtl_freeMemory( mpArray );
@@ -311,7 +311,7 @@ void ImplChain::ImplBeginAdd( const Point& rStartPt )
{
maPoly = tools::Polygon();
maStartPt = rStartPt;
- mnCount = 0UL;
+ mnCount = 0;
}
inline void ImplChain::ImplAdd( sal_uInt8 nCode )
@@ -914,12 +914,12 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
long nActX = rStartPt.X();
long nActY = rStartPt.Y();
sal_uLong nFound;
- sal_uLong nLastDir = 0UL;
+ sal_uLong nLastDir = 0;
sal_uLong nDir;
do
{
- nFound = 0UL;
+ nFound = 0;
// first try last direction
long nTryX = nActX + aImplMove[ nLastDir ].nDX;
@@ -929,12 +929,12 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
{
rChain.ImplAdd( (sal_uInt8) nLastDir );
pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
- nFound = 1UL;
+ nFound = 1;
}
else
{
// try other directions
- for( nDir = 0UL; nDir < 8UL; nDir++ )
+ for( nDir = 0; nDir < 8; nDir++ )
{
// we already tried nLastDir
if( nDir != nLastDir )
@@ -946,7 +946,7 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
{
rChain.ImplAdd( (sal_uInt8) nDir );
pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
- nFound = 1UL;
+ nFound = 1;
nLastDir = nDir;
break;
}
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index bb0ee05d0f37..ab15754724f4 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -347,7 +347,7 @@ void PNGWriterImpl::ImplWriteTransparent()
ImplOpenChunk(PNGCHUNK_tRNS);
- for (sal_uLong n = 0UL; n <= nTransIndex; n++)
+ for (sal_uLong n = 0; n <= nTransIndex; n++)
{
ImplWriteChunk((nTransIndex == n) ? static_cast<sal_uInt8>(0x0) : static_cast<sal_uInt8>(0xff));
}
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 55087af5fb90..5a07927216f4 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -335,7 +335,7 @@ void ImplSkipActions(SvStream& rIStm, sal_uLong nSkipCount)
{
sal_Int32 nActionSize;
sal_Int16 nType;
- for (sal_uLong i = 0UL; i < nSkipCount; ++i)
+ for (sal_uLong i = 0; i < nSkipCount; ++i)
{
rIStm.ReadInt16(nType).ReadInt32(nActionSize);
if (!rIStm.good() || nActionSize < 4)
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index e361ed6a9b52..cdebce02a139 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -642,13 +642,13 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
if (bHMirr)
{
aOutSz.Width() = -aOutSz.Width();
- aOutPt.X() -= aOutSz.Width() - 1L;
+ aOutPt.X() -= aOutSz.Width() - 1;
}
if (bVMirr)
{
aOutSz.Height() = -aOutSz.Height();
- aOutPt.Y() -= aOutSz.Height() - 1L;
+ aOutPt.Y() -= aOutSz.Height() - 1;
}
if (!aDstRect.Intersection(tools::Rectangle(aOutPt, aOutSz)).IsEmpty())
@@ -744,11 +744,11 @@ private:
long nOutDimention, long nOffset, long* pMap, long* pMapOffset)
{
- const double fReverseScale = (std::abs(nOutDimention) > 1L) ? (nSrcDimension - 1L) / double(std::abs(nOutDimention) - 1L) : 0.0;
+ const double fReverseScale = (std::abs(nOutDimention) > 1) ? (nSrcDimension - 1) / double(std::abs(nOutDimention) - 1) : 0.0;
- long nSampleRange = std::max(0L, nSrcDimension - 2L);
+ long nSampleRange = std::max(0L, nSrcDimension - 2);
- for (long i = 0L; i < nDstDimension; i++)
+ for (long i = 0; i < nDstDimension; i++)
{
double fTemp = std::abs((nOffset + i) * fReverseScale);
@@ -807,7 +807,7 @@ public:
sal_uInt8 nColor1, nColor2, nColor3, nAlpha;
- for (long nY = 0L; nY < nDstHeight; nY++)
+ for (long nY = 0; nY < nDstHeight; nY++)
{
const long nMapY = mpMapY[nY];
const long nMapFY = mpMapYOffset[nY];
@@ -822,13 +822,13 @@ public:
pDestScanline = pDestination->GetScanline(nY);
- for (long nX = 0L; nX < nDstWidth; nX++)
+ for (long nX = 0; nX < nDstWidth; nX++)
{
const long nMapX = mpMapX[nX];
const long nMapFX = mpMapXOffset[nX];
- pColorSample1 = pLine0 + 3L * nMapX;
- pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3L : pColorSample1;
+ pColorSample1 = pLine0 + 3 * nMapX;
+ pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3 : pColorSample1;
nColor1Line1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
pColorSample1++;
@@ -839,8 +839,8 @@ public:
pColorSample2++;
nColor3Line1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
- pColorSample1 = pLine1 + 3L * nMapX;
- pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3L : pColorSample1;
+ pColorSample1 = pLine1 + 3 * nMapX;
+ pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3 : pColorSample1;
nColor1Line2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
pColorSample1++;
@@ -852,11 +852,11 @@ public:
nColor3Line2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
pColorSample1 = pLineAlpha0 + nMapX;
- pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1L : pColorSample1;
+ pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1 : pColorSample1;
nAlphaLine1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
pColorSample1 = pLineAlpha1 + nMapX;
- pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1L : pColorSample1;
+ pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1 : pColorSample1;
nAlphaLine2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1);
nColor1 = (nColor1Line1 + nMapFY * ((nColor1Line2 >> 7) - (nColor1Line1 >> 7))) >> 7;
@@ -911,9 +911,9 @@ private:
long nMirrorOffset = 0;
if (bMirror)
- nMirrorOffset = (nDstLocation << 1) + nSrcDimension - 1L;
+ nMirrorOffset = (nDstLocation << 1) + nSrcDimension - 1;
- for (long i = 0L; i < nDstDimension; ++i, ++nOffset)
+ for (long i = 0; i < nDstDimension; ++i, ++nOffset)
{
pMap[i] = nDstLocation + nOffset * nSrcDimension / nOutDimention;
if (bMirror)
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index df1c7ee8c380..903157fd01b5 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -333,7 +333,7 @@ void OutputDevice::SetRefPoint()
mpMetaFile->AddAction( new MetaRefPointAction( Point(), false ) );
mbRefPoint = false;
- maRefPoint.X() = maRefPoint.Y() = 0L;
+ maRefPoint.X() = maRefPoint.Y() = 0;
if( mpAlphaVDev )
mpAlphaVDev->SetRefPoint();
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 30ca92c1f7db..11633591d084 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -254,15 +254,15 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
const long nEndX = ImplLogicXToDevicePixel( nRight );
const long nStartY = ImplLogicYToDevicePixel( nY );
const long nEndY = ImplLogicYToDevicePixel( nBottom );
- long nHorzCount = 0L;
- long nVertCount = 0L;
+ long nHorzCount = 0;
+ long nVertCount = 0;
std::vector< sal_Int32 > aVertBuf;
std::vector< sal_Int32 > aHorzBuf;
if( ( nFlags & DrawGridFlags::Dots ) || ( nFlags & DrawGridFlags::HorzLines ) )
{
- aVertBuf.resize( aDstRect.GetHeight() / nDistY + 2L );
+ aVertBuf.resize( aDstRect.GetHeight() / nDistY + 2 );
aVertBuf[ nVertCount++ ] = nStartY;
while( ( nY += nDistY ) <= nBottom )
{
@@ -272,7 +272,7 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
if( ( nFlags & DrawGridFlags::Dots ) || ( nFlags & DrawGridFlags::VertLines ) )
{
- aHorzBuf.resize( aDstRect.GetWidth() / nDistX + 2L );
+ aHorzBuf.resize( aDstRect.GetWidth() / nDistX + 2 );
aHorzBuf[ nHorzCount++ ] = nStartX;
while( ( nX += nDistX ) <= nRight )
{
@@ -291,9 +291,9 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
if( nFlags & DrawGridFlags::Dots )
{
- for( long i = 0L; i < nVertCount; i++ )
+ for( long i = 0; i < nVertCount; i++ )
{
- for( long j = 0L, Y = aVertBuf[ i ]; j < nHorzCount; j++ )
+ for( long j = 0, Y = aVertBuf[ i ]; j < nHorzCount; j++ )
{
mpGraphics->DrawPixel( aHorzBuf[ j ], Y, this );
}
@@ -303,7 +303,7 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
{
if( nFlags & DrawGridFlags::HorzLines )
{
- for( long i = 0L; i < nVertCount; i++ )
+ for( long i = 0; i < nVertCount; i++ )
{
nY = aVertBuf[ i ];
mpGraphics->DrawLine( nStartX, nY, nEndX, nY, this );
@@ -312,7 +312,7 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D
if( nFlags & DrawGridFlags::VertLines )
{
- for( long i = 0L; i < nHorzCount; i++ )
+ for( long i = 0; i < nHorzCount; i++ )
{
nX = aHorzBuf[ i ];
mpGraphics->DrawLine( nX, nStartY, nX, nEndY, this );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 94e46d00224a..658a7a157b53 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -244,8 +244,8 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
long nOldOffY = mnOutOffY;
bool bOldMap = mbMap;
- mnOutOffX = 0L;
- mnOutOffY = 0L;
+ mnOutOffX = 0;
+ mnOutOffY = 0;
mpMetaFile = nullptr;
EnableMapMode( false );
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index da95bf17e107..a1f3ad04ec89 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -1005,7 +1005,7 @@ void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos )
if ( (nStartY != nEndY) || (nStartX > nEndX) )
{
long nDX = nEndX - nStartX;
- double nO = atan2( -nEndY + nStartY, ((nDX == 0L) ? 0.000000001 : nDX) );
+ double nO = atan2( -nEndY + nStartY, ((nDX == 0) ? 0.000000001 : nDX) );
nO /= F_PI1800;
nOrientation = (short)nO;
aStartPt.RotateAround( nEndX, nEndY, -nOrientation );
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index e4e21d49b0a1..8d79075e0dca 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -132,18 +132,18 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
aMask.Convert( BmpConversion::N1BitThreshold );
// mirrored horizontically
- if( aDestSz.Width() < 0L )
+ if( aDestSz.Width() < 0 )
{
aDestSz.Width() = -aDestSz.Width();
- aDestPt.X() -= ( aDestSz.Width() - 1L );
+ aDestPt.X() -= ( aDestSz.Width() - 1 );
nMirrFlags |= BmpMirrorFlags::Horizontal;
}
// mirrored vertically
- if( aDestSz.Height() < 0L )
+ if( aDestSz.Height() < 0 )
{
aDestSz.Height() = -aDestSz.Height();
- aDestPt.Y() -= ( aDestSz.Height() - 1L );
+ aDestPt.Y() -= ( aDestSz.Height() - 1 );
nMirrFlags |= BmpMirrorFlags::Vertical;
}
@@ -178,10 +178,10 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
mbMap = false;
// create forward mapping tables
- for( nX = 0L; nX <= nSrcWidth; nX++ )
+ for( nX = 0; nX <= nSrcWidth; nX++ )
pMapX[ nX ] = aDestPt.X() + FRound( (double) aDestSz.Width() * nX / nSrcWidth );
- for( nY = 0L; nY <= nSrcHeight; nY++ )
+ for( nY = 0; nY <= nSrcHeight; nY++ )
pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight );
// walk through all rectangles of mask
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 452cb12f4df6..bb22f2be95ea 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -240,8 +240,8 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
default:
{
- const long nRight = nX + nWidth - 1L;
- const long nBottom = nY + nHeight - 1L;
+ const long nRight = nX + nWidth - 1;
+ const long nBottom = nY + nHeight - 1;
long nFirstX;
long nFirstY;
@@ -261,10 +261,10 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
long nStartX = nX + nOffX;
long nStartY = nY + nOffY;
- if( nOffX > 0L )
+ if( nOffX > 0 )
nStartX -= nBmpWidth;
- if( nOffY > 0L )
+ if( nOffY > 0 )
nStartY -= nBmpHeight;
for( long nBmpY = nStartY; nBmpY <= nBottom; nBmpY += nBmpHeight )
@@ -290,7 +290,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
const tools::Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) );
tools::Rectangle aWorkRect;
- aWorkRect = tools::Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L );
+ aWorkRect = tools::Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1 );
aWorkRect.Justify();
aWorkRect.Intersection( aColRect );
if( !aWorkRect.IsEmpty() )
@@ -300,7 +300,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
rWallpaper );
}
- aWorkRect = tools::Rectangle( 0, aPos.Y(), aPos.X() - 1L, aPos.Y() + aBmpSize.Height() - 1L );
+ aWorkRect = tools::Rectangle( 0, aPos.Y(), aPos.X() - 1, aPos.Y() + aBmpSize.Height() - 1 );
aWorkRect.Justify();
aWorkRect.Intersection( aColRect );
if( !aWorkRect.IsEmpty() )
@@ -311,7 +311,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
}
aWorkRect = tools::Rectangle( aPos.X() + aBmpSize.Width(), aPos.Y(),
- aOutRect.Right(), aPos.Y() + aBmpSize.Height() - 1L );
+ aOutRect.Right(), aPos.Y() + aBmpSize.Height() - 1 );
aWorkRect.Justify();
aWorkRect.Intersection( aColRect );
if( !aWorkRect.IsEmpty() )
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index e9d691ec5aa2..0204828574e5 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -1278,7 +1278,7 @@ void MenuFloatingWindow::Command( const CommandEvent& rCEvt )
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) )
{
- ImplScroll( pData->GetDelta() > 0L );
+ ImplScroll( pData->GetDelta() > 0 );
MouseMove( MouseEvent( GetPointerPosPixel(), 0 ) );
}
}
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 10008241c571..672c37394ca9 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -184,7 +184,7 @@ void ImplWheelWindow::ImplRecalcScrollValues()
{
if( mnActDist < WHEEL_RADIUS )
{
- mnActDeltaX = mnActDeltaY = 0L;
+ mnActDeltaX = mnActDeltaY = 0;
mnTimeout = DEF_TIMEOUT;
}
else
@@ -201,7 +201,7 @@ void ImplWheelWindow::ImplRecalcScrollValues()
nCurTime = MAX_TIME;
if( !nCurTime )
- nCurTime = 1UL;
+ nCurTime = 1;
if( mnRepaintTime <= nCurTime )
mnTimeout = nCurTime - mnRepaintTime;
@@ -210,7 +210,7 @@ void ImplWheelWindow::ImplRecalcScrollValues()
sal_uInt64 nMult = mnRepaintTime / nCurTime;
if( !( mnRepaintTime % nCurTime ) )
- mnTimeout = 0UL;
+ mnTimeout = 0;
else
mnTimeout = ++nMult * nCurTime - mnRepaintTime;
@@ -325,14 +325,14 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt )
{
switch( eActStyle )
{
- case( PointerStyle::AutoScrollN ): mnActDeltaX = +0L; mnActDeltaY = +1L; break;
- case( PointerStyle::AutoScrollS ): mnActDeltaX = +0L; mnActDeltaY = -1L; break;
- case( PointerStyle::AutoScrollW ): mnActDeltaX = +1L; mnActDeltaY = +0L; break;
- case( PointerStyle::AutoScrollE ): mnActDeltaX = -1L; mnActDeltaY = +0L; break;
- case( PointerStyle::AutoScrollNW ): mnActDeltaX = +1L; mnActDeltaY = +1L; break;
- case( PointerStyle::AutoScrollNE ): mnActDeltaX = -1L; mnActDeltaY = +1L; break;
- case( PointerStyle::AutoScrollSW ): mnActDeltaX = +1L; mnActDeltaY = -1L; break;
- case( PointerStyle::AutoScrollSE ): mnActDeltaX = -1L; mnActDeltaY = -1L; break;
+ case( PointerStyle::AutoScrollN ): mnActDeltaX = +0; mnActDeltaY = +1; break;
+ case( PointerStyle::AutoScrollS ): mnActDeltaX = +0; mnActDeltaY = -1; break;
+ case( PointerStyle::AutoScrollW ): mnActDeltaX = +1; mnActDeltaY = +0; break;
+ case( PointerStyle::AutoScrollE ): mnActDeltaX = -1; mnActDeltaY = +0; break;
+ case( PointerStyle::AutoScrollNW ): mnActDeltaX = +1; mnActDeltaY = +1; break;
+ case( PointerStyle::AutoScrollNE ): mnActDeltaX = -1; mnActDeltaY = +1; break;
+ case( PointerStyle::AutoScrollSW ): mnActDeltaX = +1; mnActDeltaY = -1; break;
+ case( PointerStyle::AutoScrollSE ): mnActDeltaX = -1; mnActDeltaY = -1; break;
default:
break;