mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Output: Fix an error when converting tables with spanning cells. Fixes #1644912 [This Particular ePub Will Not Convert to DOCX](https://bugs.launchpad.net/calibre/+bug/1644912)
This commit is contained in:
parent
925c855c23
commit
44345abdd9
@ -15,6 +15,7 @@ from calibre.ebooks.docx.writer.styles import read_css_block_borders as rcbb, bo
|
||||
class Dummy(object):
|
||||
pass
|
||||
|
||||
|
||||
Border = namedtuple('Border', 'css_style style width color level')
|
||||
border_style_weight = {
|
||||
x:100-i for i, x in enumerate(('double', 'solid', 'dashed', 'dotted', 'ridge', 'outset', 'groove', 'inset'))}
|
||||
@ -36,6 +37,9 @@ class SpannedCell(object):
|
||||
makeelement(tcPr, 'w:%sMerge' % ('h' if self.horizontal else 'v'), w_val='continue')
|
||||
makeelement(tc, 'w:p')
|
||||
|
||||
def applicable_borders(self, edge):
|
||||
return self.spanning_cell.applicable_borders(edge)
|
||||
|
||||
|
||||
def read_css_block_borders(self, css):
|
||||
obj = Dummy()
|
||||
|
Loading…
x
Reference in New Issue
Block a user