Bug 126883 - HTML-Export: Tableexport with background supresses border
Summary: HTML-Export: Tableexport with background supresses border
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: HTML-Export
  Show dependency treegraph
 
Reported: 2019-08-13 14:54 UTC by Robert Großkopf
Modified: 2019-08-16 17:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Export the Writer document to html and have a look at the file with your browser. (9.75 KB, application/vnd.oasis.opendocument.text)
2019-08-13 14:54 UTC, Robert Großkopf
Details
Original saved as html from Writer - borders have gone. (6.73 KB, text/html)
2019-08-13 14:55 UTC, Robert Großkopf
Details
writer_table_as_HTML (browser) (9.46 KB, application/vnd.oasis.opendocument.text)
2019-08-14 10:37 UTC, spots4as
Details
writer_table_as_ODT (9.46 KB, application/vnd.oasis.opendocument.text)
2019-08-14 10:39 UTC, spots4as
Details
writer_table_as_HTML (9.91 KB, text/html)
2019-08-14 10:40 UTC, spots4as
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2019-08-13 14:54:51 UTC
Created attachment 153348 [details]
Export the Writer document to html and have a look at the file with your browser.

Open the attached Writer-file.
There is a table, which has been formatted by Table > AutoFormat Styles...
Export this table to html or download the exported html-file.
The borders of the table doesn't appear in the exported html-file.

Here is one line of the code:
<td width="25%" bgcolor="#00599d" style="background: #00599d" style="border-top: none; border-bottom: 1px solid #00599d; border-left: none; border-right: none; padding: 0cm" sdnum="1031;0;@"><p align="left" style="font-style: normal; text-decoration: none">

Note:
1) background is defined twice, as bgcolor and as style.
2) the definition of styles appears two times so the first style-definition destroys the second style-definition. Second style-definition won't be recognized by the browser.

Solution
1) remove style="background: #00599d"
2) remove the old bgcolor-definition and set the background-style as part of the other styles: style="border-top: none; border-bottom: 1px solid #00599d; border-left: none; border-right: none; padding: 0cm; background: #00599d;"

Note: Good CSS-definition ends every time with ";".

This bug won't appear with LO 5.1.5, first appears here with LO 5.2.7.2 and also with LO 6.3.0.4 on OpenSUSE 15 64bit rpm Linux.
Comment 1 Robert Großkopf 2019-08-13 14:55:43 UTC
Created attachment 153349 [details]
Original saved as html from Writer - borders have gone.
Comment 2 spots4as 2019-08-14 10:37:50 UTC
Created attachment 153377 [details]
writer_table_as_HTML (browser)
Comment 3 spots4as 2019-08-14 10:39:47 UTC
Created attachment 153378 [details]
writer_table_as_ODT
Comment 4 spots4as 2019-08-14 10:40:32 UTC
Created attachment 153379 [details]
writer_table_as_HTML
Comment 5 spots4as 2019-08-14 10:42:43 UTC
Problem and solution with "save as" (HTML4) without any aspects of HTML5 are little bit different from the OP. The expression "bgcolor" doesn't cause any problem here, and the (manual) solution is remove 'style="background: #......' with a texteditor using "regular expression".
Comment 6 raal 2019-08-16 17:11:02 UTC
This seems to have begun at the below commit.
Adding Cc: to Oliver Specht ; Could you possibly take a look at this one?
Thanks

7957aec5c3c634ccfbdce0f25f57da477c84e13e is the first bad commit
commit 7957aec5c3c634ccfbdce0f25f57da477c84e13e
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Dec 14 06:24:03 2017 +0100

    source sha:46fa816aa0a713c54836b9689fa7a1c9ff55ef5a

author	Oliver Specht <oliver.specht@cib.de>	2016-03-18 15:57:17 +0100
committer	Oliver Specht <oliver.specht@cib.de>	2016-03-23 13:57:16 +0000
commit	46fa816aa0a713c54836b9689fa7a1c9ff55ef5a (patch)
tree	8dad103eca59e741a51a2b761c9bfd69a24f95fc
parent	f9cf53a082f1d99b313ebd09c8791541859eac40 (diff)
tdf#63211: saving embedded images to HTML optional