Attributes lost for hierarchical custom styles when reading odt documents
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Context: Calibre 2.32.1, Ubuntu 14.04 LTS and LibreOffice 4.2.8.2; 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/
[...]
if parent:
#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.
Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.
status fixreleased