Bug 142079

Summary: EDITING Drag and drop result from Windows Explorer to Writer is inconsistent
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: heiko.tietze, nemeth, varga.balazs3
Priority: medium    
Version: 7.2.0.0.alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=135669
https://bugs.documentfoundation.org/show_bug.cgi?id=138179
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112976    
Attachments: Example file from Writer with many file types dropped into
Screenshot of the inconsistency in Writer

Description NISZ LibreOffice Team 2021-05-04 11:12:58 UTC
Created attachment 171629 [details]
Example file from Writer with many file types dropped into

Since bug #135669 was fixed, it is possible to drag and drop more file types from Windows file explorer to Writer. The resulting object is inconsistent between file types (document, spreadsheet, presentation) and depends on the dragged files format.
It would be useful to make the default behavior consistent (independent of file format) and configurable on the UI by document types.

Steps to reproduce:
    1. Open attached file (made in 7.1.0) to see the drag and drop results. The source files used are the contents of attachment 167259 [details] and a PDF

Actual results:
For text files, RTF, ODT and DOC get inserted as new section, DOCX as OLE document.
For spreadsheet files, ODS is not inserted at all, XLS is inserted as OLE icon and XLSX as OLE document.
For presentations ODP is not inserted at all, PPT and PPTX are inserted as embedded document.
For PDF, it gets inserted as OLE document.

Expected results:
All text / spreadsheet / presentation files are inserted the same way, which is configurable with config keys at least (maybe also with Options dialog):
- For documents, it should be possible to choose between section / OLE icon / OLE document. (I’m not a fan of section, but it’s okay to keep for historic reasons).
- For spreadsheets, it should be possible to choose between OLE icon / OLE document.
- For presentations, it should be possible to choose between OLE icon / OLE document.
- For PDF documents, it should be possible to choose between OLE icon / OLE document.

For comparison, Word 2019 drag and drops everything – except ODF files – as OLE icon. I guess our users would prefer Writer behaving the same way, so that’s why I’m asking.

LibreOffice details:
Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded
Comment 1 NISZ LibreOffice Team 2021-05-04 11:13:24 UTC
Created attachment 171630 [details]
Screenshot of the inconsistency in Writer
Comment 2 Heiko Tietze 2021-05-04 12:20:56 UTC
(In reply to NISZ LibreOffice Team from comment #0)
> For comparison, Word 2019 drag and drops everything – except ODF files – as
> OLE icon. I guess our users would prefer Writer behaving the same way, so
> that’s why I’m asking.

Don't think so. IMO you drop objects to load the file, if nothing is open, or add the content. The plain reference has no good purpose except making the text processor a file manager. But I might be wrong and we could run a quick poll somewhere. Opinions?
Comment 3 Heiko Tietze 2021-05-07 08:29:30 UTC
(In reply to Heiko Tietze from comment #2)
> ...we could run a quick poll somewhere.

https://twitter.com/liboDesign/status/1390584444256505856
Comment 4 Heiko Tietze 2021-05-17 14:56:30 UTC
(In reply to Heiko Tietze from comment #3)
> https://twitter.com/liboDesign/status/1390584444256505856

50% expect the content to be inserted, 40% would make it dependent to the module (not really clear what that means). Comment was to always ask the user, perhaps via context menu. So the ideal solution might be to insert the content but show a menu if some modifier key is being pressed while dropping.