[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Jan 16 14:00:20 UTC 2018
vcl/source/filter/ixpm/xpmread.cxx | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
New commits:
commit 3ccb36d0b36f5dc7671ea62dac5e0a1f5eb20439
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 16 11:00:05 2018 +0000
ofz#5402 Timeout
Change-Id: Id296f83b92fa8109ccbe8c4360e1d7d0ec199a4d
Reviewed-on: https://gerrit.libreoffice.org/47983
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index bb89e7a5e647..1770a37b0b47 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -307,21 +307,16 @@ bool XPMReader::ImplGetScanLine( sal_uLong nY )
{
for (sal_uLong i = 0; i < mnWidth; ++i)
{
- for (sal_uLong j = 0; j < mnColors; ++j)
+ OString aKey(reinterpret_cast<sal_Char*>(pString), mnCpp);
+ auto it = maColMap.find(aKey);
+ if (it != maColMap.end())
{
- OString aKey(reinterpret_cast<sal_Char*>(pString), mnCpp);
- auto it = maColMap.find(aKey);
- if (it != maColMap.end())
- {
- if (mnColors > 256)
- mpAcc->SetPixel(nY, i, Color(it->second[1], it->second[2], it->second[3]));
- else
- mpAcc->SetPixel(nY, i, BitmapColor(it->second[1]));
- if (mpMaskAcc)
- mpMaskAcc->SetPixel(nY, i, it->second[0] ? aWhite : aBlack);
-
- break;
- }
+ if (mnColors > 256)
+ mpAcc->SetPixel(nY, i, Color(it->second[1], it->second[2], it->second[3]));
+ else
+ mpAcc->SetPixel(nY, i, BitmapColor(it->second[1]));
+ if (mpMaskAcc)
+ mpMaskAcc->SetPixel(nY, i, it->second[0] ? aWhite : aBlack);
}
pString += mnCpp;
}
More information about the Libreoffice-commits
mailing list