[Libreoffice-bugs] [Bug 115856] Docx export: In non-English versions, styles.xml does not contain reference to international styles

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Dec 26 19:37:32 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=115856

fralau at settlenext.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |REOPENED

--- Comment #16 from fralau at settlenext.com ---
I have made another check to this issue by comparing the styles.xml for the
same document generated by MS Word and LibreOffice and I may have found what is
wrong! The problem is not with document.xml.

The predefined styles are defined, in this extract from the styles.xml
generated by MS Word, with lower case:

  <w:latentStyles w:defLockedState="0" w:defUIPriority="99" w:defSemiHidden="0"
w:defUnhideWhenUsed="0" w:defQFormat="0" w:count="375">
    <w:lsdException w:name="Normal" w:uiPriority="0" w:qFormat="1"/>
    <w:lsdException w:name="heading 1" w:uiPriority="9" w:qFormat="1"/>
    <w:lsdException w:name="heading 2" w:semiHidden="1" w:uiPriority="9"
w:unhideWhenUsed="1" w:qFormat="1"/>
...

Whereas LibreOffice used capitals:
  <w:style w:type="paragraph" w:styleId="Titre1">
    <w:name w:val="Heading 1"/>
    <w:basedOn w:val="Titre"/>
    <w:next w:val="Corpsdetexte"/>
    <w:qFormat/>
  ...

Is that the cause of the issue? Just to verify this hypothesis, I manually
changed 'Heading 1' and 'Heading 2' into 'heading 1' and 'heading 2' in
styles.xml, regenerated the docx file (by zipping, etc.), and then ran that
document through pandoc. And it worked, pandoc recognized the standard
headings!

Conclusion: in order to make the styles.xml file really standard, the w:val
attribute of the w:name tag should use lowercase, e.g.:

<w:name w:val="heading 1"/>

It seems that would fix the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181226/1545c47a/attachment.html>


More information about the Libreoffice-bugs mailing list