Bug 171081 - Direct formatting removed when copy-pasting content within document
Summary: Direct formatting removed when copy-pasting content within document
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.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: 2026-02-28 20:32 UTC by Aron Budea
Modified: 2026-03-01 02:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample ODT (11.52 KB, application/vnd.oasis.opendocument.text)
2026-02-28 20:32 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2026-02-28 20:32:18 UTC
Created attachment 205854 [details]
Sample ODT

- Open the attached ODT document,
- Select the first word after the list ("dddd"), and copy it to the clipboard,
- Paste it into the empty list line.

=> Direct formatting is removed in the pasted line.
Font size was 16 pt from direct formatting, both in the line and the copied text, and it's reset to 12 pt.

This only happens with default paste, pasting as unformatted text is a workaround.

Observed using LO 26.8.0.0.alpha0+ (02-17).

Happens since the following commit in 7.5 and its 7.4 backport:
https://git.libreoffice.org/core/commit/3707c0b4ff683ac6f0942a176ebcb8d824b567ee
author		Michael Stahl <michael.stahl@allotropia.de>	Fri Mar 18 21:30:07 2022 +0100
committer	Michael Stahl <michael.stahl@allotropia.de>	Thu Jun 16 19:18:40 2022 +0200

tdf#134759 sw: clear items in SwAttrSet::CopyToModify()