reduce scope of bPalette

Change-Id: Icc1fd48e72be6c550b03008a6d7b81bf8a903d44
This commit is contained in:
Caolán McNamara 2017-02-14 10:19:10 +00:00
parent 31de0ac30d
commit 16f5f716de

View File

@ -50,7 +50,6 @@ private:
sal_Int32 mnDepth, mnImageDatSize, mnType;
sal_Int32 mnColorMapType, mnColorMapSize;
sal_uInt8 mnRepCount, mnRepVal; // RLE Decoding
bool mbPalette;
bool ImplReadBody(BitmapWriteAccess * pAcc);
bool ImplReadHeader();
@ -77,7 +76,6 @@ RASReader::RASReader(SvStream &rRAS)
, mnColorMapSize(0)
, mnRepCount(0)
, mnRepVal(0)
, mbPalette(false)
{
}
@ -106,6 +104,8 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
if ( mnDstBitsPerPix <= 8 ) // paletten bildchen
{
bool bPalette(false);
if ( mnColorMapType == RAS_COLOR_RAW_MAP ) // RAW Colormap wird geskipped
{
sal_uLong nCurPos = m_rRAS.Tell();
@ -130,7 +130,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
{
pAcc->SetPaletteColor( i, BitmapColor( nRed[ i ], nGreen[ i ], nBlue[ i ] ) );
}
mbPalette = true;
bPalette = true;
}
else
return false;
@ -139,7 +139,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
else if ( mnColorMapType != RAS_COLOR_NO_MAP ) // alles andere ist kein standard
return false;
if ( !mbPalette )
if ( !bPalette )
{
mnDstColors = 1 << mnDstBitsPerPix;
pAcc->SetPaletteEntryCount( mnDstColors );