summaryrefslogtreecommitdiff
path: root/filter/source/graphicfilter
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/graphicfilter')
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx2
-rw-r--r--filter/source/graphicfilter/epbm/epbm.cxx4
-rw-r--r--filter/source/graphicfilter/epgm/epgm.cxx4
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx6
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx10
-rw-r--r--filter/source/graphicfilter/eras/eras.cxx4
-rw-r--r--filter/source/graphicfilter/etiff/etiff.cxx8
-rw-r--r--filter/source/graphicfilter/expm/expm.cxx4
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.cxx10
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx4
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx8
-rw-r--r--filter/source/graphicfilter/ipcx/ipcx.cxx19
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx30
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx12
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx5
-rw-r--r--filter/source/graphicfilter/itga/itga.cxx6
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx48
17 files changed, 90 insertions, 94 deletions
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index cdd78a02d614..66eb7b9afae0 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -522,7 +522,7 @@ void GIFWriter::WriteAccess()
else
{
for( long nX = 0L; nX < nWidth; nX++ )
- pBuffer[ nX ] = (sal_uInt8) pAcc->GetPixel( nY, nX );
+ pBuffer[ nX ] = pAcc->GetPixelIndex( nY, nX );
aCompressor.Compress( pBuffer, nWidth );
}
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx
index c048bb16a6db..5fb48533c5ab 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -153,7 +153,7 @@ void PBMWriter::ImplWriteBody()
for ( x = 0; x < mnWidth; x++ )
{
nBYTE <<= 1;
- if (!(mpAcc->GetPixel( y, x ) & 1 ) )
+ if (!(mpAcc->GetPixelIndex( y, x ) & 1 ) )
nBYTE++;
if ( ( x & 7 ) == 7 )
*mpOStm << nBYTE;
@@ -175,7 +175,7 @@ void PBMWriter::ImplWriteBody()
nxCount = 69;
*mpOStm << (sal_uInt8)10;
}
- *mpOStm << (sal_uInt8)( ( mpAcc->GetPixel( y, x ) ^ 1 ) + '0' ) ;
+ *mpOStm << (sal_uInt8)( ( mpAcc->GetPixelIndex( y, x ) ^ 1 ) + '0' ) ;
}
*mpOStm << (sal_uInt8)10;
}
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index 5640290eceaf..a67444053d00 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -155,7 +155,7 @@ void PGMWriter::ImplWriteBody()
{
for ( sal_uLong x = 0; x < mnWidth; x++ )
{
- *mpOStm << (sal_uInt8)( mpAcc->GetPixel( y, x ) );
+ *mpOStm << mpAcc->GetPixelIndex( y, x );
}
}
}
@@ -172,7 +172,7 @@ void PGMWriter::ImplWriteBody()
nCount = 69;
*mpOStm << (sal_uInt8)10;
}
- nDat = (sal_uInt8)mpAcc->GetPixel( y, x );
+ nDat = mpAcc->GetPixelIndex( y, x );
nNumb = nDat / 100;
if ( nNumb )
{
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index d6c96c980584..ae73e3699662 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -1183,17 +1183,17 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
for ( pTemp = pPix, i = 0; i < nSrcRowBytes; i++ )
*pTemp++ = (sal_uInt8)0;
for ( i = 0; i < nWidth; i++ )
- pPix[ ( i >> 3 ) ] |= (sal_uInt8)( pAcc->GetPixel( ny, i ) & 1 ) << ( ( i & 7 ) ^ 7 );
+ pPix[ ( i >> 3 ) ] |= (pAcc->GetPixelIndex( ny, i ) & 1) << ((i & 7) ^ 7);
break;
case 4 :
for ( pTemp = pPix, i = 0; i < nSrcRowBytes; i++ )
*pTemp++ = (sal_uInt8)0;
for ( i = 0; i < nWidth; i++ )
- pPix[ ( i >> 1 ) ] |= (sal_uInt8)( pAcc->GetPixel( ny, i ) & 15 ) << ( ( i & 1 ) << 2 ) ;
+ pPix[ ( i >> 1 ) ] |= (pAcc->GetPixelIndex( ny, i ) & 15) << ((i & 1) << 2);
break;
case 8 :
for ( i = 0; i < nWidth; i++ )
- pPix[ i ] = (sal_uInt8)pAcc->GetPixel( ny, i );
+ pPix[ i ] = pAcc->GetPixelIndex( ny, i );
break;
}
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 9e21611da409..22fc78edb788 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -1780,7 +1780,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- ImplWriteHexByte( (sal_uInt8)pAcc->GetPixel( y, x ) );
+ ImplWriteHexByte( pAcc->GetPixelIndex( y, x ) );
}
}
*mpPS << (sal_uInt8)10;
@@ -1818,7 +1818,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- Compress( (sal_uInt8)pAcc->GetPixel( y, x ) );
+ Compress( pAcc->GetPixelIndex( y, x ) );
}
}
EndCompression();
@@ -1829,7 +1829,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- ImplWriteHexByte( (sal_uInt8)pAcc->GetPixel( y, x ) );
+ ImplWriteHexByte( pAcc->GetPixelIndex( y, x ) );
}
}
}
@@ -1881,7 +1881,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- Compress( (sal_uInt8)pAcc->GetPixel( y, x ) );
+ Compress( pAcc->GetPixelIndex( y, x ) );
}
}
EndCompression();
@@ -1892,7 +1892,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi
{
for ( long x = 0; x < nWidth; x++ )
{
- ImplWriteHexByte( (sal_uInt8)pAcc->GetPixel( y, x ) );
+ ImplWriteHexByte( pAcc->GetPixelIndex( y, x ) );
}
}
}
diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx
index 33da99adec75..a49dcd162357 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -210,7 +210,7 @@ void RASWriter::ImplWriteBody()
ImplCallback( y ); // processing output
for ( x = 0; x < mnWidth; x++ )
{
- ImplPutByte ( mpAcc->GetPixel( y, x ) );
+ ImplPutByte ( mpAcc->GetPixelIndex( y, x ) );
}
if ( x & 1 ) ImplPutByte( 0 ); // WORD ALIGNMENT ???
}
@@ -224,7 +224,7 @@ void RASWriter::ImplWriteBody()
ImplCallback( y ); // processing output
for ( x = 0; x < mnWidth; x++ )
{
- nDat = ( ( nDat << 1 ) | ( mpAcc->GetPixel ( y, x ) & 1 ) );
+ nDat = ( ( nDat << 1 ) | ( mpAcc->GetPixelIndex( y, x ) & 1 ) );
if ( ( x & 7 ) == 7 )
ImplPutByte( nDat );
}
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index a3ecf744622d..cd1ef448a32e 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -397,7 +397,7 @@ sal_Bool TIFFWriter::ImplWriteBody()
ImplCallback( 100 * mnCurAllPictHeight / mnSumOfAllPictHeight );
for ( x = 0; x < mnWidth; x++ )
{
- Compress( mpAcc->GetPixel( y, x ) );
+ Compress( mpAcc->GetPixelIndex( y, x ) );
}
}
}
@@ -411,9 +411,9 @@ sal_Bool TIFFWriter::ImplWriteBody()
for ( x = 0; x < mnWidth; x++, nShift++ )
{
if (!( nShift & 1 ))
- nTemp = ( (sal_uInt8)mpAcc->GetPixel( y, x ) << 4 );
+ nTemp = ( mpAcc->GetPixelIndex( y, x ) << 4 );
else
- Compress( (sal_uInt8)( nTemp | ( mpAcc->GetPixel( y, x ) & 0xf ) ) );
+ Compress( (sal_uInt8)( nTemp | ( mpAcc->GetPixelIndex( y, x ) & 0xf ) ) );
}
if ( nShift & 1 )
Compress( nTemp );
@@ -430,7 +430,7 @@ sal_Bool TIFFWriter::ImplWriteBody()
for ( x = 0; x < mnWidth; x++)
{
j <<= 1;
- j |= ( ( ~mpAcc->GetPixel( y, x ) ) & 1 );
+ j |= ( ( ~mpAcc->GetPixelIndex( y, x ) ) & 1 );
if ( j & 0x100 )
{
Compress( (sal_uInt8)j );
diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx
index 6842128786fa..a9581c0ec7c6 100644
--- a/filter/source/graphicfilter/expm/expm.cxx
+++ b/filter/source/graphicfilter/expm/expm.cxx
@@ -176,7 +176,7 @@ void XPMWriter::ImplWritePalette()
sal_uInt16 nTransIndex = 0xffff;
if ( mbTrans )
- nTransIndex = mpAcc->GetBestMatchingColor( BMP_COL_TRANS );
+ nTransIndex = mpAcc->GetBestPaletteIndex( BMP_COL_TRANS );
for ( sal_uInt16 i = 0; i < mnColors; i++ )
{
*mpOStm << "\x22";
@@ -202,7 +202,7 @@ void XPMWriter::ImplWriteBody()
*mpOStm << (sal_uInt8)0x22;
for ( sal_uLong x = 0; x < mnWidth; x++ )
{
- ImplWritePixel( (sal_uInt8)(mpAcc->GetPixel( y, x ) ) );
+ ImplWritePixel( mpAcc->GetPixelIndex( y, x ) );
}
*mpOStm << "\x22,\x0a";
}
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx
index 69cb2f553d71..5c36abc2abc3 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -81,7 +81,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
nxC = nxCount;
for ( nx = 0; --nxC; nx++ )
{ // this is not fast, but a one bit/pixel format is rarely used
- rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( (*( rDesc.mpBuf + ( nx >> 3 ) ) >> ( ( nx & 7 ) ^ 7 ) ) ) & 1 );
+ rDesc.mpAcc->SetPixelIndex( ny, nx, static_cast<sal_uInt8>( (*( rDesc.mpBuf + (nx >> 3)) >> ((nx & 7)^7))) & 1 );
}
}
}
@@ -95,7 +95,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
nxC = nxCount;
for ( nx = 0; --nxC; nx++ )
{ // this is not fast, but a two bits/pixel format is rarely used
- rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( (*( rDesc.mpBuf + ( nx >> 2 ) ) >> ( ( ( nx & 3 ) ^ 3 ) << 1 ) ) ) & 3 );
+ rDesc.mpAcc->SetPixelIndex( ny, nx, static_cast<sal_uInt8>( (*(rDesc.mpBuf + (nx >> 2)) >> (((nx & 3)^3) << 1))) & 3 );
}
}
}
@@ -112,11 +112,11 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
for ( nx = 0; --nxC; nx++ )
{
nDat = *pTemp++;
- rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( nDat >> 4 ) );
+ rDesc.mpAcc->SetPixelIndex( ny, nx, static_cast<sal_uInt8>(nDat >> 4) );
if ( --nxC )
{
nx ++;
- rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( nDat & 15 ) );
+ rDesc.mpAcc->SetPixelIndex( ny, nx, static_cast<sal_uInt8>(nDat & 15) );
}
else
break;
@@ -134,7 +134,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
nxC = nxCount;
for ( nx = 0; --nxC; nx++ )
{
- rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( *pTemp++ ) );
+ rDesc.mpAcc->SetPixelIndex( ny, nx, *(pTemp++) );
}
}
}
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 4a783051ae39..29967e5c8802 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -648,10 +648,10 @@ extern "C" sal_Bool GraphicImport(SvStream & rStream, Graphic & rGraphic, Filter
}
}
if ( nBitDepth == 1 )
- pAcc->SetPixel( y, x, sal::static_int_cast< sal_uInt8 >(( nDat >> nBitsLeft ) & 1) );
+ pAcc->SetPixelIndex( y, x, static_cast<sal_uInt8>(nDat >> nBitsLeft) & 1 );
else
{
- pAcc->SetPixel( y, x, ( nDat ) ? 1 : 0 ); // nBitDepth == 8
+ pAcc->SetPixelIndex( y, x, nDat ? 1 : 0 ); // nBitDepth == 8
nBitsLeft = 0;
}
}
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 3f986649cecf..b8ca0d1434db 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -276,7 +276,7 @@ sal_Bool PBMReader::ImplReadBody()
*mpPBM >> nDat;
nShift = 7;
}
- mpAcc->SetPixel( nHeight, nWidth, nDat >> nShift );
+ mpAcc->SetPixelIndex( nHeight, nWidth, nDat >> nShift );
if ( ++nWidth == mnWidth )
{
nShift = 0;
@@ -295,7 +295,7 @@ sal_Bool PBMReader::ImplReadBody()
return sal_False;
*mpPBM >> nDat;
- mpAcc->SetPixel( nHeight, nWidth++, nDat);
+ mpAcc->SetPixelIndex( nHeight, nWidth++, nDat);
if ( nWidth == mnWidth )
{
@@ -356,7 +356,7 @@ sal_Bool PBMReader::ImplReadBody()
if ( nDat == '0' || nDat == '1' )
{
- mpAcc->SetPixel( nHeight, nWidth, (sal_uInt8)nDat-'0' );
+ mpAcc->SetPixelIndex( nHeight, nWidth, static_cast<sal_uInt8>(nDat - '0') );
nWidth++;
if ( nWidth == mnWidth )
{
@@ -385,7 +385,7 @@ sal_Bool PBMReader::ImplReadBody()
nCount--;
if ( nGrey <= mnMaxVal )
nGrey = 255 * nGrey / mnMaxVal;
- mpAcc->SetPixel( nHeight, nWidth++, (sal_uInt8)nGrey );
+ mpAcc->SetPixelIndex( nHeight, nWidth++, static_cast<sal_uInt8>(nGrey) );
nGrey = 0;
if ( nWidth == mnWidth )
{
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 2c99deeaacfb..6f3340ecaffa 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -308,12 +308,9 @@ void PCXReader::ImplReadBody()
{
sal_uLong nShift = ( i & 7 ) ^ 7;
if ( nShift == 0 )
- pAcc->SetPixel( ny, i, ( *pSource1++ & 1 ) );
+ pAcc->SetPixelIndex( ny, i, *(pSource1++) & 1 );
else
- pAcc->SetPixel(
- ny, i,
- sal::static_int_cast< sal_uInt8 >(
- ( *pSource1 >> nShift ) & 1) );
+ pAcc->SetPixelIndex( ny, i, (*pSource1 >> nShift ) & 1 );
}
break;
// 4 colors
@@ -335,14 +332,14 @@ void PCXReader::ImplReadBody()
nCol = ( *pSource1++ ) & 0x03;
break;
}
- pAcc->SetPixel( ny, i, nCol );
+ pAcc->SetPixelIndex( ny, i, nCol );
}
break;
// 256 colors
case 0x108 :
for ( i = 0; i < nWidth; i++ )
{
- pAcc->SetPixel( ny, i, *pSource1++ );
+ pAcc->SetPixelIndex( ny, i, *pSource1++ );
}
break;
// 8 colors
@@ -353,14 +350,14 @@ void PCXReader::ImplReadBody()
if ( nShift == 0 )
{
nCol = ( *pSource1++ & 1) + ( ( *pSource2++ << 1 ) & 2 ) + ( ( *pSource3++ << 2 ) & 4 );
- pAcc->SetPixel( ny, i, nCol );
+ pAcc->SetPixelIndex( ny, i, nCol );
}
else
{
nCol = sal::static_int_cast< sal_uInt8 >(
( ( *pSource1 >> nShift ) & 1) + ( ( ( *pSource2 >> nShift ) << 1 ) & 2 ) +
( ( ( *pSource3 >> nShift ) << 2 ) & 4 ));
- pAcc->SetPixel( ny, i, nCol );
+ pAcc->SetPixelIndex( ny, i, nCol );
}
}
break;
@@ -373,14 +370,14 @@ void PCXReader::ImplReadBody()
{
nCol = ( *pSource1++ & 1) + ( ( *pSource2++ << 1 ) & 2 ) + ( ( *pSource3++ << 2 ) & 4 ) +
( ( *pSource4++ << 3 ) & 8 );
- pAcc->SetPixel( ny, i, nCol );
+ pAcc->SetPixelIndex( ny, i, nCol );
}
else
{
nCol = sal::static_int_cast< sal_uInt8 >(
( ( *pSource1 >> nShift ) & 1) + ( ( ( *pSource2 >> nShift ) << 1 ) & 2 ) +
( ( ( *pSource3 >> nShift ) << 2 ) & 4 ) + ( ( ( *pSource4 >> nShift ) << 3 ) & 8 ));
- pAcc->SetPixel( ny, i, nCol );
+ pAcc->SetPixelIndex( ny, i, nCol );
}
}
break;
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 64709a2b122a..e15ce308826a 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -260,38 +260,38 @@ public:
switch ( nPixelSize ) \
{ \
case 1 : \
- pAcc->SetPixel( ny, nx++, nDat >> 7 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 7 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat >> 6 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 6 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat >> 5 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 5 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat >> 4 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 4 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat >> 3 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 3 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat >> 2 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 2 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat >> 1 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 1 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat ); \
break; \
case 2 : \
- pAcc->SetPixel( ny, nx++, nDat >> 6 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 6 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat >> 4 & 3); \
+ pAcc->SetPixelIndex( ny, nx++, (nDat>>4)&3);\
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat >> 2 & 3 ); \
+ pAcc->SetPixelIndex( ny, nx++, (nDat>>2)&3 );\
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat & 3); \
+ pAcc->SetPixelIndex( ny, nx++, nDat & 3); \
break; \
case 4 : \
- pAcc->SetPixel( ny, nx++, nDat >> 4 ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat >> 4 ); \
if ( nx == nWidth ) break; \
- pAcc->SetPixel( ny, nx++, nDat ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat ); \
break; \
case 8 : \
- pAcc->SetPixel( ny, nx++, nDat ); \
+ pAcc->SetPixelIndex( ny, nx++, nDat ); \
break; \
}
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index be3ada272565..5c07066d5b29 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -368,7 +368,7 @@ sal_Bool PSDReader::ImplReadBody()
}
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
- mpWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat >> nBitCount-- );
+ mpWriteAcc->SetPixelIndex( nY, nX, nDat >> nBitCount-- );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -389,7 +389,7 @@ sal_Bool PSDReader::ImplReadBody()
nDat ^= 0xff;
nBitCount = 7;
}
- mpWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat >> nBitCount-- );
+ mpWriteAcc->SetPixelIndex( nY, nX, nDat >> nBitCount-- );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -418,7 +418,7 @@ sal_Bool PSDReader::ImplReadBody()
*mpPSD >> nDummy;
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
- mpWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat );
+ mpWriteAcc->SetPixelIndex( nY, nX, nDat );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -435,7 +435,7 @@ sal_Bool PSDReader::ImplReadBody()
*mpPSD >> nDat;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- mpWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat );
+ mpWriteAcc->SetPixelIndex( nY, nX, nDat );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -686,7 +686,7 @@ sal_Bool PSDReader::ImplReadBody()
*mpPSD >> nDummy;
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
- mpMaskWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat );
+ mpMaskWriteAcc->SetPixelIndex( nY, nX, nDat );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
@@ -707,7 +707,7 @@ sal_Bool PSDReader::ImplReadBody()
nDat = 1;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
*mpPSD >> nDummy;
- mpMaskWriteAcc->SetPixel( nY, nX, (sal_uInt8)nDat );
+ mpMaskWriteAcc->SetPixelIndex( nY, nX, nDat );
if ( ++nX == mpFileHeader->nColumns )
{
nX = 0;
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 48923d15a4b1..7efafda5fcb0 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -229,8 +229,7 @@ sal_Bool RASReader::ImplReadBody()
{
if (!(x & 7))
nDat = ImplGetByte();
- mpAcc->SetPixel (
- y, x,
+ mpAcc->SetPixelIndex( y, x,
sal::static_int_cast< sal_uInt8 >(
nDat >> ( ( x & 7 ) ^ 7 )) );
}
@@ -244,7 +243,7 @@ sal_Bool RASReader::ImplReadBody()
for ( x = 0; x < mnWidth; x++ )
{
nDat = ImplGetByte();
- mpAcc->SetPixel ( y, x, nDat );
+ mpAcc->SetPixelIndex( y, x, nDat );
}
if ( x & 1 ) ImplGetByte(); // WORD ALIGNMENT ???
}
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index d4d217743a51..7e51d82979c4 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -380,7 +380,7 @@ sal_Bool TGAReader::ImplReadBody()
return sal_False;
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- mpAcc->SetPixel( nY, nX, (sal_uInt8)nDummy );
+ mpAcc->SetPixelIndex( nY, nX, nDummy );
nX += nXAdd;
nXCount++;
if ( nXCount == mpFileHeader->nImageWidth )
@@ -403,7 +403,7 @@ sal_Bool TGAReader::ImplReadBody()
*mpTGA >> nDummy;
if ( nDummy >= mpFileHeader->nColorMapLength )
return sal_False;
- mpAcc->SetPixel( nY, nX, (sal_uInt8)nDummy );
+ mpAcc->SetPixelIndex( nY, nX, nDummy );
nX += nXAdd;
nXCount++;
if ( nXCount == mpFileHeader->nImageWidth )
@@ -617,7 +617,7 @@ sal_Bool TGAReader::ImplReadBody()
*mpTGA >> nDummy;
if ( nDummy >= mpFileHeader->nColorMapLength )
return sal_False;
- mpAcc->SetPixel( nY, nX, (sal_uInt8)nDummy );
+ mpAcc->SetPixelIndex( nY, nX, nDummy );
}
break;
default:
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index b5a127318923..4cb6400e1eea 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -871,7 +871,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
nLast = BYTESWAP( (sal_uInt8)*pt++ );
for ( nx = 0; nx < nImageWidth; nx++ )
{
- pAcc->SetPixel( nY, nx, nLast );
+ pAcc->SetPixelIndex( nY, nx, nLast );
nLast = nLast + *pt++;
}
}
@@ -880,7 +880,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
for ( nx = 0; nx < nImageWidth; nx++ )
{
nLast = *pt++;
- pAcc->SetPixel( nY, nx, (sal_uInt8)( ( (BYTESWAP((sal_uLong)nLast ) - nMinSampleValue ) * nMinMax ) ) );
+ pAcc->SetPixelIndex( nY, nx, static_cast<sal_uInt8>( (BYTESWAP((sal_uLong)nLast) - nMinSampleValue) * nMinMax ) );
}
}
}
@@ -891,7 +891,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
nLast = *pt++;
for ( nx = 0; nx < nImageWidth; nx++ )
{
- pAcc->SetPixel( nY, nx, nLast );
+ pAcc->SetPixelIndex( nY, nx, nLast );
nLast = nLast + *pt++;
}
}
@@ -899,7 +899,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
{
for ( nx = 0; nx < nImageWidth; nx++ )
{
- pAcc->SetPixel( nY, nx, (sal_uInt8)( ( (sal_uLong)*pt++ - nMinSampleValue ) * nMinMax ) );
+ pAcc->SetPixelIndex( nY, nx, static_cast<sal_uInt8>( ((sal_uLong)*pt++ - nMinSampleValue) * nMinMax ) );
}
}
@@ -917,7 +917,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
for ( nx = 0; nx < nImageWidth; nx++ )
{
nVal = ( GetBits( pt, nx * nBitsPerSample, nBitsPerSample ) - nMinSampleValue ) * nMinMax;
- pAcc->SetPixel( nY, nx, (sal_uInt8)nVal );
+ pAcc->SetPixelIndex( nY, nx, static_cast<sal_uInt8>(nVal));
}
}
break;
@@ -931,28 +931,28 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
while ( --nByteCount )
{
nByteVal = *pt++;
- pAcc->SetPixel( nY, nx++, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, nx++, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, nx++, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, nx++, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, nx++, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, nx++, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, nx++, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, nx++, nByteVal );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal );
}
if ( nImageWidth & 7 )
{
nByteVal = *pt++;
while ( nx < nImageWidth )
{
- pAcc->SetPixel( nY, nx++, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx++, nByteVal & 1 );
nByteVal >>= 1;
}
}
@@ -964,21 +964,21 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
while ( --nByteCount )
{
nByteVal = *pt++;
- pAcc->SetPixel( nY, nx, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, nx, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, --nx, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, --nx, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, --nx, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, --nx, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, --nx, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, --nx, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, --nx, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, --nx, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, --nx, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, --nx, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, --nx, nByteVal & 1 );
+ pAcc->SetPixelIndex( nY, --nx, nByteVal & 1 );
nByteVal >>= 1;
- pAcc->SetPixel( nY, --nx, nByteVal );
+ pAcc->SetPixelIndex( nY, --nx, nByteVal );
nx += 15;
}
if ( nImageWidth & 7 )
@@ -988,7 +988,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
nShift = 7;
while ( nx < nImageWidth )
{
- pAcc->SetPixel( nY, nx++, ( nByteVal >> nShift ) & 1);
+ pAcc->SetPixelIndex( nY, nx++, ( nByteVal >> nShift ) & 1);
}
}
}
@@ -1011,7 +1011,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
pt++;
for ( nx = 0; nx < nImageWidth; nx++, pt += 2 )
{
- pAcc->SetPixel( nY, nx, (sal_uInt8)( ( (sal_uLong)*pt - nMinSampleValue ) * nMinMax ) );
+ pAcc->SetPixelIndex( nY, nx, static_cast<sal_uInt8>( ((sal_uLong)*pt - nMinSampleValue) * nMinMax) );
}
}
}