Bug 55528 - FILESAVE: 100% table width not saved in doc file as relative
Summary: FILESAVE: 100% table width not saved in doc file as relative
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.0.0
Keywords: filter:doc
Depends on:
Blocks: DOC-Limitations DOC-Tables
  Show dependency treegraph
 
Reported: 2012-10-02 08:57 UTC by Markus Ilmola
Modified: 2017-10-20 12:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
autoWidth_table.doc: created in MSO 2003 with 98% table width (24.00 KB, application/msword)
2017-09-15 01:07 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Ilmola 2012-10-02 08:57:34 UTC
Create a new text document and add a table. Set table aligment to left and width to 100% (relative). Save as Word 97/2000/XP/2004 doc -file. Close the file and reopen it. Check the table width and it's been converted to 17,00cm (non relative).
Comment 1 A (Andy) 2013-03-01 22:17:13 UTC
Reproducible with LO 4.0.0.3 (Win7 Home, 64bit), but I am not sure if this really a bug.
Can anybody else confirm this and verify that this is a bug?
Comment 2 Jorendc 2013-06-01 00:10:11 UTC
I can confirm this behavior too using Linux Mint 15 x64 with LibreOffice 4.0.3.3. Therefore marking it as NEW.
Comment 3 A (Andy) 2015-03-07 20:36:18 UTC
Reproducible with LO 4.4.1.2, Win 8.1
Comment 4 tommy27 2016-04-16 07:25:17 UTC Comment hidden (obsolete)
Comment 5 Telesto 2017-06-11 12:19:58 UTC
Repro with
Version: 5.5.0.0.alpha0+
Build ID: 076ed447f694239d5c67adee528ea6e471d909ff
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-06-09_23:54:20
Locale: nl-NL (nl_NL); Calc: CL
Comment 6 Justin L 2017-09-15 01:07:36 UTC
Created attachment 136252 [details]
autoWidth_table.doc: created in MSO 2003 with 98% table width

In MSO2003, the table width is set with "Preferred Width" being undefined, or set to 0.  In DOCX, this shows up as <w:tblW w:w="0" w:type="auto"/>.

So, relative widths definitely are supported in .doc and .docx.  In LO, docx seems to round-trip OK, but .doc doesn't export/import with the correct relative size, indent.  Confirmed with LO6.0dev.
Comment 7 Justin L 2017-09-15 01:24:45 UTC
(In reply to Justin L from comment #6)
> In MSO2003, the table width is set with "Preferred Width" being undefined,
> or set to 0.  In DOCX, this shows up as <w:tblW w:w="0" w:type="auto"/>.

Type=auto was for 100%.  For 98% it shows up as
<w:tblW w:w="4900" w:type="pct"/>
where width is measured as ST_TblWidth "pct (Width in Fiftieths of a Percent)"
Comment 8 Justin L 2017-09-28 18:16:30 UTC
proposed fixes:
https://gerrit.libreoffice.org/42918 - import table width percent
https://gerrit.libreoffice.org/42919 - export table width percent
Comment 9 Commit Notification 2017-10-11 17:43:49 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#55528 ww8import: import table width percent

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.
Comment 10 Commit Notification 2017-10-20 11:21:49 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=889547390ceeb8b5474f4a6245c07120e513da3f

tdf#55528 ww8export: export table width percent

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.