Bug 168424 - First letter of Writer numbered list items lost when pasting to Impress text box
Summary: First letter of Writer numbered list items lost when pasting to Impress text box
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: target:26.2.0 target:25.8.2 target:25...
Keywords: bibisected, bisected, regression
: 167020 (view as bug list)
Depends on:
Blocks: Paste Bullet-Number-Outline-Lists Textbox
  Show dependency treegraph
 
Reported: 2025-09-15 18:35 UTC by Buovjaga
Modified: 2025-09-18 07:07 UTC (History)
4 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 Buovjaga 2025-09-15 18:35:32 UTC
1. Create numbered list in Writer
2. Select the list and copy
3. Paste to Impress

Observe the first letter of each list item has been lost.

Seen on Linux and Windows.

Bibisected with linux-64-25.2 to 2cb039f570379213ffc9469a132f5b24f425b7be
tdf#36709 editeng: Layout for font-relative first-line indent

First reported in bug 37592 comment 13
Comment 1 BogdanB 2025-09-15 19:42:28 UTC
Already reported here: https://bugs.documentfoundation.org/show_bug.cgi?id=167020
Comment 2 Buovjaga 2025-09-16 05:29:23 UTC
*** Bug 167020 has been marked as a duplicate of this bug. ***
Comment 3 Jonathan Clark 2025-09-16 20:15:17 UTC
The root cause is unsafe implicit casting between signed and unsigned ints inside editeng's RTF parser. The SvxLRSpaceItem rework made it possible to represent the very large unsigned first line indent generated by the RTF code, rather than it silently overflowing and being treated as the small negative first line indent that is intended.
Comment 4 Commit Notification 2025-09-17 16:26:06 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

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

tdf#168424 editeng: Fix unsafe s/uint implicit cast in RTF parser

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 Jonathan Clark 2025-09-17 16:30:30 UTC
This bug caused text to be indented past the edge of the screen. Doing this forces a line break between the first and second characters, giving documents the appearance of losing the first letter when it is still actually present.

Although this change fixes the issue reported in bug 37592 comment 13, it does not fix the long-standing bug 37592.
Comment 6 Dave Gilbert 2025-09-17 16:50:51 UTC
Thanks! I can confirm that does indeed fix the apparently missing first character.
Thanks again!
Comment 7 Commit Notification 2025-09-17 18:13:40 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

tdf#168424 editeng: Fix unsafe s/uint implicit cast in RTF parser

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 8 Commit Notification 2025-09-18 06:49:03 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/8323008a38bf23a0a5f04377bdf3ddaaf471117a

tdf#168424 editeng: Fix unsafe s/uint implicit cast in RTF parser

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.