Bug 78508 - FILEOPEN: DOCX Strict - Table cell spacing not retained from <w:tcMar>
Summary: FILEOPEN: DOCX Strict - Table cell spacing not retained from <w:tcMar>
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.3.3 release
Hardware: Other All
: medium normal
Assignee: Justin L
URL:
Whiteboard: interoperability target:6.0.0
Keywords: filter:docx
Depends on: 79272
Blocks: OOXML-Import-Strict DOCX-Tables
  Show dependency treegraph
 
Reported: 2014-05-09 23:21 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-10-26 16:09 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
word 2013 .docx strict (47.60 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-09 23:21 UTC, Yousuf Philips (jay) (retired)
Details
how the table looks in word 2013 and LibO 4.2 (97.87 KB, image/jpeg)
2014-05-09 23:22 UTC, Yousuf Philips (jay) (retired)
Details
Exported pdf using 4.3b1 windows 8.1 (147.78 KB, application/pdf)
2014-05-25 19:58 UTC, Jorendc
Details
how it looks in word 2013 vs libO 4.3 beta (137.31 KB, image/jpeg)
2014-05-26 01:39 UTC, Yousuf Philips (jay) (retired)
Details
Screenshot of table in v4.3.0.2. (46.77 KB, image/png)
2014-07-13 09:22 UTC, Owen Genat (retired)
Details
Comparison between Word 2010 (above) and Libreoffice 5.0.1.2 (below) (170.21 KB, image/jpeg)
2015-09-09 13:01 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-05-09 23:21:27 UTC
Created attachment 98792 [details]
word 2013 .docx strict

I download the .docx file found at < http://download.microsoft.com/documents/uk/partner/publicsector/DraftMicrosoftResponsetoGovernment.docx > and opened it in word 2013 and saved it as an .docx strict file. I then opened the .docx file in LibO 4.2.3 and 4.2.5 and on page 14, the table is crushed. In LibO 4.3 alpha the table of the right width but the cell padding isnt retained. This was tested in Linux Mint.
Comment 1 Yousuf Philips (jay) (retired) 2014-05-09 23:22:20 UTC
Created attachment 98793 [details]
how the table looks in word 2013 and LibO 4.2
Comment 2 Jorendc 2014-05-25 19:57:54 UTC
Can not reproduce this anymore, tested using Windows 8.1 with LibreOffice 4.3.0.0 beta1 Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f

@Jay: you mind retesting :-)?

Kind regards,
Joren
Comment 3 Jorendc 2014-05-25 19:58:20 UTC
Created attachment 99794 [details]
Exported pdf using 4.3b1 windows 8.1
Comment 4 Yousuf Philips (jay) (retired) 2014-05-26 01:35:59 UTC
as stated in the summary, in libo 4.3 alpha the table is not crushed, but the cell padding is not retained. confirmed its still there in libo 4.3 beta.
Comment 5 Yousuf Philips (jay) (retired) 2014-05-26 01:39:56 UTC
Created attachment 99818 [details]
how it looks in word 2013 vs libO 4.3 beta

the 4.3 beta pdf was from Jorendc's comment 3.
Comment 6 Yousuf Philips (jay) (retired) 2014-05-26 01:42:30 UTC
are there any intentions to backport the crushed table fix to the 4.2 branch?
Comment 7 Yousuf Philips (jay) (retired) 2014-05-26 02:15:41 UTC
sorry it wasnt table spacing but the font/paragraph style. in word 2013 its set to 'Line spacing:  Multiple 1.08 li, Space After: 8 pt'.
Comment 8 Owen Genat (retired) 2014-06-29 02:18:17 UTC
This is just for information. The collapsing of the table (ISO/IEC 29500 Strict in this case) exhibits the same effect produce in bug 58079 (for Flat OPC Word 2003 XML). Confirmed. Status set to NEW. Not sure why the Severity is minor, as according to the QA flowchart it should be either major or normal - I have set it to normal.
Comment 9 Owen Genat (retired) 2014-07-13 09:22:14 UTC
Created attachment 102689 [details]
Screenshot of table in v4.3.0.2.

My prior comment (confirmation) was made using v4.2.5.2. The v4.3 series, as prior comments indicate, appears to improve rendering, but I am seeing the table run beyond the page boundary to the right using:

- Debian 7 x86_64 / v4.3.0.2 Build ID: 14ed55896fdfcb93ff437b85c4f3e1923d2b1409
- Crunchbang 11 x86_64 / v4.4.0.0.alpha0+
Build ID: 3fdd4f069d5436cf39708004af7fda8175fbc4c2
Comment 10 Yousuf Philips (jay) (retired) 2014-07-13 13:43:30 UTC
The table running over the margin is bug 78227.
Comment 11 Yousuf Philips (jay) (retired) 2014-07-13 13:52:16 UTC
But it running over the margins, doesnt happen with the docx strict attachment 98792 [details] file in 4.3.1.
Comment 12 Markus Mohrhard 2014-08-31 19:05:06 UTC
Does it also happen with OOXML transitional?
Comment 13 Yousuf Philips (jay) (retired) 2014-09-01 11:48:10 UTC
No the table spacing issue doesnt happen with the original ooxml transitional file.
Comment 14 Xisco Faulí 2015-09-09 13:01:19 UTC Comment hidden (no-value)
Comment 15 Robinson Tryon (qubit) 2015-12-13 12:18:25 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2017-01-03 19:50:24 UTC Comment hidden (obsolete)
Comment 17 Yousuf Philips (jay) (retired) 2017-09-30 16:41:10 UTC
(In reply to Xisco Faulí from comment #14)
> Created attachment 118547 [details]
> Comparison between Word 2010 (above) and  Libreoffice 5.0.1.2 (below)

The Word 2010 preview isnt correct because you havent installed the ooxml strict support for office 2010[1].

[1] https://www.microsoft.com/en-us/download/details.aspx?id=38828

So i checked the table in Word and each cell has cell margins of 0.14cm, but LO isnt picking up on this. The relevant XML code is below.

<w:tc>
 <w:tcPr>
   ...
   <w:tcMar>
     <w:top w:w="4pt" w:type="dxa" />
     <w:start w:w="4pt" w:type="dxa" />
     <w:bottom w:w="4pt" w:type="dxa" />
     <w:end w:w="4pt" w:type="dxa" />
   </w:tcMar>
   ...
 </w:tcPr>
</w:tc>

LO doesnt seem to have a problem importing the cell margins in the original docx mentioned in comment 0 when the values were like so.

<w:tcMar>
  <w:top w:w="80" w:type="dxa" />
  <w:left w:w="80" w:type="dxa" />
  <w:bottom w:w="80" w:type="dxa" />
  <w:right w:w="80" w:type="dxa" />
</w:tcMar>

Justin, Mike, Miklos: Any thoughts?
Comment 18 Justin L 2017-10-17 05:29:43 UTC
depends on bug 79272 for strict docx support.

Also requires some fixes to support _start/_end as proposed in gerrit.libreoffice.org/43432
Comment 19 Commit Notification 2017-10-26 10:22:32 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=018687837648dfe1832ddabbd4cda183708d7fdc

related tdf#78508 and n#793262: import w:tcMar_start/end

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.