Bug 163871 - Pasting text loses bold formatting in specific example file
Summary: Pasting text loses bold formatting in specific example file
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2024-11-12 21:26 UTC by Gabor Kelemen (allotropia)
Modified: 2024-11-13 12:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (9.65 KB, application/vnd.oasis.opendocument.text)
2024-11-12 21:26 UTC, Gabor Kelemen (allotropia)
Details
The document before the copy-paste (47.04 KB, image/png)
2024-11-12 21:27 UTC, Gabor Kelemen (allotropia)
Details
The document after the copy-paste (51.55 KB, image/png)
2024-11-12 21:27 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-11-12 21:26:42 UTC
Created attachment 197579 [details]
Example file from Writer

Attached file contains specially formatted paragraphs.

When copy-pasting the first two paragraphs into the third, the bold first word loses its formatting.

1. Open attached file
2. Copy "AAA Lorem Ipsum" from the first paragraph
3. Paste it into the empty third paragraph
-> The AAA part loses its bold formatting

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7713d916e06a8388f849a758f928cbcfded6c0ae
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

Seems to have started in 24.2 with:

https://git.libreoffice.org/core/+/2d0f43befdaa1010062b534dffa82adad8c956c8

commit 2d0f43befdaa1010062b534dffa82adad8c956c8	[log]
author	Miklos Vajna <vmiklos@collabora.com>	Mon Aug 14 08:10:51 2023 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	Mon Aug 14 09:17:55 2023 +0200

tdf#156321 ODT import: fix lost char format on outer span elements

Adding CC to: Miklos Vajna
Comment 1 Gabor Kelemen (allotropia) 2024-11-12 21:27:19 UTC
Created attachment 197580 [details]
The document before the copy-paste
Comment 2 Gabor Kelemen (allotropia) 2024-11-12 21:27:35 UTC
Created attachment 197581 [details]
The document after the copy-paste
Comment 3 Eyal Rozenberg 2024-11-12 22:44:36 UTC
I can reproduce, but not consistently. If I undo, then copy and paste again, it stops removing the boldface formatting, for some reason.

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Comment 4 Miklos Vajna 2024-11-13 08:31:02 UTC
> ODT import: fix lost char format on outer span elements

Oh, this is strange. If you look at the bugreport, the context was some 3rd-party generating custom ODT files -- Writer is never supposed to write ODT files with nested spans. And our in-memory model doesn't support nested character formatting, either.
Comment 5 Bogaboga Man 2024-11-13 12:56:13 UTC
I can reproduce in the version below...but pasting comes back OK if done as Rich Text!

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-GB
Calc: CL threaded