Bug 83536 - Exports fixed with tables to HTML even when size is relative.
Summary: Exports fixed with tables to HTML even when size is relative.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2014-09-05 16:19 UTC by dE
Modified: 2023-10-06 13:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Original document includes table with relative width (8.87 KB, application/vnd.oasis.opendocument.text)
2021-05-18 07:03 UTC, Stéphane Guillou (stragu)
Details
Exported XHTML with LO 7.2 Alpha0 (4.97 KB, text/html)
2021-05-18 07:03 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dE 2014-09-05 16:19:58 UTC
Export the attached document (basically a new LO document with a table with relative width set to 100%) to HTML, and see the table with fixed width in a browser (zoom in, zoom out, width doesn't change).

Doing a save-as to HTML exports it correctly.
Comment 1 Buovjaga 2014-11-13 13:14:35 UTC
Reproduced.

From help:
Table - Table Properties - Table.
Enter the width of the table. This check box is only available if the Automatic option in the Alignment area is not selected.
Checked the Relative box.

The output is different between the xhtml export and html save as.
Xhtml export has td style="text-align:left;width:8.5cm; "
Html save as has td width="50%"

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Comment 2 QA Administrators 2015-12-20 16:06:32 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2017-01-03 19:46:08 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2019-12-03 14:20:26 UTC Comment hidden (obsolete)
Comment 5 Stéphane Guillou (stragu) 2021-05-18 07:03:10 UTC
Created attachment 172109 [details]
Original document includes table with relative width

Confirmed in current 7.2 Alpha.

Steps to reproduce:

1. Create new table
2. Select whole table
3. Table > Properties > Table > Alignment: Left
4. Tick "Relative" next to "Width"
5. Set Width to 50%
6. File > Export > XHTML

Or with example ODT attachment, open and export to XHTML.

Source code does contain "width="50%"" in the table tag, but something must be overwriting it.

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 6b09276d157abada74e1a4989700139167207778
CPU threads: 8; OS: Linux 4.15; 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-05-14_04:32:30
Calc: threaded
Comment 6 Stéphane Guillou (stragu) 2021-05-18 07:03:48 UTC
Created attachment 172110 [details]
Exported XHTML with LO 7.2 Alpha0
Comment 7 QA Administrators 2023-10-06 03:20:03 UTC Comment hidden (obsolete)
Comment 8 Stéphane Guillou (stragu) 2023-10-06 13:14:54 UTC
Still reproduced in recent trunk build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f95c3994f0b6a82a3bc2ddfb68822b74479ae185
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

With attachment 172110 [details], issue is that, even though it has the parameter width="50%", the table uses class="table-Table1" which has fixed width in <style>:

    .table-Table1{ width:8.5cm; margin-left:0px; margin-right:auto;}