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
Tue May 15 18:18:53 BST 2012


.. I checked again and I think it can stay as it is.

On Mon, May 14, 2012 at 10:12 PM, Jos van den Oever
<jos at vandenoever.info> wrote:
> On Monday 14 May 2012 15:08:12 PM matus.uzak at gmail.com wrote:
>> 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
>
> Sounds like a good fix. I would be fine with code like this:
>
> if (text.isNull()) {
>    body->addAttribute("style:leader-text", QChar(0x00B));
> } else {
>    body->addAttribute("style:leader-text", text);
> }
>
> Cheers,
> Jos
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel



More information about the calligra-devel mailing list