From 44345abdd9e83ec6ca166685b76f603b45d374f9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 26 Nov 2016 08:37:09 +0530 Subject: [PATCH] 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) --- src/calibre/ebooks/docx/writer/tables.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/ebooks/docx/writer/tables.py b/src/calibre/ebooks/docx/writer/tables.py index 7865f958b8..fe1716b19e 100644 --- a/src/calibre/ebooks/docx/writer/tables.py +++ b/src/calibre/ebooks/docx/writer/tables.py @@ -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()