Commit 9ea85e3d authored by Jos van den Oever's avatar Jos van den Oever

Filter out misplaced <graphic-properties/> elements.

parent 16c4754a
......@@ -119,9 +119,10 @@ class OdfFixer extends XMLFilterImpl {
}
// correct invalid nesting
// element <style:style style:family="paragraph"> may not have child
// element <style:graphic-properties>
// element <style:graphic-properties/> or <graphic-properties/>
// (workaround for invalid ODF from LibreOffice 5
if (NC.style.equals(uri) && "graphic-properties".equals(localName)
if ("graphic-properties".equals(localName)
&& (NC.style.equals(uri) || "".equals(uri))
&& familyStack.size() > 0
&& "paragraph".equals(familyStack.lastElement())) {
mute = true;
......
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