diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-14 10:19:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-14 10:19:47 +0000 |
commit | 16f5f716de4f8a6ecf2378f50f9320194bad5320 (patch) | |
tree | ed09c70251eb154ff2a3d9b029ff4953fc465a17 /filter | |
parent | RTF import: handle target of hyperlink (diff) | |
download | core-16f5f716de4f8a6ecf2378f50f9320194bad5320.tar.gz core-16f5f716de4f8a6ecf2378f50f9320194bad5320.zip |
reduce scope of bPalette
Change-Id: Icc1fd48e72be6c550b03008a6d7b81bf8a903d44
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/iras/iras.cxx | 8 |
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 ); |