Bug 81277 - FILEOPEN: HTML file loads without retaining table properties
Summary: FILEOPEN: HTML file loads without retaining table properties
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: All All
: medium minor
Assignee: Caolán McNamara
URL:
Whiteboard: interoperability target:4.4.0
Keywords: notBibisectable, regression
Depends on:
Blocks: Writer-Tables HTML-Import
  Show dependency treegraph
 
Reported: 2014-07-12 22:01 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-10-22 20:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-07-12 22:01:36 UTC
While checking bug 80668, I see that with LibO 4.2 and above, the table borders and background colors are not retained for attachment 102656 [details].

How it looks in 4.1 vs 4.2 and above - attachment 102682 [details]
Comment 1 Joel Madero 2014-07-12 23:15:22 UTC
Ubuntu 14.04
LibreOffice 4.3.0.1 rc
Not bibisectable unfortunately.

Repro Steps:
1. Download attachment
2. Open Writer
3. File -> open (select your downloaded html file)

Obeserved: The borders can be seen on screen but they are empty (no color) and the borders are not black (just the outline is visible)

Expected: The color from the original html file is retained and the borders are black as seen in the image attached in the description 

Minor - can slow down professional quality work (you'd have to reapply the colors after opening the file).
Medium - regression so bumped up from low
Comment 2 Yousuf Philips (jay) (retired) 2014-07-13 15:37:21 UTC
Digging into the html code, the table border property is set to 0, but each cell has a css class equal to 'bordered', which is:

        .bordered {
            border: 1px solid #000;
            padding: 0;
        }

With the table headers that are missing a background color, the rows have the css class equal to 'bg-gray', which is:

        .bg-gray {
            background: #eee;
        }

I believe that LibO is ignoring most CSS styles defined in <style> tags and putting in standard text document styles instead of default html styles, as further illustrated with bug 81297.
Comment 3 Michael Stahl (CIB) 2014-07-22 21:54:23 UTC
the table borders are due to the same root cause in CSS import as
bug 81276 but not the cell backgrounds...
Comment 4 Michael Stahl (CIB) 2014-07-22 22:31:15 UTC
actually this is a duplicate of the other bug - the fix for it
fixes the table background too when backported to 4.2 and 4.3;
so on master there is a different regression that
affects the table background.... i vaguely remember seeing
a bug about table backgrounds on master but can't remember now...

*** This bug has been marked as a duplicate of bug 81276 ***
Comment 5 Caolán McNamara 2014-09-29 12:10:55 UTC
taking this for the cell backgrounds as seen in 4.4 series
Comment 6 Commit Notification 2014-09-29 13:32:30 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#81277 missing table cell background color in doc/html import



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 7 Robinson Tryon (qubit) 2015-12-17 10:57:25 UTC
Migrating Whiteboard tags to Keywords: (NotBibisectable)
[NinjaEdit]