Bug 79272 - FILEOPEN: Strict DOCX - Table size and position not retained
Summary: FILEOPEN: Strict DOCX - Table size and position not retained
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.5.0 release
Hardware: Other All
: medium normal
Assignee: Justin L
Whiteboard: target:6.0.0
Keywords: filter:docx
: 81938 (view as bug list)
Depends on:
Blocks: OOXML-Import-Strict DOCX-Tables 78508
  Show dependency treegraph
Reported: 2014-05-26 20:01 UTC by Luke
Modified: 2017-10-17 16:45 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:

Sample Open XML Strict Table that does not import (11.99 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-26 20:01 UTC, Luke
LibO 4.3 beta vs Word 2013 (58.21 KB, image/jpeg)
2014-05-26 22:00 UTC, Yousuf Philips (jay) (retired)
Word 2013 PDF (161.33 KB, application/pdf)
2014-05-26 22:00 UTC, Yousuf Philips (jay) (retired)
Sample Open XML Transition Table that correctly imports (12.04 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-09-05 03:40 UTC, Luke

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2014-05-26 20:01:50 UTC
Created attachment 99891 [details]
Sample Open XML Strict Table that does not import

This bug was tested LibreOffice v4.4 running in windows 7 and Linux. It appears that LibreOffice squishes tables when importing MS Open XML Strict .docx files. I have attached an example.

Steps to reproduce the bug:
1. Open attached Demo-Hayden-Management-v2StrictTable.docx document in writer 4.3+
2. Open attached Demo-Hayden-Management-v2StrictTable.docx document in Word2013 or onedrive
3. Compare the documents. 

Note that the table is compressed and unreadable.
Comment 1 Yousuf Philips (jay) (retired) 2014-05-26 21:59:39 UTC
Confirmed in Linux Mint 4.2.4 and 4.3 beta 1. The placement of the table is also off compared to word 2013. This relates to my bug 78508.
Comment 2 Yousuf Philips (jay) (retired) 2014-05-26 22:00:19 UTC
Created attachment 99903 [details]
LibO 4.3 beta vs Word 2013
Comment 3 Yousuf Philips (jay) (retired) 2014-05-26 22:00:47 UTC
Created attachment 99904 [details]
Word 2013 PDF
Comment 4 Markus Mohrhard 2014-08-31 19:05:59 UTC
Does it also happen if you save the file as OOXML transitional?
Comment 5 Luke 2014-08-31 19:18:33 UTC
@Markus Mohrhard
Yes, the original table from Office 2007 is imported perfectly. It's attachment 83023 [details] from Bug 67339. You can view the hidden part of the document by highlighting the black and orange picture elements and deleting them.
Comment 6 Luke 2014-09-05 03:40:36 UTC
Created attachment 105774 [details]
Sample Open XML Transition Table that correctly imports

If it helps, here's the same file saved transitional OOXML
Comment 7 Xisco Faulí 2015-09-07 15:09:17 UTC
This issue is still present in

Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale: es-ES (es_ES)

on Windows 7 (64-bit)
Comment 8 Robinson Tryon (qubit) 2015-12-09 18:45:04 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2017-09-29 08:49:22 UTC Comment hidden (obsolete)
Comment 10 Xisco Faulí 2017-10-03 14:51:59 UTC
Still reproducible in

Build ID: 34e8fd7e99489e9f50a512b07c6f3923b358b4d3
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 11 Yousuf Philips (jay) (retired) 2017-10-03 17:01:10 UTC
*** Bug 81938 has been marked as a duplicate of this bug. ***
Comment 12 Yousuf Philips (jay) (retired) 2017-10-03 17:09:31 UTC
How transitional set the size

<w:tblW w:w="4311" w:type="dxa" />

How strict set the size

<w:tblW w:w="215.55pt" w:type="dxa" />

strict sets sizes in pt and LO needs to be able to deal with these values, as i'm assuming its thinking its the value with the ending 'pt' and this is what causes the problem. another example - bug 78508
Comment 13 Justin L 2017-10-14 15:38:29 UTC
proposed fix: https://gerrit.libreoffice.org/43384

This fixes the tables in 
-the description's attachment 99891 [details]
-duplicate bug 81938 description's  attachment 103714 [details]
-duplicate bug 81938 comment 8's attachment 103836 [details]
Comment 14 Commit Notification 2017-10-17 16:37:00 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":


tdf#79272 ooxmlimport: support strict dxa tblWidth

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:

Affected users are encouraged to test the fix and report feedback.
Comment 15 Justin L 2017-10-17 16:45:31 UTC
No plans to backport because it is based on other changes made in 6.0 for bug 109306 by commit 8c7c72c8f8a1c8c09ee7cd4f413611c456f336b2.