Download it now!
Bug 119721 - kde5: Drag'n drop of text not working
Summary: kde5: Drag'n drop of text not working
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Katarina Behrens (Inactive)
URL:
Whiteboard: target:6.2.0
Keywords:
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:


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

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 (CIB) 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

https://cgit.freedesktop.org/libreoffice/core/commit/?id=6685793351178364460e1580e07b2bf5ccc043ce
https://cgit.freedesktop.org/libreoffice/core/commit/?id=0585043a6f326a2e108a51bba251ce77ca6a2ea0
https://cgit.freedesktop.org/libreoffice/core/commit/?id=ac2b58cdae26375846f67bfbe7244e4a0fd306ba
https://cgit.freedesktop.org/libreoffice/core/commit/?id=5ebef042bd44e9babd58f53b4458616aa3215beb
https://cgit.freedesktop.org/libreoffice/core/commit/?id=0fa25c261ad1bac1303f8a35d89261365bb5d849
https://cgit.freedesktop.org/libreoffice/core/commit/?id=a261016b9817443878396c745a72e8d2eb644ded

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,