Bug 145722 - Basic Editor : impossible to copy a module or a dialog to an another worksheet.
Summary: Basic Editor : impossible to copy a module or a dialog to an another worksheet.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: x86-64 (AMD64) other
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0 target:7.3.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2021-11-16 15:58 UTC by Thierry Munoz
Modified: 2022-05-18 09:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
ScreenShot (51.99 KB, image/png)
2021-11-16 15:59 UTC, Thierry Munoz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Munoz 2021-11-16 15:58:36 UTC
Description:
I can't copy a basic or dialog module to an another worksheet with dragging and copying (with the Control Key pressed). I've no contextual menu to copy and paste too.
I can move but not copying (ses screenshot).
I'm using Ubuntu 20.04 Mate edition.

Regards

Steps to Reproduce:
1.Open 2 worksheets
2.Open the window to manage BASIC macros.
3.Try to copy a basic or dialog module from 1 worksheet to the other with CONTROL key pressed

Actual Results:
No copying (no symbol + appears when CTRL key pressed), just moving.

Expected Results:
No copying


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Nothing
Comment 1 Thierry Munoz 2021-11-16 15:59:36 UTC
Created attachment 176292 [details]
ScreenShot
Comment 2 Regina Henschel 2021-11-16 19:24:08 UTC
A drag-drop copy is indeed not possible yet. You need to go via save and load in the IDE. It is a valid enhancement request.
Comment 3 Thierry Munoz 2021-11-16 20:49:53 UTC
Thanks Regina,
But for me is not an enhancement, it's a regression because I made it so it was possible with the anterior versions of LibreOffice (see the documentation here, the last line : https://help.libreoffice.org/3.5/Basic/Organizing_Libraries_and_Modules, but this still worked on version 6).
Regards.
Comment 4 Regina Henschel 2021-11-17 00:33:25 UTC
I've got it.

Fails in Version: 6.4.0.0.alpha1+ (x64)
Build ID: d456ca6efb98d707427228e8131dfe8a5f27e2f6
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: GL; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL

Is OK in Version: 6.3.0.0.alpha1+
Build ID: f6e7dbccf063767c2ac87c6460bd1004df742081
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-05-30_00:13:29
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 5 Thierry Munoz 2021-11-17 17:25:16 UTC
I've tested too under Windows 10 and LibreOffice 7.1.7 and 7.2.2 and LibreOffice crash when I close the window to manage the macros.
Comment 6 Thierry Munoz 2021-11-19 18:59:01 UTC
Hi, an other user told me that the crash in Windows appears when the document where we copy/move the module isn't saved before.
Comment 7 TISSENDIER Pierre 2022-02-25 13:01:28 UTC
Fails in
Version: 7.3.0.3 / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Ubuntu 20.04 LTS Gnome 3.36.8 Window : X11

Actual result : No copying (no symbol + appears when CTRL key pressed), just moving.
Comment 8 raal 2022-05-11 15:30:24 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
 1422df3e1338ce034c616dfbc3248b0fb3436c7f is the first bad commit
commit 1422df3e1338ce034c616dfbc3248b0fb3436c7f
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Jun 13 02:07:30 2019 +0200

    source ad1cbee2ffc7b3c10cad6fd69f5e4b523ac4027c

https://git.libreoffice.org/core/+/ad1cbee2ffc7b3c10cad6fd69f5e4b523ac4027c
  weld OrganizeDialog
Comment 9 raal 2022-05-11 15:35:49 UTC
(In reply to Thierry Munoz from comment #6)
> Hi, an other user told me that the crash in Windows appears when the
> document where we copy/move the module isn't saved before.

Can you reproduce it? I have not Windows, but on Linux it doesn't crash for me.
Comment 10 Caolán McNamara 2022-05-12 18:49:42 UTC
ctrl doesn't seem to be selecting the "copy" case. Mostly the same code is used for the drag and drop elsewhere, and the ctrl as "copy" is working in e.g. writer so there must be some piece missing.
Comment 11 Caolán McNamara 2022-05-17 10:40:55 UTC
aha, gtk_tree_view_set_reorderable just sets GDK_ACTION_MOVE alone so that's presumably the root of my trouble
Comment 12 Commit Notification 2022-05-17 18:50:42 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ba257c8443e3b66f73737895f68e57b7cd1c7cb2

Related: tdf#145722 need to clone userdata if we copy a module/dialog

It will be available in 7.4.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 13 Commit Notification 2022-05-17 18:50:51 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/517a39c3201ff5a2a258402ca5de6ae9d9c41196

Resolves: tdf#145722 don't propose MOVE from AcceptDrop if not asked for MOVE

It will be available in 7.4.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 Caolán McNamara 2022-05-17 18:52:02 UTC
done in trunk, backports to 7.3 in gerrit
Comment 15 Commit Notification 2022-05-18 09:04:19 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/5d2f16b0ae25949a0f466c30357fd591fa7276d9

Related: tdf#145722 need to clone userdata if we copy a module/dialog

It will be available in 7.3.4.

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 16 Commit Notification 2022-05-18 09:16:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/7f989417a1f16b6db6b9b0fbc6bb6ffd7a81bb1c

Resolves: tdf#145722 don't propose MOVE from AcceptDrop if not asked for MOVE

It will be available in 7.3.4.

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.