GPaste icon indicating copy to clipboard operation
GPaste copied to clipboard

GPaste converts LibreOffice Draw elements to bitmaps on copy/paste

Open floeschie opened this issue 6 years ago • 8 comments

I use GPaste with image support enabled. When I copy & paste items in LibreOffice draw, most of the time they get converted into bitmaps, and the pasted item looks very blurry. The original LibreOffice element has some text, which I can edit using F2. The pasted element has the text converted to bitmap, so it cannot be edited anymore.

Steps to reproduce

  1. Make sure GPaste is running and image support is enabled
  2. Create a new LibreOffice Draw document
  3. Add a circle item to the canvas
  4. Copy the circle
  5. Paste the circle

Expected result

Pasted item is a identical copy of the original LibreOffice item, without any conversion.

Actual result

Pasted item is blurry

image

Environment

  • Fedora Workstation 28
  • GPaste 3.28.2
  • LibreOffice 6.0.4.2
  • xorg-x11-server-Xwayland 1.19.6

floeschie avatar Jun 19 '18 08:06 floeschie

I have a similar problem, but I am triggering this vulnerability when copying images in Telegram

  • Debian Testing
  • GPaste 3.30.x
  • telegram 1.5.x

ilovesusu avatar Feb 22 '19 03:02 ilovesusu

How is that a vulnerability?

Keruspe avatar Feb 22 '19 08:02 Keruspe

sorry,my english is shat. you can see this video。 After I click to copy the image, gpaste will copy infinitely. video

ilovesusu avatar Feb 22 '19 09:02 ilovesusu

I'm facing same problem and can help fixing it. I think @ilovesusu refers to bug (no vulnerability) and several times (no infinitely). I didn't realize about multiple history entries, but yes it's happening to me too, I have to remove lot of image entries.

So @Keruspe is possible to point to code that detects a copy action is an image, just with that I can debug it

albfan avatar Feb 28 '19 07:02 albfan

(LibreOffice dev here)

Most likely this is related to something choosing to copy bitmaps around in preference to using the metafile version of the data.

Could be either GPaste or LibreOffice.

I am aware of at least one similar bug in LibreOffice: https://bugs.documentfoundation.org/show_bug.cgi?id=122072

grandinj avatar Feb 28 '19 07:02 grandinj

@grandinj, for me and @floeschie, seems disable "image support" in gpaste fixed this (I'd say is related with gpaste then). Anyway, any doc for the metadata in a libreoffice copied object to clipboard? Just to keep that verbatim when gpaste find this kind of object.

albfan avatar Feb 28 '19 07:02 albfan

Yes, quite possibly GPaste needs to be taught that when "image support" is active, it should prefer vector formats (like metafile) over bitmap formats, to preserve as much information as possible

grandinj avatar Feb 28 '19 07:02 grandinj

I can report that the same applies for (brace yourselves) Microsoft Office running in a rmote desktop client (Remmina in my case). What I experienced was that working in RDP on a windows VM, whenever I copied a graphical element (shapes, but also grouped objects) in a Powerpoint presentation, they got converted to bitmap when I pasted them back. After struggling for some time, I noticed that I had lots of bitmaps in the Gpaste history. Killing the Gpaste daemon immedately solved the issue.

wiselynx avatar Mar 02 '20 11:03 wiselynx