https://bugs.documentfoundation.org/show_bug.cgi?id=142201

            Bug ID: 142201
           Summary: EDITING: Cut paste transposed: formula references from
                    wrong cells adjusted
           Product: LibreOffice
           Version: 7.1.2.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: i...@scito.ch

Description:
Formula references from wrong cells are adjusted after cut paste transposed.
Transposed location changes are not taken into account.

In version 7.1, it can only be reproduced if the cut cells start in A1 due to
bugs 68976, 71058. After these bugs have been fixed, it happens everywhere.

Technical background:
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove() and
ScDocument::UpdateTranspose() are responsible for adjusting cell references for
cut and paste transposed. Location change due to transpose has to be taken into
account as well.

Steps to Reproduce:
1. Open an empty Calc spreadsheet.
2. Enter
    A1: 1
    B1: 11
    A2: 2
    B2: 12

    A4: =$A$1
    B4: =$B$1
    A5: =$A$2
    B5: =$B$2

    D4: 1
    E4: 11
    D5: 2
    E5: 12

3. Select A1:A2
4. Cut
5. Go to cell A7
6. Context menu > Special Paste > Special Paste > Transpose button

Actual Results:
i) LibreOffice 7.1.2.2:
A4: =$A$7 (value: 1)
B4: =$B$7 (value: 2)    <- wrong
A5: =$A$2 (value: 0)    <- wrong (bug 71058)
B5: =$B$2 (value: 12)

Displayed values changed

ii) LibreOffice 7.2 alpha (after fixing bug 71058):
A4: =$A$7 (value: 1)
B4: =$B$7 (value: 2)    <- wrong
A5: =$A$2 (value: 2)
B5: =$B$2 (value: 12)

Displayed values changed

Expected Results:
A4: =$A$7 (value: 1)    <- changed reference
B4: =$B$2 (value: 11)
A5: =$B$7 (value: 2)    <- changed reference
B5: =$B$2 (value: 12)

Displayed values stay the same, only 2 references change


Reproducible: Always


User Profile Reset: No



Additional Info:
I've discovered this bug while fixing and testing bugs 68976, 71058, 142065.

I document this bug 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: 4cc8406abaf8acd5dc2bdba8d46d6c3c44fbc985
CPU threads: 4; OS: Linux 5.3; UI render: default; VCL: x11
Locale: de-CH (en_US.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to