Bug 108493

Summary: FILEOPEN: DOCX file numbered list number in wrong place - not preserving hanging indent
Product: LibreOffice Reporter: Gabriel Bowater <gabrielbowater>
Component: WriterAssignee: László Németh <nemeth>
Status: VERIFIED FIXED    
Severity: normal CC: gabrielbowater, kelemeng, libreoffice, patrick.jaap, xiscofauli
Priority: medium Keywords: filter:docx
Version: 4.1 all versions   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=105261
https://bugs.documentfoundation.org/show_bug.cgi?id=122423
https://bugs.documentfoundation.org/show_bug.cgi?id=78352
Whiteboard: target:7.0.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107830, 113546    
Attachments: File with indent problem on number 1 of numbered list
Showing difference in rendering between Office 365 and LibreOffice
File with indent problem - compare MSO and LO
Another example file from Word
Screenshot of the example file in Word 2010 and Writer 6.2alpha
File with indent problem - compared MSO LO
Another example file from Word - Compared

Description Gabriel Bowater 2017-06-13 00:08:20 UTC
Description:
When opening attached document in LibreOffice 5.2.2.3 the first level of the numbered list hierarchy doesn't have the hanging indent that the document has when opened in Microsoft Office

Steps to Reproduce:
1. Open document 
2. Check indentation of item "1."
3. Item has undivided indent when it should be a hanging indent

Actual Results:  
First level of numbered list has an undivided indent, meaning the number is rendered flush with the text

Expected Results:
First level of numbered list should be rendered with a hanging indent to the number is offset from the text block


Reproducible: Always

User Profile Reset: No - confirmed across multiple systems

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Comment 1 Gabriel Bowater 2017-06-13 00:09:21 UTC
Created attachment 133989 [details]
File with indent problem on number 1 of numbered list
Comment 2 Gabriel Bowater 2017-06-13 00:10:23 UTC
Created attachment 133990 [details]
Showing difference in rendering between Office 365 and LibreOffice
Comment 3 Xisco Faulí 2017-06-13 09:14:02 UTC
Confirmed in

- Version: 5.5.0.0.alpha0+
Build ID: 6ab249ea6aecef5d3f35d624622a368061cad9c3
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

- Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)

- Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

- Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

In 

- LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

it's even worse.
Comment 4 Timur 2018-01-29 10:06:39 UTC
Created attachment 139426 [details]
File with indent problem - compare MSO and LO

LO doesn't properly import "hanging" paragraphs.
Comment 5 Gabor Kelemen (allotropia) 2018-07-12 06:44:53 UTC
Created attachment 143498 [details]
Another example file from Word

We made this other example: -2 cm Left indent and 0.63 cm hanging indent becomes -1.37 cm Before text and -0.63 cm First line in current Writer master.
Comment 6 Gabor Kelemen (allotropia) 2018-07-12 06:46:10 UTC
Created attachment 143499 [details]
Screenshot of the example file in Word 2010 and Writer 6.2alpha
Comment 7 Timur 2019-01-28 14:40:23 UTC
Similar with DOC attachment 106262 [details]:
MSO setting is Centered, Indentation 0 cm, Special Hanging 0,79 cm.
LO opens as Before text 0,79 cm, After text 0 cm, First line 0,79 cm.
So it really moves text.
Repro 6.3+.
Comment 8 Gabor Kelemen (allotropia) 2019-07-12 08:10:00 UTC
*** Bug 124769 has been marked as a duplicate of this bug. ***
Comment 9 Gabor Kelemen (allotropia) 2019-07-12 08:11:56 UTC
This happens with simple paragraph indent too -> changing meta bug.

Also in the duplicate I commented (have it here too):

What's also interesting is that the amount of the hanging indent (0.4 cm in this file) is added to the indent before, but only on screen and not on docx save: the original value is written to the file.
Comment 10 László Németh 2020-05-05 16:12:50 UTC
tdf#108493 DOCX import: fix hanging indent of lists

when its value comes from the numbering style, but
the left indentation is overwritten by paragraph
settings. The problem caused by that these settings
are not independent in Writer core.
Comment 11 Commit Notification 2020-05-06 07:02:07 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/38016653cb9b338d6287c06a49663252f636f548

tdf#108493 DOCX import: fix hanging indent of lists

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Timur 2020-05-08 13:48:30 UTC
Created attachment 160537 [details]
File with indent problem - compared MSO LO

attachment 133989 [details] looks good.
Comment 13 Timur 2020-05-08 13:53:04 UTC
Created attachment 160538 [details]
Another example file from Word - Compared

Another example file from Word has no change.
Comment 14 Timur 2020-05-08 13:58:03 UTC Comment hidden (obsolete)
Comment 15 NISZ LibreOffice Team 2020-06-05 08:37:29 UTC
(In reply to Timur from comment #13)
> Created attachment 160538 [details]
> Another example file from Word - Compared
> 
> Another example file from Word has no change.

This seems to be fixed since

https://cgit.freedesktop.org/libreoffice/core/commit/?id=bf7acc698f91f420ac1b3796f18c1ae76ce1e401

tdf#78352: docx import: allow tab at left indent for list