Kaydet (Commit) 3056a6b6 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Björn Michaelsen

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/19615Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarChristina Roßmanith <ChrRossmanith@web.de>
üst 04783fd9
...@@ -90,19 +90,24 @@ template<typename Func> void visitElements(Func& rFunc, ...@@ -90,19 +90,24 @@ template<typename Func> void visitElements(Func& rFunc,
rFunc.push(); rFunc.push();
// recurse over children // recurse over children
if (eCaller == SHAPE_WRITER && rElem->getTagName() == "defs") {
return;
}
uno::Reference<xml::dom::XNodeList> xChildren( rElem->getChildNodes() ); uno::Reference<xml::dom::XNodeList> xChildren( rElem->getChildNodes() );
const sal_Int32 nNumNodes( xChildren->getLength() ); const sal_Int32 nNumNodes( xChildren->getLength() );
for( sal_Int32 i=0; i<nNumNodes; ++i ) for( sal_Int32 i=0; i<nNumNodes; ++i )
{ {
if( xChildren->item(i)->getNodeType() == xml::dom::NodeType_ELEMENT_NODE ) if( xChildren->item(i)->getNodeType() == xml::dom::NodeType_ELEMENT_NODE ){
visitElements( rFunc, //tdf#65864
uno::Reference<xml::dom::XElement>( //TODO: support clipPath
xChildren->item(i), if( !(eCaller == SHAPE_WRITER &&
uno::UNO_QUERY_THROW), xChildren->item(i)->getNodeName() == "path" &&
eCaller ); 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 // children processing done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment