Bug 156897 - Font changes when copy and paste multiple lines with incomplete first line
Summary: Font changes when copy and paste multiple lines with incomplete first line
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Paragraph Cut-Copy
  Show dependency treegraph
 
Reported: 2023-08-24 16:03 UTC by lvm
Modified: 2023-09-15 20:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
testcase (9.60 KB, application/vnd.oasis.opendocument.text)
2023-08-24 16:03 UTC, lvm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lvm 2023-08-24 16:03:35 UTC
Created attachment 189128 [details]
testcase

File x.odt (attached) contains two lines in liberation mono font:

abcd
efgh

1. open it with writer
2. position cursor between b and c and press shift-down to mark characters cd<LF>ef
3. copy to the clipboard (^C)
4. move cursor down to the clear space
5. paste (^V)

Expected: two lines

cd
ef

pasted in liberation mono font.

Actual: the same two lines but the first one is in liberation serif font.

This issue occurs only when pasting more than one line and the first line is copied not from its start.

Clean profile, Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded

Windows has the same problem although I didn't test with a clean profile there.
Comment 1 Aaron 2023-08-24 23:53:26 UTC
Thanks for reporting. I can reproduce in

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-AU (fr_FR); UI: en-US
Calc: threaded

I've noticed from testing that the issue occurs only when the formatting style is anything except 'default paragraph style'. The first copied line will change to 'default paragraph style' and the second copied line retains the original formatting. This results in the change in font as described. The defect also only seems to happen with liberation font styles and not other fonts like 'Times New Roman' for example.
Comment 2 Kira Tubo 2023-09-15 20:26:22 UTC
Reproducible in v.3.3.0, updating version to Inherited From OOo. Also reproducible in daily master build. 

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9a37652b79001bf5208841b9221dee851b9b6d0f
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded