Bug 159054 - Ordered List toggle button is toggled even without numbering
Summary: Ordered List toggle button is toggled even without numbering
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:24.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2024-01-07 13:47 UTC by Aron Budea
Modified: 2024-03-20 20:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
tdf159054_disableOutlineNumberingC.docx: example matching OP's description (5.56 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-03-19 15:19 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2024-01-07 13:47:30 UTC
- Start a new document,
- Choose a heading style, eg. Heading 1.

=> Note how 'Toggle Ordered List' in the toolbar is toggled. Toggling the button does nothing, ie. you can't simply add numbering by clicking the button, you have to open the dropdown and pick a specific entry.

Observed in LO 24.8.0.0.alpha0+ (a2deec946ebfc8f14792e971a354906d1c723164), 7.4.0.3 / Ubuntu.

This is a regression from, or perhaps just a side-effect of the following commit:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=bcede3c0ed94d413fea18d2457b916a9f5f4346a
author		Vasily Melenchuk <vasily.melenchuk@cib.de>	2022-03-12 09:07:53 +0300
committer	Thorsten Behrens <thorsten.behrens@allotropia.de>	2022-03-16 04:43:27 +0100

tdf#146851: sw: even numbering=None is still a numbering
Comment 1 Meuritz 2024-01-07 15:28:19 UTC
repro with:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 12; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded

same steps as the report, happens whit heading 1, 2, 3 and 4
Comment 2 Justin L 2024-03-18 13:43:37 UTC
Note that use Headings styles in numbering bugs is always an edge case, because LO intentionally has some bizarre special handling for tools -> "Heading numbering" (aka chapter numbering, aka outline numbering).
Comment 3 Justin L 2024-03-19 14:50:43 UTC
(In reply to Justin L from comment #2)
> Note that use Headings styles in numbering bugs is always an edge case
Turns out that this bug report is completely accurate as this is only an edge case affecting what today is called "Heading numbering".

This bug report talks about the default Heading styles, which have NONE as the style. It is even worse if you DO have numbering (with a suffix) assigned.
The first "toggle" removes the number but leaves the suffix behind - and it affects ALL of your Heading paragraphs in the entire document.

The same thing was true for removing the list (right click, list - No list)

No list first showed up acting this way in LO 7.2 with
commit c456f839a597f537f1c59becd7d0bb6c86248ef8
Author: Anshu on Wed Jan 6 15:04:16 2021 +0530
    tdf#115965 tdf#92622 NoList default in menu,tool,sidebar
which added the NumOrBulletOff() to "No numbering" which damaged "Heading numbering" instances.

https://gerrit.libreoffice.org/c/core/+/164985
Comment 4 Justin L 2024-03-19 15:19:52 UTC
Created attachment 193200 [details]
tdf159054_disableOutlineNumberingC.docx: example matching OP's description

(In reply to Aron Budea from comment #0)
> => Note how 'Toggle Ordered List' in the toolbar is toggled ON.
This is technically correct. There IS numbering assigned - it just is numbering of type NONE with no visible anything. There is a HasVisibleNumberingOrBullet() function, but I don't think it would be wise to change SelectionHasNumber to use this. (If we do, not only will the fact that there IS numbering not be indicated, but the first toggle OFF will still "do nothing" and not even change the toolbar status.)

> Toggling the button does nothing
So for OP's scenario the first toggle with "seem to do nothing" but will actually toggle off the numbering (and properly update the toolbar status). The second toggle will toggle numbering on - changing the Heading numbering style to use numbers - so ALL of the "Heading 1" paragraphs will now be numbered. [This is a special-case scenario, due to SVX_NUM_NUMBER_NONE not being considered numbering, so toggling on will replace it with the default numbering type.]
Comment 5 Commit Notification 2024-03-20 15:19:26 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159054 unit test: noting the current state before making changes

It will be available in 24.8.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 6 Commit Notification 2024-03-20 15:20:29 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/91e5d1ef52964dc43875ed62acd766524fa7cc5c

tdf#159054 sw: fix .uno:DefaultNumber toggle on Heading numbering

It will be available in 24.8.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.