Bug 35146 - copy-paste from InkScape pastes text instead of image on Linux
Summary: copy-paste from InkScape pastes text instead of image on Linux
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: All Linux (All)
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 05:24 UTC by sasha.libreoffice
Modified: 2015-12-04 16:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Inkscape test file (13.77 KB, image/svg+xml)
2012-02-02 17:14 UTC, Drew Jensen
Details
example error document (9.74 KB, application/vnd.oasis.opendocument.text)
2012-02-02 17:15 UTC, Drew Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sasha.libreoffice 2011-03-09 05:24:33 UTC
copy-paste from InkScape versions 0.47 and 0.48 (newest) pastes text in all components of Libreoffice instead of image on Linux
reproduced on Fedora 64 bit and Mandriva 32 bit and 64 bit Kde 4.4

on windows XP 32 bit works properly
Comment 1 Björn Michaelsen 2011-12-23 11:43:43 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 2 sasha.libreoffice 2012-01-02 03:07:50 UTC
reproduced on LibO 3.5.0 beta 1
Comment 3 Drew Jensen 2012-02-01 13:04:32 UTC
Test system - Ubuntu 11.04 (64bit), Unity, LibO 3.5 RC2, InkScape .48+(dev snapshot)

I tried copy/past of single our grouped objects into writer, draw and image control. Dont' get text, but do not get anything.

At first I thought it was inkscape that was acting up - because what I do get is a tackback dialog in the inkscape program. The text from one of the copy/paste attempts [the LibreOffice Motiff file BTW] follows:

Traceback (most recent call last):
  File "ink2canvas.py", line 89, in <module>
    ink.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 227, in affect
    self.effect()
  File "ink2canvas.py", line 84, in effect
    self.walk_tree(svg_root)
  File "ink2canvas.py", line 74, in walk_tree
    elem.draw()
  File "/usr/share/inkscape/extensions/ink2canvas/svg.py", line 310, in draw
    path_command[comm](data)
  File "/usr/share/inkscape/extensions/ink2canvas/svg.py", line 251, in pathArcTo
    sig = sig * math.sqrt(numr / demr)
ValueError: math domain error

----------------
However , I then tried copy/past of the same content into Gimp and ScribusNG and for these prgrams it works without flaw, the content is inserted and no trackback dialog is opened under inkscape. So it appears we are doing something different from the others..
Comment 4 Drew Jensen 2012-02-01 13:47:49 UTC
ok - maybe that was a wrong assumption there - I used ScribusNG as I thought it would also bring the SVG objects in as SVG objects..I was wrong, it also converts the clipboard contents into a raster image on import.

One final comment - I tried this again and somehow missed this earlier. 
What I also get after the Inkscape trackback dialog opens and using Writer but _not_ Draw is a LibO warning dialog saying 
- Requested Clipboard Format is not available. 

So back to thinking this may be an Inkscape issue.
Comment 5 Drew Jensen 2012-02-02 17:14:29 UTC
Created attachment 56558 [details]
Inkscape test file
Comment 6 Drew Jensen 2012-02-02 17:15:04 UTC
Created attachment 56559 [details]
example error document
Comment 7 Drew Jensen 2012-02-02 17:19:42 UTC
Same test system - Ubuntu 11.04 (64bit), Unity
Updated Inkscape to latest trunk build.

Copy / paste of multiple objects still triggers error backtrack in inkscape.
Paste to draw does nothing

Copy / paste of single object to Draw - no error in inkscape triggerd - nothing inserted to Draw file

Copy/ pate of single object writer..

1 - open attached svg file
2 - select one object and copy to clipboard
3 - paste into Writer file
Noe errors triggered, a green marker displays in the writer, but no graphic.
Double clicking the field(?) marker opens a sript edit dialog I've never seen before.

Attached example inkscape file used
Attached resulting word file, the insert point is at the end of the text.
Comment 8 Philippe 2012-12-10 13:07:09 UTC
I confirm that I have been seeing this bugs for many years in Ubuntu.

I've done a little bit more investigation, if that can help locating the problem: 

It seems this is a linux-specific bug. (According to that report https://bugs.freedesktop.org/show_bug.cgi?id=48889 graphics are indeed pasted in windows).

Also it's not an Inkscape-specific bug. Same text-pasting problem with MarvinSketch (see https://www.chemaxon.com/forum/ftopic8927.html).

Ok, one could think LO is just picking the wrong clipboard format. Unfortunately Paste-Special is not an option: the list is empty.

Using a little python script I could take a look at what Mime types Inkscape advertises on the clipboard; it says:

------------------------------------------------------------
['TIMESTAMP', 'TARGETS', 'MULTIPLE', 'image/x-inkscape-svg', 'image/svg+xml', 'image/x-inkscape-svg-compressed', 'image/svg+xml-compressed', 'text/plain', 'application/pdf', 'image/png', 'image/x-postscript', 'image/x-e-postscript', 'text/x-povray-script', 'text/x-javafx-script', 'text/x-tex', 'application/x-wmf', 'image/hpgl', 'image/dxf', 'text/xml+xaml', 'application/x-xsk1', 'application/x-zip', 'image/x-plt', 'application/x-xcf', 'application/x-qt-image']
------------------------------------------------------------

So it's a mystery why there is not a single Paste-Special possibility. And moreover these other formats actually exist since in wine-powerpoint a bitmap gets pasted when I do ctrl-V.
Comment 9 Jim Van Zandt 2013-07-27 15:01:38 UTC
I've run into a possibly related problem.  In Libre Office Impress, I cut and pasted a block of text.  Then  I copied several drawing objects (lines, text, filled circles, etc.) from an Inkscape canvas and tried to paste them into a different canvas.  However, what got pasted was the block of text from Impress.  Somehow Inkscape was unable to replace the content of the clipboard.

I'm using Inkscape 0.48 and Libre Office 3.5.4.2 under Debian 7.0.
Comment 10 sasha.libreoffice 2013-07-29 06:39:29 UTC
In 4.1.0 problem still exist.
Workaround: Save picture as file and then copy-paste this file into LO.
Comment 11 Frederic Parrenin 2014-09-23 20:00:31 UTC
I confirm this but in a slightly different context: I was trying to copy a graphic from gnumeric and paste it in LO on debian or ubuntu. The copied graphic is pixelized, it does not use the svg format, which gnumeric support, see:
https://bugzilla.gnome.org/show_bug.cgi?id=737132

It is true there is a workaround: saving to an svg file, and importing the file in LO. But it is more convenient to use copy/paste, and actually this feature (pasting a vector graphic) has been supported on MS office for about 20 years, so for me this is a must-have.
Comment 12 QA Administrators 2015-10-14 19:57:00 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

   Test to see if the bug is still present on a currently supported version of LibreOffice (5.0.1 or preferably 5.0.2.2 or later)
   https://www.libreoffice.org/download/

   If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
 
 If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

   Update the version field
   Reply via email (please reply directly on the bug tracker)
   Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 

1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug 
3. Leave a comment with your results. 
4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 
4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-10-14
Comment 13 Buovjaga 2015-12-04 16:28:18 UTC
Copied the test file just fine to all components (Inkscape 0.91). WFM.

Ubuntu 15.10 64-bit 
Version: 5.0.3.2
Build ID: 1:5.0.3~rc2-0ubuntu1
Locale: en-US (en_US.UTF-8)