Bug 77796 - FILEOPEN: DOCX - Table cell padding (defined in table style) not imported correctly
Summary: FILEOPEN: DOCX - Table cell padding (defined in table style) not imported cor...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0
Keywords: filter:docx
: 122037 (view as bug list)
Depends on:
Blocks: DOCX-Tables Writer-Tables-Style
  Show dependency treegraph
 
Reported: 2014-04-23 07:04 UTC by Yousuf Philips (jay) (retired)
Modified: 2020-01-10 11:16 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
table spacing in LibO 4.2 (73.96 KB, image/jpeg)
2014-04-23 07:04 UTC, Yousuf Philips (jay) (retired)
Details
table spacing in Word 2010 (76.34 KB, image/jpeg)
2014-04-23 07:05 UTC, Yousuf Philips (jay) (retired)
Details
pdf export word 2013 left, LibreOffice right (150.26 KB, image/png)
2014-04-26 13:20 UTC, Jorendc
Details
trimmed sample (47.29 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-10-18 20:19 UTC, Yousuf Philips (jay) (retired)
Details
tdf77796_zeropadding.docx: single cell example (25.19 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-10-19 19:18 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-04-23 07:04:22 UTC
Created attachment 97806 [details]
table spacing in LibO 4.2

I downloaded the .docx file found at < http://download.microsoft.com/documents/rus/microsoft4you/How_to_license_the_operating_system_Windows_8_new.docx > and scroll down to page 6 where the table didnt retain left spacing of 0.00cm but instead put it as -0.19cm and cell left and right padding was supposed to be loaded with 0.00cm instead of 0.19cm. This was tested in LibO 3.6 - 4.2.
Comment 1 Yousuf Philips (jay) (retired) 2014-04-23 07:05:00 UTC
Created attachment 97807 [details]
table spacing in Word 2010
Comment 2 Jorendc 2014-04-26 13:14:47 UTC
Reproducible, tested using Windows 8.1 with LibreOffice Version: 4.3.0.0.alpha1+
Build ID: f4a6837025a293312cbc43b9c527851362f11030
TinderBox: Win-x86@47-TDF, Branch:MASTER, Time: 2014-04-26_09:21:18

Kind regards,
Joren
Comment 3 Jorendc 2014-04-26 13:20:46 UTC
Created attachment 98032 [details]
pdf export word 2013 left, LibreOffice right
Comment 4 QA Administrators 2015-06-08 14:42:52 UTC Comment hidden (obsolete)
Comment 5 Yousuf Philips (jay) (retired) 2015-06-10 06:36:15 UTC
Still present.

Version: 5.1.0.0.alpha1+
Build ID: 782c116b5ac39aef27c3a00f7fc145c9f755e3a3
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-06-09_23:59:00
Comment 6 QA Administrators 2016-09-20 10:02:00 UTC Comment hidden (obsolete)
Comment 7 Yousuf Philips (jay) (retired) 2017-09-27 18:33:51 UTC
The table cell padding/margins is incorrectly imported as 0.19cm on the left and right though the 'Table Grid' style is set for it to be 0cm in /word/styles.xml.

<w:style w:type="table" w:styleId="TableGrid">
 ...
 <w:tblPr>
   <w:tblInd w:w="0" w:type="dxa" />
   <w:tblCellMar>
     <w:top w:w="0" w:type="dxa" />
     <w:left w:w="0" w:type="dxa" />
     <w:bottom w:w="0" w:type="dxa" />
     <w:right w:w="0" w:type="dxa" />
   </w:tblCellMar>
 </w:tblPr>
 ...
</w:style>
Comment 8 Justin L 2017-10-17 17:22:53 UTC
I round-tripped attachment 97806 [details] using Word 2003, and then LO had zero-padding. Can a minimal example be created/provided for debugging purposes?
Comment 9 Yousuf Philips (jay) (retired) 2017-10-18 20:19:42 UTC
Created attachment 137084 [details]
trimmed sample

(In reply to Justin L from comment #8)
> I round-tripped attachment 97806 [details] using Word 2003, and then LO had
> zero-padding. Can a minimal example be created/provided for debugging
> purposes?

Are you use you meant Word 2003? The .docx file was created in Word 2013 and the attached trimmed sample was created with Word 2010 and LO still doesnt open it correctly.
Comment 10 Justin L 2017-10-19 04:31:36 UTC
(In reply to Yousuf Philips (jay) from comment #9)
> Are you use you meant Word 2003?

2003 is the last version that I have access to a licensed copy.
Thanks for the trimmed example.
Comment 11 Justin L 2017-10-19 19:18:40 UTC
Created attachment 137123 [details]
tdf77796_zeropadding.docx: single cell example

Support for table styles is pretty new and not feature complete in LO. From what I can see, table styles are only InteropGrabBag'ed for round-tripping but not applied in docx.

void PropertyMap::insertTableProperties( const PropertyMap* )
{
#ifdef DEBUG_WRITERFILTER
    TagLogger::getInstance().element( "PropertyMap.insertTableProperties" );
#endif
}
Comment 12 Yousuf Philips (jay) (retired) 2017-10-20 17:30:06 UTC
(In reply to Justin L from comment #11)
> Support for table styles is pretty new and not feature complete in LO. From
> what I can see, table styles are only InteropGrabBag'ed for round-tripping
> but not applied in docx.

Yes docx table styles wasnt implemented in the GSoC project, and was limited to only odf table styles.
Comment 13 QA Administrators 2018-10-21 02:50:45 UTC Comment hidden (obsolete, spam)
Comment 14 Commit Notification 2020-01-07 12:51:50 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#77796 DOCX: import table style based cell padding

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 15 NISZ LibreOffice Team 2020-01-10 11:16:39 UTC
*** Bug 122037 has been marked as a duplicate of this bug. ***