vcl/source/filter/ixpm/xpmread.cxx | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-)
New commits: commit 3ccb36d0b36f5dc7671ea62dac5e0a1f5eb20439 Author: Caolán McNamara <caol...@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 <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits