Bug 57274 - EDITING: Paste Special Link Checkbox fails to insert cell references when the source cell is blank
Summary: EDITING: Paste Special Link Checkbox fails to insert cell references when the...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:6.1.0
Keywords:
: 55826 (view as bug list)
Depends on:
Blocks: Paste-Special
  Show dependency treegraph
 
Reported: 2012-11-19 13:24 UTC by Blindfreddy
Modified: 2024-11-13 09:36 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Attached is a simple file prefilled with data to show how to reproduce the defect. (11.86 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-11-19 13:24 UTC, Blindfreddy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Blindfreddy 2012-11-19 13:24:29 UTC
Created attachment 70250 [details]
Attached is a simple file prefilled with data to show how to reproduce the defect.

Problem description: 

When using Paste Special with the 'Link' checkbox checked, blank source cells are omitted, ie no reference to the blank source cell is created.

Steps to reproduce:
1. Enter any text or number into any cell and ensure that the adjacent cell is blank
2. Select the cell with the text/number as well as the adjacent (blank) cell(s)
3. Click Copy
4. Click any target cell except the source cells themselves
5. Click Paste Special
6. Click checkbox 'Link' so that it is checked
7. Click OK

Current behavior:
References to the source cells are pasted only for non-blank source cells, ie. references to blank source cells are not created in the paste range. 

Expected behavior:
References to all selected source cells are created in the paste region, even if source cells are blank.  If source cell is blank, a 0 is displayed in the corresponding destination cell.  

Platform (if different from the browser): 
              
Browser: Opera/9.80 (X11; Linux i686) Presto/2.12.388 Version/12.10
Comment 1 A (Andy) 2013-04-20 09:40:16 UTC
reproducible with LO 4.0.2.2 (Win7 Home, 64bit), I would agree
Comment 2 Goran Rakic 2013-06-13 02:18:02 UTC
*** Bug 55826 has been marked as a duplicate of this bug. ***
Comment 3 QA Administrators 2015-03-16 23:15:17 UTC Comment hidden (obsolete)
Comment 4 Jean-Baptiste Faure 2015-03-29 16:52:28 UTC
Still reproducible with LibreOffice 4.4.3.0.0+ built at home under Ubuntu 14.10 x86-64

Best regards. JBF
Comment 5 QA Administrators 2017-03-06 16:00:01 UTC Comment hidden (obsolete)
Comment 6 Jean-Baptiste Faure 2017-04-22 10:29:03 UTC
Not reproducible in version 5.3.2 if the selected cells are in the same row. But if the selected cells are in a column, the problem still occurs.

Tested with LO 5.3.2 provided by Ubuntu. Same behavior with LO 5.3.4.0.0+ built at home under Ubuntu 16-04 x86-64.

Best regards. JBF
Comment 7 Commit Notification 2018-04-07 09:53:48 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bb6121156ceb0a1187600f8cad1eb00fdb2cb643

uitest for bug tdf#57274 and tdf#116385

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Xavier Van Wijmeersch 2018-04-08 08:37:37 UTC
I tested with attachment 70250 [details] and its working for me, a zero is displayed.
Putting a number in E6 change also the zero to another number in other copied cells

Version: 6.1.0.0.alpha0+
Build ID: a0bcbf72614344639235a46d1cc81483f93a3d61
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 9 Xavier Van Wijmeersch 2018-04-08 08:44:35 UTC
Its work in the row but not in the column

Version: 6.0.4.0.0+
Build ID: 49c0d98cb2bec7d171f9847b1335874c05042187
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.1.0.0.alpha0+
Build ID: a0bcbf72614344639235a46d1cc81483f93a3d61
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 10 QA Administrators 2019-04-09 02:50:06 UTC Comment hidden (obsolete)
Comment 11 Jean-Baptiste Faure 2019-08-11 11:36:10 UTC
Problem still occurs if selected cells are in the same column (see comment #6).
Tested with LO 6.3.1.0+ and current master both built at home under Ubuntu 18.04 x86-64.

Best regards. JBF
Comment 12 QA Administrators 2021-10-13 03:40:56 UTC Comment hidden (obsolete)
Comment 13 Blindfreddy 2021-10-22 16:00:33 UTC
Retested on below version - defect is still present. 

Version: 6.4.6.2
Build ID: 0ce51a4fd21bff07a5c061082cc82c5ed232f115
CPU threads: 16; OS: Mac OS X 10.16; UI render: default; VCL: osx; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Comment 14 QA Administrators 2023-10-23 03:14:23 UTC Comment hidden (obsolete)
Comment 15 Andreas Heinisch 2024-11-12 19:02:34 UTC
Still repro in:
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c0984f3c046a81cac0116cb96d194b39798211b2
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL threaded
Comment 16 Andreas Heinisch 2024-11-13 09:36:37 UTC
Code pointer: https://opengrok.libreoffice.org/xref/core/sc/source/core/data/column3.cxx?r=be11f274&mo=55519&fi=1556#1556

if (rCxt.isAsLink() && rCxt.getInsertFlag() == InsertDeleteFlags::ALL)
{
    // We also reference empty cells for "ALL"
    // InsertDeleteFlags::ALL must always contain more flags when compared to "Insert contents" as
    // contents can be selected one by one!

We can remove the check rCxt.getInsertFlag() == InsertDeleteFlags::ALL but I have no idea which side effects can be caused. This bug seems to be in LibreOffice since the initial import.