Allow more customization of opendocument styles.

Automatic styles can now be inserted in the template,
since the template, not the writer, now provides the
enclosing `<office:automatic-styles>` tags.

Closes #2520.
This commit is contained in:
John MacFarlane 2015-11-14 17:19:25 -08:00
parent 0f3a68a39d
commit 420c86b69a
2 changed files with 2 additions and 3 deletions

@ -1 +1 @@
Subproject commit ef963c30605d7f0558b9cfbf7183f0aa4aad688e
Subproject commit c31874467bb58ac1735dc28af458e7603a166397

View file

@ -191,8 +191,7 @@ writeOpenDocument opts (Pandoc meta blocks) =
listStyle (n,l) = inTags True "text:list-style"
[("style:name", "L" ++ show n)] (vcat l)
listStyles = map listStyle (stListStyles s)
automaticStyles = inTagsIndented "office:automatic-styles" $ vcat $
reverse $ styles ++ listStyles
automaticStyles = vcat $ reverse $ styles ++ listStyles
context = defField "body" body
$ defField "automatic-styles" (render' automaticStyles)
$ metadata