summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/bitmap/bitmapscalesuper.cxx92
-rw-r--r--vcl/source/gdi/bitmap.cxx4
-rw-r--r--vcl/source/gdi/bitmap3.cxx16
-rw-r--r--vcl/source/gdi/bmpacc2.cxx12
-rw-r--r--vcl/source/gdi/dibtools.cxx2
-rw-r--r--vcl/source/gdi/impvect.cxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx22
7 files changed, 75 insertions, 75 deletions
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index 00d253ad6430..057a337eee8d 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -26,7 +26,7 @@
namespace {
-#define MAP( cVal0, cVal1, nFrac ) ((sal_uInt8)((((long)(cVal0)<<7L)+nFrac*((long)(cVal1)-(cVal0)))>>7L))
+#define MAP( cVal0, cVal1, nFrac ) ((sal_uInt8)((((long)(cVal0)<<7)+nFrac*((long)(cVal1)-(cVal0)))>>7))
void generateMap(long nW, long nDstW, bool bHMirr, long* pMapIX, long* pMapFX)
{
@@ -286,7 +286,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 nMax = 1 << 7L;
+ const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
@@ -342,10 +342,10 @@ void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY)
if(nX == nEndX )
{
- nSumRowB += rCol.GetBlue() << 7L;
- nSumRowG += rCol.GetGreen() << 7L;
- nSumRowR += rCol.GetRed() << 7L;
- nTotalWeightX += 1 << 7L;
+ nSumRowB += rCol.GetBlue() << 7;
+ nSumRowG += rCol.GetGreen() << 7;
+ nSumRowR += rCol.GetRed() << 7;
+ nTotalWeightX += 1 << 7;
}
else if( j == 0 )
{
@@ -365,10 +365,10 @@ void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY)
}
else
{
- nSumRowB += rCol.GetBlue() << 7L;
- nSumRowG += rCol.GetGreen() << 7L;
- nSumRowR += rCol.GetRed() << 7L;
- nTotalWeightX += 1 << 7L;
+ nSumRowB += rCol.GetBlue() << 7;
+ nSumRowG += rCol.GetGreen() << 7;
+ nSumRowR += rCol.GetRed() << 7;
+ nTotalWeightX += 1 << 7;
}
}
@@ -411,7 +411,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 nMax = 1 << 7L;
+ const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
@@ -466,10 +466,10 @@ void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
if(nX == nEndX )
{
- nSumRowB += aCol0.GetBlue() << 7L;
- nSumRowG += aCol0.GetGreen() << 7L;
- nSumRowR += aCol0.GetRed() << 7L;
- nTotalWeightX += 1 << 7L;
+ nSumRowB += aCol0.GetBlue() << 7;
+ nSumRowG += aCol0.GetGreen() << 7;
+ nSumRowR += aCol0.GetRed() << 7;
+ nTotalWeightX += 1 << 7;
}
else if( j == 0 )
{
@@ -492,10 +492,10 @@ void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
else
{
- nSumRowB += aCol0.GetBlue() << 7L;
- nSumRowG += aCol0.GetGreen() << 7L;
- nSumRowR += aCol0.GetRed() << 7L;
- nTotalWeightX += 1 << 7L;
+ nSumRowB += aCol0.GetBlue() << 7;
+ nSumRowG += aCol0.GetGreen() << 7;
+ nSumRowR += aCol0.GetRed() << 7;
+ nTotalWeightX += 1 << 7;
}
}
@@ -538,7 +538,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 nMax = 1 << 7L;
+ const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
@@ -594,10 +594,10 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY)
{
if(nX == nEndX )
{
- nSumRowB += ( *pTmpX ) << 7L;pTmpX++;
- nSumRowG += ( *pTmpX ) << 7L;pTmpX++;
- nSumRowR += ( *pTmpX ) << 7L;pTmpX++;
- nTotalWeightX += 1 << 7L;
+ nSumRowB += ( *pTmpX ) << 7;pTmpX++;
+ nSumRowG += ( *pTmpX ) << 7;pTmpX++;
+ nSumRowR += ( *pTmpX ) << 7;pTmpX++;
+ nTotalWeightX += 1 << 7;
}
else if( j == 0 )
{
@@ -617,10 +617,10 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY)
}
else
{
- nSumRowB += ( *pTmpX ) << 7L;pTmpX++;
- nSumRowG += ( *pTmpX ) << 7L;pTmpX++;
- nSumRowR += ( *pTmpX ) << 7L;pTmpX++;
- nTotalWeightX += 1 << 7L;
+ nSumRowB += ( *pTmpX ) << 7;pTmpX++;
+ nSumRowG += ( *pTmpX ) << 7;pTmpX++;
+ nSumRowR += ( *pTmpX ) << 7;pTmpX++;
+ nTotalWeightX += 1 << 7;
}
}
@@ -661,7 +661,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 nMax = 1 << 7L;
+ const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
@@ -715,10 +715,10 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY)
{
if(nX == nEndX )
{
- nSumRowR += ( *pTmpX ) << 7L;pTmpX++;
- nSumRowG += ( *pTmpX ) << 7L;pTmpX++;
- nSumRowB += ( *pTmpX ) << 7L;pTmpX++;
- nTotalWeightX += 1 << 7L;
+ nSumRowR += ( *pTmpX ) << 7;pTmpX++;
+ nSumRowG += ( *pTmpX ) << 7;pTmpX++;
+ nSumRowB += ( *pTmpX ) << 7;pTmpX++;
+ nTotalWeightX += 1 << 7;
}
else if( j == 0 )
{
@@ -738,10 +738,10 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY)
}
else
{
- nSumRowR += ( *pTmpX ) << 7L;pTmpX++;
- nSumRowG += ( *pTmpX ) << 7L;pTmpX++;
- nSumRowB += ( *pTmpX ) << 7L;pTmpX++;
- nTotalWeightX += 1 << 7L;
+ nSumRowR += ( *pTmpX ) << 7;pTmpX++;
+ nSumRowG += ( *pTmpX ) << 7;pTmpX++;
+ nSumRowB += ( *pTmpX ) << 7;pTmpX++;
+ nTotalWeightX += 1 << 7;
}
}
@@ -782,7 +782,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 nMax = 1 << 7L;
+ const long nMax = 1 << 7;
for( long nY = nStartY; nY <= nEndY; nY++ )
{
@@ -837,10 +837,10 @@ void scaleNonPalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
if(nX == nEndX )
{
- nSumRowB += aCol0.GetBlue() << 7L;
- nSumRowG += aCol0.GetGreen() << 7L;
- nSumRowR += aCol0.GetRed() << 7L;
- nTotalWeightX += 1 << 7L;
+ nSumRowB += aCol0.GetBlue() << 7;
+ nSumRowG += aCol0.GetGreen() << 7;
+ nSumRowR += aCol0.GetRed() << 7;
+ nTotalWeightX += 1 << 7;
}
else if( j == 0 )
{
@@ -862,10 +862,10 @@ void scaleNonPalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY)
}
else
{
- nSumRowB += aCol0.GetBlue() << 7L;
- nSumRowG += aCol0.GetGreen() << 7L;
- nSumRowR += aCol0.GetRed() << 7L;
- nTotalWeightX += 1 << 7L;
+ nSumRowB += aCol0.GetBlue() << 7;
+ nSumRowG += aCol0.GetGreen() << 7;
+ nSumRowR += aCol0.GetRed() << 7;
+ nTotalWeightX += 1 << 7;
}
}
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index f8aa444d8091..ab49663c87b8 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -506,7 +506,7 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags )
const long nWidth = pAcc->Width();
const long nHeight = pAcc->Height();
const long nWidth1 = nWidth - 1L;
- const long nWidth_2 = nWidth >> 1L;
+ const long nWidth_2 = nWidth >> 1;
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -533,7 +533,7 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags )
std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[ nScanSize ]);
const long nHeight = pAcc->Height();
const long nHeight1 = nHeight - 1L;
- const long nHeight_2 = nHeight >> 1L;
+ const long nHeight_2 = nHeight >> 1;
for( long nY = 0L, nOther = nHeight1; nY < nHeight_2; nY++, nOther-- )
{
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 08c0cda4d7f4..bae9d2ac0e3b 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -1229,13 +1229,13 @@ bool Bitmap::ImplDitherMatrix()
{
for( sal_uLong nY = 0UL; nY < nHeight; nY++ )
{
- for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
+ for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ )
{
const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixelIndex( nY, nX ) ) );
const sal_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const sal_uLong nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const sal_uLong nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const sal_uLong nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const sal_uLong nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16;
+ const sal_uLong nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16;
+ const sal_uLong nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16;
aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
@@ -1246,13 +1246,13 @@ bool Bitmap::ImplDitherMatrix()
{
for( sal_uLong nY = 0UL; nY < nHeight; nY++ )
{
- for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
+ for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ )
{
const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) );
const sal_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const sal_uLong nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const sal_uLong nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const sal_uLong nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const sal_uLong nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16;
+ const sal_uLong nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16;
+ const sal_uLong nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16;
aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 984cdb138e87..1d7cec5f4c79 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -102,25 +102,25 @@ void BitmapReadAccess::SetPixelForN8BitTcMask(Scanline pScanline, long nX, const
BitmapColor BitmapReadAccess::GetPixelForN16BitTcMsbMask(ConstScanline pScanline, long nX, const ColorMask& rMask)
{
BitmapColor aColor;
- rMask.GetColorFor16BitMSB( aColor, pScanline + ( nX << 1UL ) );
+ rMask.GetColorFor16BitMSB( aColor, pScanline + ( nX << 1 ) );
return aColor;
}
void BitmapReadAccess::SetPixelForN16BitTcMsbMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
{
- rMask.SetColorFor16BitMSB( rBitmapColor, pScanline + ( nX << 1UL ) );
+ rMask.SetColorFor16BitMSB( rBitmapColor, pScanline + ( nX << 1 ) );
}
BitmapColor BitmapReadAccess::GetPixelForN16BitTcLsbMask(ConstScanline pScanline, long nX, const ColorMask& rMask)
{
BitmapColor aColor;
- rMask.GetColorFor16BitLSB( aColor, pScanline + ( nX << 1UL ) );
+ rMask.GetColorFor16BitLSB( aColor, pScanline + ( nX << 1 ) );
return aColor;
}
void BitmapReadAccess::SetPixelForN16BitTcLsbMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
{
- rMask.SetColorFor16BitLSB( rBitmapColor, pScanline + ( nX << 1UL ) );
+ rMask.SetColorFor16BitLSB( rBitmapColor, pScanline + ( nX << 1 ) );
}
BitmapColor BitmapReadAccess::GetPixelForN24BitTcBgr(ConstScanline pScanline, long nX, const ColorMask&)
@@ -250,13 +250,13 @@ void BitmapReadAccess::SetPixelForN32BitTcRgba(Scanline pScanline, long nX, cons
BitmapColor BitmapReadAccess::GetPixelForN32BitTcMask(ConstScanline pScanline, long nX, const ColorMask& rMask)
{
BitmapColor aColor;
- rMask.GetColorFor32Bit( aColor, pScanline + ( nX << 2UL ) );
+ rMask.GetColorFor32Bit( aColor, pScanline + ( nX << 2 ) );
return aColor;
}
void BitmapReadAccess::SetPixelForN32BitTcMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
{
- rMask.SetColorFor32Bit( rBitmapColor, pScanline + ( nX << 2UL ) );
+ rMask.SetColorFor32Bit( rBitmapColor, pScanline + ( nX << 2 ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 1b16d24906de..a7242f39b26e 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -615,7 +615,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
cTmp = *pTmp++;
}
- auto nIndex = (cTmp >> ( --nShift << 2UL ) ) & 0x0f;
+ auto nIndex = (cTmp >> ( --nShift << 2 ) ) & 0x0f;
rAcc.SetPixelIndex(nY, nX, SanitizePaletteIndex(nIndex, rPalette, bForceToMonoWhileReading));
}
}
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 50913aeb8037..96cf9728d657 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -301,7 +301,7 @@ void ImplChain::ImplGetSpace()
const sal_uLong nOldArraySize = mnArraySize;
sal_uInt8* pNewCodes;
- mnArraySize = mnArraySize << 1UL;
+ mnArraySize = mnArraySize << 1;
pNewCodes = new sal_uInt8[ mnArraySize ];
memcpy( pNewCodes, mpCodes.get(), nOldArraySize );
mpCodes.reset( pNewCodes );
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 40ad7f23034d..e361ed6a9b52 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1425,7 +1425,7 @@ Bitmap OutputDevice::BlendBitmapWithAlpha(
for( nY = 0, nOutY = nOffY; nY < nDstHeight; nY++, nOutY++ )
{
const long nMapY = pMapY[ nY ];
- const long nModY = ( nOutY & 0x0FL ) << 4L;
+ const long nModY = ( nOutY & 0x0FL ) << 4;
int nOutX;
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
@@ -1435,14 +1435,14 @@ Bitmap OutputDevice::BlendBitmapWithAlpha(
aDstCol = AlphaBlend( nX, nY, nMapX, nMapY, pP, pA, pB.get(), pAlphaW.get(), nResAlpha );
- aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
- nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16UL ] +
- nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16UL ] ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16 ] +
+ nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16 ] +
+ nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16 ] ) );
pW->SetPixel( nY, nX, aIndex );
- aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) >> 16UL ] +
- nVCLGLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) >> 16UL ] +
- nVCLBLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) >> 16UL ] ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) >> 16 ] +
+ nVCLGLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) >> 16 ] +
+ nVCLBLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) >> 16 ] ) );
pAlphaW->SetPixel( nY, nX, aIndex );
}
}
@@ -1518,7 +1518,7 @@ Bitmap OutputDevice::BlendBitmap(
{
nMapY = aBmpRect.Bottom() - nMapY;
}
- const long nModY = ( nOutY & 0x0FL ) << 4L;
+ const long nModY = ( nOutY & 0x0FL ) << 4;
int nOutX;
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
@@ -1532,9 +1532,9 @@ Bitmap OutputDevice::BlendBitmap(
aDstCol = pB->GetColor( nY, nX );
aDstCol.Merge( pP->GetColor( nMapY, nMapX ), pA->GetPixelIndex( nMapY, nMapX ) );
- aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
- nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16UL ] +
- nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16UL ] ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16 ] +
+ nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16 ] +
+ nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16 ] ) );
pW->SetPixel( nY, nX, aIndex );
}
}