Issue 17051 - URL's copied from Konqueror into OOWriter can't be pasted with normal Paste
Summary: URL's copied from Konqueror into OOWriter can't be pasted with normal Paste
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC
Hardware: PC Linux, all
: P4 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
Depends on:
Reported: 2003-07-18 08:58 UTC by Unknown
Modified: 2013-08-07 14:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-07-18 08:58:26 UTC
First, thanks for a truly great product! 
In evaluating the the 1.1 RC, I have found a couple of bugs,for example OOWriter randomly hanging 
when saving (don't know how to trace this), but this bugreport is about a problem with pasting a 
URL into OOWriter that is copied from Konqueror. To reproduce the bug: 
In Konqueror, right click a hyperlink and select "Copy Link Location". Then try to paste that into 
OOWriter. After a 10-20 seconds "freeze", OOWriter returns to the state it was before pasting. 
When trying to paste again, the "freeze" is much shorter (2-3 seconds). 
I've done a little "investigating" and here are some points that might be of interest: 
- The error does not occur in OOCalc or OOImpress. 
- Text selected in Konqueror and copied will paste without any problem. 
- When right-clicking an image in Konqueror and choosing "Copy Image Location", and then pasting 
into OOWriter, it will paste the image instead of the URL. (Once again, only in OOWriter.) 
- When using Klipper, one can "reselect" the link and pasting will work properly. 
- None of these errors happen when using Mozilla vs OOWriter, or Konqueror vs any other 
My setup is this: 
Gentoo Linux (up to date), KDE 3.1.2, and the binary OpenOffice from the web page. 
I'm sorry if this bug report is somewhat messy. If you have any questions at all, I'll be happy to 
-- Thomas
Comment 1 dankegel 2003-07-26 16:17:29 UTC
Hi Thomas!

As to your present problem, I tried reproducing it under
OOo1.1rc2 and Red Hat 8 Linux (via a remote X session to
another RH8 desktop).  There was a small delay (1 second)
when pasting a URL, and the URL didn't show up.  This is
indeed a usability problem.  However, the workaround is to
Paste Special rather than Paste.

Likewise, with the image, Paste Special gets the URL.

I'm updating your issue summary to reflect what I found
and confirming it at low priority, even though it's possible
it's a problem in Konqueror.  We do have to work out these
little issues in copy-and-paste so they don't suprise anyone.

About the hang problem you mentioned:
To debug a hang, run openoffice under GDB, get the problem to happen,
and press ^C in the GDB window.  Then give the 'bt' command to get
a backtrace of the current thread.  Then use 'info threads' to list
all the threads, 'thread N' to switch to each one, and give the 'bt'
command again to get a backtrace of that thread's stack.  See for more info.  Please enter this
as a separate issue.

Comment 2 h.ilter 2003-07-28 15:47:44 UTC
Reassigned to ES
Comment 3 eric.savary 2003-09-09 17:40:06 UTC
ES: I cannot reproduce the freeze either.
Same as Don Kegel's description.

->DVO: (regression) do you rate the graphic problem and the URL
problem as having the same origin or do you want an other issue for
one of the both? 
Comment 4 openoffice 2003-10-30 11:43:59 UTC
dvo: I'm finally able to reproduce this... reproduce the
insert-graphic or insert-not-at-all problem as reported by Dan and
Eric that is, not the freeze.

Explanation: With clipboard operations, the copy process puts a number
of formats (format names, not contents) into the clipboard. The paste
process can examine this lists, and chooses the 'best' format ti can
support. E.g., when copy+pasting text, the copy process e.g. text and
RTF and HTML into the clipboard. A receiving text editor would choose
the text format, while a full blown word processor would choose either
of RTF or HTML.

The problem is that there are many clipboard formats, even for the
same thing. E.g., for a link one might use plain text as format, or a
specialized URL format (which has the same info, but additionally
informs the receiving app that this is an URL), or as a file (almost
the same as URL).

Now, what I think happens here is this: When choosing 'copy link
location', Konquerer is a little extra friendly, and not only puts the
link location as text into the clipboard, but also as a file or URL.
Other browser probably only use text; however, for Konquerer as a
file+web+everything browser, treating this as a file makes a certain
amount of sense. Now... Writer tries to be a little extra friendly,
too. If someone puts a file into the clipboard, we try to insert the
file. Which works fine with a graphics, and not with
not-insertable-formats. So, when Writer examines the clipboard, it
finds that a file is better than plain text, and tries to insert it.
Works for the graphics; fails for anything else. Only if the user
specifically overrides Writer's choice (paste special, text) the text
is inserted...

Problem #1: That's my hypothesis; I'm not sure yet how to test whether
this actually is the case.

Problem #2: I'm not really sure what we want to do in this case. If
Konquerer actually puts an 'URL' or 'file' into the clipboard, then
Writer's behaviour is perfectly sensible...

P.S.: Maybe the freeze has to do with which file is being pointed to.
If Writer attempts to insert it, it may depend on the exact URL being
pasted (or the network connection, for that matter) how much time this
process takes.

P.S. 2: I'm not really sure this should be targetted as OOo 1.1.1 -
There's a new copy-paste-spec on OOo for the 2.0 time frame; this
issue might best be handled together with that work.
Comment 5 openoffice 2003-10-30 13:18:13 UTC
dvo: Additional info: This seems to have worked for previous versions,
so maybe my hypothesis is wrong.

Still, changing target to OOo 2.0.
Comment 6 openoffice 2004-02-04 18:52:47 UTC
Comment 7 openoffice 2004-10-12 16:55:45 UTC
dvo->fs: Please have a look at this. The relevant code is in:
  sw/source/ui/dochdl/swdtflvr.cxx (copy&paste handling in Writer)
  sot/source/base/exchange.cxx + formats.cxx (format tables)
Comment 8 andreas.martens 2004-12-03 08:40:58 UTC
Changed prio to 4
Comment 9 Frank Schönheit 2005-03-15 11:20:54 UTC
targeting to "OOo Later" in agreement with AMA
Comment 10 Rob Weir 2013-07-30 02:23:17 UTC
Reset assignee on issues not touched by assignee in more than 2000 days.