Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


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 <tbehrens@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: pgpWRAC9yjcZY.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.