Bug 119054 - FILEOPEN DOCX Paragraph style in a table appears without the set spacing below
Summary: FILEOPEN DOCX Paragraph style in a table appears without the set spacing below
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0 target:6.4.0.1 target:7.0.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Tables Paragraph
  Show dependency treegraph
 
Reported: 2018-08-01 22:27 UTC by Gabor Kelemen (allotropia)
Modified: 2020-04-29 10:50 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document from Word (18.40 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-08-01 22:27 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the file in Word (157.87 KB, image/png)
2018-08-01 22:27 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the file in LO (179.18 KB, image/png)
2018-08-01 22:40 UTC, Gabor Kelemen (allotropia)
Details
The Heading 2 styles settings in a current master build (109.64 KB, image/png)
2018-08-01 22:46 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-08-01 22:27:27 UTC
Created attachment 143915 [details]
Example document from Word

If we insert a table in Microsoft Word and add some paragraphs into the table with text and modify the style of the paragraph from default to Heading 2, and set the below spacing 18 pt, LibreOffice will not consider it. Even if the setting of the spacing is correct in the style.

Steps to reproduce:
1. Create a new document with Microsoft Word 2010/2013/2016
2. Insert a table with 1 cell.
3. Fill the table with some random text and empty paragraphs.
4. Select the full text and modify the style from “Normal” to “Heading 2”
5. Modify the “below paragraph” of the “Heading 2“ style from 0 pt to 18 pt.
6. Save the style and then save the document as *.docx
7. Open the file in LibreOffice Writer

Actual results:
The “below paragraph” of the “Heading 2“ style is correct but the paragraphs appears with wrong (still 0) spacing. The same problem appears if we export the file with LibreOffice Writer and reload it or open the exported file with Microsoft Word.

Expected results:
The paragraph spacing style should work even if we use them in a table.

Version: 6.2.0.0.alpha0+
Build ID: 480428e0e95453ff6abbc8f90255d3f00e4f0b7b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: hu-HU (hu_HU.UTF-8); Calc: group
Comment 1 Gabor Kelemen (allotropia) 2018-08-01 22:27:58 UTC
Created attachment 143916 [details]
Screenshot of the file in Word
Comment 2 Gabor Kelemen (allotropia) 2018-08-01 22:40:49 UTC
Created attachment 143917 [details]
Screenshot of the file in LO
Comment 3 Gabor Kelemen (allotropia) 2018-08-01 22:46:21 UTC
Created attachment 143918 [details]
The Heading 2 styles settings in a current master build

I also noticed that in the original file removing direct formatting from the paragraphs solves the problem, so I'm not sure what is going on here.
Comment 4 raal 2018-08-14 17:52:18 UTC
Confirm with Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a) and Version: 6.2.0.0.alpha0+
Build ID: 53eda574a61396b6765cd1cb0ac9804c754ac4c1
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3;
Comment 5 Justin L 2018-08-16 15:08:42 UTC
This is likely due to the table styles, which need a ton of work.

<w:style w:type="table" w:styleId="Rcsostblzat">
  <w:name w:val="Table Grid"/>
  <w:pPr>
    <w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
  </w:pPr>
Comment 6 Commit Notification 2019-11-19 06:54:37 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6100909c84550036932d031f4d2f652e158a1a0a

tdf#119054 DOCX: fix not table style based bottom margin

It will be available in 6.5.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 2019-11-21 16:36:30 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/6c5da2cd7af5c2d90e4d8e9635ba8c9989c87923

tdf#119054 DOCX: fix not table style based bottom margin

It will be available in 6.4.0.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 8 Commit Notification 2019-12-02 10:01:17 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/749fd6508504cf3b2e3822eca52a67fa36d75fb8

revert obsolete writerfilter hacks for tdf#119054 and tdf#128752

It will be available in 6.5.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 Commit Notification 2020-02-12 11:54:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c90b6a208d867a00252ad58d8eeab2fd12516157

Revert "revert obsolete writerfilter hacks for tdf#119054 and tdf#128752"

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.