[Libreoffice-commits] core.git: vcl/source
e12346
e12346 at ce.pdn.ac.lk
Fri Sep 16 08:59:55 UTC 2016
vcl/source/gdi/animate.cxx | 6 -
vcl/source/gdi/bitmap3.cxx | 196 +++++++++++++++++++-------------------
vcl/source/gdi/bitmapex.cxx | 16 +--
vcl/source/gdi/bmpacc.cxx | 8 -
vcl/source/gdi/bmpacc2.cxx | 4
vcl/source/gdi/dibtools.cxx | 68 ++++++-------
vcl/source/gdi/gdimtf.cxx | 28 ++---
vcl/source/gdi/impanmvw.cxx | 32 +++---
vcl/source/gdi/impgraph.cxx | 4
vcl/source/gdi/impvect.cxx | 106 ++++++++++----------
vcl/source/gdi/octree.cxx | 26 ++---
vcl/source/gdi/pdfwriter_impl.cxx | 10 -
vcl/source/gdi/print.cxx | 12 +-
vcl/source/gdi/print2.cxx | 32 +++---
vcl/source/gdi/region.cxx | 4
vcl/source/gdi/regionband.cxx | 8 -
vcl/source/gdi/salmisc.cxx | 42 ++++----
vcl/source/gdi/svgdata.cxx | 2
vcl/source/gdi/svmconverter.cxx | 10 -
19 files changed, 307 insertions(+), 307 deletions(-)
New commits:
commit 171201c574b325653794bcd851d0aa7a80dc3249
Author: e12346 <e12346 at ce.pdn.ac.lk>
Date: Mon Aug 1 23:08:30 2016 +0530
tdf#96505 - Remove "long" integer literals in vcl/source/gdi/
Removed the "long" integer literals in "vcl/source/gdi/". Some literals are
left to match external methods
Change-Id: I55aa9bd2935bfd82c9c1cc5cd1efcc4b7c3d9346
Reviewed-on: https://gerrit.libreoffice.org/27784
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 225d1f7..c585e0a 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -27,8 +27,8 @@
#include "impanmvw.hxx"
-#define MIN_TIMEOUT 2L
-#define INC_TIMEOUT 0L
+#define MIN_TIMEOUT 2
+#define INC_TIMEOUT 0
sal_uLong Animation::mnAnimCount = 0UL;
@@ -336,7 +336,7 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDes
void Animation::ImplRestartTimer( sal_uLong nTimeout )
{
- maTimer.SetTimeout( std::max( nTimeout, (sal_uLong)(MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10L );
+ maTimer.SetTimeout( std::max( nTimeout, (sal_uLong)(MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10 );
maTimer.Start();
}
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 32dd2cc..f4223fe 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -38,7 +38,7 @@
#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 GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0,255))
#define CALC_ERRORS \
nTemp = p1T[nX++] >> 12; \
@@ -363,9 +363,9 @@ bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold )
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++ )
{
const sal_uInt8 cIndex = pReadAcc->GetPixelIndex( nY, nX );
if( pReadAcc->GetPaletteColor( cIndex ).GetLuminance() >=
@@ -380,9 +380,9 @@ bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold )
}
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++ )
{
if( pReadAcc->GetPixel( nY, nX ).GetLuminance() >=
cThreshold )
@@ -438,9 +438,9 @@ bool Bitmap::ImplMakeMonoDither()
if( pReadAcc->HasPalette() )
{
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
- for( long nX = 0L, nModY = nY % 16; nX < nWidth; nX++ )
+ for( long nX = 0, nModY = nY % 16; nX < nWidth; nX++ )
{
const sal_uInt8 cIndex = pReadAcc->GetPixelIndex( nY, nX );
if( pReadAcc->GetPaletteColor( cIndex ).GetLuminance() >
@@ -455,9 +455,9 @@ bool Bitmap::ImplMakeMonoDither()
}
else
{
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
- for( long nX = 0L, nModY = nY % 16; nX < nWidth; nX++ )
+ for( long nX = 0, nModY = nY % 16; nX < nWidth; nX++ )
{
if( pReadAcc->GetPixel( nY, nX ).GetLuminance() >
pDitherMatrix[ nModY ][ nX % 16 ] )
@@ -519,9 +519,9 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
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++ )
{
const sal_uInt8 cIndex = pReadAcc->GetPixelIndex( nY, nX );
pWriteAcc->SetPixelIndex( nY, nX,
@@ -534,12 +534,12 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
{
nShift += 8;
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
Scanline pReadScan = pReadAcc->GetScanline( nY );
Scanline pWriteScan = pWriteAcc->GetScanline( nY );
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
const sal_uLong nB = *pReadScan++;
const sal_uLong nG = *pReadScan++;
@@ -554,12 +554,12 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
{
nShift += 8;
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
Scanline pReadScan = pReadAcc->GetScanline( nY );
Scanline pWriteScan = pWriteAcc->GetScanline( nY );
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
const sal_uLong nR = *pReadScan++;
const sal_uLong nG = *pReadScan++;
@@ -571,8 +571,8 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
}
else
{
- 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++ )
pWriteAcc->SetPixelIndex( nY, nX, (pReadAcc->GetPixel( nY, nX ) ).GetLuminance() >> nShift );
}
@@ -637,9 +637,9 @@ bool Bitmap::ImplConvertUp(sal_uInt16 nBitCount, Color* pExtColor)
pWriteAcc->SetPalette(aPalette);
- 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++)
{
pWriteAcc->SetPixel(nY, nX, pReadAcc->GetPixel(nY, nX));
}
@@ -649,9 +649,9 @@ bool Bitmap::ImplConvertUp(sal_uInt16 nBitCount, Color* pExtColor)
{
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++)
{
pWriteAcc->SetPixel(nY, nX, pReadAcc->GetPaletteColor(pReadAcc->GetPixelIndex(nY, nX)));
}
@@ -659,9 +659,9 @@ bool Bitmap::ImplConvertUp(sal_uInt16 nBitCount, Color* pExtColor)
}
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++)
{
pWriteAcc->SetPixel(nY, nX, pReadAcc->GetPixel(nY, nX));
}
@@ -703,7 +703,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor)
{
const sal_uInt16 nCount = 1 << nBitCount;
const long nWidth = pWriteAcc->Width();
- const long nWidth1 = nWidth - 1L;
+ const long nWidth1 = nWidth - 1;
const long nHeight = pWriteAcc->Height();
Octree aOctree(*pReadAcc, pExtColor ? (nCount - 1) : nCount);
aPalette = aOctree.GetPalette();
@@ -714,7 +714,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor)
std::vector<ImpErrorQuad> aErrQuad2(nWidth);
ImpErrorQuad* pQLine1 = aErrQuad1.data();
ImpErrorQuad* pQLine2 = nullptr;
- long nYTmp = 0L;
+ long nYTmp = 0;
sal_uInt8 cIndex;
bool bQ1 = true;
@@ -734,10 +734,10 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor)
pWriteAcc->SetPalette(aPalette);
- for (long nY = 0L; nY < std::min(nHeight, 2L); nY++, nYTmp++)
+ for (long nY = 0; nY < std::min(nHeight, 2L); nY++, nYTmp++)
{
pQLine2 = !nY ? aErrQuad1.data() : aErrQuad2.data();
- for (long nX = 0L; nX < nWidth; nX++)
+ for (long nX = 0; nX < nWidth; nX++)
{
if (pReadAcc->HasPalette())
pQLine2[nX] = pReadAcc->GetPaletteColor(pReadAcc->GetPixelIndex(nYTmp, nX));
@@ -746,14 +746,14 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor)
}
}
- for (long nY = 0L; nY < nHeight; nY++, nYTmp++)
+ for (long nY = 0; nY < nHeight; nY++, nYTmp++)
{
// first pixel in the line
cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex(pQLine1[0].ImplGetColor());
pWriteAcc->SetPixelIndex(nY, 0, cIndex);
long nX;
- for (nX = 1L; nX < nWidth1; nX++)
+ for (nX = 1; nX < nWidth1; nX++)
{
aColor = pQLine1[nX].ImplGetColor();
cIndex = static_cast<sal_uInt8>(aColorMap.GetBestPaletteIndex(aColor));
@@ -778,7 +778,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor)
if (nYTmp < nHeight)
{
- for (nX = 0L; nX < nWidth; nX++)
+ for (nX = 0; nX < nWidth; nX++)
{
if (pReadAcc->HasPalette())
pQLine2[nX] = pReadAcc->GetPaletteColor(pReadAcc->GetPixelIndex(nYTmp, nX));
@@ -1091,8 +1091,8 @@ bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
if( pWriteAcc )
{
const long nScanlineSize = pWriteAcc->GetScanlineSize();
- const long nNewWidth1 = nNewWidth - 1L;
- const long nNewHeight1 = nNewHeight - 1L;
+ const long nNewWidth1 = nNewWidth - 1;
+ const long nNewHeight1 = nNewHeight - 1;
if( nNewWidth1 && nNewHeight1 )
{
@@ -1101,23 +1101,23 @@ bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
std::unique_ptr<long[]> pLutX(new long[ nNewWidth ]);
std::unique_ptr<long[]> pLutY(new long[ nNewHeight ]);
- for( long nX = 0L; nX < nNewWidth; nX++ )
+ for( long nX = 0; nX < nNewWidth; nX++ )
pLutX[ nX ] = long(nX * nWidth / nNewWidth);
- for( long nY = 0L; nY < nNewHeight; nY++ )
+ for( long nY = 0; nY < nNewHeight; nY++ )
pLutY[ nY ] = long(nY * nHeight / nNewHeight);
- long nActY = 0L;
+ long nActY = 0;
while( nActY < nNewHeight )
{
long nMapY = pLutY[ nActY ];
- for( long nX = 0L; nX < nNewWidth; nX++ )
+ for( long nX = 0; nX < nNewWidth; nX++ )
pWriteAcc->SetPixel( nActY, nX, pReadAcc->GetPixel( nMapY , pLutX[ nX ] ) );
while( ( nActY < nNewHeight1 ) && ( pLutY[ nActY + 1 ] == nMapY ) )
{
- memcpy( pWriteAcc->GetScanline( nActY + 1L ),
+ memcpy( pWriteAcc->GetScanline( nActY + 1 ),
pWriteAcc->GetScanline( nActY ), nScanlineSize );
nActY++;
}
@@ -1146,7 +1146,7 @@ bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
bool bRet = false;
- if( ( nNewWidth > 1L ) && ( nNewHeight > 1L ) )
+ if( ( nNewWidth > 1 ) && ( nNewHeight > 1 ) )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
if( pReadAcc )
@@ -1158,14 +1158,14 @@ bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
if( pWriteAcc )
{
- const long nNewWidth1 = nNewWidth - 1L;
- const long nWidth1 = pReadAcc->Width() - 1L;
+ const long nNewWidth1 = nNewWidth - 1;
+ const long nWidth1 = pReadAcc->Width() - 1;
const double fRevScaleX = (double) nWidth1 / nNewWidth1;
std::unique_ptr<long[]> pLutInt(new long[ nNewWidth ]);
std::unique_ptr<long[]> pLutFrac(new long[ nNewWidth ]);
- for( long nX = 0L, nTemp = nWidth - 2L; nX < nNewWidth; nX++ )
+ for( long nX = 0, nTemp = nWidth - 2; nX < nNewWidth; nX++ )
{
double fTemp = nX * fRevScaleX;
pLutInt[ nX ] = MinMax( (long) fTemp, 0, nTemp );
@@ -1173,7 +1173,7 @@ bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
pLutFrac[ nX ] = (long) ( fTemp * 1024. );
}
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
if( 1 == nWidth )
{
@@ -1187,14 +1187,14 @@ bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
aCol0 = pReadAcc->GetPixel( nY, 0 );
}
- for( long nX = 0L; nX < nNewWidth; nX++ )
+ for( long nX = 0; nX < nNewWidth; nX++ )
{
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
}
else
{
- for( long nX = 0L; nX < nNewWidth; nX++ )
+ for( long nX = 0; nX < nNewWidth; nX++ )
{
long nTemp = pLutInt[ nX ];
@@ -1245,14 +1245,14 @@ bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
if( pReadAcc && pWriteAcc )
{
- const long nNewHeight1 = nNewHeight - 1L;
- const long nHeight1 = pReadAcc->Height() - 1L;
+ const long nNewHeight1 = nNewHeight - 1;
+ const long nHeight1 = pReadAcc->Height() - 1;
const double fRevScaleY = (double) nHeight1 / nNewHeight1;
std::unique_ptr<long[]> pLutInt(new long[ nNewHeight ]);
std::unique_ptr<long[]> pLutFrac(new long[ nNewHeight ]);
- for( long nY = 0L, nTemp = nHeight - 2L; nY < nNewHeight; nY++ )
+ for( long nY = 0, nTemp = nHeight - 2; nY < nNewHeight; nY++ )
{
double fTemp = nY * fRevScaleY;
pLutInt[ nY ] = MinMax( (long) fTemp, 0, nTemp );
@@ -1263,20 +1263,20 @@ bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
// after 1st step, bitmap *is* 24bit format (see above)
OSL_ENSURE(!pReadAcc->HasPalette(), "OOps, somehow ImplScaleInterpolate in-between format has palette, should not happen (!)");
- for( long nX = 0L; nX < nNewWidth; nX++ )
+ for( long nX = 0; nX < nNewWidth; nX++ )
{
if( 1 == nHeight )
{
BitmapColor aCol0 = pReadAcc->GetPixel( 0, nX );
- for( long nY = 0L; nY < nNewHeight; nY++ )
+ for( long nY = 0; nY < nNewHeight; nY++ )
{
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
}
else
{
- for( long nY = 0L; nY < nNewHeight; nY++ )
+ for( long nY = 0; nY < nNewHeight; nY++ )
{
long nTemp = pLutInt[ nY ];
@@ -1425,11 +1425,11 @@ bool Bitmap::ImplDitherFloyd()
{
BitmapColor aColor;
long nWidth = pReadAcc->Width();
- long nWidth1 = nWidth - 1L;
+ long nWidth1 = nWidth - 1;
long nHeight = pReadAcc->Height();
long nX;
- long nW = nWidth * 3L;
- long nW2 = nW - 3L;
+ long nW = nWidth * 3;
+ long nW2 = nW - 3;
long nRErr, nGErr, nBErr;
long nRC, nGC, nBC;
std::unique_ptr<long[]> p1(new long[ nW ]);
@@ -1464,7 +1464,7 @@ bool Bitmap::ImplDitherFloyd()
}
}
- for( long nY = 1, nYAcc = 0L; nY <= nHeight; nY++, nYAcc++ )
+ for( long nY = 1, nYAcc = 0; nY <= nHeight; nY++, nYAcc++ )
{
pTmp = p1T;
p1T = p2T;
@@ -1507,7 +1507,7 @@ bool Bitmap::ImplDitherFloyd()
// Get middle Pixels using a loop
long nXAcc;
- for ( nX = 3L, nXAcc = 1L; nX < nW2; nXAcc++ )
+ for ( nX = 3, nXAcc = 1; nX < nW2; nXAcc++ )
{
CALC_ERRORS;
CALC_TABLES7;
@@ -1556,7 +1556,7 @@ bool Bitmap::ImplDitherFloyd16()
if( pReadAcc && pWriteAcc )
{
const long nWidth = pWriteAcc->Width();
- const long nWidth1 = nWidth - 1L;
+ const long nWidth1 = nWidth - 1;
const long nHeight = pWriteAcc->Height();
BitmapColor aColor;
BitmapColor aBestCol;
@@ -1565,17 +1565,17 @@ bool Bitmap::ImplDitherFloyd16()
std::unique_ptr<ImpErrorQuad[]> pErrQuad2(new ImpErrorQuad[ nWidth ]);
ImpErrorQuad* pQLine1 = pErrQuad1.get();
ImpErrorQuad* pQLine2 = nullptr;
- long nYTmp = 0L;
+ long nYTmp = 0;
bool bQ1 = true;
- for( long nY = 0L; nY < std::min( nHeight, 2L ); nY++, nYTmp++ )
+ for( long nY = 0; nY < std::min( nHeight, 2L ); nY++, nYTmp++ )
{
pQLine2 = !nY ? pErrQuad1.get() : pErrQuad2.get();
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
pQLine2[ nX ] = pReadAcc->GetPixel( nYTmp, nX );
}
- for( long nY = 0L; nY < nHeight; nY++, nYTmp++ )
+ for( long nY = 0; nY < nHeight; nY++, nYTmp++ )
{
// First RowPixel
aBestCol = pQLine1[ 0 ].ImplGetColor();
@@ -1585,7 +1585,7 @@ bool Bitmap::ImplDitherFloyd16()
pWriteAcc->SetPixel( nY, 0, aBestCol );
long nX;
- for( nX = 1L; nX < nWidth1; nX++ )
+ for( nX = 1; nX < nWidth1; nX++ )
{
aColor = pQLine1[ nX ].ImplGetColor();
aBestCol.SetRed( ( aColor.GetRed() & 248 ) | 7 );
@@ -1611,7 +1611,7 @@ bool Bitmap::ImplDitherFloyd16()
pQLine2 = ( bQ1 = !bQ1 ) ? pErrQuad2.get() : pErrQuad1.get();
if( nYTmp < nHeight )
- for( nX = 0L; nX < nWidth; nX++ )
+ for( nX = 0; nX < nWidth; nX++ )
pQLine2[ nX ] = pReadAcc->GetPixel( nYTmp, nX );
}
@@ -1687,14 +1687,14 @@ bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount )
if( pRAcc->HasPalette() )
{
- 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++ )
pWAcc->SetPixelIndex( nY, nX, static_cast<sal_uInt8>(aOct.GetBestPaletteIndex( pRAcc->GetPaletteColor( pRAcc->GetPixelIndex( nY, nX ) ))) );
}
else
{
- 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++ )
pWAcc->SetPixelIndex( nY, nX, static_cast<sal_uInt8>(aOct.GetBestPaletteIndex( pRAcc->GetPixel( nY, nX ) )) );
}
@@ -1781,9 +1781,9 @@ bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
if( pRAcc->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++ )
{
const BitmapColor& rCol = pRAcc->GetPaletteColor( pRAcc->GetPixelIndex( nY, nX ) );
pCountTable[ ( ( ( (sal_uInt32) rCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
@@ -1794,9 +1794,9 @@ bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
}
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++ )
{
const BitmapColor aCol( pRAcc->GetPixel( nY, nX ) );
pCountTable[ ( ( ( (sal_uInt32) aCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
@@ -1833,9 +1833,9 @@ bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
if( pRAcc->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++ )
{
const BitmapColor& rCol = pRAcc->GetPaletteColor( pRAcc->GetPixelIndex( nY, nX ) );
aDstCol.SetIndex( pIndexMap[ ( ( ( (sal_uInt32) rCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
@@ -1847,9 +1847,9 @@ bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
}
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++ )
{
const BitmapColor aCol( pRAcc->GetPixel( nY, nX ) );
aDstCol.SetIndex( pIndexMap[ ( ( ( (sal_uInt32) aCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
@@ -1909,16 +1909,16 @@ bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount )
sal_uLong* pColBuf = static_cast<sal_uLong*>(rtl_allocateMemory( nSize ));
const long nWidth = pWAcc->Width();
const long nHeight = pWAcc->Height();
- long nIndex = 0L;
+ long nIndex = 0;
memset( pColBuf, 0, nSize );
// create Buffer
if( pRAcc->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++ )
{
const BitmapColor& rCol = pRAcc->GetPaletteColor( pRAcc->GetPixelIndex( nY, nX ) );
pColBuf[ RGB15( rCol.GetRed() >> 3, rCol.GetGreen() >> 3, rCol.GetBlue() >> 3 ) ]++;
@@ -1927,9 +1927,9 @@ bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount )
}
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++ )
{
const BitmapColor aCol( pRAcc->GetPixel( nY, nX ) );
pColBuf[ RGB15( aCol.GetRed() >> 3, aCol.GetGreen() >> 3, aCol.GetBlue() >> 3 ) ]++;
@@ -1945,8 +1945,8 @@ bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount )
// do mapping of colors to palette
InverseColorMap aMap( aPal );
pWAcc->SetPalette( aPal );
- 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++ )
pWAcc->SetPixelIndex( nY, nX, static_cast<sal_uInt8>( aMap.GetBestPaletteIndex( pRAcc->GetColor( nY, nX ) )) );
rtl_freeMemory( pColBuf );
@@ -2143,15 +2143,15 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
// calculate slope
if( nContrastPercent >= 0 )
- fM = 128.0 / ( 128.0 - 1.27 * MinMax( nContrastPercent, 0L, 100L ) );
+ fM = 128.0 / ( 128.0 - 1.27 * MinMax( nContrastPercent, 0, 100 ) );
else
- fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100L, 0L ) ) / 128.0;
+ fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100, 0 ) ) / 128.0;
if(!msoBrightness)
// total offset = luminance offset + contrast offset
- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0;
+ fOff = MinMax( nLuminancePercent, -100, 100 ) * 2.55 + 128.0 - fM * 128.0;
else
- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55;
+ fOff = MinMax( nLuminancePercent, -100, 100 ) * 2.55;
// channel offset = channel offset + total offset
fROff = nChannelRPercent * 2.55 + fOff;
@@ -2163,22 +2163,22 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
const bool bGamma = ( fGamma != 1.0 );
// create mapping table
- for( long nX = 0L; nX < 256L; nX++ )
+ for( long nX = 0; nX < 256; nX++ )
{
if(!msoBrightness)
{
- cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
- cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
- cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
+ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0, 255 );
+ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0, 255 );
+ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0, 255 );
}
else
{
// LO simply uses (in a somewhat optimized form) "newcolor = (oldcolor-128)*contrast+brightness+128"
// as the formula, i.e. contrast first, brightness afterwards. MSOffice, for whatever weird reason,
// use neither first, but apparently it applies half of brightness before contrast and half afterwards.
- cMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0L, 255L );
- cMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0L, 255L );
- cMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0L, 255L );
+ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0, 255 );
+ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0, 255 );
+ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0, 255 );
}
if( bGamma )
{
@@ -2211,11 +2211,11 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
}
else if( pAcc->GetScanlineFormat() == ScanlineFormat::N24BitTcBgr )
{
- for( long nY = 0L; nY < nH; nY++ )
+ for( long nY = 0; nY < nH; nY++ )
{
Scanline pScan = pAcc->GetScanline( nY );
- for( long nX = 0L; nX < nW; nX++ )
+ for( long nX = 0; nX < nW; nX++ )
{
*pScan = cMapB[ *pScan ]; pScan++;
*pScan = cMapG[ *pScan ]; pScan++;
@@ -2225,11 +2225,11 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
}
else if( pAcc->GetScanlineFormat() == ScanlineFormat::N24BitTcRgb )
{
- for( long nY = 0L; nY < nH; nY++ )
+ for( long nY = 0; nY < nH; nY++ )
{
Scanline pScan = pAcc->GetScanline( nY );
- for( long nX = 0L; nX < nW; nX++ )
+ for( long nX = 0; nX < nW; nX++ )
{
*pScan = cMapR[ *pScan ]; pScan++;
*pScan = cMapG[ *pScan ]; pScan++;
@@ -2239,9 +2239,9 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
}
else
{
- for( long nY = 0L; nY < nH; nY++ )
+ for( long nY = 0; nY < nH; nY++ )
{
- for( long nX = 0L; nX < nW; nX++ )
+ for( long nX = 0; nX < nW; nX++ )
{
aCol = pAcc->GetPixel( nY, nX );
aCol.SetRed( cMapR[ aCol.GetRed() ] );
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 4547cd3..7bde2ff 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -843,9 +843,9 @@ namespace
const Size aDestinationSizePixel(aDestination.GetSizePixel());
const BitmapColor aOutside(BitmapColor(0xff, 0xff, 0xff));
- for(long y(0L); y < aDestinationSizePixel.getHeight(); y++)
+ for(long y(0); y < aDestinationSizePixel.getHeight(); y++)
{
- for(long x(0L); x < aDestinationSizePixel.getWidth(); x++)
+ for(long x(0); x < aDestinationSizePixel.getWidth(); x++)
{
const basegfx::B2DPoint aSourceCoor(rTransform * basegfx::B2DPoint(x, y));
@@ -1067,11 +1067,11 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
else if(ScanlineFormat::N24BitTcBgr == xContent->GetScanlineFormat())
{
- for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++)
+ for(sal_uInt32 y(0); y < (sal_uInt32)xContent->Height(); y++)
{
Scanline pScan = xContent->GetScanline(y);
- for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++)
+ for(sal_uInt32 x(0); x < (sal_uInt32)xContent->Width(); x++)
{
const basegfx::BColor aBSource(
*(pScan + 2)* fConvertColor,
@@ -1086,11 +1086,11 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
else if(ScanlineFormat::N24BitTcRgb == xContent->GetScanlineFormat())
{
- for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++)
+ for(sal_uInt32 y(0); y < (sal_uInt32)xContent->Height(); y++)
{
Scanline pScan = xContent->GetScanline(y);
- for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++)
+ for(sal_uInt32 x(0); x < (sal_uInt32)xContent->Width(); x++)
{
const basegfx::BColor aBSource(
*pScan * fConvertColor,
@@ -1105,9 +1105,9 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
else
{
- for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++)
+ for(sal_uInt32 y(0); y < (sal_uInt32)xContent->Height(); y++)
{
- for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++)
+ for(sal_uInt32 x(0); x < (sal_uInt32)xContent->Width(); x++)
{
const BitmapColor aBMCol(xContent->GetColor(y, x));
const basegfx::BColor aBSource(
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 8357784..c55b864 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -141,7 +141,7 @@ void BitmapReadAccess::ImplInitScanBuffer( Bitmap& rBitmap )
mpScanBuf = new Scanline[ nHeight ];
if( mpBuffer->mnFormat & ScanlineFormat::TopDown )
{
- for( long nY = 0L; nY < nHeight; nY++, pTmpLine += mpBuffer->mnScanlineSize )
+ for( long nY = 0; nY < nHeight; nY++, pTmpLine += mpBuffer->mnScanlineSize )
mpScanBuf[ nY ] = pTmpLine;
}
else
@@ -414,7 +414,7 @@ void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc
}
else
// TODO: use fastbmp infrastructure
- for( long nX = 0L, nWidth = std::min( mpBuffer->mnWidth, rReadAcc.Width() ); nX < nWidth; nX++ )
+ for( long nX = 0, nWidth = std::min( mpBuffer->mnWidth, rReadAcc.Width() ); nX < nWidth; nX++ )
SetPixel( nY, nX, rReadAcc.GetPixel( nY, nX ) );
}
@@ -472,7 +472,7 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
{
const ColorMask aDummyMask;
- for( long nX = 0L, nWidth = mpBuffer->mnWidth; nX < nWidth; nX++ )
+ for( long nX = 0, nWidth = mpBuffer->mnWidth; nX < nWidth; nX++ )
SetPixel( nY, nX, pFncGetPixel( aSrcScanline, nX, aDummyMask ) );
}
}
@@ -492,7 +492,7 @@ void BitmapWriteAccess::CopyBuffer( const BitmapReadAccess& rReadAcc )
memcpy( mpBuffer->mpBits, rReadAcc.GetBuffer(), nCount );
}
else
- for( long nY = 0L, nHeight = std::min( mpBuffer->mnHeight, rReadAcc.Height() ); nY < nHeight; nY++ )
+ for( long nY = 0, nHeight = std::min( mpBuffer->mnHeight, rReadAcc.Height() ); nY < nHeight; nY++ )
CopyScanline( nY, rReadAcc );
}
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 089a246..8501f00 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -162,13 +162,13 @@ void BitmapReadAccess::SetPixelForN24BitTcRgb(Scanline pScanline, long nX, const
BitmapColor BitmapReadAccess::GetPixelForN24BitTcMask(ConstScanline pScanline, long nX, const ColorMask& rMask)
{
BitmapColor aColor;
- rMask.GetColorFor24Bit( aColor, pScanline + nX * 3L );
+ rMask.GetColorFor24Bit( aColor, pScanline + nX * 3 );
return aColor;
}
void BitmapReadAccess::SetPixelForN24BitTcMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
{
- rMask.SetColorFor24Bit( rBitmapColor, pScanline + nX * 3L );
+ rMask.SetColorFor24Bit( rBitmapColor, pScanline + nX * 3 );
}
BitmapColor BitmapReadAccess::GetPixelForN32BitTcAbgr(ConstScanline pScanline, long nX, const ColorMask&)
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index d12559b..a3e6a07 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -50,9 +50,9 @@ struct CIEXYZ
FXPT2DOT30 aXyzZ;
CIEXYZ()
- : aXyzX(0L),
- aXyzY(0L),
- aXyzZ(0L)
+ : aXyzX(0),
+ aXyzY(0),
+ aXyzZ(0)
{}
~CIEXYZ()
@@ -348,7 +348,7 @@ bool ImplDecodeRLE( sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess&
{
Scanline pRLE = pBuffer;
Scanline pEndRLE = pBuffer + rHeader.nSizeImage;
- long nY = rHeader.nHeight - 1L;
+ long nY = rHeader.nHeight - 1;
const sal_uLong nWidth = rAcc.Width();
sal_uLong nCountByte;
sal_uLong nRunByte;
@@ -478,7 +478,7 @@ bool ImplDecodeRLE( sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess&
}
}
}
- while (!bEndDecoding && (nY >= 0L));
+ while (!bEndDecoding && (nY >= 0));
return true;
}
@@ -529,7 +529,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
// Read color mask
if(bTCMask && BITFIELDS == rHeader.nCompression)
{
- rIStm.SeekRel( -12L );
+ rIStm.SeekRel( -12 );
rIStm.ReadUInt32( nRMask );
rIStm.ReadUInt32( nGMask );
rIStm.ReadUInt32( nBMask );
@@ -575,11 +575,11 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
sal_uInt8 cTmp = *pTmp++;
- for( long nX = 0L, nShift = 8L; nX < nWidth; nX++ )
+ for( long nX = 0, nShift = 8; nX < nWidth; nX++ )
{
if( !nShift )
{
- nShift = 8L;
+ nShift = 8;
cTmp = *pTmp++;
}
@@ -604,7 +604,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
sal_uInt8 cTmp = *pTmp++;
- for( long nX = 0L, nShift = 2L; nX < nWidth; nX++ )
+ for( long nX = 0, nShift = 2; nX < nWidth; nX++ )
{
if( !nShift )
{
@@ -633,7 +633,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
return false;
}
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
auto nIndex = *pTmp++;
rAcc.SetPixelIndex(nY, nX, SanitizePaletteIndex(nIndex, bHasPalette, nPaletteEntryCount));
@@ -666,7 +666,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
return false;
}
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aMask.GetColorFor16BitLSB( aColor, reinterpret_cast<sal_uInt8*>(pTmp16++) );
rAcc.SetPixel( nY, nX, aColor );
@@ -688,7 +688,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
return false;
}
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aPixelColor.SetBlue( *pTmp++ );
aPixelColor.SetGreen( *pTmp++ );
@@ -728,7 +728,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
return false;
}
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aMask.GetColorAndAlphaFor32Bit( aColor, aAlpha, reinterpret_cast<sal_uInt8*>(pTmp32++) );
rAcc.SetPixel( nY, nX, aColor );
@@ -748,7 +748,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
return false;
}
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
aMask.GetColorFor32Bit( aColor, reinterpret_cast<sal_uInt8*>(pTmp32++) );
rAcc.SetPixel( nY, nX, aColor );
@@ -995,16 +995,16 @@ bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& rOffset )
sal_uInt32 nTmp32(0);
if ( 0x4142 == nTmp16 )
{
- rIStm.SeekRel( 12L );
+ rIStm.SeekRel( 12 );
rIStm.ReadUInt16( nTmp16 );
- rIStm.SeekRel( 8L );
+ rIStm.SeekRel( 8 );
rIStm.ReadUInt32( nTmp32 );
rOffset = nTmp32 - 28UL;
bRet = ( 0x4D42 == nTmp16 );
}
else // 0x4D42 == nTmp16, 'MB' from BITMAPFILEHEADER
{
- rIStm.SeekRel( 8L ); // we are on bfSize member of BITMAPFILEHEADER, forward to bfOffBits
+ 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)
bRet = ( rIStm.GetError() == 0UL );
@@ -1060,17 +1060,17 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, bool bRLE4 )
sal_uInt8 cLast;
bool bFound;
- for ( long nY = nHeight - 1L; nY >= 0L; nY-- )
+ for ( long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = pBuf.get();
nX = nBufCount = 0UL;
while( nX < nWidth )
{
- nCount = 1L;
+ nCount = 1;
cPix = rAcc.GetPixelIndex( nY, nX++ );
- while( ( nX < nWidth ) && ( nCount < 255L )
+ while( ( nX < nWidth ) && ( nCount < 255 )
&& ( cPix == rAcc.GetPixelIndex( nY, nX ) ) )
{
nX++;
@@ -1089,7 +1089,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, bool bRLE4 )
nSaveIndex = nX - 1UL;
bFound = false;
- while( ( nX < nWidth ) && ( nCount < 256L )
+ while( ( nX < nWidth ) && ( nCount < 256 )
&& ( cPix = rAcc.GetPixelIndex( nY, nX ) ) != cLast )
{
nX++; nCount++;
@@ -1182,7 +1182,7 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess*
rOStm.WriteBytes(rAcc.GetBuffer(), rAcc.Height() * rAcc.GetScanlineSize());
else
{
- for( long nY = rAcc.Height() - 1, nScanlineSize = rAcc.GetScanlineSize(); nY >= 0L; nY-- )
+ for( long nY = rAcc.Height() - 1, nScanlineSize = rAcc.GetScanlineSize(); nY >= 0; nY-- )
rOStm.WriteBytes( rAcc.GetScanline(nY), nScanlineSize );
}
}
@@ -1245,16 +1245,16 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess*
size_t nUnusedBytes = nAlignedWidth - ((nWidth+7) / 8);
memset(pBuf.get() + nAlignedWidth - nUnusedBytes, 0, nUnusedBytes);
- for( long nY = nHeight - 1; nY >= 0L; nY-- )
+ for( long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = pBuf.get();
sal_uInt8 cTmp = 0;
- for( long nX = 0L, nShift = 8L; nX < nWidth; nX++ )
+ for( long nX = 0, nShift = 8; nX < nWidth; nX++ )
{
if( !nShift )
{
- nShift = 8L;
+ nShift = 8;
*pTmp++ = cTmp;
cTmp = 0;
}
@@ -1274,21 +1274,21 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess*
size_t nUnusedBytes = nAlignedWidth - ((nWidth+1) / 2);
memset(pBuf.get() + nAlignedWidth - nUnusedBytes, 0, nUnusedBytes);
- for( long nY = nHeight - 1; nY >= 0L; nY-- )
+ for( long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = pBuf.get();
sal_uInt8 cTmp = 0;
- for( long nX = 0L, nShift = 2L; nX < nWidth; nX++ )
+ for( long nX = 0, nShift = 2; nX < nWidth; nX++ )
{
if( !nShift )
{
- nShift = 2L;
+ nShift = 2;
*pTmp++ = cTmp;
cTmp = 0;
}
- cTmp |= rAcc.GetPixelIndex( nY, nX ) << ( --nShift << 2L );
+ cTmp |= rAcc.GetPixelIndex( nY, nX ) << ( --nShift << 2 );
}
*pTmp = cTmp;
rOStm.WriteBytes( pBuf.get(), nAlignedWidth );
@@ -1298,11 +1298,11 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess*
case 8:
{
- for( long nY = nHeight - 1; nY >= 0L; nY-- )
+ for( long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = pBuf.get();
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
*pTmp++ = rAcc.GetPixelIndex( nY, nX );
rOStm.WriteBytes( pBuf.get(), nAlignedWidth );
@@ -1323,11 +1323,11 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess*
BitmapColor aPixelColor;
const bool bWriteAlpha(32 == nBitCount && pAccAlpha);
- for( long nY = nHeight - 1; nY >= 0L; nY-- )
+ for( long nY = nHeight - 1; nY >= 0; nY-- )
{
sal_uInt8* pTmp = pBuf.get();
- for( long nX = 0L; nX < nWidth; nX++ )
+ for( long nX = 0; nX < nWidth; nX++ )
{
// when alpha is used, this may be non-24bit main bitmap, so use GetColor
// instead of GetPixel to ensure RGB value
@@ -1421,7 +1421,7 @@ bool ImplWriteDIBBody(const Bitmap& rBitmap, SvStream& rOStm, BitmapReadAccess&
// MapMode is integer-based, and suffers from roundoffs,
// especially if maPrefSize is small. Trying to circumvent
// that by performing part of the math in floating point.
- const Size aScale100000(OutputDevice::LogicToLogic(Size(100000L, 100000L), MAP_100TH_MM, rBitmap.GetPrefMapMode()));
+ const Size aScale100000(OutputDevice::LogicToLogic(Size(100000, 100000), MAP_100TH_MM, rBitmap.GetPrefMapMode()));
const double fBmpWidthM((double)rBitmap.GetPrefSize().Width() / aScale100000.Width());
const double fBmpHeightM((double)rBitmap.GetPrefSize().Height() / aScale100000.Height());
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index b2bdcd1..7954574 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -52,7 +52,7 @@
using namespace com::sun::star;
-#define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0,255))
struct ImplColAdjustParam
{
@@ -836,8 +836,8 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
void GDIMetaFile::Rotate( long nAngle10 )
{
- nAngle10 %= 3600L;
- nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10;
+ nAngle10 %= 3600;
+ nAngle10 = ( nAngle10 < 0 ) ? ( 3599 + nAngle10 ) : nAngle10;
if( nAngle10 )
{
@@ -2121,15 +2121,15 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
// calculate slope
if( nContrastPercent >= 0 )
- fM = 128.0 / ( 128.0 - 1.27 * MinMax( nContrastPercent, 0L, 100L ) );
+ fM = 128.0 / ( 128.0 - 1.27 * MinMax( nContrastPercent, 0, 100 ) );
else
- fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100L, 0L ) ) / 128.0;
+ fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100, 0 ) ) / 128.0;
if(!msoBrightness)
// total offset = luminance offset + contrast offset
- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0;
+ fOff = MinMax( nLuminancePercent, -100, 100 ) * 2.55 + 128.0 - fM * 128.0;
else
- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55;
+ fOff = MinMax( nLuminancePercent, -100, 100 ) * 2.55;
// channel offset = channel offset + total offset
fROff = nChannelRPercent * 2.55 + fOff;
@@ -2141,19 +2141,19 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
const bool bGamma = ( fGamma != 1.0 );
// create mapping table
- for( long nX = 0L; nX < 256L; nX++ )
+ for( long nX = 0; nX < 256; nX++ )
{
if(!msoBrightness)
{
- aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
- aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
- aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
+ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0, 255 );
+ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0, 255 );
+ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0, 255 );
}
else
{
- aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0L, 255L );
- aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0L, 255L );
- aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0L, 255L );
+ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0, 255 );
+ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0, 255 );
+ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0, 255 );
}
if( bGamma )
{
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 2606283..c8616ef 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -40,15 +40,15 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
meLastDisposal ( Disposal::Back ),
mbPause ( false ),
mbMarked ( false ),
- mbHMirr ( maSz.Width() < 0L ),
- mbVMirr ( maSz.Height() < 0L )
+ mbHMirr ( maSz.Width() < 0 ),
+ mbVMirr ( maSz.Height() < 0 )
{
Animation::ImplIncAnimCount();
// Mirrored horizontally?
if( mbHMirr )
{
- maDispPt.X() = maPt.X() + maSz.Width() + 1L;
+ maDispPt.X() = maPt.X() + maSz.Width() + 1;
maDispSz.Width() = -maSz.Width();
maSzPix.Width() = -maSzPix.Width();
}
@@ -61,7 +61,7 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
// Mirrored vertically?
if( mbVMirr )
{
- maDispPt.Y() = maPt.Y() + maSz.Height() + 1L;
+ maDispPt.Y() = maPt.Y() + maSz.Height() + 1;
maDispSz.Height() = -maSz.Height();
maSzPix.Height() = -maSzPix.Height();
}
@@ -119,19 +119,19 @@ bool ImplAnimView::matches( OutputDevice* pOut, long nExtraData ) const
void ImplAnimView::getPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix )
{
const Size& rAnmSize = mpParent->GetDisplaySizePixel();
- Point aPt2( rAnm.aPosPix.X() + rAnm.aSizePix.Width() - 1L,
- rAnm.aPosPix.Y() + rAnm.aSizePix.Height() - 1L );
+ Point aPt2( rAnm.aPosPix.X() + rAnm.aSizePix.Width() - 1,
+ rAnm.aPosPix.Y() + rAnm.aSizePix.Height() - 1 );
double fFactX, fFactY;
// calculate x scaling
- if( rAnmSize.Width() > 1L )
- fFactX = (double) ( maSzPix.Width() - 1L ) / ( rAnmSize.Width() - 1L );
+ if( rAnmSize.Width() > 1 )
+ fFactX = (double) ( maSzPix.Width() - 1 ) / ( rAnmSize.Width() - 1 );
else
fFactX = 1.0;
// calculate y scaling
- if( rAnmSize.Height() > 1L )
- fFactY = (double) ( maSzPix.Height() - 1L ) / ( rAnmSize.Height() - 1L );
+ if( rAnmSize.Height() > 1 )
+ fFactY = (double) ( maSzPix.Height() - 1 ) / ( rAnmSize.Height() - 1 );
else
fFactY = 1.0;
@@ -141,16 +141,16 @@ void ImplAnimView::getPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size
aPt2.X() = FRound( aPt2.X() * fFactX );
aPt2.Y() = FRound( aPt2.Y() * fFactY );
- rSizePix.Width() = aPt2.X() - rPosPix.X() + 1L;
- rSizePix.Height() = aPt2.Y() - rPosPix.Y() + 1L;
+ rSizePix.Width() = aPt2.X() - rPosPix.X() + 1;
+ rSizePix.Height() = aPt2.Y() - rPosPix.Y() + 1;
// Mirrored horizontally?
if( mbHMirr )
- rPosPix.X() = maSzPix.Width() - 1L - aPt2.X();
+ rPosPix.X() = maSzPix.Width() - 1 - aPt2.X();
// Mirrored vertically?
if( mbVMirr )
- rPosPix.Y() = maSzPix.Height() - 1L - aPt2.Y();
+ rPosPix.Y() = maSzPix.Height() - 1 - aPt2.Y();
}
void ImplAnimView::drawToPos( sal_uLong nPos )
@@ -217,7 +217,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
// Mirrored horizontally?
if( mbHMirr )
{
- aBmpPosPix.X() = aPosPix.X() + aSizePix.Width() - 1L;
+ aBmpPosPix.X() = aPosPix.X() + aSizePix.Width() - 1;
aBmpSizePix.Width() = -aSizePix.Width();
}
else
@@ -229,7 +229,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
// Mirrored vertically?
if( mbVMirr )
{
- aBmpPosPix.Y() = aPosPix.Y() + aSizePix.Height() - 1L;
+ aBmpPosPix.Y() = aPosPix.Y() + aSizePix.Height() - 1;
aBmpSizePix.Height() = -aSizePix.Height();
}
else
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index bea44dc..907fbd6 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -939,7 +939,7 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm )
sal_Int32 nMapMode, nScaleNumX, nScaleDenomX;
sal_Int32 nScaleNumY, nScaleDenomY, nOffsX, nOffsY;
- rIStm.SeekRel( -4L );
+ rIStm.SeekRel( -4 );
sal_Int32 nLen;
rIStm.ReadInt32( nType ).ReadInt32( nLen ).ReadInt32( nWidth ).ReadInt32( nHeight );
@@ -947,7 +947,7 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm )
rIStm.ReadInt32( nScaleDenomY ).ReadInt32( nOffsX ).ReadInt32( nOffsY );
// swapped
- if( nType > 100L )
+ if( nType > 100 )
{
nType = OSL_SWAPDWORD( nType );
nWidth = OSL_SWAPDWORD( nWidth );
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 7f0559a..26a4c6d 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -39,7 +39,7 @@
#define VECT_POLY_OUTLINE_INNER 4UL
#define VECT_POLY_OUTLINE_OUTER 8UL
-#define VECT_MAP( _def_pIn, _def_pOut, _def_nVal ) _def_pOut[_def_nVal]=(_def_pIn[_def_nVal]=((_def_nVal)*4L)+1L)+5L;
+#define VECT_MAP( _def_pIn, _def_pOut, _def_nVal ) _def_pOut[_def_nVal]=(_def_pIn[_def_nVal]=((_def_nVal)*4)+1)+5;
#define BACK_MAP( _def_nVal ) ((((_def_nVal)+2)>>2)-1)
#define VECT_PROGRESS( _def_pProgress, _def_nVal ) \
if(_def_pProgress) \
@@ -60,36 +60,36 @@ namespace ImplVectorizer
struct ChainMove { long nDX; long nDY; };
static const ChainMove aImplMove[ 8 ] = {
- { 1L, 0L },
- { 0L, -1L },
- { -1L, 0L },
- { 0L, 1L },
- { 1L, -1L },
- { -1, -1L },
- { -1L, 1L },
- { 1L, 1L }
+ { 1, 0 },
+ { 0, -1 },
+ { -1, 0 },
+ { 0, 1 },
+ { 1, -1 },
+ { -1, -1 },
+ { -1, 1 },
+ { 1, 1 }
};
static const ChainMove aImplMoveInner[ 8 ] = {
- { 0L, 1L },
- { 1L, 0L },
- { 0L, -1L },
- { -1L, 0L },
- { 0L, 1L },
- { 1L, 0L },
- { 0L, -1L },
- { -1L, 0L }
+ { 0, 1 },
+ { 1, 0 },
+ { 0, -1 },
+ { -1, 0 },
+ { 0, 1 },
+ { 1, 0 },
+ { 0, -1 },
+ { -1, 0 }
};
static const ChainMove aImplMoveOuter[ 8 ] = {
- { 0L, -1L },
- { -1L, 0L },
- { 0L, 1L },
- { 1L, 0L },
- { -1L, 0L },
- { 0L, 1L },
- { 1L, 0L },
- { 0L, -1L }
+ { 0, -1 },
+ { -1, 0 },
+ { 0, 1 },
+ { 1, 0 },
+ { -1, 0 },
+ { 0, 1 },
+ { 1, 0 },
+ { 0, -1 }
};
struct ImplColorSet
@@ -217,14 +217,14 @@ ImplVectMap::ImplVectMap( long nWidth, long nHeight ) :
mnWidth ( nWidth ),
mnHeight( nHeight )
{
- const long nWidthAl = ( nWidth >> 2L ) + 1L;
+ const long nWidthAl = ( nWidth >> 2 ) + 1;
const long nSize = nWidthAl * nHeight;
Scanline pTmp = mpBuf = static_cast<Scanline>(rtl_allocateMemory( nSize ));
memset( mpBuf, 0, nSize );
mpScan = static_cast<Scanline*>(rtl_allocateMemory( nHeight * sizeof( Scanline ) ));
- for( long nY = 0L; nY < nHeight; pTmp += nWidthAl )
+ for( long nY = 0; nY < nHeight; pTmp += nWidthAl )
mpScan[ nY++ ] = pTmp;
}
@@ -437,8 +437,8 @@ void ImplChain::ImplEndAdd( sal_uLong nFlag )
}
}
- aArr[ nPolyPos ].X() = nFirstX + 1L;
- aArr[ nPolyPos++ ].Y() = nFirstY + 1L;
+ aArr[ nPolyPos ].X() = nFirstX + 1;
+ aArr[ nPolyPos++ ].Y() = nFirstY + 1;
aArr.ImplSetRealSize( nPolyPos );
}
else if( nFlag & VECT_POLY_INLINE_OUTER )
@@ -544,8 +544,8 @@ void ImplChain::ImplEndAdd( sal_uLong nFlag )
}
}
- aArr[ nPolyPos ].X() = nFirstX - 1L;
- aArr[ nPolyPos++ ].Y() = nFirstY - 1L;
+ aArr[ nPolyPos ].X() = nFirstX - 1;
+ aArr[ nPolyPos++ ].Y() = nFirstY - 1;
aArr.ImplSetRealSize( nPolyPos );
}
else
@@ -662,8 +662,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
pColorSet[ n ].maColor = pRAcc->GetPaletteColor( n );
}
- 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++ )
pColorSet[ pRAcc->GetPixel( nY, nX ).GetIndex() ].mbSet = true;
qsort( pColorSet, 256, sizeof( ImplColorSet ), ImplColorSetCmpFnc );
@@ -856,8 +856,8 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
{
const long nOldWidth = pRAcc->Width();
const long nOldHeight = pRAcc->Height();
- const long nNewWidth = ( nOldWidth << 2L ) + 4L;
- const long nNewHeight = ( nOldHeight << 2L ) + 4L;
+ const long nNewWidth = ( nOldWidth << 2 ) + 4;
+ const long nNewHeight = ( nOldHeight << 2 ) + 4;
const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) );
std::unique_ptr<long[]> pMapIn(new long[ std::max( nOldWidth, nOldHeight ) ]);
std::unique_ptr<long[]> pMapOut(new long[ std::max( nOldWidth, nOldHeight ) ]);
@@ -865,17 +865,17 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
pMap = new ImplVectMap( nNewWidth, nNewHeight );
- for( nX = 0L; nX < nOldWidth; nX++ )
+ for( nX = 0; nX < nOldWidth; nX++ )
VECT_MAP( pMapIn, pMapOut, nX );
- for( nY = 0L, nTmpY = 5L; nY < nOldHeight; nY++, nTmpY += 4L )
+ for( nY = 0, nTmpY = 5; nY < nOldHeight; nY++, nTmpY += 4 )
{
- for( nX = 0L; nX < nOldWidth; )
+ for( nX = 0; nX < nOldWidth; )
{
if( pRAcc->GetPixel( nY, nX ) == aTest )
{
nTmpX = pMapIn[ nX++ ];
- nTmpY -= 3L;
+ nTmpY -= 3;
pMap->Set( nTmpY++, nTmpX, VECT_CONT_INDEX );
pMap->Set( nTmpY++, nTmpX, VECT_CONT_INDEX );
@@ -885,8 +885,8 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
while( nX < nOldWidth && pRAcc->GetPixel( nY, nX ) == aTest )
nX++;
- nTmpX = pMapOut[ nX - 1L ];
- nTmpY -= 3L;
+ nTmpX = pMapOut[ nX - 1 ];
+ nTmpY -= 3;
pMap->Set( nTmpY++, nTmpX, VECT_CONT_INDEX );
pMap->Set( nTmpY++, nTmpX, VECT_CONT_INDEX );
@@ -898,16 +898,16 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
}
}
- for( nY = 0L; nY < nOldHeight; nY++ )
+ for( nY = 0; nY < nOldHeight; nY++ )
VECT_MAP( pMapIn, pMapOut, nY );
- for( nX = 0L, nTmpX = 5L; nX < nOldWidth; nX++, nTmpX += 4L )
+ for( nX = 0, nTmpX = 5; nX < nOldWidth; nX++, nTmpX += 4 )
{
- for( nY = 0L; nY < nOldHeight; )
+ for( nY = 0; nY < nOldHeight; )
{
if( pRAcc->GetPixel( nY, nX ) == aTest )
{
- nTmpX -= 3L;
+ nTmpX -= 3;
nTmpY = pMapIn[ nY++ ];
pMap->Set( nTmpY, nTmpX++, VECT_CONT_INDEX );
@@ -918,8 +918,8 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
while( nY < nOldHeight && pRAcc->GetPixel( nY, nX ) == aTest )
nY++;
- nTmpX -= 3L;
- nTmpY = pMapOut[ nY - 1L ];
+ nTmpX -= 3;
+ nTmpY = pMapOut[ nY - 1 ];
pMap->Set( nTmpY, nTmpX++, VECT_CONT_INDEX );
pMap->Set( nTmpY, nTmpX++, VECT_CONT_INDEX );
@@ -939,9 +939,9 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8
{
const long nWidth = pMap->Width(), nHeight= pMap->Height();
- for( long nY = 0L; nY < nHeight; nY++ )
+ for( long nY = 0; nY < nHeight; nY++ )
{
- long nX = 0L;
+ long nX = 0;
bool bInner = true;
while( nX < nWidth )
@@ -992,7 +992,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8
while( pMap->IsDone( nY, nX ) )
nX++;
- if( ( ( nX - nStartSegX ) == 1L ) || ( ImplIsUp( pMap, nY, nStartSegX ) != ImplIsUp( pMap, nY, nX - 1L ) ) )
+ if( ( ( nX - nStartSegX ) == 1 ) || ( ImplIsUp( pMap, nY, nStartSegX ) != ImplIsUp( pMap, nY, nX - 1 ) ) )
bInner = !bInner;
}
}
@@ -1051,11 +1051,11 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
bool ImplIsUp( ImplVectMap* pMap, long nY, long nX )
{
- if( pMap->IsDone( nY - 1L, nX ) )
+ if( pMap->IsDone( nY - 1, nX ) )
return true;
- else if( pMap->IsDone( nY + 1L, nX ) )
+ else if( pMap->IsDone( nY + 1, nX ) )
return false;
- else if( pMap->IsDone( nY - 1L, nX - 1L ) || pMap->IsDone( nY - 1L, nX + 1L ) )
+ else if( pMap->IsDone( nY - 1, nX - 1 ) || pMap->IsDone( nY - 1, nX + 1 ) )
return true;
else
return false;
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index e67f115..cfd079b 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -54,7 +54,7 @@ ImpNodeCache::~ImpNodeCache()
Octree::Octree( const BitmapReadAccess& rReadAcc, sal_uLong nColors ) :
nMax ( nColors ),
- nLeafCount ( 0L ),
+ nLeafCount ( 0 ),
pTree ( nullptr ),
pAcc ( &rReadAcc )
{
@@ -83,7 +83,7 @@ void Octree::ImplCreateOctree()
for( long nX = 0; nX < nWidth; nX++ )
{
pColor = &(BitmapColor&) pAcc->GetPaletteColor( pAcc->GetPixelIndex( nY, nX ) );
- nLevel = 0L;
+ nLevel = 0;
ImplAdd( &pTree );
while( nLeafCount > nMax )
@@ -102,7 +102,7 @@ void Octree::ImplCreateOctree()
for( long nX = 0; nX < nWidth; nX++ )
{
aColor = pAcc->GetPixel( nY, nX );
- nLevel = 0L;
+ nLevel = 0;
ImplAdd( &pTree );
while( nLeafCount > nMax )
@@ -166,10 +166,10 @@ void Octree::ImplReduce()
{
sal_uLong i;
NODE* pNode;
- sal_uLong nRedSum = 0L;
- sal_uLong nGreenSum = 0L;
- sal_uLong nBlueSum = 0L;
- sal_uLong nChildren = 0L;
+ sal_uLong nRedSum = 0;
+ sal_uLong nGreenSum = 0;
+ sal_uLong nBlueSum = 0;
+ sal_uLong nChildren = 0;
for ( i = OCTREE_BITS - 1; i && !pReduce[i]; i-- ) {}
@@ -235,11 +235,11 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
nBits( 8 - OCTREE_BITS )
{
const int nColorMax = 1 << OCTREE_BITS;
- const unsigned long xsqr = 1L << ( nBits << 1 );
+ const unsigned long xsqr = 1 << ( nBits << 1 );
const unsigned long xsqr2 = xsqr << 1;
const int nColors = rPal.GetEntryCount();
- const long x = 1L << nBits;
- const long x2 = x >> 1L;
+ const long x = 1 << nBits;
+ const long x2 = x >> 1;
sal_uLong r, g, b;
long rxx, gxx, bxx;
@@ -257,9 +257,9 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
long bdist = cBlue - x2;
rdist = rdist*rdist + gdist*gdist + bdist*bdist;
- const long crinc = ( xsqr - ( cRed << nBits ) ) << 1L;
- const long cginc = ( xsqr - ( cGreen << nBits ) ) << 1L;
- const long cbinc = ( xsqr - ( cBlue << nBits ) ) << 1L;
+ const long crinc = ( xsqr - ( cRed << nBits ) ) << 1;
+ const long cginc = ( xsqr - ( cGreen << nBits ) ) << 1;
+ const long cbinc = ( xsqr - ( cBlue << nBits ) ) << 1;
sal_uLong* cdp = reinterpret_cast<sal_uLong*>(pBuffer);
sal_uInt8* crgbp = pMap;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 251672c..66b79c07 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1713,7 +1713,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
PDFWriter& i_rOuterFace)
:
m_pReferenceDevice( nullptr ),
- m_aMapMode( MAP_POINT, Point(), Fraction( 1L, pointToPixel(1) ), Fraction( 1L, pointToPixel(1) ) ),
+ m_aMapMode( MAP_POINT, Point(), Fraction( 1, pointToPixel(1) ), Fraction( 1, pointToPixel(1) ) ),
m_nCurrentStructElement( 0 ),
m_bEmitStructure( true ),
m_nNextFID( 1 ),
@@ -6889,7 +6889,7 @@ bool PDFWriterImpl::finalizeSignature()
return false;
}
- SAL_INFO("vcl.pdfwriter", "Setting curl to verbose: " << (curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L) == CURLE_OK ? "OK" : "FAIL"));
+ SAL_INFO("vcl.pdfwriter", "Setting curl to verbose: " << (curl_easy_setopt(curl, CURLOPT_VERBOSE, 1) == CURLE_OK ? "OK" : "FAIL"));
if ((rc = curl_easy_setopt(curl, CURLOPT_URL, OUStringToOString(m_aContext.SignTSA, RTL_TEXTENCODING_UTF8).getStr())) != CURLE_OK)
{
@@ -6933,7 +6933,7 @@ bool PDFWriterImpl::finalizeSignature()
return false;
}
- if ((rc = curl_easy_setopt(curl, CURLOPT_POST, 1l)) != CURLE_OK)
+ if ((rc = curl_easy_setopt(curl, CURLOPT_POST, 1)) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_POST) failed: " << curl_easy_strerror(rc));
free(pass);
@@ -6953,8 +6953,8 @@ bool PDFWriterImpl::finalizeSignature()
}
// Use a ten second timeout
- if ((rc = curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10l)) != CURLE_OK ||
- (rc = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10l)) != CURLE_OK)
+ if ((rc = curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10)) != CURLE_OK ||
+ (rc = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10)) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_TIMEOUT or CURLOPT_CONNECTTIMEOUT) failed: " << curl_easy_strerror(rc));
free(pass);
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 8b0aa60..3574c51 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -764,18 +764,18 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
// 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;
}
@@ -804,10 +804,10 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
InitFillColor();
// 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/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index b2e6bac..22cf699 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -169,15 +169,15 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
// assume white background for alpha blending
Color aLineColor( rStateOutDev.GetLineColor() );
- aLineColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) );
- aLineColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) );
- aLineColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) );
+ aLineColor.SetRed( static_cast<sal_uInt8>( (255*nTransparency + (100 - nTransparency)*aLineColor.GetRed()) / 100 ) );
+ aLineColor.SetGreen( static_cast<sal_uInt8>( (255*nTransparency + (100 - nTransparency)*aLineColor.GetGreen()) / 100 ) );
+ aLineColor.SetBlue( static_cast<sal_uInt8>( (255*nTransparency + (100 - nTransparency)*aLineColor.GetBlue()) / 100 ) );
o_rMtf.AddAction( new MetaLineColorAction(aLineColor, true) );
Color aFillColor( rStateOutDev.GetFillColor() );
- aFillColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) );
- aFillColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) );
- aFillColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) );
+ aFillColor.SetRed( static_cast<sal_uInt8>( (255*nTransparency + (100 - nTransparency)*aFillColor.GetRed()) / 100 ) );
+ aFillColor.SetGreen( static_cast<sal_uInt8>( (255*nTransparency + (100 - nTransparency)*aFillColor.GetGreen()) / 100 ) );
+ aFillColor.SetBlue( static_cast<sal_uInt8>( (255*nTransparency + (100 - nTransparency)*aFillColor.GetBlue()) / 100 ) );
o_rMtf.AddAction( new MetaFillColorAction(aFillColor, true) );
}
@@ -1169,13 +1169,13 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aDstPtPix.X() = aBoundRect.Left();
aDstSzPix = bTiling ? Size( MAX_TILE_WIDTH, MAX_TILE_HEIGHT ) : aBoundRect.GetSize();
- if( ( aDstPtPix.Y() + aDstSzPix.Height() - 1L ) > aBoundRect.Bottom() )
- aDstSzPix.Height() = aBoundRect.Bottom() - aDstPtPix.Y() + 1L;
+ if( ( aDstPtPix.Y() + aDstSzPix.Height() - 1 ) > aBoundRect.Bottom() )
+ aDstSzPix.Height() = aBoundRect.Bottom() - aDstPtPix.Y() + 1;
while( aDstPtPix.X() <= aBoundRect.Right() )
{
- if( ( aDstPtPix.X() + aDstSzPix.Width() - 1L ) > aBoundRect.Right() )
- aDstSzPix.Width() = aBoundRect.Right() - aDstPtPix.X() + 1L;
+ if( ( aDstPtPix.X() + aDstSzPix.Width() - 1 ) > aBoundRect.Right() )
+ aDstSzPix.Width() = aBoundRect.Right() - aDstPtPix.X() + 1;
if( !Rectangle( aDstPtPix, aDstSzPix ).Intersection( aBoundRect ).IsEmpty() &&
aPaintVDev->SetOutputSizePixel( aDstSzPix ) )
@@ -1362,12 +1362,12 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const
{
const Color& rStartColor = rGradient.GetStartColor();
const Color& rEndColor = rGradient.GetEndColor();
- const long nR = ( ( (long) rStartColor.GetRed() * rGradient.GetStartIntensity() ) / 100L +
- ( (long) rEndColor.GetRed() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
- const long nG = ( ( (long) rStartColor.GetGreen() * rGradient.GetStartIntensity() ) / 100L +
- ( (long) rEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
- const long nB = ( ( (long) rStartColor.GetBlue() * rGradient.GetStartIntensity() ) / 100L +
- ( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
+ const long nR = ( ( (long) rStartColor.GetRed() * rGradient.GetStartIntensity() ) / 100 +
+ ( (long) rEndColor.GetRed() * rGradient.GetEndIntensity() ) / 100 ) >> 1;
+ const long nG = ( ( (long) rStartColor.GetGreen() * rGradient.GetStartIntensity() ) / 100 +
+ ( (long) rEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100 ) >> 1;
+ const long nB = ( ( (long) rStartColor.GetBlue() * rGradient.GetStartIntensity() ) / 100 +
+ ( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100 ) >> 1;
const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 48a5cc0..0046743 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -90,7 +90,7 @@ namespace
// Create a new RegionBand object as container of the bands.
RegionBand* pRegionBand = new RegionBand();
- long nLineId = 0L;
+ long nLineId = 0;
// Iterate over all polygons.
const sal_uInt16 nPolyCount = rPolyPoly.Count();
@@ -184,7 +184,7 @@ namespace
*/
RegionBand* ImplGeneralPolygonToBands(const tools::PolyPolygon& rPolyPoly, const Rectangle& rPolygonBoundingBox)
{
- long nLineID = 0L;
+ long nLineID = 0;
// initialisation and creation of Bands
RegionBand* pRegionBand = new RegionBand();
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index 73e7d4a..911c1dd 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -474,8 +474,8 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
const long nStartY = rStartPt.Y();
const long nEndX = rEndPt.X();
const long nEndY = rEndPt.Y();
- const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
- const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
+ const long nXInc = ( nStartX < nEndX ) ? 1 : -1;
+ const long nYInc = ( nStartY < nEndY ) ? 1 : -1;
if ( nDX >= nDY )
{
@@ -487,7 +487,7 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
{
InsertPoint( Point( nX, nY ), nLineId, nStartX == nX, eLineType );
- if ( nD < 0L )
+ if ( nD < 0 )
nD += nDY2;
else
{
@@ -506,7 +506,7 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
{
InsertPoint( Point( nX, nY ), nLineId, nStartY == nY, eLineType );
- if ( nD < 0L )
+ if ( nD < 0 )
nD += nDY2;
else
{
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index bcc75e0..84c7bec 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -39,7 +39,7 @@ break
#define DOUBLE_SCANLINES() \
while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) ) \
{ \
- memcpy( pDstScanMap[ nActY + 1L ], pDstScan, rDstBuffer.mnScanlineSize ); \
+ memcpy( pDstScanMap[ nActY + 1 ], pDstScan, rDstBuffer.mnScanlineSize ); \
nActY++; \
}
@@ -49,15 +49,15 @@ static long ImplIndexFromColor( const BitmapColor& rCol )
{
#if TC_TO_PAL_COLORS == 4096
- return( ( ( (long) rCol.GetBlue() >> 4L) << 8L ) |
- ( ( (long) rCol.GetGreen() >> 4L ) << 4L ) |
- ( (long) rCol.GetRed() >> 4L ) );
+ return( ( ( (long) rCol.GetBlue() >> 4) << 8 ) |
+ ( ( (long) rCol.GetGreen() >> 4 ) << 4 ) |
+ ( (long) rCol.GetRed() >> 4 ) );
#elif TC_TO_PAL_COLORS == 32768
- return( ( ( (long) rCol.GetBlue() >> 3L) << 10L ) |
- ( ( (long) rCol.GetGreen() >> 3L ) << 5L ) |
- ( (long) rCol.GetRed() >> 3L ) );
+ return( ( ( (long) rCol.GetBlue() >> 3) << 10 ) |
+ ( ( (long) rCol.GetGreen() >> 3 ) << 5 ) |
+ ( (long) rCol.GetRed() >> 3 ) );
#endif
}
@@ -88,7 +88,7 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff
long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0L; nX < rDstBuffer.mnWidth; ++nX)
+ for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
pFncSetPixel( pDstScan, nX, pColMapBuf[ pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ).GetIndex() ], rDstMask );
DOUBLE_SCANLINES();
@@ -115,7 +115,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0L; nX < rDstBuffer.mnWidth;)
+ for (long nX = 0; nX < rDstBuffer.mnWidth;)
{
nMapX = pMapX[ nX ];
pFncSetPixel( pDstScan, nX++,
@@ -135,7 +135,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0L; nX < rDstBuffer.mnWidth;)
+ for (long nX = 0; nX < rDstBuffer.mnWidth;)
{
nMapX = pMapX[ nX ];
pFncSetPixel( pDstScan, nX++,
@@ -153,7 +153,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0L; nX < rDstBuffer.mnWidth; ++nX)
+ for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
pFncSetPixel( pDstScan, nX, pColBuf[ pSrcScan[ pMapX[ nX ] ] ], rDstMask );
DOUBLE_SCANLINES();
@@ -166,7 +166,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0L; nX < rDstBuffer.mnWidth; ++nX)
+ for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
pFncSetPixel( pDstScan, nX, pColBuf[ pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ).GetIndex() ], rDstMask );
DOUBLE_SCANLINES();
@@ -192,7 +192,7 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0L; nX < rDstBuffer.mnWidth; ++nX)
+ for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
{
aCol.SetBlue( *( pPixel = ( pSrcScan + pMapX[ nX ] * 3 ) )++ );
aCol.SetGreen( *pPixel++ );
@@ -210,7 +210,7 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0L; nX < rDstBuffer.mnWidth; ++nX)
+ for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
pFncSetPixel( pDstScan, nX, pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ), rDstMask );
DOUBLE_SCANLINES();
@@ -248,7 +248,7 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
long nMapY = pMapY[nActY];
Scanline pSrcScan(pSrcScanMap[nMapY]), pDstScan(pDstScanMap[nActY]);
- for (long nX = 0L; nX < rDstBuffer.mnWidth; ++nX)
+ for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
{
aIndex.SetIndex( pColToPalMap[ ImplIndexFromColor( pFncGetPixel( pSrcScan, pMapX[ nX ], rSrcMask ) ) ] );
pFncSetPixel( pDstScan, nX, aIndex, rDstMask );
@@ -404,12 +404,12 @@ BitmapBuffer* StretchAndConvert(
{
const double fFactorX = (double)rTwoRect.mnSrcWidth / pDstBuffer->mnWidth;
- for (long i = 0L; i < pDstBuffer->mnWidth; ++i)
+ for (long i = 0; i < pDstBuffer->mnWidth; ++i)
pMapX[ i ] = rTwoRect.mnSrcX + static_cast<int>( i * fFactorX );
}
else
{
- for (long i = 0L, nTmp = rTwoRect.mnSrcX ; i < pDstBuffer->mnWidth; ++i)
+ for (long i = 0, nTmp = rTwoRect.mnSrcX ; i < pDstBuffer->mnWidth; ++i)
pMapX[ i ] = nTmp++;
}
@@ -418,12 +418,12 @@ BitmapBuffer* StretchAndConvert(
{
const double fFactorY = (double)rTwoRect.mnSrcHeight / pDstBuffer->mnHeight;
- for (long i = 0L; i < pDstBuffer->mnHeight; ++i)
+ for (long i = 0; i < pDstBuffer->mnHeight; ++i)
pMapY[ i ] = rTwoRect.mnSrcY + static_cast<int>( i * fFactorY );
}
else
{
- for (long i = 0L, nTmp = rTwoRect.mnSrcY; i < pDstBuffer->mnHeight; ++i)
+ for (long i = 0, nTmp = rTwoRect.mnSrcY; i < pDstBuffer->mnHeight; ++i)
pMapY[ i ] = nTmp++;
}
@@ -441,7 +441,7 @@ BitmapBuffer* StretchAndConvert(
nOffset = -rSrcBuffer.mnScanlineSize;
}
- for (long i = 0L; i < rSrcBuffer.mnHeight; i++, pTmpScan += nOffset)
+ for (long i = 0; i < rSrcBuffer.mnHeight; i++, pTmpScan += nOffset)
pSrcScan[ i ] = pTmpScan;
// destination scanline buffer
@@ -456,7 +456,7 @@ BitmapBuffer* StretchAndConvert(
nOffset = -pDstBuffer->mnScanlineSize;
}
- for (long i = 0L; i < pDstBuffer->mnHeight; i++, pTmpScan += nOffset)
+ for (long i = 0; i < pDstBuffer->mnHeight; i++, pTmpScan += nOffset)
pDstScan[ i ] = pTmpScan;
// do buffer scaling and conversion
diff --git a/vcl/source/gdi/svgdata.cxx b/vcl/source/gdi/svgdata.cxx
index 76badae..1e08433 100644
--- a/vcl/source/gdi/svgdata.cxx
+++ b/vcl/source/gdi/svgdata.cxx
@@ -131,7 +131,7 @@ void SvgData::ensureSequenceAndRange()
geometry::RealRectangle2D aRealRect;
uno::Sequence< beans::PropertyValue > aViewParameters;
- for(sal_Int32 a(0L); a < nCount; a++)
+ for(sal_Int32 a(0); a < nCount; a++)
{
// get reference
const css::uno::Reference< css::graphic::XPrimitive2D > xReference(maSequence[a]);
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 2ae6dfd..37bcd08 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -309,7 +309,7 @@ void ImplSkipActions( SvStream& rIStm, sal_uLong nSkipCount )
for( sal_uLong i = 0UL; i < nSkipCount; i++ )
{
rIStm.ReadInt16( nType ).ReadInt32( nActionSize );
- rIStm.SeekRel( nActionSize - 4L );
+ rIStm.SeekRel( nActionSize - 4 );
}
}
@@ -1010,10 +1010,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int16 nBrushStyle;
ImplReadColor( rIStm, aActionColor );
- rIStm.SeekRel( 6L );
+ rIStm.SeekRel( 6 );
rIStm.ReadInt16( nBrushStyle );
rMtf.AddAction( new MetaFillColorAction( aActionColor, nBrushStyle != 0 ) );
- rIStm.SeekRel( 2L );
+ rIStm.SeekRel( 2 );
}
break;
@@ -1352,7 +1352,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
break;
default:
- rIStm.SeekRel( nActionSize - 4L );
+ rIStm.SeekRel( nActionSize - 4 );
break;
}
}
@@ -1391,7 +1391,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
// ActionCount will be written later
nCountPos = rOStm.Tell();
- rOStm.SeekRel( 4L );
+ rOStm.SeekRel( 4 );
const sal_Int32 nActCount = ImplWriteActions( rOStm, rMtf, *aSaveVDev.get(), bRop_0_1, aLineCol, aLineColStack, eActualCharSet );
const sal_uLong nActPos = rOStm.Tell();
More information about the Libreoffice-commits
mailing list