Bug 137577 - UI: resolve ambiguity for 'named ranges' with identical name and different scope
Summary: UI: resolve ambiguity for 'named ranges' with identical name and different scope
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.5.0 target:7.3....
Keywords:
Depends on:
Blocks: Cell-Name
  Show dependency treegraph
 
Reported: 2020-10-18 14:07 UTC by b.
Modified: 2023-08-18 19:25 UTC (History)
2 users (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 b. 2020-10-18 14:07:56 UTC
Description:
@erAck solved a problem with the 'name box' not showing a name when selecting a range with a name with scope 'local' in tdf#67007, there are some shortcomings, left ones and new, 

consider a sheet 'sheet1' with two named ranges, both named test, one with scope 'global', one with scope 'sheet1' (regardlees if it's a good idea from a user to use such, it's possible and will occur), 

- selecting either of theese ranges will display 'test' in the name box (since ver. 7.1), without hint which of them it is, users may be irritated checking the 'global' range being 'test', and the formula '=sum(test)' producing 'wrong' results, as it calculates the sum of 'test(sheet1)', 

- clicking the name box will offer two ranges, 'test' and 'test(sheet1)', clicking either of theese names will select the local range which is wrong for te global range, users may get the impression that the local range has the name of the local range, 

- the 'global range' test is not 'addressable' while in an sheet which has a local named range with identical name, 

- copying parts of a sheet which completely covers a named range doesn't carry that name to the new destination, neither for local nor global names, 

- moving parts of a sheet which completely covers a named range doesn't carry that name to the new destination, neither for local nor global names, 

- the range adressed by the former name is changed to the new destination, but selecting the covered range on the new sheet doesn't show a name in the name box, 

- references in formulas pointing to that range are changed 'old-sheet-name.test', and do work, 

- undo of such actions sometimes doesn't bring the name back, 

- copying such sheet with 'move or copy sheet' runs into a conflict that it normally stays with the name for the global range and converts it to scope local , that would result in two identical names with identical scope on one sheet, 

- instead names like test(sheet1_2) are created when copying to 'sheet2', and selecting that name from the name box results in an error 'you must select a valid name ...', 

- after above copy the 'global range' on the new sheet has no name, 

solution? i don't know, 

- show name with 'scope' in named box when a named range is selected, 

- make global ranges select- / addressable by the label 'name(global)', 

- forbid the use of identical names for local and global ranges? at least for being on the same sheet, 

i'm unsure if this description covers all curiosities, 

to stay calm, ex$el (tested '2010') is confused with such nonsense too, it offers names as 'book1.test' for the global range and changes it in formulas to 'sheet1.test', then calculating the local range ... 

Steps to Reproduce:
see description above, try to handele two ranges test(sheet1) and test(global) on the same sheet, and copying that sheet, 

Actual Results:
shortcomings as in description

Expected Results:
consistent handling, avoiding constructions which can't be handeled, or meaningful warnings and error message, 


Reproducible: Always


User Profile Reset: Yes



Additional Info:
tested ver. 3.5.1.2, 6.1.6.3, 7.1.0.0.a0+
Comment 1 Commit Notification 2021-03-30 12:03:17 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/65cba409936d133aa05f9934db28bd2555a38676

Related: tdf#137577 Display (sheetname) with sheet-local names in Name Box

It will be available in 7.2.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 2 Xisco Faulí 2021-03-30 14:33:47 UTC
I guess we can move this to NEW
Comment 3 Commit Notification 2021-03-30 20:29:37 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#137577 Be able to select a global named range from Name Box

It will be available in 7.2.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 Commit Notification 2021-03-30 23:22:50 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6b3f0866e9eddd5553857741862ca0d7d5b2ec2b

Related: tdf#137577 Update Name Box range name list on sheet rename

It will be available in 7.2.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 5 Commit Notification 2022-09-05 23:21:05 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/540a312af2f02108ea90f5d2a9f3bf573db622e5

Related: tdf#150307 Use SfxHintId::ScAreasChanged, tdf#137577 follow-up

It will be available in 7.5.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 2022-09-07 06:22:02 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/607f12bc94228472c6eeb7a42387744e93a23b34

Related: tdf#150307 Use SfxHintId::ScAreasChanged, tdf#137577 follow-up

It will be available in 7.3.7.

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 7 Commit Notification 2022-09-07 06:23:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

Related: tdf#150307 Use SfxHintId::ScAreasChanged, tdf#137577 follow-up

It will be available in 7.4.2.

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 8 BogdanB 2023-08-18 19:02:28 UTC
Eike, is this bug solved, or there is still work to be done?