Bug 159549 - FORMATTING LO Writer 7.6 and 24.2 alter settings of Text Body paragraph style when renaming style as Body Text
Summary: FORMATTING LO Writer 7.6 and 24.2 alter settings of Text Body paragraph style...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 beta1+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:25.8.0 target:25.2.0.0.beta2 t...
Keywords: bibisectNotNeeded
Depends on:
Blocks: Writer-Styles-Paragraph
  Show dependency treegraph
 
Reported: 2024-02-04 04:29 UTC by Kenneth Burke
Modified: 2025-03-06 09:02 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The line AAAA in the sample document renders differently in LO 7.5.9 than in later versions of LibreOffice Writer (22.37 KB, application/vnd.oasis.opendocument.text)
2024-02-04 04:29 UTC, Kenneth Burke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Burke 2024-02-04 04:29:15 UTC
Created attachment 192378 [details]
The line AAAA in the sample document renders differently in LO 7.5.9 than in later versions of LibreOffice Writer

Consistent with the modification reported in Bug # 154933, LO Writer versions after 7.5.9 intentionally rename paragraph styles named "Text Body" in documents created with earlier versions of LO to "Body Text". The problem is that in that conversion, multiple settings of the style are altered.
Steps to reproduce:
Create file in LO Writer 7.5.9 or earlier.
Include a paragraph using paragraph style named Text Body with settings:
Font: Charis SIL Compact Regular 11 pt
Indent
Before text: 0.0 pt
After text: 0.0 pt
First line: 0.0 pt
Spacing
Above paragraph: 0.0 pt
Below paragraph: 8.0 pt
Line spacing
Fixed of 13.5 pt

Save file
Open the same file in LO Writer 7.6 or 24.2
The paragraph previously using the Text Body style now is set to use the Body Text style.
The Body text style now shows the following settings:

Font: Charis SIL Compact Regular 10 pt
Indent
Before text: 0.0 pt
After text: 0.0 pt
First line: 0.0 pt
Spacing
Above paragraph: 0.0 pt
Below paragraph: 5.8 pt
Line spacing
Fixed of 11.5 pt

Behavior is the same on Windows Terminal Server 2016 and on MacBook Air 2020 OS Sonoma 14.2.1.
Comment 1 Heiko Tietze 2024-02-06 09:48:53 UTC
Follow-up to bug 154933.
Comment 2 sdc.blanco 2024-02-06 11:05:12 UTC
Repro (as follows):

1.  Download attachment  192378 [details] 
2.  Open downloaded file with either: 7.2.7.2 or 24.2.0.0.alpha1
3.  Look at paragraph setting for the line AAAA

With 7.2.7.2, I get the result shown in the OP for 7.5.9. or earlier
With 24.2.0.0.alpha1, I get the result shown in the OP for 7.6 and 24.2

When I look at the styles.xml for the downloaded attachment, I can see that Body Text and Text Body are both present in the styles.xml, with parameters that correspond to what is reported in OP.


Version: 7.2.7.2 (x64) / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL


Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0ddd9f7e055a0c1ecb120de3e40c3fdb8373e9dc
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded
Comment 3 Buovjaga 2024-02-23 13:17:32 UTC
Checking with the example file, the change can be seen with linux-64-7.6 repo when comparing commit c83d241effbd09491e9f96d3e435ab91700f58b0 to its preceding one. Binary hash is a2ebf434f3b0b3ca9b957c1d56ff94fe466012f2 in that repo.

However, I could not reproduce it from scratch when I saved from oldest of 7.5 and opened with 24.2.
Comment 4 Michael Stahl (allotropia) 2024-12-05 12:23:48 UTC
this has a super annoying cause, here's a partial fix that might be enough for this bug but the general problem isn't solved yet...

https://gerrit.libreoffice.org/c/core/+/177858
Comment 5 Commit Notification 2024-12-06 13:25:30 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159549 sw: fix ODF import of newly colliding Body Text styles

It will be available in 25.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-12-09 13:45:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2b8d794e448a7d3c573ff79cffe9decc8d960262

tdf#159549 sw: fix style name in SwXStyle::getParentStyle()

It will be available in 25.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 7 Commit Notification 2024-12-09 16:35:55 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159549 sw: add unit test

It will be available in 25.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 8 Commit Notification 2024-12-09 19:51:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

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

tdf#159549 sw: fix ODF import of newly colliding Body Text styles

It will be available in 25.2.0.0.beta2.

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-12-09 19:53:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/5917ef4d57ca5869ae3bb419093882e491c06574

tdf#159549 sw: fix style name in SwXStyle::getParentStyle()

It will be available in 25.2.0.0.beta2.

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-12-09 19:53:32 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/8a8244e019edd5c96311d705a4b4119a41417814

tdf#159549 sw: add unit test

It will be available in 25.2.0.0.beta2.

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 Commit Notification 2024-12-10 15:42:42 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159549 sw: fix style mapping for Page Styles

It will be available in 25.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 12 Commit Notification 2024-12-10 15:43:45 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/44878a26e0d934a80ab39d5bf597ca49e46db86e

tdf#159549 sw: fix style mapping for Character Styles

It will be available in 25.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 13 Commit Notification 2024-12-10 15:43:47 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159549 sw: rename SwXStyle variables to make it more obvious

It will be available in 25.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 14 Commit Notification 2024-12-10 17:38:16 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/81c55d3929472a75cbf81979a1107c120f9e55f5

tdf#159549 sw: fix style mapping for Page Styles

It will be available in 25.2.0.0.beta2.

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

https://git.libreoffice.org/core/commit/1355e214e29ef01990bd9fb194af9593f1c24a39

tdf#159549 sw: fix style mapping for Character Styles

It will be available in 25.2.0.0.beta2.

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 16 Commit Notification 2024-12-10 17:39:22 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/06a9f0d102c74106c1414dc984858b0f47e5be6f

tdf#159549 sw: rename SwXStyle variables to make it more obvious

It will be available in 25.2.0.0.beta2.

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 17 Commit Notification 2024-12-10 18:58:33 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7aae0e71a408b2c9aae4fb1135ec71a4f10ed2df

tdf#159549 sw: fix FN_UNO_PARA_STYLE in unotbl.cxx

It will be available in 25.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 18 Commit Notification 2024-12-11 10:17:59 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/5364d359aee6b32fa2b2115129a68d6863043cdd

tdf#159549 sw: fix FN_UNO_PARA_STYLE in unotbl.cxx

It will be available in 25.2.0.0.beta2.

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 19 Commit Notification 2024-12-11 10:18:01 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159549 sw: try to fix style mapping for Table Styles

It will be available in 25.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 20 Commit Notification 2024-12-11 11:09:19 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/8f28be428ef2f36af35d7f0727b4a428d701ed21

tdf#159549 sw: try to fix style mapping for Table Styles

It will be available in 25.2.0.0.beta2.

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 21 Commit Notification 2024-12-11 11:58:35 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159549 sw: lcl_getUsedPageStyles() needs to use FillProgName()

It will be available in 25.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 22 Commit Notification 2024-12-11 13:43:49 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

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

tdf#159549 sw: lcl_getUsedPageStyles() needs to use FillProgName()

It will be available in 25.2.0.0.beta2.

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 23 Michael Stahl (allotropia) 2024-12-11 17:15:24 UTC
hope this is fixed now

at the API all style names should be ProgNames now, and UINames are only available via "DisplayName" property.

the only exception is table styles/table templates, where UINames can be used, in order to import old ODF documents, see bug 129568.

i've only backported the paragraph-style changes to libreoffice-24-8 as that was causing an actual problem already. https://gerrit.libreoffice.org/c/core/+/178259
Comment 24 Heiko Tietze 2024-12-12 08:13:58 UTC
(In reply to Michael Stahl (allotropia) from comment #23)
> at the API all style names should be ProgNames now, and UINames are only
> available via "DisplayName" property.
Awesome! Thanks a lot.
Comment 25 Michael Stahl (allotropia) 2024-12-12 09:29:50 UTC
Noel found another one that i missed:

commit f15c86221b41739a578c8a9b15046b20b43cb8c1
Author:     Noel Grandin <noelgrandin@gmail.com>
AuthorDate: Wed Dec 11 20:00:33 2024 +0200
Commit:     Noel Grandin <noelgrandin@gmail.com>
CommitDate: Wed Dec 11 20:50:21 2024 +0100

    fix ruby style name handling in SwXStyle::SetPropertyValue

commit baa997a412f1f87e4fe55af3927a685934dbcaba
Author:     Noel Grandin <noelgrandin@gmail.com>
AuthorDate: Wed Dec 11 20:00:33 2024 +0200
Commit:     Michael Stahl <michael.stahl@allotropia.de>
CommitDate: Thu Dec 12 10:27:05 2024 +0100

    fix ruby style name handling in SwXStyle::SetPropertyValue
Comment 26 Michael Stahl (allotropia) 2024-12-13 14:30:55 UTC
another bugfix from Noel:

commit e7763739ae04193190a29e5127f047de2f5f35af
Author:     Noel Grandin <noelgrandin@gmail.com>
AuthorDate: Thu Dec 12 18:51:09 2024 +0200
Commit:     Michael Stahl <michael.stahl@allotropia.de>
CommitDate: Fri Dec 13 12:28:09 2024 +0100

    GetCountOrName returns a UI name
    
    But the caller in SwXStyleFamily::getByIndex was treating the
    return value like a programmatic name.
    
commit 6d5d5c8065365a949b0c0b5ba0c9d071d20ff4da
Author:     Noel Grandin <noelgrandin@gmail.com>
AuthorDate: Thu Dec 12 18:51:09 2024 +0200
Commit:     Michael Stahl <michael.stahl@allotropia.de>
CommitDate: Fri Dec 13 13:22:37 2024 +0100

    GetCountOrName returns a UI name
    
    But the caller in SwXStyleFamily::getByIndex was treating the
    return value like a programmatic name.
Comment 27 Commit Notification 2024-12-24 13:11:45 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

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

tdf#159549 sw: fix ODF import of newly colliding Body Text styles

It will be available in 24.8.5.

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.