Bug 101583 - Range name references updated incorrectly (for single row/column ranges)
Summary: Range name references updated incorrectly (for single row/column ranges)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.6.2 rc
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:5.3.0 target:5.2.4
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-08-17 17:37 UTC by dmdcomputing
Modified: 2016-11-05 20:32 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Range Name Example (7.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-08-17 17:37 UTC, dmdcomputing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dmdcomputing 2016-08-17 17:37:18 UTC
Created attachment 126881 [details]
Range Name Example

Windows 10, LibreOffice 5.2.0.4


When inserting rows and/or columns range name references are not updated correctly.

In the attached file there is a simple table with the column headings 'Description' and 'Weight' along with a short list. The Table is named 'Fruits_LUT' and the columns 'Fruits' and 'Weight'. Above the table is a simple formula to return the maximum weight.

Inserting a column to the left of column A moves the data to the right but the 'Fruits_LUT' range name now covers columns A to C. 'Fruits' now also includes column A. 'Weights' updates correctly.

Inserting two rows above the table results in each of the range name references being extended to include the inserted rows.
Comment 1 m_a_riosv 2016-08-17 21:13:40 UTC
I think you have enable the option:
Menu/Tools/Options/LibreOffice calc/General - Expand references when new columns/rows are inserted.
Disabling it works as you expect.

Resolved as not a bug, please if you are not agree, reopen it.
Comment 2 dmdcomputing 2016-08-18 07:10:20 UTC
Yes, you were right, I had the Expand references option ticked. I obviously did that in error and without realising I had done so.

Please accept my apologies.
Comment 3 m_a_riosv 2016-08-18 07:22:17 UTC
Don't worry, there are a lot of options, everybody ask for the option they like, but with so many makes easy this kind of mistakes. :)
Comment 4 GerardF 2016-08-18 16:31:50 UTC
(In reply to m.a.riosv from comment #1)
> I think you have enable the option:
> Menu/Tools/Options/LibreOffice calc/General - Expand references when new
> columns/rows are inserted.
> Disabling it works as you expect.
> 
> Resolved as not a bug, please if you are not agree, reopen it.

Sorry, but I disagree with this.

With option unchecked, no change in named range. That's OK

With option checked, ranges must be expanded but not this way :
Insert column should expand named range *only if named range had 2 or more columns*.

So Fruit_LUT sould expand to A7:C9, while Fruits (A7:A9, only une column) should *not* be expended.

Same for insert row, only named range with several rows must be expended.
Comment 5 m_a_riosv 2016-08-19 17:57:23 UTC
Hi @GerardF I don't think the same matter.

It begins with
Win10x64
Version: 5.0.6.2 (x64)
Build ID: b3fbfa99158a1030fb79f0ba72b6851afc3c7895-GL

last working for me:
Version: 4.4.7.2
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600

Looks like a regression from 4.4 to 5.0
Comment 6 m_a_riosv 2016-08-19 18:01:40 UTC
Also in:
Version: 5.3.0.0.alpha0+ (x64)
Build ID: 327f5cc66f122979943d2c896eb1824791a854c9
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2016-08-18_00:02:16
Locale: es-ES (es_ES); Calc: CL
Comment 7 Xisco Faulí 2016-09-12 12:16:42 UTC
Adding keyword 'bibisectRequest'.
Comment 8 Eike Rathke 2016-10-18 16:52:50 UTC
Taking, bibisect not needed.
Comment 9 Commit Notification 2016-10-18 17:35:29 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6b9804b8f2ca85e9eb42d344d17cfee7a7a9414c

Resolves: tdf#101583 references to be expanded must be at least 2 cols/rows

It will be available in 5.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Eike Rathke 2016-10-18 18:19:17 UTC
Pending review https://gerrit.libreoffice.org/30023 for 5-2
Comment 11 Commit Notification 2016-10-18 19:01:29 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5cfbab03f914946bf9e5813eae707328fda438f9

unit test for tdf#101583, named expression reference expansion

It will be available in 5.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2016-11-05 20:32:49 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0230a4eccd3884ef3c3d6b7b4c6d54e5582a1268&h=libreoffice-5-2

Resolves: tdf#101583 references to be expanded must be at least 2 cols/rows

It will be available in 5.2.4.

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

Affected users are encouraged to test the fix and report feedback.