Bug 144939 - Non-contiguous chapter numbering (works after save and reload)
Summary: Non-contiguous chapter numbering (works after save and reload)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0 target:7.4.3 target:7.3.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Heading-Numbering
  Show dependency treegraph
 
Reported: 2021-10-05 09:58 UTC by Ulrich Windl
Modified: 2022-10-15 15:45 UTC (History)
5 users (show)

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


Attachments
Screenshot showing bad numbering (27.87 KB, image/png)
2021-10-05 09:58 UTC, Ulrich Windl
Details
Screenshot showing correct numbering after reload (27.66 KB, image/png)
2021-10-05 09:59 UTC, Ulrich Windl
Details
PDF document being exported also has the wrong number in it (68.21 KB, application/pdf)
2021-10-05 10:00 UTC, Ulrich Windl
Details
Sample ODT document that was used to demonstrate the problem (17.00 KB, application/vnd.oasis.opendocument.text)
2021-10-05 10:05 UTC, Ulrich Windl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Windl 2021-10-05 09:58:36 UTC
Created attachment 175533 [details]
Screenshot showing bad numbering

I had a long document with itemized lists at different levels.
To structure the list, I decided to add headers of level 1 and 2.
Surprisingly, when adding a level-2 header, the "next" number was completely unexpected. See screenshot.
Saving and loading the document fixed the numbering, however.

I suspect that a "continue numbering" setting from a list item was "inherited" to the heading paragraph somehow, using the item number of the list as heading number (which is totally insane, of course).
Comment 1 Ulrich Windl 2021-10-05 09:59:54 UTC
Created attachment 175534 [details]
Screenshot showing correct numbering after reload
Comment 2 Ulrich Windl 2021-10-05 10:00:59 UTC
Created attachment 175535 [details]
PDF document being exported also has the wrong number in it
Comment 3 Ulrich Windl 2021-10-05 10:05:27 UTC
Created attachment 175537 [details]
Sample ODT document that was used to demonstrate the problem
Comment 4 Ulrich Windl 2021-10-05 10:06:21 UTC
One more comment: In the original document version te "step" was more drastic, like 1.90 following 1.2, but for the sample I had removed most of the items.
Comment 5 Dieter 2021-10-26 11:30:24 UTC
I confirm it with

Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps to reproduce
1. Open attachment 175537 [details]
2. Put cursor after "nichts Gutes" (before 1.4)
3. Press enter
4. Change paragraph style to "Heading 2"

Result
Numbering 6.1 appears instead of 1.4

5. Save and reload => 6.1 changes to 1.4

I had this allso several times in different documents; very annoying.
Comment 6 Gabor Kelemen (allotropia) 2022-04-22 09:38:24 UTC
Seems to be a regression in 6.2, started with:

https://git.libreoffice.org/core/+/bafd49fb4d72b6dbb10b2fea1386d295dc9d435c

author	Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>	Sun Oct 14 22:55:25 2018 +0200
committer	Björn Michaelsen <bjoern.michaelsen@libreoffice.org>	Mon Oct 15 21:56:55 2018 +0200


tdf#118049 tdf#118833 tdf#118725: Fix some SwDepend regressions

Adding CC to: Björn Michaelsen
Comment 7 Commit Notification 2022-09-25 08:44:13 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2aed71fa9e8a36ff2dc9f48897092c26ab89ea9e

tdf#144939: fix chapter numbering updates

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2022-09-26 13:17:00 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/cb43334ee9938d7b8e250f9ddbdc81e53779f8d0

tdf#144939: fix chapter numbering updates

It will be available in 7.4.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Timur 2022-09-27 08:47:31 UTC

*** This bug has been marked as a duplicate of bug 134294 ***
Comment 10 Commit Notification 2022-10-04 12:58:43 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/84fde6fb3151aae8506fc66554a4fa2983127e87

tdf#144939: fix chapter numbering updates

It will be available in 7.3.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Dieter 2022-10-15 15:45:21 UTC
VERIFIED with

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 8991cbb7986d3967bc6c3719d95254ff04428d1a
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Björn, thanks for fixing it!