vcl/source/gdi/pdfextoutdevdata.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit fed7de57d23b43f0a0cb2bcf5f0fbefe5852de2e Author: Marco Cecchetti <marco.cecche...@collabora.com> Date: Fri Nov 25 10:23:31 2016 +0100 tdf#101458 - check PNG for adequate compression Change-Id: I7131d3b721ebb4d47b0bb43f09fcb9767f8ac6d8 Reviewed-on: https://gerrit.libreoffice.org/31409 Reviewed-by: Marco Cecchetti <mrcek...@gmail.com> Tested-by: Marco Cecchetti <mrcek...@gmail.com> diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 34c448c..73d9232 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -420,9 +420,10 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc if ( !mbGroupIgnoreGDIMtfActions ) mCurrentGraphic = rGraphic; } - else if ( eType == GfxLinkType::NativePng ) + else if ( eType == GfxLinkType::NativePng && mParaRects.size() >= 2 ) { - mCurrentGraphic = rGraphic; + if ( rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) ) + mCurrentGraphic = rGraphic; } } break; @@ -805,7 +806,7 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic, { bool bReduceResolution = false; - assert( rGraphic.IsLink() && rGraphic.GetLink().GetType() == GfxLinkType::NativeJpg ); + assert( rGraphic.IsLink() && (rGraphic.GetLink().GetType() == GfxLinkType::NativeJpg || rGraphic.GetLink().GetType() == GfxLinkType::NativePng)); // small items better off as PNG anyway if ( rGraphic.GetSizePixel().Width() < 32 && _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits