Hi,

could someone quickly review attached patch - a fairly safe fix I'd
like to include in -3-3, since it quite spectacularly break graphics
on PDF import.

Thanks,

-- Thorsten
From e455af833b31e3d5e8f7fa32a24ea44e53126baa Mon Sep 17 00:00:00 2001
From: Thorsten Behrens <tbehr...@novell.com>
Date: Wed, 15 Dec 2010 02:32:07 +0100
Subject: [PATCH] Fix filled polygons on pdfimport

This fixes fdo#32330, by explicitely closing filled polygons on
ODF streaming-out. LibO does not fill polygons, even if specifically
asked to - unless they're closed on coordinate level.
---
 sdext/source/pdfimport/tree/genericelements.cxx |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sdext/source/pdfimport/tree/genericelements.cxx b/sdext/source/pdfimport/tree/genericelements.cxx
index 5242a6b..d8696dd 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -164,6 +164,10 @@ void PolyPolyElement::updateGeometry()
     y = aRange.getMinY();
     w = aRange.getWidth();
     h = aRange.getHeight();
+
+    // fdo#32330 - non-closed paths will not show up filled in LibO
+    if( Action & (PATH_FILL | PATH_EOFILL) )
+        PolyPoly.setClosed(true);
 }
 
 void PolyPolyElement::visitedBy( ElementTreeVisitor&                          rVisitor,
-- 
1.7.1

Attachment: pgp0nFLwLjg0a.pgp
Description: PGP signature

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to