Fix ODF attributes style:wrap-contour-mode, style:wrap-contour and style:leader-text in docx filter.

matus.uzak at gmail.com matus.uzak at gmail.com
Mon May 14 14:08:12 BST 2012


Hi Jos,

in ODF the default value of style:leader-text is “ “ (U+0020).  Docx:
if there's no leader text specified or it is "none", then there should
be no space.
The invisible space QChar(0x200B) solution as used for the
text:bullet-char by Zagge would be fine.

--- a/filters/words/docx/DocxXmlDocumentReader.cpp
+++ b/filters/words/docx/DocxXmlDocumentReader.cpp
@@ -4720,7 +4720,9 @@ KoFilter::ConversionStatus DocxXmlDocume
             text = QChar();
         }
     }
-    body->addAttribute("style:leader-text", text);
+    if (!text.isNull()) {
+        body->addAttribute("style:leader-text", text);
+    }
     body->endElement(); // style:tab-stop

     readNext();



More information about the calligra-devel mailing list