Issue 115148 - Using middle mouse button to paste under linux does not behave as expected
Summary: Using middle mouse button to paste under linux does not behave as expected
Alias: None
Product: Impress
Classification: Application
Component: ui (show other issues)
Version: OOo 1.0.0
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2010-10-20 15:09 UTC by clippka
Modified: 2017-05-20 11:11 UTC (History)
2 users (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 clippka 2010-10-20 15:09:51 UTC
- Open new presentation or drawing document
- Insert a shape with some text
- Put some text in the clipboard, f.e. from an html page
- Move mouse cursor over the previously created text shape and press middle
mouse button.

Expected behavior

Middle mouse press actives text editing and puts the text cursor at the current
mouse position, then insert the clipboard text at the text cursor

Current behavior

Middle mouse press always inserts a new text shape.

Under windows there is no paste using middle mouse button. To paste using the
mouse one has to use the context menu. The right mouse click on a text shape to
open the context menu also starts the text edit mode and selection of the paste
command works as expected. therefore the handling of the middle mouse button
paste on unix systems is not consistent.
Comment 1 clippka 2010-10-20 17:46:43 UTC
:-( it turns out that this is one of the things that looks like a small bug from
the outside but it is nearly un fixable from the inside.

Problem is as follows... The middle mouse button pastes the 'selection
clipboard', not the 'clipboard'. There is a technical difference. Only mac and
linux support the 'selection clipboard' across different applications. On
windows there is no such thing so we only know about selections inside office
applications (this means in windows if you select something in firefox and then
press middle mouse button inside a writer or impress document nothing happens).

Now, to enable inserting text in a shape while doing middle mouse button I have
to get that shape into edit mode first. while putting the shape into edit mode
it is also selected. this action changes the selection clipboard from anything
that was previously selected into the shape itself. the result is that even so I
go into edit mode,no text is pasted in that shape but the same shape is duplicated.

In writer this works because they do not need a selection to paste text in
existing text.

The only workaround would be to identify the situation (check the clipboard for
text and check that there is actually text under the mouse pointer and then copy
the text from clipboard and then enter text edit mode and insert copied shape).
At this point it is not a small fix any longer but a lot of work. yikes
Comment 2 clippka 2010-11-18 16:35:45 UTC
cl->cl: The solution is in View::InsertData for SOT_FORMATSTR_ID_HTML,
mouse click but *after* the stream was taken from the current transferable
helper. If this does not work make a memory copy of the stream before starting
optional text edit. This conflicts with TL's work to convert the edit engine
clipboard format from binary to xml so I have to wait until his cws is integrated.
Comment 3 Marcus 2017-05-20 11:11:24 UTC
Reset assigne to the default "".