Bug 93812 - Spreadsheet column aliases break when new row is inserted
Summary: Spreadsheet column aliases break when new row is inserted
Status: RESOLVED DUPLICATE of bug 93264
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-31 15:46 UTC by Chris Spencer
Modified: 2015-08-31 17:33 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Spencer 2015-08-31 15:46:51 UTC
Steps to reproduce:

1. Create a new spreadsheet.
2. In cell $A1, enter the value 1.
3. Select the column A header so the entire column is selected, and alias it by entering the name "FIRST" into the cell selection dropdown and pressing enter.
4. In cell $B1, enter the value 2.
5. Select the column B header so the entire column is selected, and alias it by entering the name "SECOND" into the cell selection dropdown and pressing enter.
6. In cell $C1, enter the formula "=FIRST+SECOND" and notice that the calculated value is 3.
7. Select all of row 2, right-click and select "Insert row above".
8. The expected behavior is that the value of $C1 remain unchanged, but notice that cell $C1 now reports the error "#REF!". This is because the inserted row has corrupted all the name aliases. If you click on the cell-selector dropdown and select "Manage names", you can see all the name aliases now look like:

    "$Sheet1.$A$1:$A$#REF!".

A workaround is to manually define name aliases to include an end-row less than the maximum number of rows.

For example, by default, setting a name alias currently generates a name entry like:

    $Sheet1.$A$1:$A$1048576

Presumably, inserting a new row tries to increment the end value, which overflows, causing an error. If you manually re-define this like:

    $Sheet1.$A$1:$A$10000

Then insertions can increment this value without overflowing, albeit this can be a huge hassle to do if you need to define dozens of column aliases.

This bug seems to have been introduced in some 4.* release. I don't remember having this problem in the 3.* release.
Comment 1 raal 2015-08-31 17:33:17 UTC
Hello,

Thank you for submitting the bug. The bug has previously been reported, so this bug will be added as a duplicate of it. You will automatically be CCed to updates made to the other bug.

*** This bug has been marked as a duplicate of bug 93264 ***