Bug 107699 - middle mouse button paste changes font
Summary: middle mouse button paste changes font
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Linux (All)
: low trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2017-05-08 08:57 UTC by ffs
Modified: 2019-11-05 23:36 UTC (History)
2 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 ffs 2017-05-08 08:57:10 UTC
Description:
When I middle-mouse-button paste I get text in monospace font rather than the font I was using - this is rather annoying

Actual Results:  
block middle mouse button paste - get monospace font (rather than what I was using)

Expected Results:
Text should be pasted, font should not be changed


Reproducible: Always

User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]Locale: en-GBModule: TextDocument[Information guessed from browser]OS: Linux (All)OS is 64bit: yes
Builds ID: LibreOffice 5.2.2.2


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Comment 1 Buovjaga 2017-05-13 11:47:18 UTC
Not reproduced. You are copying from your document and pasting in the same?
This happens with a fresh document with no formatting?

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.2.2
Build ID: 5.3.2-3
CPU Threads: 8; OS Version: Linux 4.10; UI Render: default; VCL: kde4; Layout Engine: new; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Comment 2 ffs 2017-05-19 07:30:54 UTC
Sorry - I missed a bit - middle-button paste from a terminal emulator (in this case konsole).  This is a recent problem and I can't tell is libreoffice is adding font information based on the fact that it is simply plain text of if konsole is adding font information into the copy buffer (which it shouldn't).
Comment 3 Buovjaga 2017-05-19 10:07:16 UTC
I am using Konsole as well, but I don't know how to middle-click paste from Konsole to LibO.
Comment 4 ffs 2017-06-07 11:42:35 UTC
Highlight / block what you want with the left mouse button, move to LO and press the middle mouse button.

This has been the default copy-paste in X11 for years (forever?) I think it can be overridden in KDE, but, by default, left button block, middle mouse paste should work for pretty much anything, no need to use the keyboard.
Comment 5 Buovjaga 2017-06-07 13:40:41 UTC
Ok, I reproduce.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.3.2
Build ID: 5.3.3-1
CPU Threads: 8; OS Version: Linux 4.10; UI Render: default; VCL: kde4; Layout Engine: new; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 6 Jonatham E. Snow 2018-10-23 18:26:18 UTC
confirm this bug, copying from one LO document to another:

Middle button paste should act in one of two ways: 
A) like I typed text in from the keyboard, keeping the same styles and formatting that already existed in the target document like paste unformatted text. (preferable)
B) like Ctrl-V, inheriting the style from the document that the copied text came from. (which I hate)

Instead it seems to do some random thing.
Comment 7 QA Administrators 2019-10-24 02:40:59 UTC Comment hidden (obsolete)
Comment 8 ffs 2019-10-28 10:40:58 UTC
Definitely still there Version: 6.0.7.3
Comment 9 Dean Serenevy 2019-10-28 11:17:06 UTC
@ffs: I'm pretty sure konsole is adding this information, and it can be changed!

In Konsole: Settings -> edit current profile -> Mouse -> Copy text as HTML. Uncheck that box and it should paste as plain text.
Comment 10 Buovjaga 2019-10-28 11:39:29 UTC
Indeed, I confirmed it solves the problem! Thanks, Dean.
Comment 11 ffs 2019-11-05 08:57:23 UTC
Dean,

that seems a reasonable analysis of the problem but my version of konsole (17.12.3) does not have this option. 

Also the font conversion isn't quite right (Ubuntu mono - > monospace despite ubuntu mono being available but I guess if this is html this might be mangled and approximate).

I experimented with "paste unformatted text" but this gets "requested clipboard format is not available" (same for 'paste').

It would seem that (after examining the clipboard contents using xclip) that konsole offers the X11 atoms: text/plain TEXT text/html and that libreoffice switched at some point from text/plain to text/html.

It does not seem wrong that the copying should offer multiple formats but it is clearly unitended here that the paste operation includes the html formatting and libreoffice should offer a choice and default from the X11 paste buffer.
Comment 12 ffs 2019-11-05 09:00:58 UTC
Your filter dropdown box is different from mine:

I cannot edit it - if I click "into" it it just produces the dropdown options.  The "<x|" button present in yours (and in mine on the NAME: box) is absent.

Otherwise it is identical.
Comment 13 Buovjaga 2019-11-05 10:10:24 UTC
(In reply to ffs from comment #11)
> that seems a reasonable analysis of the problem but my version of konsole
> (17.12.3) does not have this option. 

Well, it will when you update to a newer one.
Comment 14 ffs 2019-11-05 23:36:40 UTC
No doubt moving to a newer version of konsole with the option to restrict the paste data to text will solve this problem.

However LO should be able to paste from the choice of buffers on offer.  The bug here is not that konsole offers html/text and plain/text (that is probably a desirable feature for some) but that LO doesn't offer a choice of which X11 buffer to use.

LO does provide paste:paste unformatted:paste special options for the clipboard but treats the X11 paste buffer differently.