mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
0fdf12e446
commit
25b918a931
@ -405,8 +405,11 @@ class BlockStyle(DOCXStyle):
|
||||
except (TypeError, ValueError):
|
||||
self.line_height = max(0, int(1.2 * css.fontSize * 20))
|
||||
self.background_color = None if is_table_cell else convert_color(css['background-color'])
|
||||
try:
|
||||
self.text_align = {'start':'left', 'left':'left', 'end':'right', 'right':'right', 'center':'center', 'justify':'both', 'centre':'center'}.get(
|
||||
css['text-align'].lower(), 'left')
|
||||
except AttributeError:
|
||||
self.text_align = 'left'
|
||||
|
||||
DOCXStyle.__init__(self, namespace)
|
||||
|
||||
|
@ -301,8 +301,8 @@ class Table(object):
|
||||
except Exception:
|
||||
tcell = None
|
||||
if tcell is None:
|
||||
nrow.extend([SpannedCell(nrow[-1], horizontal=True) for i in xrange(idx - len(nrow))])
|
||||
nrow.append(sc)
|
||||
nrow.cells.extend([SpannedCell(nrow.cells[-1], horizontal=True) for i in xrange(idx - len(nrow.cells))])
|
||||
nrow.cells.append(sc)
|
||||
else:
|
||||
if isinstance(tcell, SpannedCell):
|
||||
# Conflict between rowspan and colspan
|
||||
|
Loading…
x
Reference in New Issue
Block a user