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)
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Cell-Formula Cell-Management
  Show dependency treegraph
Reported: 2018-11-15 09:20 UTC by NISZ LibreOffice Team
Modified: 2021-11-19 05:18 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:

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
A screenshot showcasing the issue. (15.65 KB, image/png)
2018-11-15 09:21 UTC, NISZ LibreOffice Team
The file to reproduce the issue. (8.35 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-11-16 07:22 UTC, NISZ LibreOffice Team

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
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

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

Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 

Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

Version (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: (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

Version: (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
Comment 8 QA Administrators 2021-11-19 05:18:09 UTC
Dear NISZ LibreOffice Team,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team