Bug 31379 - wrong headline number in table of contents (TOC) for specific file
Summary: wrong headline number in table of contents (TOC) for specific file
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2010-11-04 04:56 UTC by Samuel V.
Modified: 2017-09-29 08:54 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example for the Bug (22.83 KB, application/vnd.oasis.opendocument.text)
2010-11-09 05:49 UTC, Samuel V.
Details
TOC Example (22.62 KB, application/vnd.oasis.opendocument.text)
2012-06-03 03:59 UTC, rojanu
Details
Another example of the TOC bug (10.63 KB, application/vnd.oasis.opendocument.text)
2017-03-03 01:21 UTC, madduck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel V. 2010-11-04 04:56:35 UTC
If I create a table of contents before the first headline when the contents of the table are not taken from the capital-numbering, but from other templates, the table of contents starts with #2, not one.
Maybe it's better, to show you the file and hope, you can reproduce this bug.
Find the file attached and have a look at the second line in the table of contents. (number should be §2)
Sry for my bad english, I can't describe this bug better :(
Comment 1 Samuel V. 2010-11-04 04:59:27 UTC
edit: the number of the second line in the table of contents on my pc is 2, but should be 1.... Describes this situation better.
But maybe, you get a correct number in the second line in the table of contents
Greetings
Sam
Comment 2 Samuel V. 2010-11-09 05:49:13 UTC
Created attachment 40146 [details]
Example for the Bug

You can see the problem in the table of contents. The first headline "Allgemeines" has number "B". But in the document it's number "A"
This headline doesn't belong to the outline of the document. It's only some kind of parting the document in smaller pieces for better looking.
But I said, the table of contents shall contain it by "create table of contents from outline -> yes" and "create table of contents from other templates -> yes".
Maybe this is a little more helpful.
Comment 3 Petr Mladek 2010-11-12 11:52:13 UTC
I see the problem as well. The document is a bit strange:

1. "View/Navigator" does not list (A), (B), ... entries as headings.
2. "Tools/Outline Numbering..." has the paragraph style "Heading 2" for
   the level "1"

I am not Writer expert but I think that the above settings affect the table of content generation. I do not understand how it was supposed to work.

Anyway, I was not able to fix it by modifying "Tools/Outline Numbering..."

Cedric, it might be for you.
Comment 4 Samuel V. 2011-01-22 18:56:43 UTC
Are there some news about this bug? If it's helpful to explain the (wished/requested) outline of the document, I would welcome the chance, to explain it, if there are some questions. Didn't tested the document with actual RC, so maybe the bug is also fixed.
But I was just clearing up my pc, and stumbled over the example file for the bug.. So let me know, if I can help, or test something...

Best regards,
Samuel
Comment 5 Roman Eisele 2012-05-03 04:37:07 UTC
This is a Writer bug, right? Therefore changed 'Component'.
Comment 6 rojanu 2012-06-03 03:59:30 UTC
Created attachment 62443 [details]
TOC Example

I have hit the same bug on Ubuntu 12.04 LibreOffice 3.5.3.2
Comment 7 Roman Eisele 2012-06-04 02:37:38 UTC
If comment #6 is right, this is a cross-platform bug, therefore changed the Platform field accordingly.
Comment 8 Roman Eisele 2012-07-21 15:14:09 UTC
Still REPRODUCIBLE with both sample documents and LibreOffice 3.5.5.3 (Build-ID: 7122e39-92ed229-498d286-15e43b4-d70da21), German langpack installed, on MacOS X 10.6.8 (Intel).
Comment 9 Samuel V. 2013-03-10 23:44:29 UTC
Still REPRODUCIBLE with LibreOffice 4.0.1.2 (Build ID: 84102822e3d61eb989ddd325abf1ac077904985) on Windows 7 x64
Comment 10 bfoman (inactive) 2013-07-24 12:04:51 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2014-10-23 17:32:03 UTC Comment hidden (obsolete)
Comment 12 Nicholas K. 2015-02-07 16:40:32 UTC
LibreOffice 4.4.0.3 has this bug on Fedora 21 x86_64.
Comment 13 Jean-Baptiste Faure 2015-02-21 18:42:20 UTC
The first attachment comes from the conversion of a MS-Word file (numbering style named WW8Num1). It would be interesting to know if you can reproduce the problem from a completely empty .odt file from the default template.
I think there is a mismatch between chapters numbering and adding a numbering to heading and text body styles.

Best regards. JBF
Comment 14 Matthew Francis 2015-04-06 12:46:26 UTC
Occurs back to OOo / LO 3.3.0

-> Version: Inherited from OOo
Comment 15 QA Administrators 2017-01-03 19:36:48 UTC Comment hidden (obsolete)
Comment 16 Zineta 2017-02-06 11:29:38 UTC
Still exist.
In TOC_Example document, only if place TOC in the end of the document 
numbering in TOC is ok (or anywhere after  1. Terms of References).

Version: 5.4.0.0.alpha0+
Build ID: a296a69c984b17cfbcd249cf6bdc191d08dff2a6
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-02-06_00:00:55
Locale: bs-BA (bs_BA); Calc: group
Comment 17 Timur 2017-02-06 15:31:06 UTC
(In reply to Jean-Baptiste Faure from comment #13)
> The first attachment comes from the conversion of a MS-Word file (numbering
> style named WW8Num1). 

If this is true, than this whole bug is not properly reported nor triaged. 
Exact steps are required to reproduce the issue. If the document was "converted" from MS-Word file, than the source file should be attached, with the steps and LO version used to convert it. 
Otherwise, this bug may stay open for a long time, without any real chance to be fixed. 
I don's see who confirmed the bug, but questions are not answered. So I'll revert this one to Needinfo. 
Please provide the answers and set back to Unconfirmed. 
If this can be reproduced from empty .odt file, without conversion, that's even better, but that should be clean new bug.
Comment 18 Zineta 2017-02-09 13:31:30 UTC
More observation in the example given for TOC bug: 
turn on navigation and the first address is:
A) allgemeines (after mark it as Heading1)
But when after the title on the first page vom TODO: Date
I press two times enter appears A) 
and the navigation can be seen that the first title now B)
After another ENTER  A) in this text is lost, the title to the navigation returns to A)but most likely remain as such continues to TOC.
Comment 19 madduck 2017-03-03 01:21:42 UTC
Created attachment 131590 [details]
Another example of the TOC bug
Comment 20 madduck 2017-03-03 01:22:14 UTC
I can add some information to this, because I think I have encountered the same bug in a different setting.

My problem seems to relate to (ab)using outline numbering to number
paragraphs, i.e. Level 1 is Heading 1, but Level 2 is associated
with the Text body style, which I do in order to get the chapter number into the individual paragraph numberings.

Example document is being attached.

Even though there are no instances of either Heading 1 or Text body
before the first header, this seems to throw off display of the TOC, which starts at § 2.

Do note that if you hover over the TOC, the correct link text is displayed.

Also, as the original poster said, this is only a problem if the TOC appears before the first instance of Heading 1.
Comment 21 madduck 2017-03-03 01:23:48 UTC
The file I just attached is a native ODT I created just to reproduce this bug, so it seems to be independent from the Word conversion.
Comment 22 Philip Jackson 2017-03-03 17:15:07 UTC
I can confirm the behavior listed in Comment 20 from creating a new file in Writer 5.1.4.2 using just H1's and Text body paras with H1 assigned to Level 1 numbering and Text Body style assigned to Level2 numbering so that each paragraph is numbered and picks up the Chapter number.

If an empty text paragraph is positioned between the ToC and the Document text/headings, then the ToC displays correctly.
Comment 23 madduck 2017-03-03 19:35:11 UTC
Philip also found out that the paragraph between ToC and the first heading needs to be (a) of style "Text body" (i.e. outline-numbered in the way we use outline numbering to number paragraphs), and (b) numbering needs to be turned off with F12 for this paragraph. If both (a) and (b) are in place, then the ToC displays correctly.

The discussion is here: https://www.mail-archive.com/users@global.libreoffice.org/msg51172.html
Comment 24 QA Administrators 2017-08-30 19:27:34 UTC Comment hidden (obsolete)
Comment 25 QA Administrators 2017-09-29 08:54:34 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20170929