Bug 161172

Summary: UNDO incomplete: list level is not restored in a specific document
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: WriterAssignee: Mike Kaganski <mikekaganski>
Status: RESOLVED FIXED    
Severity: normal CC: aron.budea, vmiklos
Priority: medium Keywords: implementationError
Version: 24.2.0.3 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=62032
Whiteboard: target:24.8.0 target:24.2.4
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 105948    
Attachments: A manual list item

Description Mike Kaganski 2024-05-19 06:55:41 UTC
Created attachment 194188 [details]
A manual list item

1. Open the attachment. See that the single paragraph there (with the text "foo") has the paragraph style "No_list", the numbering style "Num_1", the list level 1 (shown in the status bar), and the numbering label "Num1_lvl1_1".

2. Double-click paragraph style "Num_1_lvl2" in the Stylist (F11) to apply it to the paragraph. See that the list level in the status bar changes to level 2, and that the numbering label becomes "Num1_lvl2_1".

3. Undo (Ctrl+Z). See that the paragraph style restores to the "No_list". The problem is: the list level is not restored to level 1 (it is still level 2), and the numbering label is still "Num1_lvl2_1", instead of the expected "Num1_lvl1_1".

The change of the list level in step 2 was implemented in commit c1cfe85f8bba10d367ef9ef1d6d569f53969dd34 (tdf#62032 use style list level when changing style, 2023-07-10). The correct Undo needs to be implemented.
Comment 1 Mike Kaganski 2024-05-19 09:09:38 UTC
https://gerrit.libreoffice.org/c/core/+/167839
Comment 2 Commit Notification 2024-05-19 10:37:02 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#161172: Also record history for !bChangeOfListStyleAtParagraph

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 3 Commit Notification 2024-05-21 09:27:36 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

tdf#161172: Also record history for !bChangeOfListStyleAtParagraph

It will be available in 24.2.4.

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.