DOCX Input: Handle numbering without character styles

DOCX Input: Fix erorr when converting docx files that have numbering
defined with no associated character style. Fixes #1232100 [Private bug](https://bugs.launchpad.net/calibre/+bug/1232100)
This commit is contained in:
Kovid Goyal 2013-10-03 10:28:06 +05:30
parent 5ca115eab0
commit 9dd410ed70

View File

@ -90,7 +90,7 @@ class Level(object):
self.is_numbered = False
cs = self.character_style
if lt in {'\uf0a7', 'o'} or (
cs.font_family is not inherit and cs.font_family.lower() in {'wingdings', 'symbol'}):
cs is not None and cs.font_family is not inherit and cs.font_family.lower() in {'wingdings', 'symbol'}):
self.fmt = {'\uf0a7':'square', 'o':'circle'}.get(lt, 'disc')
else:
self.bullet_template = lt