Bug 60882 - Bulleted list not exported as XHTML ul list and not saved as HTML ul list
Summary: Bulleted list not exported as XHTML ul list and not saved as HTML ul list
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2013-02-15 09:24 UTC by isaric
Modified: 2023-05-08 19:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
export (30.91 KB, application/vnd.oasis.opendocument.text)
2013-02-15 09:24 UTC, isaric
Details
Bulleted list saved as & exported as html (1.90 KB, application/x-zip-compressed)
2015-04-16 17:52 UTC, Buovjaga
Details
XHTML export of original document with LO 7.2 alpha (28.39 KB, text/html)
2021-05-18 05:20 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description isaric 2013-02-15 09:24:13 UTC
Created attachment 74861 [details]
export

I am French, but I do not know if I identify problems with libreoffice already the object of bugs

I am having problems with:
Point A)
The conversion file XHTM a problem with bullets :
Point B)
Made between the
File > Save As > choose the format : Document HTML (writer)
and
File > Export… > xhtml 
different
http://isaric.cof.free.fr/LibO/CaptureNbP-odthtml2%20du%202013-02-07%2014:38:30.png 

File > Save As : preserves well the "footnote" setting, but not the layout as the left margin.
File > Export… > xhtml : does not retain "footnote" setting, but the layout is much closer to the original.

(original File odt : http://isaric.cof.free.fr/LibO/Test-note%20de%20bas%20page.odt) 
	(Fichier original odt : http://isaric.cof.free.fr/LibO/Test-note%20de%20bas%20page.odt) 

Point C)
Note "nbp1" “footnote" offset of the first row at the end of page xhtml export

Point D)
Numbers are to beon titles

Point E)
Highlighting (1 and 3) is different in xhtml


Résult : http://isaric.cof.free.fr/LibO/T15-02.html
Comment 1 isaric 2013-02-23 08:58:19 UTC
Identical problem with LibreOffice_4.0.1.1_Linux_x86-64_deb
Comment 2 Buovjaga 2015-04-16 17:52:15 UTC
Created attachment 114836 [details]
Bulleted list saved as & exported as html

I confirm the problems & inconsistensies when using attachment 74861 [details] to save & export as html.

I also created a new document, turned on Footnote style and created a bulleted list exactly like in the attachment. The results are wildly different and can be examined by downloading this attachment.

Win 7 Pro 64-bit, Version: 4.4.2.2
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Locale: fi_FI
Comment 3 tommy27 2016-04-16 07:28:31 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2017-05-22 13:26:35 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2019-12-03 14:09:26 UTC Comment hidden (obsolete)
Comment 6 isaric 2019-12-05 12:31:36 UTC
I just tried with :
Version: 6.3.3.2.0+
Build ID: libreoffice-6.3.3.2-snap1

There has been no change
cordially
Comment 7 Stéphane Guillou (stragu) 2021-05-18 05:20:47 UTC
Created attachment 172107 [details]
XHTML export of original document with LO 7.2 alpha

Hi all

I am trying to check this one with the latest 7.2 alpha.

See attachment of the XHTML export (tested with Firefox 88.0.1 on Ubuntu 18.04).

A) The bullet list text overlapping with the bullets is still a problem, but I can now see an indentation for the 3rd and 4th element;

B) I am not sure what is meant by "does not retain the footnote setting"? Is it that is is displayed as a superscript? If that's the case, the issue remains.

C) The problem of the indentation of the first footnote remains;

D) There are 5 headings of level 1. In the original document, "Point A)" and "Titre a" headings have respectively the numbering 1 and 2, but in the output, the final heading has the number 3 instead.

E) The highlighting is the same height for all three highlighted lines, but it spans the whole line for "surlignage 1" and "surlignage 3", which is different to the original document.

I believe that new, specific bug reports should be created for each one of the issues, and this bug report be closed afterwards. This bug report is too wide-ranging and is unlikely to be all fixed in one go, so everyone would benefit from more targeted bug reports.

Isaric, to make sure we are looking at the actual issues you were referring to, would you be able to:

* Test the issues with a recent version of LibreOffice
* Create a new bug report for each issue, with an example document that is minimal and only looks at the corresponding issue

LibreOffice version:

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 6b09276d157abada74e1a4989700139167207778
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-05-14_04:32:30
Calc: threaded
Comment 8 Stéphane Guillou (stragu) 2021-05-18 06:13:32 UTC
Note that, using the same version 7.2 as quoted in previous comment, I can rename the file with the ".xhtml" extension instead of the default ".html" extension, open in Firefox, and the point C) is fixed.

Wondering if LibreOffice should name the file with the more specific ".xhtml" when exporting to XHTML? It would also avoid overwriting the same file saved as HTML in the same directory.
Comment 9 Christophe Strobbe 2022-05-16 18:29:08 UTC
I looked at this with LibreOffice 7.1.4.2:
Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.5; UI render: default; VCL: kf5
Locale: en-GB (en_GB.utf8); UI: en-GB
Calc: threaded

In isaric's original ODF file, the list below Point A is formatted using a Footnote style, which is not to be recommended.

LibreOffice currently behaves as follows:

1. When you create a bulleted list using the "Bulleted List" button on the formatting toolbar, LibreOffice generates a <text:list> element for the list and one <text:list-item> for each list item in the ODF's XML code. This results in <ul> element with <li> elements, both when saving as HTML and when exporting to XHTML. This works in the way it should.
2. When you create a list using only the List 1 style, for example, and don't define a numbering style, LibreOffice generates one <text:p> element per list item, i.e. there is no list structure in the ODF's XML code. This is probably why no ul elements are created when saving as HTML or exporting as XHTML. 
3. When you create a list using only the List 1 style, for example, and then either edit the style to define a list style or select the entire list and press the "Bulleted List" button, LibreOffice generates <text:list> element for the list and one <text:list-item> for each list item in the ODF's XML code. This results in <ul> element with <li> elements, both when saving as HTML and when exporting to XHTML. This works in the way it should.

I doubt that LibreOffice's behaviour in the second case (no <text:list> element) is correct. However, most authors will apply a list style to their lists and thereby also get correct bullet lists in the exported HTML and XHTML.

Based on this, I think we can focus this issue on just spacing of the footnotes? (That would mean we should retitle this bug again.)