Bug 167760 - Changing the paragraph style on a list entry removes the list
Summary: Changing the paragraph style on a list entry removes the list
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.3 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:26.2.0 target:25.8.2 target:25...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Styles-List
  Show dependency treegraph
 
Reported: 2025-08-01 08:09 UTC by Jaroslaw
Modified: 2025-09-02 12:13 UTC (History)
5 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 Jaroslaw 2025-08-01 08:09:04 UTC
Description:
How show problem:
1. Change same text to list (numbered/unnumbered)
2. Change style 1 line list => remove list

Steps to Reproduce:
Back broken functionality.

Actual Results:
Change style on line list ramove list on this line.

Expected Results:
Change style on line list not remove list on this line


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Work correctly in 24.8.x.x (november 2024). Check on 2 different computer (work/home).
Comment 1 raal 2025-08-11 21:20:19 UTC
Confirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a0ae1b0cf2661e7be9ea042e5357530f5fb412f5
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 2 raal 2025-08-11 21:29:23 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-25.2.
Adding Cc: to Oliver Specht ; Could you possibly take a look at this one?
Thanks
 31b973101031f928dd58554781b78c961011b499 is the first bad commit
commit 31b973101031f928dd58554781b78c961011b499
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Tue Nov 19 01:20:32 2024 +0100

    source 075560420a7aa238182e2d80dfe1c5fbaad3edbd

174977: tdf# 162326 reset paragraph list attributes on style apply | https://gerrit.libreoffice.org/c/core/+/174977
Comment 3 Justin L 2025-08-27 20:37:19 UTC
The patches indicates that this list clearing should only happen while the CTRL key is pressed. However, it is happening regardless.

The problem is in the change made in sw/source/core/doc/docfmt.cxx,
because SwDocShell::ApplyStyles always calls SetTextFormatColl with bResetListAttrs=true.

But now with comment 2's patch, bResetListAttrs (which was guarded by certain conditions in lcl_SetTextFormatColl) now affects all lists, not just when the paragraph style itself set numbering.
Comment 4 Commit Notification 2025-08-28 10:30:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#167760 tdf#162326 limit reset para list attrs on style apply

It will be available in 26.2.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 5 Commit Notification 2025-09-01 13:58:22 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/17c702997ece4aeb401c8731e53e5b49acb12862

tdf#167760 tdf#162326 limit reset para list attrs on style apply

It will be available in 25.8.2.

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 2025-09-02 06:32:38 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/6f06b848d858456e081e285c03cbc1c06b924bc5

tdf#167760 tdf#162326 limit reset para list attrs on style apply

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