Bug 114773 - TOC: Remove additional space after chapter number in ToC
Summary: TOC: Remove additional space after chapter number in ToC
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 115060 (view as bug list)
Depends on:
Blocks: TableofContents-Indexes Chapter-Numbering
  Show dependency treegraph
 
Reported: 2017-12-30 20:44 UTC by Thomas Lendo
Modified: 2019-04-27 22:24 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lendo 2017-12-30 20:44:29 UTC
See attachment 132787 [details].

In 5.3.1 an additional space after the chapter number in a Table of Content was introduced. You can test it with attachment 132787 [details] of bug 44282.

Illustration and table indexes are not affected.
5.3.0 wasn't affected. 5.3.2 and later versions are also affected.

Steps to reproduce:
1. Open the mentioned Writer file.
2. Update the table of indexes.

Actual result:
2.1 Heading level 2 ................. 2 -1

Expected result:
2.1 Heading level 2 ................. 2-1
Comment 1 Dieter Praas 2017-12-31 12:01:43 UTC
I confirm it with

Version: 6.0.0.1 (x64)
Build ID: d2bec56d7865f05a1003dc88449f2b0fdd85309a
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: de-DE (de_DE); Calc: CL


The difference between TOC and illustration and table index is, that the entry is different:
TOC: Chapter No.
Table index: Chapter Info
Comment 2 Cor Nouws 2018-01-03 16:54:56 UTC
(In reply to Thomas Lendo from comment #0)

Have you tested it with a different locale?
The problem does not appear in my LibreOffice.
Comment 3 Thomas Lendo 2018-01-03 21:21:02 UTC
Weird. I tested it with English and German locale and a new profile. No difference.

Version: 6.1.0.0.alpha0+
Build ID: 38f5e768b0f858f8f990a8f297396821c75d45dc
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-12-29_01:09:09
Locale: de-DE (de_DE.UTF-8); Calc: group threaded
Comment 4 Thomas Lendo 2018-01-18 20:03:14 UTC
*** Bug 115060 has been marked as a duplicate of this bug. ***
Comment 5 raal 2018-01-22 11:46:50 UTC
bbisect
5f1ebf0563dfa376c8ff949fce15616c8a29f41f is the first bad commit
commit 5f1ebf0563dfa376c8ff949fce15616c8a29f41f
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Feb 15 17:20:50 2017 -0800

    source sha:dc8ebf205c3231ffc4d6737b53cee396c2ac0bfd

    source sha:dc8ebf205c3231ffc4d6737b53cee396c2ac0bfd
	
author	Xisco Fauli <anistenis@gmail.com>	2017-02-15 11:06:00 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-02-15 11:33:56 +0000
commit	dc8ebf205c3231ffc4d6737b53cee396c2ac0bfd (patch)
tree	10fb4e9a4d6bb474f4dd0144354df612d33ba38c
parent	54c0b9977a6421ecb7383fa48636075c6ca9967e (diff)
tdf#104315: Revert "tdf#44282 fix missing space...
... for numbered lists in TOC"

This commit is causing lot of regressions in TOC.
Besides, as the comment says, it's an ugly hack,
so I'd prefer to revert it and find a better solution
Comment 6 Xisco Faulí 2018-01-22 12:13:06 UTC
The bisection in comment 5 is not correct, as the commit mentioned only reverts a previous commit.

Regression introduced by:

author	Abhilash Singh <abhilash300singh@gmail.com>	2016-07-22 11:48:45 +0530
committer	jan iversen <jani@documentfoundation.org>	2016-08-16 06:26:04 +0000
commit	ce95e39f8e952159844e9dc04a1df402bb103634 (patch)
tree	dc419e5a1cb976ceab9867bd0b20612c8f8cf199
parent	989e8bc0d792f0dc5778746fac45de129a22d7ac (diff)
tdf#44282 fix missing space for numbered lists in TOC

Bisected with: Abhilash Singh

Adding Cc: to bibisect-linux-64-5.3
Comment 7 Yvan Rose 2018-02-17 15:03:24 UTC Comment hidden (no-value)
Comment 8 Yvan Rose 2018-04-09 13:58:40 UTC Comment hidden (no-value)
Comment 9 Timur 2018-07-31 09:17:46 UTC
Additional space is ugly. 
I think proper solution is tab stop in Bug 32360.

Actual result (space is tied to chapter number):
2.1(space)Heading level 2 ................. 2(space)-1
Expected result (tab is entry in ToC structure):
2.1(tab)Heading level 2 ................. 2-1
Comment 10 Yvan Rose 2018-09-04 22:52:17 UTC
I just did some testing using LO 6.0.6.2, to no avail: that pesky space keeps coming up. As I mention in related posts, the culprit was introduced in LO 5.3, while 5.2.7 was perfectly functional. I am hoping to revive this issue, so someone competent can address it, for everyone's benefit. Thank you very much!
Comment 11 Cor Nouws 2018-09-07 15:55:49 UTC Comment hidden (obsolete)
Comment 12 Yvan Rose 2018-09-07 16:22:10 UTC
(In reply to Cor Nouws from comment #11)
> @thomas: as far as I see, the space only is added after the second chapter
> number in the line, and only added once, not repeatedly?
> So update summary of this issue?

The extra space always appears between the automatic number generated by Writer (as set by list or outline/chapter numbering) and the author-entered contents that follows. So if you have the punctuation input automatically by Writer, the extra space appears after that punctuation (e.g. "2.  blahblah" > note that there are two spaces before blahblah); if you have the punctuation entered by the document's author, then the extra space appears before that punctuation (e.g. "2 . blahblah").

Does this clarify the issue?
Comment 13 Thomas Lendo 2018-09-07 17:37:28 UTC
(In reply to Cor Nouws from comment #11)
> @thomas: as far as I see, the space only is added after the second chapter
> number in the line, and only added once, not repeatedly?
> So update summary of this issue?
For, I see this extra space in every TOC line, not only once and not only after the second chapter. Therefore the summary is still valid.
Comment 14 Yvan Rose 2019-01-13 14:12:12 UTC Comment hidden (no-value)
Comment 15 Yvan Rose 2019-04-04 12:08:16 UTC
I just did some check with LO 6.2.2.2. The same problem is there.
Comment 16 Julius Becker 2019-04-27 14:38:09 UTC
In LO 6.2.3.2, this "bug" persists.

I do understand why the space after chapter number (E#) is default, but it should be possible to remove it. My document has three parts and every part has it's own paging. Due to the default space, it looks (A -1, A -2, ..., B -1, B -2, ..., C -1, C -2) not the way I want it to look (A-1, A-2, ..., B-1, B-2, ..., C-1, C-2).
Comment 17 Cor Nouws 2019-04-27 18:57:15 UTC
(In reply to Cor Nouws from comment #2)
> (In reply to Thomas Lendo from comment #0)
> 
> Have you tested it with a different locale?
> The problem does not appear in my LibreOffice.

I see it now too in my version. Maybe I made a mistake first. Sorry in that case.
Comment 18 Cor Nouws 2019-04-27 19:24:43 UTC
Patch introducing the problem is this one
  https://cgit.freedesktop.org/libreoffice/core/commit/?id=ce95e39f8e952159844e9dc04a1df402bb103634

Note: before that patch, there was no space between the chapter number and the chapter text. Which is annoying and much more prevalent than the example of this bug. It was a problem in OOo already (and is in AOO)
See bug 44282

File with the code is here
  https://opengrok.libreoffice.org/xref/core/sw/source/core/tox/ToxTextGenerator.cxx?r=80cedb5d
Comment 19 Yvan Rose 2019-04-27 22:24:34 UTC
This issue was introduced with version 5.3 of LO. It's possible that OO had it independently (I didn't verify) but LO 5.2.7 does not have this issue, while every  subsequent version of LO has been affected by it to this day. If I could, I would pay to see it gone, so I can start promoting LO again as the best system to write long, structured documents (with ToCs and all).