Bug 109277 - Control-drag-drop in Writer doesn’t copy
Summary: Control-drag-drop in Writer doesn’t copy
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.6 target:5.4.1
Keywords:
Depends on:
Blocks: Cut-Copy
  Show dependency treegraph
 
Reported: 2017-07-22 18:26 UTC by Tim Ferguson
Modified: 2017-07-27 20:46 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Ferguson 2017-07-22 18:26:58 UTC
Control-drag-drop in Writer doesn’t copy

Drag and drop with <ctrl> key is meant to copy text, but it only moves it and does not preserve the original. 

Method to reproduce

1.  Create a new text document in Writer

2.  Enter three lines of text, eg **Paragraph one of text \<enter>Paragraph two of text \<enter>Paragraph three of text**

3.  Use the mouse or keyboard to highlight the first line of text.

4.  Use the mouse to drag the first line to the start of the third line. Before dropping the text, press and hold the <ctrl> key. The mouse icon changes to a copy icon with a ‘+’ symbol.

5.  Release the mouse button and then the <ctrl> key. The text is moved from the first line and not copied. 

This does not appear to be related to bug # 33692, which describes copying of graphic shapes not working. 

Current set up

LibreOffice: Version: 5.3.4.2

Arch Linux 64 bit, fully updated

Awesome window manager:    
same behaviour shown under Gnome DE and default WM.
Comment 1 Julien Nabet 2017-07-23 12:28:51 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Interesting point is it happens only with gtk3 rendering.
Not with gtk (=gtk2), kde4 and gen rendering.

I noticed logs these on console:
warn:legacy.osl:18356:1:sw/source/core/access/accmap.cxx:1029: invalid event combination
warn:legacy.osl:18356:1:sw/source/core/access/accmap.cxx:1029: invalid event combination
warn:legacy.osl:18356:1:sw/source/core/access/acccontext.cxx:455: fire event for disposed frame?
warn:legacy.osl:18356:1:sw/source/core/access/acccontext.cxx:455: fire event for disposed frame?
warn:legacy.osl:18356:1:sw/source/core/access/acccontext.cxx:455: fire event for disposed frame?
warn:legacy.osl:18356:1:sw/source/core/access/acccontext.cxx:455: fire event for disposed frame?
warn:sw.core:18356:1:sw/source/core/attr/calbck.cxx:170: a 21SwAccessibleParagraph client added as listener to a 16SwTextFormatColl during client iteration.
Comment 2 Caolán McNamara 2017-07-26 20:31:17 UTC
I think I need to explicitly query for the ctrl being pressed in the gtk3 signalDragMotion callback
Comment 4 Julien Nabet 2017-07-27 10:48:30 UTC
With master sources updated today (which includes the patch), I confirm it's ok now.
Thank you Caolán!
Comment 5 Commit Notification 2017-07-27 20:46:29 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3cb369463e4e9d0a00baee3adf10957d1ed7ed83&h=libreoffice-5-3

gtk3: Resolves: tdf#109277 take modifier key into account for dnd

It will be available in 5.3.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2017-07-27 20:46:37 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ab273651477d76890fc4268277b52893d89edc0b&h=libreoffice-5-4

gtk3: Resolves: tdf#109277 take modifier key into account for dnd

It will be available in 5.4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.