[Libreoffice-commits] core.git: filter/source

Caolán McNamara caolanm at redhat.com
Tue Feb 14 10:20:16 UTC 2017


 filter/source/graphicfilter/iras/iras.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 16f5f716de4f8a6ecf2378f50f9320194bad5320
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 14 10:19:10 2017 +0000

    reduce scope of bPalette
    
    Change-Id: Icc1fd48e72be6c550b03008a6d7b81bf8a903d44

diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 93b7fe2..9172ef9 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 );


More information about the Libreoffice-commits mailing list