Bug 156585 - Calc - paste special with link does not copy empty cells
Summary: Calc - paste special with link does not copy empty cells
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-External-Datalink
  Show dependency treegraph
 
Reported: 2023-08-02 16:10 UTC by gabriele
Modified: 2023-08-03 09:29 UTC (History)
2 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 gabriele 2023-08-02 16:10:54 UTC
Description:
When I copy-special (link option) empty cells from one sheet to another, I do not get a link to the original cells, but completely empty cells, with no links. If a cell in the original sheet is emptied, then the cell linked to it shows the value '0'.

Steps to Reproduce:
1.create sheet A containing some filled and some empty cells
2.create sheet B
3.copy the content of sheet A 
4. paste it into sheet B with 'paste special' selecting 'link' option and 'paste all' selected
5. in sheet B the cells that contained something in sheet A will be correctly linked to their origin; cells that were empty in sheet A contain nothing in sheet B (while I'd expect them to contain a link to the corresponding cell in sheet A). This is annoying because you want ALL changes in sheet A (including filling empty cells) to be reflected in sheet B. 
6. Delete the content of a non-empty cell in sheet A, that was correctly linked in sheet B. Now the corresponding cell in sheet B still contains the link to the original cell in sheet A, but it contains a value of 0. This is quite worrisome because empty is not the same as 0; i.e., after the change the cell will be empty in sheet A and contain '0' in sheet B.

Actual Results:
see steps to reproduce

Expected Results:
see steps to reproduce


Reproducible: Always


User Profile Reset: No

Additional Info:
The bug was first noticed in 2010 in the OO forum (very clear explanation), with a message in 2018 confirming it in Libreoffice as well.

https://bz.apache.org/ooo/show_bug.cgi?id=109556
Comment 1 m_a_riosv 2023-08-03 00:42:08 UTC
First doing a reference in an empty file
A1 is empty
A2=A1 shows '0'
It is how spreadsheets works.
Paste as links only creates a reference to the original cell.

But in help https://help.libreoffice.org/24.2/en-US/text/shared/01/02070000.html?System=WIN&DbPAR=CALC&HID=modules/scalc/ui/pastespecial/dialog-action_area1#bm_id31541011
"
Link

Inserts the cell range as a link, so that changes made to the cells in the source file are updated in the target file. To ensure that changes made to empty cells in the source file are updated in the target file, ensure that the "Paste All" option is also selected.

You can also link sheets within the same spreadsheet. When you link to other files, a DDE link is automatically created. A DDE link is inserted as a matrix formula and can only be modified as a whole.
"

With 'Paste all' marked doesn't link the empty cells either, and no version of LibreOffice neither Aoo works so.
Or an error in help or a bug.