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
Created attachment 192153 [details] Test file showing reload list issue
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
This list bug is confirmed using MacOS 14.2.1 on a 2018 Mac Mini with Intel processor.
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
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)?
*** Bug 159972 has been marked as a duplicate of this bug. ***
*** Bug 157928 has been marked as a duplicate of this bug. ***
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.
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.
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.
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.
Created attachment 193909 [details] python script to remove list-style-name from automatic styles
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.
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.
I've completed testing of LO 7.6.7.2 and (the just released) 24.2.4.2 Appimage and confirm the Paragraph Direct Formatting bug is fixed. The issue affected 7.6.[0-1] and 24.2.[0-3]. Now I'm attempting to use Michael Stahl's script 'remove-direct-liststylename.py' to clear the unwanted Paragraph Direct Formatting from many documents. I copied the script into folder .../user/Scripts/python/ (both Win and Linux Mint) and although recognised via LO Tools > Macros > Run >, when run (in Win 10) it produces the error message: com.sun.star.uno.RuntimeException: Error during invoking function replace in module file:///C:/Users/Allan/AppData/Roaming/LibreOffice/4/user/Scripts/python/remove-direct-liststylename.py (<class 'TypeError'>: replace() missing 2 required positional arguments: 'filename' and 'targetname' File "C:\Program Files\LibreOffice\program\pythonscript.py", line 916, in invoke ret = self.func( *args ) What am I doing wrong and how does one provide the 'filename' and 'targetname' info required by the script? I'd appreciate all help in getting this macro to run - note I'm NOT a programmer so please be detailed with replies!
(In reply to bugzilla from comment #15) You must run the python script out of the LO environment. ~$ python3 remove-direct-liststylename-2.py <myODTfile.odt>
Olivier, many thanks for helping me get the script working. Just one question, in your example the script filename has a -2 suffix. Is that a newer revision? Michael, thanks for your efforts in creating the 'remove-direct-liststylename.py' script. It works well and allows quick and accurate clean-up any documents affected by the bug.
(In reply to bugzilla from comment #17) > Olivier, many thanks for helping me get the script working. Just one > question, in your example the script filename has a -2 suffix. Is that a > newer revision? No. It is the one attached by Michael Stahl (I must have downloaded it twice)