Bug 145077 - Highlighting a named range with relative references does not work correctly
Summary: Highlighting a named range with relative references does not work correctly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.3.0 target:7.2.3
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-11 17:18 UTC by Igor
Modified: 2021-10-13 13:57 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample file (36.36 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-10-11 17:19 UTC, Igor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor 2021-10-11 17:18:08 UTC
Description:
Selecting an appropriate range name in the “Name Box” that belongs to the active sheet does not correctly highlight the range. Does not work. But it should (works correctly in Excel). All ranges are configured using mixed references, which must be calculated relative to the active cell. But when you open the “Manage Names” dialog, all references are calculated correctly. And why is it not selected when necessary? Try it yourself.
File attached

Select the ranges of the active sheet from the “Name Box”, for example: Players (selects the first row correctly), Points (selects the wrong range, not the current row but again the first row), Winners (selects the wrong range).

Steps to Reproduce:
1. As described
2.
3.

Actual Results:
When we use relative row numbers, there is no fixed range to jump to.

Expected Results:
It works in Excel, but in Calc it don't.
But it is calculated correctly in the “Manage Names” window. Jump!


Reproducible: Always


User Profile Reset: No



Additional Info:
Link to discussion on Ask:
https://ask.libreoffice.org/t/highlighting-a-named-range-does-not-work-correctly/69146
Comment 1 Igor 2021-10-11 17:19:00 UTC
Created attachment 175673 [details]
Sample file
Comment 2 Eike Rathke 2021-10-11 17:43:35 UTC
Short summary:
Selecting a named range from the Name Box, if it contains relative references the resulting selection should take the current cell cursor position into account, same as if the reference was viewed in Manage Names.
Comment 3 Commit Notification 2021-10-12 15:45:07 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/57f09e6f3cfdd9ad4e1673df14e6ee550d402743

Resolves: tdf#145077 Use position for jumping to named relative references

It will be available in 7.3.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 Eike Rathke 2021-10-12 15:50:19 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/123507 for 7-2
Comment 5 Commit Notification 2021-10-13 07:57:03 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#145077: sc: Add UItest

It will be available in 7.3.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 6 Commit Notification 2021-10-13 13:57:58 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

Resolves: tdf#145077 Use position for jumping to named relative references

It will be available in 7.2.3.

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.