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
Created attachment 172719 [details] Screenshot of caption number issue.
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.
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.
(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.
Yes, that workaround does work, thank you for that.
(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
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
I would close this as NOTABUG within the next 30 days if there is no contrary opinion about it.