Bug 122066 - Drag-and-drop multiple file links
Summary: Drag-and-drop multiple file links
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Drag-and-Drop
  Show dependency treegraph
 
Reported: 2018-12-13 05:46 UTC by wpeaton4
Modified: 2023-10-01 05:14 UTC (History)
3 users (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 wpeaton4 2018-12-13 05:46:29 UTC
Description:
You can drag and drop a picture from a file explorer into any Writer/Calc/Impress etc. If you press Ctl+Shift while dragging, the picture is inserted as a link.

Here's the bug: if you drag multiple pictures, only the first picture is inserted as a link. Everything after is inserted directly.

Steps to Reproduce:
1. Drag multiple pictures from file explore while pressing Ctl+Shift
2. 
3.

Actual Results:
First inserted picture is a link. All other pictures are directly inserted

Expected Results:
All pictures should be inserted as link


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 raal 2018-12-13 11:55:08 UTC
I can not confirm with Version: 6.3.0.0.alpha0+
Build ID: 2b6bd096f5bd9d250e4590d7150190086ad282b2
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 

I tried insert three images (png) and in properties of all of them I can see Link string filled on Image tab.
Comment 2 wpeaton4 2018-12-13 16:36:16 UTC
Original report was erroneously reported against Writer. Writer seems to work correctly.

Impress/Draw exhibit this behavior.

Calc has a different bug -- if you drag multiple pictures only the first picture is placed in the document.
Comment 3 raal 2019-01-18 14:53:13 UTC
Confirm with Version: 4.4.0.0.alpha0+
Build ID: dea4a3b9d7182700abeb4dc756a24a9e8dea8474 and LO 6.3
Comment 4 Michael Weghorn 2019-01-29 09:05:09 UTC
I cannot reproduce using

Version: 6.3.0.0.alpha0+
Build ID: 6c342d5a3748b1ded8f2661883c0be396fc683af
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded

and dragging two pictures from PCManFM file manager to Impress while pressing Ctrl+Shift.

Is this possibly platform-specific (i.e. it depends on the VCL plugin)?
Comment 5 wpeaton4 2019-01-31 04:48:06 UTC
Confirm with Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.2
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group

This is with PCManFM dragging into Impress. First picture is a link. Second one is not. Using Edit...Links to External Files... only shows one file linked. 

That would be great news if somehow current versions in alpha fix this problem.
Comment 6 Michael Weghorn 2019-01-31 11:26:26 UTC
Sorry for giving you false hope; I didn't check properly; it still happens with master...

At a quick glance, the problem seems to be at

https://gerrit.libreoffice.org/plugins/gitiles/core/+/42da02bd5aa50c349ab7a2e75d054fd4af55f6a2/sd/source/ui/view/sdview4.cxx#418

where 'tempAction' is set to 0 for all except the first element in the vector, thus also causing 'bLink' to be false.

This code was introduced by commit

commit c6c750c3e374fbb2b4098f02f7ab36558a74f220
Author: Kai Ahrens <ka@openoffice.org>
Date:   Thu Mar 14 14:37:19 2002 +0000

    #97248#: use MimeTypes to search for correct filters


Since the StarDivision internal bugtracker that the comment refers to is not available, it's hard to say what exactly the reason for that commit was.
In a quick test, just reverting it at least causes the problem that drag'n'dropping 2 PNG files to Impress only inserts the last one (as a link when pressing Ctrl+Shift).
So in any case, this needs further investigation.
Comment 7 QA Administrators 2023-01-16 03:21:38 UTC Comment hidden (obsolete)
Comment 8 wpeaton4 2023-03-22 23:10:27 UTC
Verified bug still present in LibO 7.2.7.2

In Writer, dragging multiple files with Ctl+Shift+Drag will be linked as expected.

In Calc, Draw, Impress, dragging multiple files with Ctl+Shift+Drag will only link one of the dragged files, the rest are embedded in the document.