mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
DOCX Input: Handle DOCX files with missing referenced styles
Fixes #1228669 [.docx conversion fails w/ attribute error](https://bugs.launchpad.net/calibre/+bug/1228669)
This commit is contained in:
parent
0ba14158c2
commit
87a8f703be
@ -301,7 +301,7 @@ class Styles(object):
|
|||||||
if ts is not None:
|
if ts is not None:
|
||||||
parent_styles.append(ts)
|
parent_styles.append(ts)
|
||||||
if direct_formatting.linked_style is not None:
|
if direct_formatting.linked_style is not None:
|
||||||
ls = self.get(direct_formatting.linked_style).character_style
|
ls = getattr(self.get(direct_formatting.linked_style), 'character_style', None)
|
||||||
if ls is not None:
|
if ls is not None:
|
||||||
parent_styles.append(ls)
|
parent_styles.append(ls)
|
||||||
elif default_char is not None and default_char.character_style is not None:
|
elif default_char is not None and default_char.character_style is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user