Bug 142065

Summary: EDITING: Cut paste transposed with formula reference within range leads to #REF
Product: LibreOffice Reporter: Roland Kurmann <info>
Component: CalcAssignee: Roland Kurmann <info>
Status: VERIFIED FIXED    
Severity: normal CC: buzea.bogdan, info
Priority: medium    
Version: 7.1.2.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=68976
https://bugs.documentfoundation.org/show_bug.cgi?id=71058
https://bugs.documentfoundation.org/show_bug.cgi?id=142201
Whiteboard: target:7.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 108253, 108479    

Description Roland Kurmann 2021-05-03 19:19:20 UTC
Description:
Cutting and transposing a range with formula reference within range leads to #REF in pasted formula. However, copying and transposing works correctly.

Interestingly, cut and transpose, 1x undo 1x and 1x redo, then it works as well correctly.

Steps to Reproduce:
1. Create new spread sheet.
2. Insert cells:
    A1: 1
    B1: =A1+10
3. Select A1 and B1
4. Cut
5. Go to cell A3
6. Paste

Actual Results:
Cell A4 shows #REF and contains =#REF!2+10

Expected Results:
Cell A4 shows 11 and contains =A3+10

(I.e. the same result as from copy and paste transposed is expected.)


Reproducible: Always


User Profile Reset: No



Additional Info:
I've discovered this bug while writing unit tests for bug 68976 and bug 71058. Creating a bug report for QA.

Version: 7.1.1.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.3; UI render: GL; VCL: kf5
Locale: de-CH (en_US.UTF-8); UI: de-DE
Calc: threaded

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: aa38eede9d340cbb11a792ab1ebbe681521a4489
CPU threads: 4; OS: Linux 5.3; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Roland Kurmann 2021-05-03 19:23:00 UTC
I'll work on it.
Comment 2 Roland Kurmann 2021-05-24 18:36:14 UTC
I've submitted a patch: https://gerrit.libreoffice.org/c/core/+/116073
Waiting for review
Comment 3 Commit Notification 2021-05-29 20:47:25 UTC
scito committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bda9929821de620f1f85528abd1c4bba46d937d6

tdf#142201 tdf#142065 fix cut paste transpose references, incl. undo

It will be available in 7.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 4 BogdanB 2021-06-01 09:00:33 UTC
I verified. Is ok, thanks for fixing this. But I am waiting for you to mark this as resolved.
Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: f49e5902a3737c02fabf5bec23243ccb126426c4
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 5 BogdanB 2021-06-08 04:51:56 UTC
I have verified again, it's fixed. Thanks.

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: ec629c5ee22d02f99d66a5cf975ce239876b7f4d
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded