Bug 66312 - FILESAVE: section numbers sometimes skipped in XHTML export
Summary: FILESAVE: section numbers sometimes skipped in XHTML export
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2013-06-28 10:06 UTC by callow.mark
Modified: 2021-05-18 12:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
.odt whose export shows the errant section numbering (140.69 KB, application/vnd.oasis.opendocument.text)
2013-06-28 10:07 UTC, callow.mark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description callow.mark 2013-06-28 10:06:36 UTC
Section numbers are sometimes skipped in the XHTML export. In the document fragment I will attach soon, section numbering jumps from section 1.2 to 1.4 in the exported file. The original .odt file has sequential sections 1.1 to 1.5.

In the original document this was section 8 and the document had a table of contents. In the table of contents the section numbers progressed correctly (8.1, 8.2, 8.3, 8.4, etc) and the links from the ToC went to the right contents. But the content that was really section 8.3 was labelled 8.4 just as in the sample fragment.

Whatever is incrementing the section number during export is somehow being called more times than it should be.
Comment 1 callow.mark 2013-06-28 10:07:49 UTC
Created attachment 81633 [details]
.odt whose export shows the errant section numbering
Comment 2 Julien Nabet 2013-06-29 18:49:40 UTC
On pc Debian x86-64 with master sources updated today, I reproduced the problem.
However, I quickly created a very simple document with some headings and numbering and I don't reproduce the problem with it.

The problem could be on the document. Moreover, I noticed this trace on console:
warn:xmloff:1909:1:xmloff/source/style/xmlstyle.cxx:349: Here is a duplicate Style

During XHTML/HTML export, I had these logs:
warn:legacy.osl:1909:1:sw/source/filter/xml/xmltble.cxx:1013:
1) SwXMLExport::ExportTableLines: table columns infos are unsorted
2) Accessibility Warning:
No alternate text ('svg:title' element) set for
 image '
3) warn:legacy.osl:1909:1:sw/source/filter/xml/xmlexp.cxx:318: there are table columns infos left
Comment 3 callow.mark 2013-07-01 01:44:23 UTC
Given that the source document had 7 preceding sections where the problem did not arise, it is pretty clear the issue relates to something specific about the fragment I included in the attachment. In the full section 8 of the document the problem occurs several times. I only included the first instance to keep things simple.

It seems unlikely that existence of a duplicate style would be the trigger for the bug. For one thing, I don't think the original document has any styles specific to section 8, though I could be wrong.
Comment 4 callow.mark 2013-07-05 03:38:13 UTC
(In reply to comment #3)
> Given that the source document had 7 preceding sections where the problem
> did not arise, it is pretty clear the issue relates to something specific
> about the fragment I included in the attachment.
Since the bug is confirmed in comment #2, I think the status should be changed to NEW so I am doing so. Although the issue seems specific to something about this document fragment, the fact that the .xhtml export result differs from the original document and from the .pdf export, points to a bug in the export code rather than something that should be fixed in the document.
Comment 5 QA Administrators 2015-04-01 14:39:57 UTC Comment hidden (obsolete)
Comment 6 Buovjaga 2015-04-19 13:45:56 UTC
Reproduced still.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha0+ (x64)
Build ID: 211c12b9c64facd1c12f637a5229bd6a6feb032a
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-18_01:51:17
Locale: fi_FI

Ubuntu 14.10 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 7 QA Administrators 2016-09-20 09:31:52 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2019-12-03 14:10:53 UTC Comment hidden (obsolete)
Comment 9 Michael Warner 2021-05-18 12:47:06 UTC
No repro in:
Version: 7.1.3.2 (x64) / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 6; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

However, it does have a problem where there is no space between the section number and section title, but that is a subject for a different bug report.