Bug 134569 - FILEOPEN DOCX Paragraph after nested table gets unexpected spacing
Summary: FILEOPEN DOCX Paragraph after nested table gets unexpected spacing
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.3.0 target:7.2.1
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2020-07-06 13:46 UTC by NISZ LibreOffice Team
Modified: 2021-08-19 14:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (21.83 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-07-06 13:46 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (117.96 KB, image/png)
2020-07-06 13:46 UTC, NISZ LibreOffice Team
Details
docum_minimized.docx: with exaggerated spacing (16.58 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-08-13 10:43 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-07-06 13:46:34 UTC
Created attachment 162712 [details]
Example file from Word

After the fix to bug #133735 there is a small regression remaining: an empty paragraph added after the nested table in Word gets an extra 0.35 cm spacing after setting in Writer.

Steps to reproduce:
    1. Open attached file

Actual results:
The empty paragraph after the nested table has 0.35 cm spacing after instead of 0.

Expected results:
The empty paragraph after the nested table should have 0 cm spacing after set.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 9af38b4504ccda57a0c32eb8bdd03e5a8ca29ddc
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL

Adding CC to: Laszlo Nemeth
Comment 1 NISZ LibreOffice Team 2020-07-06 13:46:51 UTC
Created attachment 162713 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 Xisco Faulí 2020-07-06 14:24:29 UTC
Regression introduced by:

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

author	László Németh <nemeth@numbertext.org>	2020-05-04 13:42:14 +0200
committer	László Németh <nemeth@numbertext.org>	2020-05-04 17:55:28 +0200
commit 81ce88aa80f8e7cde4fdc5b211e9500a3599643c (patch)
tree e343d94d8d304e97b82fe42efaabb810b6f3e04f
parent 224c155d89e4d957c0d566a5aea6004a466d54e9 (diff)
tdf#132514 DOCX import: fix lost table style with footer

Bisected with: bibisect-linux64-7.0

Adding Cc: to László Németh
Comment 3 Justin L 2021-08-13 10:43:04 UTC
Created attachment 174253 [details]
docum_minimized.docx: with exaggerated spacing

There are only two things that define w:spacing in docum.docx - all in styles:
<w:pPrDefault>   #Document defaults - overridden by Table style
  <w:pPr>
    <w:spacing w:after="200" w:line="276" w:lineRule="auto"/>
  </w:pPr>
</w:pPrDefault>

and 

<w:style w:type="table" w:styleId="Tabellengitternetz">
  <w:name w:val="Table Grid"/>
  <w:pPr>
    <w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
  </w:pPr>

So the table contents should be single spaced (not 1.15) with zero after-spacing.
Comment 4 Justin L 2021-08-13 17:44:20 UTC
This already linked bug report acted rather similarly to what we see here...

commit 45504ca72e0f081de9e7cc4f1faf553c7361694d
Author: László Németh on Wed Jul 1 18:14:39 2020 +0200
    tdf#133735 DOCX: fix paragraph settings of nested tables
Comment 5 Justin L 2021-08-16 08:54:18 UTC
proposed fix at https://gerrit.libreoffice.org/c/core/+/120526
Comment 6 Commit Notification 2021-08-16 17:31:31 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/33d588ab553652637e90ecd543c1ffa6301c762b

related tdf#134569 writerfilter: negative means table end

It will be available in 7.3.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 7 Commit Notification 2021-08-18 04:21:52 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/28a7fec1f6465f8bfee417d447eb2e684ffe040b

tdf#134569 writerfilter: move tableParaProps on table endLevel

It will be available in 7.3.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 8 BogdanB 2021-08-18 18:42:40 UTC
Justin, please mark this as resolved.

I just verified and it is ok in
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 5b025285b3528910a4360899abb2bbbaadc72c97
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 9 Commit Notification 2021-08-19 10:10:46 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/8c099c96936f136a1f76ac76259e14416e866980

related tdf#134569 writerfilter: negative means table end

It will be available in 7.2.1.

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 10 Commit Notification 2021-08-19 12:55:04 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/390d696395212721db5b050c03086fab9d667f12

tdf#134569 writerfilter: move tableParaProps on table endLevel

It will be available in 7.2.1.

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.