From 9c265f7dec702a89f777595eaa8e994e5ec9bcd0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 9 May 2013 18:58:55 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/docx/char_styles.py | 3 +-- src/calibre/ebooks/docx/to_html.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/calibre/ebooks/docx/char_styles.py b/src/calibre/ebooks/docx/char_styles.py index 87203ff44a..8b45b2c211 100644 --- a/src/calibre/ebooks/docx/char_styles.py +++ b/src/calibre/ebooks/docx/char_styles.py @@ -126,7 +126,7 @@ class RunStyle(object): } toggle_properties = { - 'b', 'bCs', 'caps', 'emboss', 'i', 'iCs', 'imprint', 'shadow', 'smallCaps', 'strike', 'vanish', + 'b', 'bCs', 'caps', 'emboss', 'i', 'iCs', 'imprint', 'shadow', 'smallCaps', 'strike', 'dstrike', 'vanish', } def __init__(self, rPr=None): @@ -174,7 +174,6 @@ class RunStyle(object): if self.strike: td.add('line-through') if self.dstrike: - td.add('overline') td.add('line-through') if td: c['text-decoration'] = ' '.join(td) diff --git a/src/calibre/ebooks/docx/to_html.py b/src/calibre/ebooks/docx/to_html.py index e443a2084a..bf50cdc05e 100644 --- a/src/calibre/ebooks/docx/to_html.py +++ b/src/calibre/ebooks/docx/to_html.py @@ -78,7 +78,7 @@ class Convert(object): self.body[-1].tail = '\n' self.styles.generate_classes() - for obj, html_obj in self.object_map.iteritems(): + for html_obj, obj in self.object_map.iteritems(): style = self.styles.resolve(obj) if style is not None: css = style.css @@ -154,7 +154,7 @@ class Convert(object): wrapper = self.wrap_elems(spans, SPAN()) wrapper.set('class', cls) - self.object_map[p] = dest + self.object_map[dest] = p return dest def wrap_elems(self, elems, wrapper):