Description: The attached ODT file contains Title and Heading 1 styles. When I save this file as DOCX in Writer, and reopen with MSO 2010, the heading styles are wrong. The bug only appear if I am using non-English UI (Simplified Chinese and Traditional Chinese). Bug does not exist if using English UI. Not sure if this issue exists in other non-English UIs. Steps to Reproduce: 1. Switch to Simplified Chinese UI. 2. Save the attached ODT file as DOCX. 3. Reopen with MSO 2010. Observe the that the text in heading1 style is wrongly center-aligned. 4. Retest with English UI. Observe that the text in heading1 style is correctly left-aligned. Actual Results: The text in heading1 style is wrongly center-aligned when reopen this docx file in MSO 2010 Expected Results: The text in heading1 style is should be left-aligned. Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Created attachment 129974 [details] Test ODT file
Created attachment 129975 [details] DOCX file saved from the ODT file under LibreOffice 5.3.0 beta2 Reopen this DOCX file in MSO 2010 to observe the wrong style in heading1.
The bibisect repo only have english UI, so bibist is not possible for this bug.
Do not reproduce in version 5.1.1.3 release, so it's a regression.
The commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=bb35db2c709d2d5fd1f86e84478944416cf7f6e0 seems to have caused the issue. In Chinese, both Heading and Title has the same meaning "标题". In Writer, the string "Heading" is translated as "标题" in Chinese, all the other headings are based on Heading. while in MSO the "Title" is "标题".This causes Heading 1 to be based on "Title" in this case. Heading 1 becomes centered as Title has the attribute CENTER. In Writer "Title" is translated as "大标题" to let it distinguiah with "Heading". I have changed the translation of Heading from "标题" to "标题 (Heading)" on pootle and hope this workaround works. I can only confirm the result after the next release us out as I am not able to build from master source at this moment. Even it works, it's not a solution. Is the export to docx using localized string as style names, rather than IDs?
The docx file displays correctly in MSO2013 and MSO2016, and also correctly in LibreOffice, apparently this is a MSO2010 bug. Unzip the docx, in word/styles.xml: <w:style w:type="paragraph" w:styleId="Style13"> <w:name w:val="标题"/> ...... </w:style> I change it to: <w:style w:type="paragraph" w:styleId="Style13"> <w:name w:val="标题样式"/> ...... </w:style> so that the w:val of this style does not conflict with "Title" style. Then I zip the folder to a new docx file, and reopen with MSO2010, the heading1 style displays correctly. For any other languages, if you encounter the same issue, you should ask the localization team to change the translation of "Heading" in pootle to something different than the *translation of "Title" as displayed in MSO 2010*.
Pinged the l10n mailing list at: http://listarchives.libreoffice.org/global/l10n/msg10583.html
Hi Kevin, I think you jump to the conclusion to early. A few things to clarify. The assumption that the same ODF file get the same result is not necessary true. It will be better if the content is created from the same procedure, i.e. create three paragraphs and set the style each to Title, Heading1, and Context so we can exclude the possibility that UI affect ODF importing. On the other hand, if you look at my commit bb35db2c709d2d5fd1f86e84478944416cf7f6e0. I expect the style name to be English. Here in you're result does not work as expected. <w:style w:type="paragraph" w:styleId="Style13"> <w:name w:val="标题"/> ...... </w:style> I'd like to spend some time checking this. Altering the translation for the purpose might not be necessary at all.
Kevin, You're right. Translation of "Heading" conflicts with the translation of "Title" in word. Updating translation is a quick solution for this.
(In reply to Mark Hung from comment #9) Thank yoy so much for investigating on this. If you have time, would you please help to identify the root cause/reason for this? Is Word 2010 not using the styleid for styles? I see those styles having different style ids.
Hi Kevin, Though updating translation seems to be a quick solution here, it also affect style names when exporting and importing ODF. It is my concern ( it's my speculation, not examined yet ) that there might be compatibility issue for different versions of LO if the translation of style name is different. An alternative solution is to create new translatable string for "Heading" for the purpose of exporting to docx, so the one in UI would not need to be changed. But it takes much more effort to do that. And, to answer your question in #10. There is no document describing how a style is connected to built-in styles in Word. All I know is that style names are recognized.