Attributes lost for hierarchical custom styles when reading odt documents
Context: Calibre 2.32.1, Ubuntu 14.04 LTS and LibreOffice 184.108.40.206; custom styles with a dot in the name, being part of a hierarchy of an ODT file when converting to EPUB with ebook-convert.
Ex.: style roman.dialogue has parent style roman.description and should inherit the text-align:justify from it.
The problem (and solution) lies in calibre/
#parent = parent.
parent = "%s-%s" % (sfamily, parent)
parent = special_
if parent in self.styledict:
When reading style roman.dialogue, the dot in the name field of the current style has been replaced by a '_' a few line ahead (see name = name.replace(
Solution: activate the statement with the comment for replacing the dot in the snippet above, then the parent style is found and the attributes are correctly inherited.