Bug 121436 - CALC editing: Shifting Cells when inserting a cut column breaks formulas after the cut column
Summary: CALC editing: Shifting Cells when inserting a cut column breaks formulas afte...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Formula Cell-Management
  Show dependency treegraph
 
Reported: 2018-11-15 09:20 UTC by NISZ LibreOffice Team
Modified: 2019-11-19 08:02 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The file to reproduce the issue. [it's not, it just is a copy of the bug description as text .odt file] (19.79 KB, application/vnd.oasis.opendocument.text)
2018-11-15 09:20 UTC, NISZ LibreOffice Team
Details
A screenshot showcasing the issue. (15.65 KB, image/png)
2018-11-15 09:21 UTC, NISZ LibreOffice Team
Details
The file to reproduce the issue. (8.35 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-11-16 07:22 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2018-11-15 09:20:05 UTC
Description:
When a whole column is cut from a spreadsheet and pasted into a different column with the other cells shifted to the right, formulas that are located right from the original location of the cut column break.

This bug needs specific circumstances to occur:
- The cells should be referenced without a function, so the bug only occurs when the cells are referenced like =A1+B1+C1, but not when they are referenced like =SUM(A1:C1);
- The bug doesn't occur either if a new column is inserted to the intended location manually with the Insert Columns Left command and the content is inserted into this newly created column;
- Another way to avoid the bug is to insert a new column to the intended location manually with the Insert Columns Left command, then Undo it with Ctrl+Z, and then insert the content with Paste Special – Shift Cells: Right.

Steps to Reproduce:
1. Add a number to the A1 cell
2. Add a number to the B1 cell
3. Add a formula to the C1 cell that references the A1 and B1 cells (e.g.: =A1*B1)
4. Type in some text in the D1 cell
5. Reference the A1, B1 and C1 cells from the E1 cell (e.g.: =A1+B1+C1)
6. Click to the top of the D column to select the whole column and press Ctrl+X
7. Click on the B column and press Ctrl+Shift+V
8. In the Paste Special window select “Paste all” at Selection, and “Right” at Shift Cells, then press OK.


Actual Results:
In the E1 cell the reference pointing to the B1 cell doesn't get updated to C1 breaking the formula.

Expected Results:
The reference in the E1 cell should be updated to the new location.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2018-11-15 09:20:45 UTC Comment hidden (obsolete)
Comment 2 NISZ LibreOffice Team 2018-11-15 09:21:00 UTC
Created attachment 146654 [details]
A screenshot showcasing the issue.
Comment 3 Xisco Faulí 2018-11-15 12:18:27 UTC
Reproduced in

Version: 6.2.0.0.alpha1+
Build ID: db01b26d2e7d6626b7504fc7ee6ba6aac50e6098
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 4 Xisco Faulí 2018-11-15 12:18:50 UTC
@Eike, I thought you could be interested in this issue...
Comment 5 NISZ LibreOffice Team 2018-11-16 07:22:08 UTC
Created attachment 146680 [details]
The file to reproduce the issue.
Comment 6 QA Administrators 2019-11-19 03:28:46 UTC Comment hidden (obsolete)
Comment 7 Oliver Brinzing 2019-11-19 08:02:30 UTC
reproducible with:

Version: 6.3.3.2 (x64)
Build-ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: 

Version: 6.5.0.0.alpha0+ (x64)
Build ID: d04eef858250f97690f32dba17f42d157a8767fc
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Formula in E1 (-> F1 after shifting right) points to: =A1+C1+B1 and results to #VALUE