From 45bc2213b7132ab1e5eb7c97f5f36de3e851c4b1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Apr 2014 00:20:34 +0530 Subject: [PATCH] DOCX Input: Fix para styles for numbering blocks applied via pStyle not being applied --- src/calibre/ebooks/docx/styles.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/docx/styles.py b/src/calibre/ebooks/docx/styles.py index 17c891423f..80be3ceb0b 100644 --- a/src/calibre/ebooks/docx/styles.py +++ b/src/calibre/ebooks/docx/styles.py @@ -262,6 +262,9 @@ class Styles(object): if num_id is not None: p.set('calibre_num_id', '%s:%s' % (lvl, num_id)) is_numbering = True + ps = self.numbering.get_para_style(num_id, lvl) + if ps is not None: + parent_styles.append(ps) for attr in ans.all_properties: if not (is_numbering and attr == 'text_indent'): # skip text-indent for lists