Bug 256881 - Can't get from OOo to X clipboard
Summary: Can't get from OOo to X clipboard
Alias: None
Product: Fedora
Classification: Fedora
Component: openoffice.org
Version: 7
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Caolan McNamara
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-08-27 15:53 UTC by Charles Curley
Modified: 2007-11-30 22:12 UTC (History)
0 users

Clone Of:
Last Closed: 2007-10-04 08:09:33 UTC

Attachments (Terms of Use)

Description Charles Curley 2007-08-27 15:53:22 UTC
Description of problem:

I can copy and paste as usual between OOo documents just fine. What I cannot do is select a cell in OOo Calc, hit Ctl+C, go to Emacs or an xterm, and paste into those.

Version-Release number of selected component (if applicable):

[ccurley@charlesc ~]$ pre openoffice.org-writer emacs gnome-terminal firefox

How reproducible:

Reliably repeatable, on two different machines.

Steps to Reproduce:

1. Select some test from an xterm, Emacs (or, I would think, any other X application) into the X clipboard.

2. Select a cell in OOo calc, and copy it into the clipboard (Ctl-C). Paste it into a different cell to verify.

3. Paste into Emacs, an xterm, etc.
Actual results:

The text selected in step 1 shows up.

Expected results:

The text from text 2 should show up.

Additional info:

The text I used in step 1 came from an xterm and Emacs.

Comment 1 Caolan McNamara 2007-08-27 16:05:18 UTC
a) gnome or kde
b) has this always been the case, or did it suddenly stop working ?

Comment 2 Charles Curley 2007-08-27 17:53:53 UTC
a) I run gnome, gnome-session-2.18.3-1.fc7.i386 KDE (kdelibs-3.5.7-20.fc7.i386) is present.

b) This is the first time I have noticed it. I don't know when I last successfully did this. I upgraded one machine (fresh install, old /home) from FC6 to FC7 on 2007-06-21, the other on 2007-08-24. So this could have showed up as part of the upgrade, and I haven't noticed it until now.

Another thought: this could be related to 247432.


[ccurley@charlesc ~]$ pre fglrx | sort
[ccurley@charlesc ~]$ uname -r

Hmmm, I should be running -65. ???

Comment 3 Charles Curley 2007-08-27 18:09:57 UTC
That's weird. I rebooted to -65. The problem is still present, but instead of getting the old content of the clipboard at step 3, I get just a new line. My choice of kernel should not affect things at the X and application levels!

Comment 4 Charles Curley 2007-08-27 18:30:53 UTC
Further data: Writer does not have this problem. I can do the Unix/X bit of swipe a region of text, and it is in the clipboard.

Also, if I select a cell in Calc, go to the formula bar and swipe the text there, it works correctly.

However, if I simply select a cell, or select a cell and hit Ctl-C, I get as above.

That at least gives me a work-around.

As a point of comparison, I see the original behavior on Ubuntu Feisty Fawn,

root@phoenix:~# pre openoffice.org-calc emacs gnome-session | sort
root@phoenix:~# uname -r

Comment 5 Caolan McNamara 2007-08-28 07:23:31 UTC
Personally I suspect that nothing has changed recently, i.e. see

So, where the text in xterm/emacs has been highlighted i.e. is in primary
selection, but not the clipboard, i.e. paste from edit menus remains unavailable
in OOo. Now ctrl+c a cell in calc, the text is not highlighted as selected, so
the primary selection remains unchanged as the xterm/emacs text, and the OOo
text becomes the clipboard. Now in e.g. gnome-terminal/OOo paste from edit
becomes available, and paste inserts the OOo text, while middle button continues
to insert the unchanged primary selection.

Now actually select the text in OOo so it becomes highlighted (which is what you
always have to do in e.g. writer to be able to copy it either with primary
selection or with clipboard) and it becomes the primary selection and so middle
button paste causes the OOo text to be inserted.

Comment 6 Charles Curley 2007-08-28 15:46:16 UTC
If Zawinski is right, then both xterm and Emacs are doing it wrong.

xterm has no way other than mouse 2 to paste into it. So xterm can only receive from the primary selection, not the clipboard selection.

Emacs has a keystroke, C-y, but it acts identically to mouse 2. Both take the text from the primary selection (if it is more recent than the latest Emacs kill), and copy it into the text being edited and put it on top of the kill ring. Emacs treats the primary selection as a copy of the top of the kill buffer.

Neither seems to have any way to get anything into the clipboard selection.

To further confuse things, I can go to a gnome terminal, swipe some text with mouse 1, and got to Edit-> Copy. I then go to Calc. Edit-> Paste is greyed out, where Zawinski says I should be able to use it to copy from the clipboard selection into Calc. So either Calc or gnome terminal is broken. But I can swipe some test in gnome terminal, go to Calc, hit mouse 2, and there's my text. It's in the primary selection, ready for Emacs to use.

Then there's Firefox's misleading failure to unhighlight regions when some other app claims the primary selection.

I think the basic problem is that nobody knows how clipboards are supposed to work in X. All I know is that something that used to work no longer does, and it's a nuisance.

Comment 7 Caolan McNamara 2007-08-28 16:02:20 UTC
http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki is another
reference FWIW.

"I can go to a gnome terminal, swipe some text with mouse 1, and got to Edit->
Copy. I then go to Calc. Edit-> Paste is greyed out, where Zawinski says I
should be able to use it to copy from the clipboard selection into Calc. So
either Calc or gnome terminal is broken."

I don't see this behavior in F7, Once  copy has been called in gnome-terminal I
get paste in oocalc and it pastes the copied content. Can you also check against
gedit in this case, i.e. do you have a scenario where you can use "paste" in
gedit, but not in calc. 

AFAICS everything is working in OOo as I expect it to work, wrt to xterm and
pasting, there are configurable key bindings that allow the paste of the
clipboard as opposed to the middle paste primary selection mechanism.

Note You need to log in before you can comment on or make changes to this bug.