Bug 142726 - Dynamic numbers in captions still have gray background when exported to HTML
Summary: Dynamic numbers in captions still have gray background when exported to HTML
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2021-06-09 04:44 UTC by Chris Y.
Modified: 2021-10-14 20:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of caption number issue. (144.67 KB, image/png)
2021-06-09 04:45 UTC, Chris Y.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Y. 2021-06-09 04:44:59 UTC
Description:
When I have a caption on a figure/table, and it has a number, the number retains its gray background from LibreOffice when you view HTML in a browser.

Steps to Reproduce:
1. Add a numbered caption to an image.
2. Save as HTML.
3. View the HTML in a web browser.

Actual Results:
The number has a gray rectangle behind it.

Expected Results:
The number should not have gray behind it.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.3.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 16; OS: Linux 5.12; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
7.1.3-2
Calc: threaded
Comment 1 Chris Y. 2021-06-09 04:45:36 UTC
Created attachment 172719 [details]
Screenshot of caption number issue.
Comment 2 [REDACTED] 2021-06-09 13:48:18 UTC
Repro

Version: 7.1.4.2 / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded


However: Deactivating option "View -> [ ] Field Shadings" eliminates the problem and produces a html file not showing a shaded number. In fact I'm not sure, whether the observed behavior is intended or this is really a bug.
Comment 3 Chris Y. 2021-06-09 14:31:09 UTC
Saving as HTML, to me, should be like exporting to PDF (without page borders) in that indicators like that should be hidden. The purpose of the gray box is to show that it's dynamic, right? But there's no such dynamic quality when it's in HTML form, it's just a span tag with a background. No metadata.
Comment 4 [REDACTED] 2021-06-09 14:39:13 UTC
(In reply to Chris Y. from comment #3)
> Saving as HTML, to me, should be like exporting to PDF (without page
> borders) in that indicators like that should be hidden. The purpose of the
> gray box is to show that it's dynamic, right? But there's no such dynamic
> quality when it's in HTML form, it's just a span tag with a background. No
> metadata.

Take my comment as a workaround.
Comment 5 Chris Y. 2021-06-09 14:56:52 UTC
Yes, that workaround does work, thank you for that.
Comment 6 Eyal Rozenberg 2021-06-15 09:11:47 UTC
(In reply to Uwe Auer from comment #2)
> In fact I'm
> not sure, whether the observed behavior is intended or this is really a bug.

Oh, it's a bug. Field shading is only to help you notice the field. You don't get when printing nor when exporting to PDF. Confirming. 

Also seeing this with

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 162f5a20095c6937030d23ee03fb8f72c51eefa1
Comment 7 Andreas Heinisch 2021-09-13 20:33:27 UTC
It does depend on the field shadings option in [1]. Imho, this behaviour is intended and it was added in [2].

[1] https://opengrok.libreoffice.org/xref/core/sw/source/filter/html/htmlfldw.cxx?r=b1668edf#555
[2] https://github.com/LibreOffice/core/commit/507ac9b8c20926de7479213cf2d890bbb5952a1d
Comment 8 Andreas Heinisch 2021-09-14 18:16:28 UTC
I would close this as NOTABUG within the next 30 days if there is no contrary opinion about it.