Bug 143982 - FILEOPEN FILESAVE RTF: Automatic table alignment (which behaves as relative 100%) converts to absolute size on RTF import and export (comment 7)
Summary: FILEOPEN FILESAVE RTF: Automatic table alignment (which behaves as relative 1...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2021-08-20 18:36 UTC by Telesto
Modified: 2023-05-23 14:31 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (8.68 KB, application/vnd.oasis.opendocument.text)
2021-08-20 18:37 UTC, Telesto
Details
Example (simplification) (8.75 KB, application/vnd.oasis.opendocument.text)
2021-10-05 07:00 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-08-20 18:36:59 UTC
Description:
Automatic table alignment which behaves as relative converted to absolute size on DOCX 

Steps to Reproduce:
1. Open the attached file
2. Table -> Properties -> Table tab -> Notice automatic turned on
3. Drag the inner border red border to left or right (notice the embedded table adapting
4. File reload without save (there is bug which unchecks 'automatic when dragging inner border) 
5. Save as DOCX
6. File reload
7. Drag the inner border to left (notice the embedded table not adapting)

Actual Results:
Relative behaviour lost on DOC/DOCX/ RTF export

Expected Results:
Should be still present


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: f58f35b2c8ca1efbacec642a8f3de5b0c499bc6b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2021-08-20 18:37:22 UTC
Created attachment 174453 [details]
Example file
Comment 2 Telesto 2021-08-20 18:41:01 UTC
Also in
Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)

and in
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 Stéphane Guillou (stragu) 2021-08-21 09:07:53 UTC
Reproduced in:

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: da006fbe2d4c5891933390d72f6e6026b28d39fc
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-08-19_11:31:56
Calc: threaded
Comment 4 Telesto 2021-10-05 07:00:14 UTC
Created attachment 175525 [details]
Example (simplification)

1. Open the attached file
2. Table -> Properties -> Table tab -> Notice automatic alignment
3. Cancel
4. Save as DOCX
5. Table -> Properties -> Table tab -> Notice From left & relative
Comment 5 Telesto 2021-10-05 07:13:25 UTC
@Justin
Follow-up/ motivation for bug 143983 was actually this

Created attachment 175525 [details]

1. Open the attached file
2. Table -> Properties -> Table tab -> Notice automatic alignment
3. Cancel
4. Save as DOCX
5. Table -> Properties -> Table tab -> Notice From left & relative

Especially losing the relative property is annoying. This one of my personal vendetta/interest/concern/pet bugs. And no this isn't unique for DOCX. So this probably bug 144933 (or bug 107665 or bug 120505).. The likely should be stacked to one; all reports by me. It's even possible to aggregate those under bug 83536 (even older, except that one is by description limited to HTML)

New reports a mainly caused by easier to reproduce example. And me trying to demonstrate the *extend* of the problem. But well there is a lots of self-interest here.. Dropping out of relative mode has cost me lots of additional hours.
Comment 6 Justin L 2021-10-05 16:41:34 UTC
A brief code read suggests that <w:tblW w:w="0" w:type="auto"/> in DOCX means something different from automatic in SW. It sounds like auto means "the table size is just all the cell sizes added up" while in SW it means "use the full page width" which is identical to relative 100% and LEFT=0.

That suggests that we should export "auto" as relative, which shouldn't be that hard.
Comment 7 Justin L 2021-10-06 08:41:42 UTC
proposed fix for DOC and DOCX is http://gerrit.libreoffice.org/c/core/+/123128.

RTF doesn't currently round-trip relative size on tables, so I skipped it. It neither reads relative table width (created by Word), nor exports automatic/relative as relative.
Comment 8 Commit Notification 2021-10-07 05:22:03 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#143982 doc/x export: save automatic table as 100% relative

It will be available in 7.3.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 Justin L 2023-05-23 14:31:47 UTC
This bug report remains open to handle the RTF case.