Bug 156093 - XHTML-Export: White background of caption will be shown as blue background
Summary: XHTML-Export: White background of caption will be shown as blue background
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.5.4.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0 target:7.5.6 target:7.6...
Keywords: bibisected, bisected, filter:html, regression
Depends on: 156155
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2023-06-29 05:51 UTC by Robert Großkopf
Modified: 2023-07-12 08:58 UTC (History)
5 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 Robert Großkopf 2023-06-29 05:51:38 UTC
Open this attachment:
https://bugs.documentfoundation.org/attachment.cgi?id=120367
(bug 95660).
Export the file to xhtml.
Ignore the image, have a look at the caption of the image.
Background will be blue - default blue of draw looks the same …

This bug appears in LO 7.5.4.2 on OpenSUSE 15.4 64bit rpm Linux.
Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

It won't appear in LO 7.5.3.2, so a regression.

Note: The image completely disappeared in LO 7.4. Also the caption will be centered, but isn't centered in *.odt-file. But this is a minor problem…
Comment 1 m_a_riosv 2023-06-30 00:49:32 UTC
Reproducible
Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f1b0aca6bf520626d3c9a1fac67cd2de2c10c78c
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 2 raal 2023-07-02 06:01:49 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.6.
Adding Cc: to Michael Stahl ; Could you possibly take a look at this one?
Thanks
 d112c01284868f60d14a5b1a8be5ba71cb0427d0 is the first bad commit
commit d112c01284868f60d14a5b1a8be5ba71cb0427d0
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon May 8 11:01:32 2023 +0200

    source e857b12dada1468cb3bdb49ed5ea636df0b6d153

151094: tdf#154989 filter: XHTML export: avoid duplicated frames | https://gerrit.libreoffice.org/c/core/+/151094
Comment 3 Svante Schubert 2023-07-03 14:06:19 UTC
Michael Stahl and I analyzed this issue.

First, we realized a different LO ODF XML issue that an attribute is missing: https://bugs.documentfoundation.org/show_bug.cgi?id=156143

We realized that there is a default graphic style in the styles.xml having a blue background (using the attribute  draw:fill-color="#729fcf").

There is no other draw:fill-color or fo:background-color defined in the document.

The caption is within a paragraph within a frame of style family graphics inherting from this default style with the background color.
Therefore the paragraph, too, inherits this color.

The XSLT filter is correct. It had enabled in this commit the feature of using draw:fill-color therefore this issue became apparent.

The problem is that the frame style (the parent frame of the caption) should have the attribute draw:fill="none" which is equivalent to transparent.

If this is set, I could fix this issue! :-)
Comment 4 Svante Schubert 2023-07-03 14:12:45 UTC
My future task is to fix the XSLT will be to realize the existence of "draw:fill" attribute in a style and mapping this to the CSS attribute background-color:transparent; which will override its ancestor background color having the blue background color.

I will start this issue as soon the issue this one depends (to be set by Michael) will be fixed!
Comment 5 Svante Schubert 2023-07-10 20:40:28 UTC
Added fix in ODF TC HTML filter, see https://github.com/oasis-tcs/odf-tc/pull/51

Merge into LO will follow..
Comment 6 Svante Schubert 2023-07-11 10:10:39 UTC
Not only the mapping had to be changed to take @draw:fill="none" into account, but also the merge of inherited styles, see style_collector.xsl within template "create-inherited-style-properties".
And in the same template finally the removal of draw:fill and draw:fill-color from the temporary global style variable to avoid duplication, after being normalized to fo:background-color during merge of style properties with inherited styles.
Comment 7 Commit Notification 2023-07-11 13:23:38 UTC
Svante Schubert committed a patch related to this issue.
It has been pushed to "master":

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

tdf#156093 filter: XHTML export: Enabled all three different ...

It will be available in 24.2.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 8 Commit Notification 2023-07-11 13:23:41 UTC
Svante Schubert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0ee798d3a4cc90629e96f0f6c780c2887ae521d0

tdf#156093 filter: XHTML export: Enabling previous test files ...

It will be available in 24.2.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 Commit Notification 2023-07-12 08:58:36 UTC
Svante Schubert committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#156093 filter: XHTML export: Enabled all three different ...

It will be available in 7.5.6.

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 10 Commit Notification 2023-07-12 08:58:39 UTC
Svante Schubert committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#156093 filter: XHTML export: Enabling previous test files ...

It will be available in 7.5.6.

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 11 Commit Notification 2023-07-12 08:58:42 UTC
Svante Schubert committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#156093 filter: XHTML export: Enabled all three different ...

It will be available in 7.6.0.2.

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 12 Commit Notification 2023-07-12 08:58:44 UTC
Svante Schubert committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/8295682360042fd75c89066bb5d90ed58869c9e0

tdf#156093 filter: XHTML export: Enabling previous test files ...

It will be available in 7.6.0.2.

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.