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:
Kovid Goyal 2016-11-26 08:37:09 +05:30
parent 925c855c23
commit 44345abdd9

View File

@ -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()