Bug 133052 - FILEOPEN DOCX Extra spacing above numbered paragraphs
Summary: FILEOPEN DOCX Extra spacing above numbered paragraphs
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:7.0.0
Keywords: bibisected, regression
Depends on:
Blocks: DOCX-Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2020-05-15 06:48 UTC by NISZ LibreOffice Team
Modified: 2020-07-08 11:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word with Auto Spacing before value (13.57 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-05-15 06:48 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (95.20 KB, image/png)
2020-05-15 06:48 UTC, NISZ LibreOffice Team
Details
Fixed top margins, except the odd one out (37.63 KB, image/png)
2020-05-20 15:32 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-05-15 06:48:22 UTC
Created attachment 160839 [details]
Example file from Word with Auto Spacing before value

After bug #132807 is fixed, there are some spacing values that are converted improperly from the numbered custom style.
Attachment contains Auto spacing above and below set in the custom style, it is converted to 0.49 cm incorrectly in:
- Numbering sublevels
- Multiple item list in table

Steps to reproduce:
    1. Open attachment, compare the Spacing before value with Word

Actual results:
Extra spacing in some paragraphs.

Expected results:
Same appearance as in Word.

LibreOffice details:
Version: 7.0.0.0.alpha1+ (x64)
Build ID: 1ed7607454d1492f65c78443cb661d5873face6b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-05-15 06:48:48 UTC
Created attachment 160840 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 BogdanB 2020-05-16 05:15:50 UTC
Confirm it
Version: 7.0.0.0.alpha1+
Build ID: b1e396d86655a0131498a4691dd8069ea76c3477
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2020-05-15_04:58:38
Calc: threaded
Comment 3 BogdanB 2020-05-16 05:26:49 UTC
Bibisected
 a0e5d5676148f159911ae694bae0046644f23a18 is the first bad commit
commit a0e5d5676148f159911ae694bae0046644f23a18
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Apr 14 09:53:24 2020 +0200

    source 35fc5ef0a759884b24ed8b83cd05702a0fab64cc
    
    source 35fc5ef0a759884b24ed8b83cd05702a0fab64cc

 instdir/program/libwriterfilterlo.so | Bin 3039616 -> 3040024 bytes
 instdir/program/versionrc            |   2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 4 László Németh 2020-05-20 15:25:31 UTC
Proposed fix: https://gerrit.libreoffice.org/c/core/+/94588

One of the top margins wasn't fixed, because it seems, the document contains a likely intended setting: different numId, visible as different list style WWNum1 and WWNum2 on LO's UI.

I suggest to investigate this problem, what is the rule for 0 auto top margin, when the adjacent list items have different list style and paragraph style.

Note: the topic of the bug report is not a regression, only indentation (maybe there is already a filed bug for that).
Comment 5 László Németh 2020-05-20 15:32:33 UTC
Created attachment 161043 [details]
Fixed top margins, except the odd one out
Comment 6 László Németh 2020-05-20 15:33:32 UTC
.... the document contains a likely NOT intended setting ...

(see attached screen shot)
Comment 7 László Németh 2020-05-21 07:27:53 UTC
tdf#133052: DOCX import: fix top auto margin of subitems

(nested lists) and other items of lists, when auto
margin is defined by paragraph style, and list items
have got w:numPr.

Follow-up of commit 162d74ae7a53eb1cde738f0a7558f297b8162f7a
(tdf#132807 DOCX import: fix top auto margin in lists).
Comment 8 Commit Notification 2020-05-21 07:27:59 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9cca15204af9cc44a8a9528ccf2f36616fb70e69

tdf#133052: DOCX import: fix top auto margin of subitems

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 9 Xisco Faulí 2020-06-01 14:17:20 UTC
Verified in

Version: 7.0.0.0.beta1+
Build ID: 2506d8221dd940dfd93d3d7c183430ba6ba3089d
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded


@László Németh, thanks for fixing this issue!!