From 3abe0800238675001c6280b798b4904b224ca22f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 15 Jun 2013 16:13:42 +0530 Subject: [PATCH] DOCX Input: Support webHidden DOCX Input: Hide text that has been marked as not being visible in the web view in Word. --- src/calibre/ebooks/docx/char_styles.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calibre/ebooks/docx/char_styles.py b/src/calibre/ebooks/docx/char_styles.py index 02b8299c94..c9a2fee4c9 100644 --- a/src/calibre/ebooks/docx/char_styles.py +++ b/src/calibre/ebooks/docx/char_styles.py @@ -132,10 +132,10 @@ class RunStyle(object): all_properties = { 'b', 'bCs', 'caps', 'cs', 'dstrike', 'emboss', 'i', 'iCs', 'imprint', - 'rtl', 'shadow', 'smallCaps', 'strike', 'vanish', + 'rtl', 'shadow', 'smallCaps', 'strike', 'vanish', 'webHidden', 'border_color', 'border_style', 'border_width', 'padding', 'color', 'highlight', 'background_color', - 'letter_spacing', 'font_size', 'text_decoration', 'vert_align', 'lang', 'font_family' + 'letter_spacing', 'font_size', 'text_decoration', 'vert_align', 'lang', 'font_family', } toggle_properties = { @@ -150,7 +150,7 @@ class RunStyle(object): else: for p in ( 'b', 'bCs', 'caps', 'cs', 'dstrike', 'emboss', 'i', 'iCs', 'imprint', 'rtl', 'shadow', - 'smallCaps', 'strike', 'vanish', + 'smallCaps', 'strike', 'vanish', 'webHidden', ): setattr(self, p, binary_property(rPr, p)) @@ -210,7 +210,7 @@ class RunStyle(object): c['text-shadow'] = '2px 2px' if self.smallCaps is True: c['font-variant'] = 'small-caps' - if self.vanish is True: + if self.vanish is True or self.webHidden is True: c['display'] = 'none' self.get_border_css(c)