Support for copy/paste with system clipboard

Bug #170185 reported by Wolfiq on 2004-03-04
80
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Krzysztof Kosinski
inkscape (Debian)
Fix Released
Unknown
inkscape (Ubuntu)
Undecided
Unassigned

Bug Description

Hell alltogether!

Guido Günther <agx at debian dot org> reported this bug
to the Debian BTS
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=232216):

copy/paste between applications seems to be non
functional with
inkscape. E.g. when I type a text in abiword, copy it
to the clipboard
and hit "paste" in inkscape it says: "Nothing is in the
clipboard"
although the same works fine between e.g. abiword and
gnumeric.

In private he told me, that at least the menu item
should be grey (inactive) if there is nothing pastable
in the clipboard, which ist reasonable. Additionally, I
think at least text should be copy-pasteable between
applications.

Best regards,

Wolfi

Wolfiq (wolfiq) wrote :

Hell alltogether!

Guido Günther <agx at debian dot org> reported this bug
to the Debian BTS
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=232216):

copy/paste between applications seems to be non
functional with
inkscape. E.g. when I type a text in abiword, copy it
to the clipboard
and hit "paste" in inkscape it says: "Nothing is in the
clipboard"
although the same works fine between e.g. abiword and
gnumeric.

In private he told me, that at least the menu item
should be grey (inactive) if there is nothing pastable
in the clipboard, which ist reasonable. Additionally, I
think at least text should be copy-pasteable between
applications.

Best regards,

Wolfi

Yes, we must support the system clipboard for text. Graying
out menu commands would be nice too. Moving this over to RFE.

severity: wishlist

Hi alltogether!

buliabyak wrote on sourceforge:

> Yes, we must support the system clipboard for text. Graying
> out menu commands would be nice too. Moving this over to RFE.

I move this bug to wishlist, too.

Best regards,

Wolfi

Bug Importer (bug-importer) wrote :

Provide a clipboard functionality for graphics add well,
not only text. SVG should be great as a clipboard format,
since it's text. Seamless copy/paste between applications
adds quite a lot to user experience!

Hi,
subject says it almost all:
 http://sourceforge.net/tracker/index.php?func=detail&aid=909735&group_id=93438&atid=604306
doesn't point to the upstream BTS.
Cheers,
 -- Guido

# Automatically generated email from bts, devscripts version 2.7.95.1
 # The SF URL changed probably due to new comments. This is the new one. Thanks
forwarded 232216 http://sourceforge.net/tracker/index.php?func=detail&aid=909735&group_id=93438&atid=604309

Peter Moulder (pjrm) wrote :

Relevant references:
First read http://freedesktop.org/Standards/ClipboardsWiki
to guide your further reading. One of its references is the
ICCCM, which google tells can be found at
http://tronche.com/gui/x/icccm/. Chapter 2, and perhaps
chapter 1.

Bug Importer (bug-importer) wrote :

When using copy paste in windows, you should be able to
import EMF/WMF from the clipboard into inkscape. This
feature will make it a lot more useful

I can confirm this is also broken when trying to copy a
chart in Gnumeric and then paste it into Inkscape. It
pastes fine into OOo (albeit as a bitmap, because OOo
doesn't support SVG).

Jean Brefort said: "graphs are exported [from Gnumeric] at
least as svg, png and jpeg to the clipboard. I don't know
why inskape can't paste them."

Horkana-users (horkana-users) wrote :

Originator: NO

bumping priority because there have been so many duplicates of this
request (closed a few today). interaction with fontforge seems to be
particularly popular.

the workaround by saving/exporting a file and then opening it in another
program means this although awkward and a problem when it comes to user
satisfaction it might not get done anytime soon.

Marcin Floryan (mfloryan) wrote :

Originator: NO

It does not work in Windows either and it is not even possible to copy and
paste between two instances of Inkscape and therefore import/export must be
used which is a little cumbersome. Alternatively copy/paste of svg source
text can currently be used.

Axiomx11 (axiomx11) wrote :

Originator: NO

Was going to file a report on this, but saw this page. It is very
annoying on Windows at least, you can't copy and paste shapes between
several instances of Inkscape. It seems to matter in which order you have
opened them, because sometimes it works, but other times it will not accept
the copied material from the other window until you close that drawing and
open it again from the open file dialog of the window that you want to
paste into.

I know that y'all know about this, and this is just a rant...

Inkscape 0.45.1 built Mar 21 2007
Windows XP SP2

Bug Importer (bug-importer) wrote :

I have the same probleme
Using openSuse 10.2, KDE 3.5 and inkscape 0.45.1
I can paste from clipboard only to new inkscape documents.

Bug Importer (bug-importer) wrote :

I have been evaluating Inkscape with an eye to changing over from Visio
for saving graphics for the publications we produce in my department. We
have two types of graphics in our documentation - screen captures (that
don't need editing), and lineart drawings. My goal is to find a single
editor that can 1) for the linearts: open/create/edit/save SVG files, and
2) for the screen caps: allows me to paste a screen capture and save it as
SVG (even if it's just a rasterized image, wrapped in an SVG, with no
additional edits).

Inkscape does #1 beautifully! I would like to have chosen it, but I need
an editor that does the 2nd so that we all don't have to use two
applications. It seems that Inkscape is sooo close, since it allows you to
open stored raster files (Import). If only paste could work that same way
so I could just paste and save.

This is an excellent product, all the same. I enjoyed it more than Visio
(which does allow pasting from clipboard), but will have to stick with
Visio for now!

cheers,
Laura Nevin
<email address hidden>

Nobs-users (nobs-users) wrote :

Originator: NO

it does not even work between two instances of inkscape

it would make work much easier if you could exchange parts of a graphic
between two loaded SVG-documents

I'm confirming this in accordance to <URL http://wiki.inkscape.org/wiki/index.php/BugTriageProjects>.

Changed in inkscape:
status: New → Confirmed
Krzysztof Kosinski (tweenk) wrote :

Confirm on 0.45-1 and SVN trunk on Ubuntu 7.10. I suggest that this should be milestoned for 0.46.

Confirmed on XP binary build as well. copy/paste only works between two Inkscape drawings if opened/created within the same Inkscape instance (i.e. the second drawing is created File->New or opened File->Open once Inkscape is running).

Krzysztof Kosinski (tweenk) wrote :

I'll try to work at this, any advice is appreciated.

My idea is to maintain a complete document as the clipboard contents, and support content negotiaion using the existing export extensions.

Changed in inkscape:
assignee: nobody → tweenk
status: Confirmed → In Progress

Yes, I think maintaining a complete SPDocument to represent the clipboard contents on the Inkscape side (at least when the clipboard contains SVG) is the right approach. Using a real SPDocument rather than just an XML::Document will make it easier to solve other clipboard-related problems as well.

Krzysztof Kosinski (tweenk) wrote :

OK, I think I'm done. I went the hard way and instead of trying to build something aorund the existing clipboard functions, I moved clipboard handling into a separate class. Everything that works inside Inkscape will work between different instances of Inkscape too. Also, pasting a color specified as an 8-character hexadecimal string will change the fill of the selected items. This is something that was supposed to function but was never implemented.
There are also some changes in the MIME types of the output extensions, because they are significant now.

Because the output extensions write to files only, using the clipboard writes to files too. This is not fixable without serious reengineering of the IO extensions subsystem.

The most important regression I've found is that pasting Live Path Effects doesn't work right and produces a crash when moving the path. However, I'm not sure if it ever worked to begin with. For now it's disabled completely (i.e. the function returns without doing anything). Pasting LPE parameters is currently broken too (probably those two bugs are related).

bbyak (buliabyak) wrote :

Well, pasting LPE works fine for me before your patch, within or between documents. The important point is to copy over the relevant defs, that's why we had a separate defs clipboard in addition to objects clipboard. Does your patch support that? Does copy/paste of objects with gradients, patterns, markers work between documents and instances? If yes, then the LPE bug must be something simple and will probably be easy to fix.

In any case, thanks A LOT for the patch, it's one of the major missing things in Inkscape!

Krzysztof Kosinski (tweenk) wrote :

My patch does copy defs between documents. It uses the same code that was formerly in selection-chemistry.cpp, I just modified it to put the defs in a SPDocument instead of in some arbitrary variable. I took care to maintain functional equivalency with that code. Therefore, everything that worked inside Inkscape should work between instances now, unless there are bugs in my code.

Fixing LPEs to work perfectly with the clipboard will be my next focus. Actually, pasting LPEs works to some extent, because in XML editor the path has a forked effect applied, but it doesn't appear on the canvas and Inkscape crashes when trying to move it. Probably there is some unexpected interaction with the lpeparam copying-pasting code that I haven't modified yet, because I don't know the feature it provides.

Excellent, I will try your patch and let you know if I find any problems.

Johan Engelen (johanengelen) wrote :

Thank you soo much for this patch!!!

alextretij (alextretij) wrote :

Thank you.

Krzysztof Kosinski (tweenk) wrote :

I have fixed the LPE issue. Copying paths with LPEs applied is now OK too. I also implemented the functions necessary for LPE pathparam handling, and removed some unneeded stuff from selection-chemistry.cpp. This patch should be commit-ready now.

I've gone ahead and committed this as r18016. There appear to be some minor issues with undoing cross-instance pasting still, and I'm going to need to look at some things in the code, but we're 99% there at this point and it'd be a shame to keep it out of trunk. The remaining issues shouldn't be that bad to sort out, and having more people testing will help.

Thank you, Chris. This has been needed so badly for so long.

bbyak (buliabyak) wrote :

 Krzysztof, please give me your sourceforge username and I'll give you devel access. You have deserved it, and you will need it for fixing bugs in your patch anyway :)

Thanks!

bbyak (buliabyak) wrote :

Also, please go to http://wiki.inkscape.org/wiki/index.php/ReleaseNotes047 and add a detailed description of your changes

Krzysztof Kosinski (tweenk) wrote :

My SF.net account name is "tweenk". Thanks in advance!

Krzysztof Kosinski (tweenk) wrote :

Since this is in trunk, marking as fixed, I'll open separate bugs for any remaining issues.

Changed in inkscape:
status: In Progress → Fix Committed
bbyak (buliabyak) on 2008-03-27
Changed in inkscape:
status: Fix Committed → Fix Released
bbyak (buliabyak) wrote :

done, you can now commit to svn

please have a look bug 207268 - it's something that worked before your patch

Good work Krzyzstof.
I am adding this as new in distribution Ubuntu. In the most recent version of Hardy, I still cannot copy/paste between two instances of inkscape. Until it has made a distribution, it can only be fix committed.

Changed in inkscape:
status: New → Fix Committed
JayK (jakres) wrote :

It does not work for me in Jaunty. I cannot copy neither objects from one Inkscape to another nor text from gedit to Inkscape. It says "Nothing is in the clipboard" or rather the German counterpart.

This is still the case also for me in Jaunty (9.04).

To JayK and Danny Staple: which version of inkscape are you using? v0.46 or a nightly development build?

If you're not already using the latter, then could you please try one? Available here:

     http://ubuntu.cafuego.net/dists/jaunty-cafuego/inkscape/

or here

     http://launchpad.net/~inkscape-nightly/+archive

Thanks Diederik this will work temporarily, but the defect still can not be closed until that upstream fix or build has made it to Jaunty or a stable ubuntu release.

The current version in Jaunty:
inkscape:
  Installed: 0.46-5ubuntu4
  Candidate: 0.46-5ubuntu4
  Version table:
 *** 0.46-5ubuntu4 0
        500 http://gb.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Alex Valavanis (valavanisalex) wrote :

The upstream patches are now in karmic, I think. I'm able to copy/paste objects between inkscape instances and set colours by copy/pasting 8-digit hex codes.

Changed in inkscape (Ubuntu):
status: Fix Committed → Fix Released
su_v (suv-lp) on 2009-09-23
tags: added: clipboard
Changed in inkscape:
assignee: Krzysztof Kosinski (tweenk) → Michelle (oncebitten1234)
su_v (suv-lp) wrote :

I doubt that the previous change was really intended - restoring previous assignment to Krzysztof.

Changed in inkscape:
assignee: Michelle (oncebitten1234) → Krzysztof Kosinski (tweenk)
Krzysztof Kosinski (tweenk) wrote :

Text pasting and graying out the paste action when nothing is on the clipboard should be filed as separate bugs.

Version: 0.47-1

I'm marking this bug as fixed, as the upstream changes are now
available in Debian. Note that bug #545459 is still open, which deals
with crashes when pasting into Inkscape.

notfixed 232216 0.47-1
thanks

Changed in inkscape (Debian):
status: Unknown → Fix Released
U.Yildiz (astro-umut-yildiz) wrote :

Hi, I have upgraded my Inkscape to ver. 0.47 and copy/paste problem occur again. It copies but pastes some empty box. Could the developers take a look at this issue please?

Thanks

I don't think this is fixed. It's 2017 and 0.92.1 is out and pasting a screenshot from the clipboard does nothing (returns "Nothing on the clipboard").

Perhaps I should also add that I'm using Windows 10 and 7.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.