vcl/source/gdi/pdfwriter_impl.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit df4931c6b66c2691bcfe30fbcddf947cb3ab3fdf Author: Vasily Melenchuk <[email protected]> Date: Fri Feb 2 20:17:23 2018 +0300 Filter out empty paths from PDF export. Empty paths (with just one line zero length), created by old hack, are causing visual artifacts in PDF. They are not required at export stage anymore, so can be safely removed. Change-Id: Id6da51667592264d87c36e88ef7e68a778d3419e Reviewed-on: https://gerrit.libreoffice.org/49657 Reviewed-by: Thorsten Behrens <[email protected]> Tested-by: Thorsten Behrens <[email protected]> diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d1ce1e0b28d5..3eb1ecc3c7aa 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1440,6 +1440,11 @@ void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const void PDFWriterImpl::PDFPage::appendPolygon( const tools::Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const { sal_uInt16 nPoints = rPoly.GetSize(); + + // "empty" zero-sized path can be removed to avoid visual artifacts in PDF + if (nPoints == 2 && rPoly[0] == rPoly[1]) + return; + /* * #108582# applications do weird things */ _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
