summaryrefslogtreecommitdiffstats
path: root/filter/source
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2018-04-15 12:33:03 +0300
committerMuhammet Kara <muhammet.kara@pardus.org.tr>2018-04-16 04:58:48 +0200
commit9c4eaa7b81a40d97fe49b85272b40bfeaaf44f86 (patch)
treecb3f70c3a06b3c97b4fea3d9d70e81a1aa0ff9bc /filter/source
parentvcl: move Bitmap::ImplScaleFast() and Bitmap::ImplScaleInterpolate() (diff)
downloadcore-9c4eaa7b81a40d97fe49b85272b40bfeaaf44f86.tar.gz
core-9c4eaa7b81a40d97fe49b85272b40bfeaaf44f86.zip
cppcheck: variableScope & unreadVariable
Change-Id: Iaa3adc54d547e243b977a562fa4dbc2b9b9c6592 Reviewed-on: https://gerrit.libreoffice.org/52905 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index c0d7a6c7fb82..30e00d45f9e1 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -96,12 +96,13 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
if ( !mbStatus )
return false;
- bool bPalette(false);
std::vector<Color> aPalette;
-
bool bOk = true;
+
if ( mnDstBitsPerPix <= 8 ) // pallets pictures
{
+ bool bPalette(false);
+
if ( mnColorMapType == RAS_COLOR_RAW_MAP ) // RAW color map is skipped
{
sal_uLong nCurPos = m_rRAS.Tell();
@@ -144,7 +145,6 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
sal_uLong nCount = 255 - ( 255 * i / ( mnDstColors - 1 ) );
aPalette[i] = Color(static_cast<sal_uInt8>(nCount), static_cast<sal_uInt8>(nCount), static_cast<sal_uInt8>(nCount));
}
- bPalette = true;
}
}
else