Commit 7852063a authored by Jos van den Oever's avatar Jos van den Oever

Set text-line-through-type to none when text-line-through-style is none.

But only in automatic styles.
parent 27cd29aa
......@@ -388,6 +388,7 @@ public class OdfNormalizer {
fixBibliographyStyles(doc, styleNames);
addLinkStyle(doc, styleNames);
setTextLineThroughType(doc);
IdAndReferenceNormalizer n = new IdAndReferenceNormalizer(doc);
// fonts
......@@ -703,6 +704,20 @@ public class OdfNormalizer {
}
}
private void setTextLineThroughType(Document doc) {
XPathResult<Attr> as = XPath
.attrIterator(
doc,
"/*/office:automatic-styles//style:text-properties/@style:text-line-through-style[.='none']");
for (Attr a : as) {
final Element e = a.getOwnerElement();
if (!e.hasAttributeNS(NC.style, "text-line-through-type")) {
e.setAttributeNS(NC.style, "style:text-line-through-type",
"none");
}
}
}
static private void fixBookmarkStart(Document document) {
// replace each text:bookmark that has a corresponding text:bookmark-end
// by text:bookmark-start
......
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