From 708ee5521ac3459c076188219c8d011fbe38eb08 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 27 Jul 2015 08:52:04 +0530 Subject: [PATCH] ODT Input: Fix custom styles with a dot in their name not being inherited. Fixes #1478346 [Attributes lost for hierarchical custom styles when reading odt documents](https://bugs.launchpad.net/calibre/+bug/1478346) --- src/odf/odf2xhtml.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/odf/odf2xhtml.py b/src/odf/odf2xhtml.py index b3f40231bc..f596cf47fe 100644 --- a/src/odf/odf2xhtml.py +++ b/src/odf/odf2xhtml.py @@ -1117,6 +1117,7 @@ dl.notes dd:last-of-type { page-break-after: avoid } # Then load the parent style if we find it if parent: + parent = parent.replace(".", "_") parent = "%s-%s" % (sfamily, parent) parent = special_styles.get(parent, "."+parent) if parent in self.styledict: