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

            Bug ID: 148072
           Summary: Sheet-local named expression destroyed with
                    Cut-Paste-Undo
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

This is a spin-off of
https://bugs.documentfoundation.org/show_bug.cgi?id=81435#c16
Use https://bugs.documentfoundation.org/attachment.cgi?id=157283 as the test
case.

Copied description (reformatted for readability):

problem: the name-reference is changed on move, but not rechanged on undo.

it's two issues, one for moving into one sheet, another for moving to another
sheet, the steps to reproduce the issue are noted in the sheet, copied here:

A) name references messed up by moving of content into the sheet and undo
steps to reproduce
1.  check name reference 'testfield_1' to sheet1.B2 (hit ctrl-F3),
    scope of reference: sheet1
2.  move sheet1.B2:sheet1.B3 to sheet1.C2:sheet1.C3 (ctrl-X, ctrl-V)
3.  check new name reference 'testfield_1' with target C2 and scope
    sheet1, in the lower part of the box 'ctrl-F3' the scope is
    announced as global!
4.  undo move – ctrl-Z – ctrl-Z
5.  check result in sheet1.B3: '=#NAME?'
    despite 'testfield_1' still defined, but pointing to $C$2
    imho the change by the move should be undone by undo
(if you undo the move by another move with exchanged source-target references
are handeled correctly)

B) name references messed up by moving of content to another sheet and undo
steps to reproduce
1.  check name reference 'testfield_1' to sheet1.B2 (hit ctrl-F3), scope
    of reference: sheet1
2.  move sheet1.B2:sheet1.B3 to sheet2.B2:sheet2.B3 (ctrl-X, ctrl-V)
3.  check new name reference 'testfield_1' with scope sheet2,
3a. check old reference with scope sheet1 remains, but now points to new
    location (on sheet2)
4.  check result in sheet2.B3: '=#NAME?'
5.  undo move – ctrl-Z – ctrl-Z
6.  check sheet1.B3 result now '0', it still references to testfield_1
    on sheet2
    test by input number to sheet2.B2
7.  remove name reference testfield_1 from sheet2
8.  observe result in sheet1.B3 unaffected,
9.  change value in sheet2.B2
10. observe sheet1.B3 still calculating with the removed reference

(if you undo the move by another move with exchanged source-target references
are NOT handeled correctly)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to