Bug 119721 - kde5: Drag'n drop of text not working
Summary: kde5: Drag'n drop of text not working
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Hardware: All Linux (All)
: medium normal
Assignee: Katarina Behrens (Inactive)
Whiteboard: target:6.2.0
Depends on:
Blocks: KDE
  Show dependency treegraph
Reported: 2018-09-06 09:24 UTC by Michael Weghorn
Modified: 2018-10-22 07:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

sample document (8.04 KB, application/vnd.oasis.opendocument.text)
2018-09-06 09:24 UTC, Michael Weghorn

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2018-09-06 09:24:12 UTC
Created attachment 144711 [details]
sample document

version: master build as of commit 1f5698ba8b62e62999b0efb363916a91bdd54c94
VCL: kde5 on X11 (the gtk3 VCL plugin e.g. works fine)
platform: Debian testing, Plasma 5 desktop

Steps to reproduce:

1) open attached document "twoparagraphs.odt" in Writer
2) select the text "Firstline" using the mouse
3) left-click on the selection and keep the mouse button pressed
4) move the mouse to after the word "secondline"
5) release the mouse button

Result: The text "secondline" is selected in addition

Expected result: The text "Firstline" should be moved after the text "secondline". (Drag and drop)

Side note: The same thing applies when trying drag and drop with the content of cells in Calc. I'm not creating a separate bug report yet, since it might have the same cause (some functionality not yet implemented for the kde5 vcl plugin?).
Comment 1 Thorsten Behrens (allotropia) 2018-09-06 11:09:29 UTC
Confirm, seems some setAcceptDrops() missing at strategic places.
Comment 2 Katarina Behrens (Inactive) 2018-10-19 12:20:50 UTC
The following commits implement interfaces for successful drag'n'drop of text within 1 document


However (and I can't stress this enough), drag'n'drop (DnD) is very complex topic and so is the related code. There are many possible scenarios, such as DnD within or between the lists, DnD to construct a pivot table, DnD from gallery, perhaps also DnD of some items from outside of LibO ... no way do I know about all of them.

That said, neither have I implemented nor tested all possible uses of DnD so please open a new bug if anything's amiss. The bug as originally reported (DnD of text content in Writer and Calc) is fixed
Comment 3 Michael Weghorn 2018-10-22 07:56:22 UTC
Thanks! This actually implements much more than just drag'n'drop of text (e.g. rearranging sheets in Calc also works fine).

For now I've created the following follow-up bugs: bug 120772, bug 120774, bug 120775,