Bug 159366 - List styles add paragraph direct formatting on loading Writer document
Summary: List styles add paragraph direct formatting on loading Writer document
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL: https://ask.libreoffice.org/t/lists-b...
Whiteboard: target:24.8.0 target:7.6.8 target:24....
Keywords: bibisected, bisected, regression
: 157928 159972 (view as bug list)
Depends on:
Blocks: Writer-Styles-List
  Show dependency treegraph
 
Reported: 2024-01-24 21:37 UTC by Olivier Hallot
Modified: 2024-05-07 13:42 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file showing reload list issue (40.43 KB, application/vnd.oasis.opendocument.text)
2024-01-24 21:38 UTC, Olivier Hallot
Details
python script to remove list-style-name from automatic styles (3.45 KB, text/x-python)
2024-04-30 16:35 UTC, Michael Stahl (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2024-01-24 21:37:48 UTC
Description:
On opening / reloading a file the list styles are changes and format is modified.

Steps to Reproduce:
1.Open test file attached
2.Enter a new line under chapter "Selecting a group of slides"
3.Enter dummy text
4. Apply paragraph style "List 1",
5. Add more content to the list
6. Note the indent of the style List 1
7. Open Styles Inspector and verify that the newly entered text has no "Paragraph Direct Formatting"
8. Save the file
9. Reload the file
10. Check the Style Inspector. The new content has "Paragraph Direct Formatting" and indentation has changed.

Actual Results:
Reloading the file affect list formatting style

Expected Results:
No changes in list formatting


Reproducible: Always


User Profile Reset: Yes

Additional Info:
The same happens with numbered lists.

Verified in Linux and Windows
Verified in 24.2 and 24.8 (master)


Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (pt_BR.UTF-8); UI: en-US
Calc: threaded
Comment 1 Olivier Hallot 2024-01-24 21:38:33 UTC
Created attachment 192153 [details]
Test file showing reload list issue
Comment 2 B. Antonio Fernández 2024-01-24 22:02:08 UTC
Confirmed

My version.
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (es_ES); UI: es-ES
Calc: CL threaded


This not occurs on L.O. 7.5.9.2
Comment 3 PeeWee 2024-01-25 08:54:07 UTC
This list bug is confirmed using MacOS 14.2.1 on a 2018 Mac Mini with Intel processor.
Comment 4 Xisco Faulí 2024-01-25 15:56:21 UTC
Regression introduced by:

author	Michael Stahl <michael.stahl@allotropia.de>	2023-02-27 20:52:39 +0100
committer	Michael Stahl <michael.stahl@allotropia.de>	2023-02-28 15:43:40 +0000
commit ade0a153f453500f15343380ac937252992733e0 (patch)
tree 379bbeb1039fc6d4f984bff895b8619cac87fc3c
parent f36265ed0e0229dc9dacd18cc16867b22d655dbe (diff)
tdf#114287 xmloff: ODF import: fix text:list override of list style

Bisected with: bibisect-linux64-7.6
Comment 5 bugzilla 2024-03-06 12:43:56 UTC
I recently raised Bug 159972 which may be caused by the same root problem that this bug report addresses.

A key concern is that documents created originally in <= LO 7.5, become 'corrupted' when opened/saved in >= LO 7.6 by the addition/duplication of Paragraph Direct Formatting involving an associated List style.

When such documents are subsequently viewed in any LO version this direct formatting is embedded and adversely affects making Style changes.   

Could the fix for this regression correct for this unwanted embedding?

Alternatively provision of a clean-up script to allow users to run (manually) on affected document(s)?
Comment 6 Stéphane Guillou (stragu) 2024-03-08 02:33:02 UTC
*** Bug 159972 has been marked as a duplicate of this bug. ***
Comment 7 Stéphane Guillou (stragu) 2024-04-02 05:34:33 UTC
*** Bug 157928 has been marked as a duplicate of this bug. ***
Comment 8 Commit Notification 2024-04-26 11:09:11 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/546741148863ae0b2a25cc994a7323c8113cb573

tdf#114287 tdf#159366 xmloff: ODF import: revert text:list override

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 9 Commit Notification 2024-04-29 19:05:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/0c1e01cd8370b1c05e12dc965bf3e95bc2fd7378

tdf#114287 tdf#159366 xmloff: ODF import: revert text:list override

It will be available in 7.6.8.

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 10 Commit Notification 2024-04-29 19:15:32 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

tdf#114287 tdf#159366 xmloff: ODF import: revert text:list override

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.
Comment 11 Michael Stahl (allotropia) 2024-04-30 16:34:27 UTC
should be fixed now; after a new examination we concluded the change was a bad idea and hence reverted.

it turns out that this document structure with the automatic style having the same list style as the parent style also happens by normal editing (found in 290 out of 19360 ODT files), so removing it automatically is probably another bad idea, but i have a python script that can be run manually with the LO bundled python to remove it.
Comment 12 Michael Stahl (allotropia) 2024-04-30 16:35:21 UTC
Created attachment 193909 [details]
python script to remove list-style-name from automatic styles
Comment 13 Cyril 2024-05-01 06:31:40 UTC
I did some testing with the latest Daily build 24.2.4 (Ubuntu 24.04) and the problem also seems solved for me, thank you.
I hope the Ubuntu repositories will be updated quickly when LO 24.2.4 will be released.
Comment 14 Commit Notification 2024-05-07 08:17:16 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6-7":

https://git.libreoffice.org/core/commit/4f0f64820a2bdf5bdf9e6cf5ee83b38f87a65cbe

tdf#114287 tdf#159366 xmloff: ODF import: revert text:list override

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