Bug 80473

Summary: Wrong style applied to DOCX paragraph when open in CJK UI (because of wrong style hereditability)
Product: LibreOffice Reporter: Kevin Suo <suokunlong>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED INVALID    
Severity: major CC: philipz85, robinson.libreoffice, serval2412, Zangune
Priority: medium Keywords: bibisectRequest, possibleRegression
Version: 4.1.6.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=76255
https://bugs.documentfoundation.org/show_bug.cgi?id=89315
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 83066, 104520    
Attachments: another test docx file

Description Kevin Suo 2014-06-24 10:02:32 UTC
Description:

The docx document in ttachment 95916 was created by saving the doc doucment in attachment 95915 [details] of bug 76255 by libreoffice with non-english UI. 

When open the docx document with libreoffice non-english UI, paragraphs "A. Heading 2" and "B. Heading 2" are aligned centered, rather than left. (Please not that the original doc file - the source file where the docx file comes from - is showing these two paragraphs aligning left.)

The docx file open with Microsoft Office 2010 is showing these paragraphs aligning left as expected.

This bug is related with bug 76255, which is regarding the broken styles hereditability.
Comment 1 Yousuf Philips (jay) (retired) 2014-06-24 10:19:12 UTC
Confirmed attachment 95916 [details] has Headings centered in 4.1.6, 4.2.5 and 4.3.0 on Linux Mint with a zh-CN UI. This doesnt effect arabic or japanese UIs.
Comment 2 Kevin Suo 2014-10-01 13:02:54 UTC
Created attachment 107187 [details]
another test docx file

This is another test docx file.
* Style "大标题" (Title) should be based on "标题" (Headings), but now in LibreOffice 4.3.2.2 it's based on "默认样式" (Default Style).
* Style "标题 1" (Heading 1), "标题 2" (Heading 2), "标题 3" (Heading 3) and "分标题" (Sub-title) should be based on "标题" (Headings), but now in LibreOffice 4.3.2.2 it's based on ""大标题" (Title)"
* The above wrong style hereditability caused the text contents which have "标题 1" (Heading 1), "标题 2" (Heading 2) or "标题 3" (Heading 3) styles applied to be showing wrong paragraph format.
Comment 3 Kevin Suo 2014-10-01 13:11:38 UTC
Also reproduce with Japanese UI, version 4.3.2.2.
Comment 4 Robinson Tryon (qubit) 2015-12-09 17:01:54 UTC Comment hidden (obsolete)
Comment 5 Julien Nabet 2016-09-13 08:23:07 UTC
The fix to tdf#89315 (put in See Also), for the moment only on master sources, may help here.
Comment 6 Justin L 2016-09-13 08:39:12 UTC
(In reply to Julien Nabet from comment #5)
> The fix to tdf#89315 may help here.

Probably not.
Comment 7 Mark Hung 2016-10-08 17:43:10 UTC
For original description, the original .doc file were opened with LibreOffice (1), then saved as .docx with LibreOffice (2), then reopen with LibreOffice(3) again. So the observed behavior had been mixed, any of the three actions might cause an issue, and they might possibly changed now. Version of the LibreOffice might make difference.

On the other hand, the hierarchy of the styles in attachment 107187 [details] in comment 2 observed in LibreOffice is the same as observed in MS Office 2010. Which means it isn't a FILEOPEN issue. If the file is saved by LibreOffice, then the style might be modified or destroyed. It will be better to have original file as comparison, and create different issue for that.