[Libreoffice-commits] core.git: filter/source

Xisco Fauli anistenis at gmail.com
Sat Nov 7 13:31:43 PST 2015


 filter/source/svg/svgreader.cxx |   23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

New commits:
commit 3056a6b6e39b57c66ebaf5210264b689f02f5fc3
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Tue Oct 27 01:43:48 2015 +0100

    SVG: tdf#95332 defs can contain shapes so fix tdf#65864 in...
    
    a different way.
    This is just a temporal fix as this should be fix by implementing support for 'clipPath'
    
    Change-Id: I451e0a9ae0466c027505672393d623d7ac363e79
    Reviewed-on: https://gerrit.libreoffice.org/19615
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Christina Roßmanith <ChrRossmanith at web.de>

diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index ce94e0f..009425a 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -90,19 +90,24 @@ template<typename Func> void visitElements(Func& rFunc,
     rFunc.push();
 
     // recurse over children
-    if (eCaller == SHAPE_WRITER && rElem->getTagName() == "defs") {
-        return;
-    }
     uno::Reference<xml::dom::XNodeList> xChildren( rElem->getChildNodes() );
     const sal_Int32 nNumNodes( xChildren->getLength() );
     for( sal_Int32 i=0; i<nNumNodes; ++i )
     {
-        if( xChildren->item(i)->getNodeType() == xml::dom::NodeType_ELEMENT_NODE )
-            visitElements( rFunc,
-                           uno::Reference<xml::dom::XElement>(
-                               xChildren->item(i),
-                               uno::UNO_QUERY_THROW),
-                           eCaller );
+        if( xChildren->item(i)->getNodeType() == xml::dom::NodeType_ELEMENT_NODE ){
+            //tdf#65864
+            //TODO: support clipPath
+            if( !(eCaller == SHAPE_WRITER &&
+                xChildren->item(i)->getNodeName() == "path" &&
+                rElem->getTagName() == "clipPath" &&
+                rElem->getParentNode()->getNodeName() == "defs") ){
+                    visitElements( rFunc,
+                                   uno::Reference<xml::dom::XElement>(
+                                       xChildren->item(i),
+                                       uno::UNO_QUERY_THROW),
+                                   eCaller );
+            }
+        }
     }
 
     // children processing done


More information about the Libreoffice-commits mailing list