Bug 145932 - Lists: The formatting of the last word affect formatting of the number
Summary: Lists: The formatting of the last word affect formatting of the number
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-28 13:34 UTC by jsv
Modified: 2023-01-19 08:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
buggy list (12.92 KB, application/vnd.oasis.opendocument.text)
2021-11-28 13:34 UTC, jsv
Details
Example of numbering taking the direct formatting from the last word on a heading (12.92 KB, image/png)
2022-06-14 21:15 UTC, RGB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jsv 2021-11-28 13:34:10 UTC
Description:
I don't know why, neither I know how to reproduce it, but after I have created a template, I have realized that list styles started to work wrong.

Consider you will create a following list by using the "123" list style:

1. aaa aaa
2. bbb bbb
3. ccc ccc

Then, if you make the last "bbb" red italic by using direct formatting, it will also affect "2."

(If you will make "bbb" red italic by using character styles, this won't create any problems.)

If you copy that list to the empty document created from the default template, "2." will be black and not italic. That is, in such a case it will look correct.

Steps to Reproduce:
see above

Actual Results:
see above

Expected Results:
see above


Reproducible: Always


User Profile Reset: No



Additional Info:
see above
Comment 1 jsv 2021-11-28 13:34:52 UTC
Created attachment 176553 [details]
buggy list
Comment 2 jsv 2021-11-28 13:50:17 UTC
Writer also have some issues with redrawing formatting. So after making the last "bbb" red and italic, you will need to scroll the document down and then up to see the "2." is now also red and italic. (Or simply close the document and open it again.)
Comment 3 Nii 2021-12-02 16:16:07 UTC
Hi, thank you for reporting the problem.

I couldn't reproduce it in

Version: 7.2.3.2 (x64) / LibreOffice Community
Build ID: d166454616c1632304285822f9c83ce2e660fd92
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: fi-FI
Calc: CL

or

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ec76fff198323122bedc63ffdfd896c2543102c6
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: fi-FI
Calc: CL
Comment 4 John 2022-01-08 14:45:19 UTC
I remember that I have had the same issue last week, but I cannot reproduce it right now.

However, I can reproduce something very similar, and I'm sure that this is actually the same bug, just different "flavors":

1. Crete a new document based on the default Writer template.
2. Open the Styles pane (View > Styles)
3. Apply the "Numbering 123" to the first line and then type "This is foo".
4. Repeat the previous step for "This is bar" and "This is baz". So now you have the following list:

```
1. This is foo
2. This is bar
3. This is baz
```

Put the cursor to the left side of the uppercase letter T in the "bar" line and then press Shift+End to select to its end. Then press Ctrl+B to make this selection bold. You will see that the number "2" is now also bold, even though it is outside the selection. I think this is wrong and "2" should stay "regular", not "bold".

Version: 7.2.4.1 (x86) / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 5 John 2022-01-08 14:50:33 UTC
The workaround (for both "flavors" of this bug) is to finish a problematic list item with a space, and don't apply to this space any formatting.

That is, if the text to left of this space is bold, the space should be regular, not bold; and if the text to the left side of the space is red, the space should be black, assuming that black is your primary text color.
Comment 6 RGB 2022-06-14 21:15:13 UTC
Created attachment 180771 [details]
Example of numbering taking the direct formatting from the last word on a heading

I can reproduce the problem also with numbered headings, as you can see in the attached screenshot. Tested on both:

Version: 7.2.5.1 
Version: 7.3.4.2 

(In reply to John from comment #5)
> The workaround (for both "flavors" of this bug) is to finish a problematic
> list item with a space, and don't apply to this space any formatting.

This is a problem with headings and cross-references: if you add a space at the end of the heading paragraph and then cross-reference that heading, the field will show the space, and that can be problematic if you need a punctuation mark immediately after.
Comment 7 Buovjaga 2023-01-19 08:10:49 UTC
(In reply to jsv from comment #2)
> Writer also have some issues with redrawing formatting. So after making the
> last "bbb" red and italic, you will need to scroll the document down and
> then up to see the "2." is now also red and italic. (Or simply close the
> document and open it again.)

I see the problem in attachment 176553 [details] with version 7.2 and 7.4, but not anymore with 7.5 or master.

You can test with a master build, Win-x86_64@tb77-TDF from https://dev-builds.libreoffice.org/daily/master/current.html

I'm closing this for now. RGB: if you still see your specific issue with 7.5, open a new report.