filter/source/svg/svgreader.cxx | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
New commits: commit 3056a6b6e39b57c66ebaf5210264b689f02f5fc3 Author: Xisco Fauli <aniste...@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 <c...@libreoffice.org> Reviewed-by: Christina RoÃmanith <chrrossman...@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
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits