Bug 141925 - Table of Contents Doesn't Put in Blank Numbered Items Generated via Chapter Numbering
Summary: Table of Contents Doesn't Put in Blank Numbered Items Generated via Chapter N...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
Keywords: preBibisect
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
Reported: 2021-04-27 08:33 UTC by Farhood
Modified: 2022-08-20 04:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:

141925_emptyParaTocEntries.odt: custom style auto-creates Chapter heading (10.85 KB, application/vnd.oasis.opendocument.text)
2021-05-01 08:20 UTC, Justin L
141925_emptyParaTocEntriesB.odt: a counter-example (12.34 KB, application/vnd.oasis.opendocument.text)
2021-05-01 08:35 UTC, Justin L

Note You need to log in before you can comment on or make changes to this bug.
Description Farhood 2021-04-27 08:33:49 UTC
The Title is pretty self-explanatory but the gist is that.

Assume I have generated a bunch of chapter headers, sub headers and so on.

I'm using chapter numbering to number these. I use a prefix like "Chapter" for my level 1 outlines. Use something like "Subchapter" for level 2 and so on.

When each chapter line is generated, if they are left empty (like It has generated "Chapter 2:") and you go to the next line, then the ToC will not respect these while generating.

Currently you have to manually go the each chapter number generated, and type some spaces for ToC to recognize it. It's also very weird because the Navigator component can see all your chapters with ease.

Steps to Reproduce:
1.Create chapter numbering schemes with a specified prefix
2.Leave them empty (don't type anything infront of them)
3.Create a ToC.

Actual Results:
It creates an empty ToC.

Expected Results:
It should not create an empty ToC.

Reproducible: Always

User Profile Reset: Yes

OpenGL enabled: Yes

Additional Info:
Version: / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.1.2~rc2-0ubuntu0.20.04.1~lo3
Calc: threaded
Comment 1 Justin L 2021-05-01 08:16:08 UTC
repro 7.2+, and already happened in bibisect43all at LO 3.5. Assume inherited.

It seems to me like this is a feature. If there are outline items with no content, then I could easily see why they would be undesirable in a TOC. Otherwise a lot of empty lines could show up in the TOC.
Comment 2 Justin L 2021-05-01 08:20:07 UTC
Created attachment 171553 [details]
141925_emptyParaTocEntries.odt: custom style auto-creates Chapter heading

P.S. This has nothing to do directly with chapter numbering. Any style specifying an outline level and containing numbering can demonstrate the suggestion.
Comment 3 Justin L 2021-05-01 08:35:35 UTC
Created attachment 171554 [details]
141925_emptyParaTocEntriesB.odt: a counter-example

Insert a TOC in this document, and it will simulate what could happen to documents if OP's suggestion is followed.

There are some compatibility issues at stake here as well.

My take on the issue is that you design your documents based on what the program provides. Rarely would chapter numbering be so fluid that it requires numbering to handle it. Rarely are empty numberings deployed.  (In fact, pressing "Enter" after one of these REMOVES it.)

Based on the difficulty in actually implementing empty-paragraph-numbering, update-TOC compatibility concerns, and a potential argument from the opposite side, I suggest WONTFIX.
Comment 4 Justin L 2021-05-01 12:35:06 UTC
see bug 70756 which indicates some empty paragraphs accidentally get OutlineLevel set to one on them. I'd say that strengthens my WONTFIX argument.
Comment 5 Dieter 2022-08-20 04:27:31 UTC
I think the problem is indierctly covered by 149282. There was the decision NOTABUG. Sounds reasonable for me.