Bug 101072 - Drag&Drop from Navigator does not work for objects from active document (in Impress)
Summary: Drag&Drop from Navigator does not work for objects from active document (in I...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.0.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2016-07-22 16:28 UTC by Regina Henschel
Modified: 2019-01-20 21:48 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Dummy presentation to test the actions (10.73 KB, application/vnd.oasis.opendocument.presentation)
2016-07-22 16:28 UTC, Regina Henschel
Details
demo of it working (323.54 KB, video/webm)
2019-01-17 13:53 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2016-07-22 16:28:40 UTC
Created attachment 126364 [details]
Dummy presentation to test the actions

Open attached document and go to third slide, which is empty.
Open the Navigator.
Drag the item "Rechteck" to the slide. Nothing happens. Try with the other kind of dragging. Nothing happens.

Expected behavior:
Drag mode "Hyperlink": A link with URL to the file name and anchor to the first slide is inserted, in text form or in button form.
Drag mode "Link": A rectangle is inserted with action "goto".
Drag mode "Copy": A rectangle is inserted, which is a copy.

Dragging a complete slide should duplicate it.

Possible minimal solutions:
Show a "forbidden" cursor.
or
Remove or hide those items in the Drag mode list, which does not work in the current situation.
Comment 1 Cor Nouws 2016-07-27 12:20:58 UTC
Hi Regina,

What you write is correct.
In my understanding, this drag&drop function can be used to take elements from another file.
So when your file is open, create a new file, then in the Navigator at the bottom open the Source.odp and drag ..
Also with limitations (Link does not work and Hyperlink gives the wrong path), but..
Comment 2 Carlos 2017-03-29 19:24:07 UTC
Thank you for reporting the bug. I can confirm that the bug is present in
Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group
Comment 3 Alex Thurgood 2017-10-13 11:01:45 UTC
*** Bug 113085 has been marked as a duplicate of this bug. ***
Comment 4 Alex Thurgood 2017-10-13 11:02:58 UTC
Not just Windows, see also bug 113085
Comment 5 Alex Thurgood 2017-10-13 11:03:54 UTC
And not just Impress, as bug 113085 shows the same problem with regards to Writer
Comment 6 Alex Thurgood 2017-10-13 11:06:17 UTC
Hmm, perhaps both this bug and bug 113085 should be duplicates of bug 90661 ?
Comment 7 Cor Nouws 2017-10-13 21:39:29 UTC
(In reply to Alex Thurgood from comment #5)
> And not just Impress, as bug 113085 shows the same problem with regards to
> Writer

This bug is Impress only - in Writer some things do work.
Comment 8 QA Administrators 2018-10-14 02:57:30 UTC Comment hidden (obsolete)
Comment 9 Regina Henschel 2018-11-06 14:41:03 UTC
The feature has worked in LibreOffice Version 4.0.1.2 (Build ID: 84102822e3d61eb989ddd325abf1ac077904985)

It is broken in Version: 4.5.0.0.alpha0+
Build ID: 40b1e8266e47792d354cd457c652bfb0f0a21e69
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-02-11_00:13:43
Locale: en_US. Sorry, I do not have a release version from that time.

Currently the mouse button down already switches the center view to the object, so that a drag is not possible at all. Tested in Version: 6.2.0.0.alpha1+ (x64)
Build ID: f825e6d4082c0d0beb1c95b881f6a2ee9bfc9161
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-05_00:20:26
Locale: de-DE (en_US); Calc: CL
Comment 10 Xisco Faulí 2018-11-09 15:29:58 UTC
I can reproduce it in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 

but not in

Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)

needs to be bisected with repo 5.1

however, the behaviour in master has changed now. Clicking on an object moves the view to that object. So I don't know if drag&drop could work now...

Adding Jim to the loop as well
Comment 11 raal 2018-11-12 12:25:12 UTC
This seems to have begun at the below commit.
Adding Cc: to Caolán McNamara; Could you possibly take a look at this one? Thanks
 03499868f8752df4db01fcfbd149708fb9d9b2a4 is the first bad commit
commit 03499868f8752df4db01fcfbd149708fb9d9b2a4
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Oct 12 06:36:16 2016 -0700

    source 4dc6e29dd6c531dc9c867bc75ef0128a78d99f33

author	Caolán McNamara <caolanm@redhat.com>	2016-10-11 20:34:32 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2016-10-12 10:10:20 +0100
commit 4dc6e29dd6c531dc9c867bc75ef0128a78d99f33 (patch)
tree be99d278decdcc2e531f5a732f05f3fe9fcdf8bd
parent 0bd4ae07ae99bf030a3f775b8e16db58f7d2cdba (diff)
convert impress/draw navigator to .ui
Comment 12 Caolán McNamara 2018-11-19 13:04:52 UTC
I can fix drag and drop, but since bug 115873 a single click on an element in the impress navigator selects that object so while dnd will work, the interaction isn't right.
Comment 13 Commit Notification 2018-11-19 14:48:23 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/c79653e33d018de7dd89b41e4206260b6a0767e9%5E%21

tdf#101072 mpParent isn't SdNavigatorWin

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2018-11-19 15:28:48 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/ec4769a82f8a35495c1f2dfdd79023d29c263b90%5E%21

tdf#101072 let the sidebar navigator drag and drop too

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 15 Miklos Vajna 2018-11-19 15:31:26 UTC
Hmm, f3c68cdf8f6a0273c62b493552f78af0138a44e8 added two flags (SelectionHandlerNavigates, NavigationGrabsFocus) that's how you can navigate with the keyboard without instantly selecting shapes after every keystroke. Perhaps the same machinery could be reused to not select shapes / loose focus during drag and drop.
Comment 16 Commit Notification 2018-11-19 16:25:01 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/63496a57b408ae18558208e4179c7b4624d5a44e%5E%21

tdf#101072 mpParent isn't SdNavigatorWin

It will be available in 6.2.0.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 17 Xisco Faulí 2018-12-27 09:22:09 UTC
A polite ping to Caolán McNamara:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks
Comment 18 Xisco Faulí 2018-12-27 09:24:32 UTC
I can't make drag&drop to work in

Version: 6.3.0.0.alpha0+
Build ID: 993913469e74e9db9743004bbe36aa412411671c
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 19 Cor Nouws 2018-12-28 22:02:40 UTC
(In reply to Caolán McNamara from comment #12)
> I can fix drag and drop, but since bug 115873 a single click on an element
> in the impress navigator selects that object so while dnd will work, the
> interaction isn't right.

In Version: 6.3.0.0.alpha0+
Build ID: 4095f95ddd29f3c3509355b0509640804160348c
one can still chose to see all shapes (Navigator tool bar) and with the arrow key select a shape, not being the selected slide. Dragging to a slide however, doesn't have any effect, neither as Link, Hyperlink or Copy
Comment 20 Caolán McNamara 2019-01-17 13:53:07 UTC
Created attachment 148400 [details]
demo of it working

For me, under gtk3 and gtk2, the actual drag and drop works, as shown in the video following cor's hack to navigate using the keyboard first.

caolanm->miklos: The click will happen first, then when held long enough it becomes a dnd so I don't think tweaking mbNavigationGrabsFocus helps ?

anyway, the piece nailed to me works again AFAICS
Comment 21 Miklos Vajna 2019-01-17 14:40:09 UTC
(In reply to Caolán McNamara from comment #20)
> caolanm->miklos: The click will happen first, then when held long enough it
> becomes a dnd so I don't think tweaking mbNavigationGrabsFocus helps ?

Aha indeed. Perhaps the "single click to focus" could happen on mouse button up, or something, if somebody is not happy with the current state.
Comment 22 Xisco Faulí 2019-01-18 13:24:47 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: cc7712ba4c70c035cbf080c5cf2f2eb6f9fe3eb1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 23 Cor Nouws 2019-01-20 21:48:10 UTC
(In reply to Cor Nouws from comment #19)

> however, doesn't have any effect, neither as Link, Hyperlink or Copy
Ah works for me now - must have been doing something wrong..