Bug 165375 - No message for invalid names in Define Name dialog, and they can be added in Manage Names
Summary: No message for invalid names in Define Name dialog, and they can be added in ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: implementationError
Depends on:
Blocks: Named-Range-Dialogs
  Show dependency treegraph
 
Reported: 2025-02-21 17:55 UTC by Aron Budea
Modified: 2025-02-21 18:20 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Invalid range created using method 2 (7.99 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-02-21 17:55 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-02-21 17:55:16 UTC
Created attachment 199367 [details]
Invalid range created using method 2

Looking at attachment 50636 [details] from bug 40438 shows that it has named ranges like this:
- name: versao_
- range: $'pdrhe com extensão'.$aa$#ref!
(there's no sheet named 'pdrhe com extensão', but there is one named 'PDRHE com Extensão')

1. Let's try to recreate something similar in an empty spreadsheet:
- Start a new spreadsheet,
- Rename sheet to "PDRHE com Extensão" (without quotes),
- Open Sheet -> Named Ranges and Expressions -> Define...,
- Enter some name, eg. "test",
- The Range is pre-filled, let's just replace the number with "#ref!" so it shows: "$'PDRHE com Extensão'.$A$#ref!"
- Press Add.

=> Nothing happens, no message, nothing.

2.
- Let's try adding the original suggested name, which will work: "$'PDRHE com Extensão'.$A$1"
- Open Sheet -> Named Ranges and Expressions -> Manage...,
- Rewrite the Range to the intended one: "$'PDRHE com Extensão'.$A$#ref!"
- Press OK.

=> This works.

If the name isn't allowed (and it isn't, see below):
- There should be an error message after the steps in 1.,
- The steps in 2. shouldn't be allowed, and there should also be an error message,
- Something should be done with existing files having invalid ranges, like attachment 50636 [details].

If any part of this is fixed, the rest can be split into a separate bug report.

Observed using LO 25.8.0.0.alpha0+ (41ab24cecd6ad74312843f113d2faa13259cdb7d) / Windows.

In 3.3.0 the dialogs are different (there's a single dialog for defining and managing names), and when trying steps in 1. and 2., there is an error message: Invalid expression.
In 3.5.0.3 the dialogs are similar to the current ones, and the bug is already reproducible.