Bug 162167 - sheet contents removed when drag-and-dropping sheet into text field or combobox (gen, win)
Summary: sheet contents removed when drag-and-dropping sheet into text field or combob...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sheet-Tabs-Bar Drag-and-Drop
  Show dependency treegraph
 
Reported: 2024-07-24 05:33 UTC by Stéphane Guillou (stragu)
Modified: 2024-08-30 06:54 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 Stéphane Guillou (stragu) 2024-07-24 05:33:59 UTC
Steps:
1. Open Calc with gen or win VCL plugin
2. Input some text in cell A1, press Enter
3. Drag-and-drop bottom sheet tab into a field that accepts text (e.g. Name Box or Font Name comboboxes in toolbars, Quick Find search field, Formula bar, or Function search field in the sidebar...)

Result: cell contents pasted into field, but sheet is emptied. If there are cell contents _and_ comments, comments are also removed. (At least they are successfully recovered with Undo.)

(And if the same is done with an empty sheet in gen, you run into bug 162166 crash.)

Expected: as with gtk3 VCL plugin, no emptying of sheet.

Reproduced in:

Recent trunk build:
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ba0e0093b0ed2816a18e54eef0a92220d7b04a4d
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: x11
Locale: en-AU (en_AU.UTF-8); UI: en-US

As well as OOo 3.3 -> inherited.
Comment 1 ady 2024-07-24 10:36:11 UTC
The dragging action of the worksheet tab is equivalent to "move" (just as with any cell).

If instead of a simple drag, you press also the [CTRL] key, you obtain a "copy" (just as with any cell).

Although the behavior might be unknown, do we really need to consider it as a bug? Someone could take this behavior as a feature.
Comment 2 Buovjaga 2024-08-29 05:25:34 UTC
(In reply to ady from comment #1)
> The dragging action of the worksheet tab is equivalent to "move" (just as
> with any cell).
> 
> If instead of a simple drag, you press also the [CTRL] key, you obtain a
> "copy" (just as with any cell).
> 
> Although the behavior might be unknown, do we really need to consider it as
> a bug? Someone could take this behavior as a feature.

Do you then propose that the behaviour of GTK3 is a bug as it does not empty the sheet?
Comment 3 ady 2024-08-29 14:33:41 UTC
(In reply to Buovjaga from comment #2)

> Do you then propose that the behaviour of GTK3 is a bug as it does not empty
> the sheet?

I have no strong opinions either way, as long as the intended action works correctly when it is really expected (i.e. to move or copy a worksheet tab to whichever logical location/order, whether within the same workbook/window/module/program or to a different one). That is relevant for all/whichever/any OS/DE/VCL.
Comment 4 Robert Großkopf 2024-08-30 06:50:08 UTC
Drag and drop will be moving content if you do it in the same application. But dragging a sheet into a form field of, for example, a Writer document, should copy the content. 
(Never done this before, because a sheet contains many cells and a form field will only show the content in one cell)
I could drag the content of a Calc sheet to a form field in a Writer document without any problem. Content in Calc will still be there. Content will be copied into the text field of Writer form.

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0427231a1485d324519e94246ff702bc0cb18b89
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

And its the same behavior in with 
SAL_USE_VCLPLUGIN=gen ./soffice
(VCL: x11)
here.