summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-14 10:19:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-14 10:19:47 +0000
commit16f5f716de4f8a6ecf2378f50f9320194bad5320 (patch)
treeed09c70251eb154ff2a3d9b029ff4953fc465a17 /filter
parent31de0ac30d6c521ad663db78feb936688be5bccb (diff)
reduce scope of bPalette
Change-Id: Icc1fd48e72be6c550b03008a6d7b81bf8a903d44
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 93b7fe2b87a8..9172ef909c00 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -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 );