Bug 160356 - Calc should support hidden Named Expressions as well
Summary: Calc should support hidden Named Expressions as well
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-25 15:07 UTC by Rafael Lima
Modified: 2024-04-01 13:13 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Test file (20.59 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-03-25 15:07 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2024-03-25 15:07:35 UTC
Created attachment 193295 [details]
Test file

Since bug 154449 was fixed, Calc now supports hidden named ranges. However, named expressions were not considered in the patch and it would be useful to support them as well.

Steps to reproduce
1) Open the "Test file"; it has no named ranges/expressions
2) Click the button "Create". It will run a macro that creates 2 hidden named ranges:

Name1 -> Points to cell "D1" (since D1 is a reference, this is saved as a named range to the file)
Name2 -> Points to the value "100" (since "100" is a value, this is saved as a named expression to the file)

3) Open the Manage Names dialog (Sheet - Named Ranges - Manage)
4) Notice that nothing is shown, as expected, since both named ranges were created as Hidden
5) Save the file and reload it (or close and reopen)
6) Open the Manage Names dialog again; Name1 will be hidden (as expected); Name2 will not be hidden (this is the problem)

This is caused because Named Expressions still do not support the Hidden flag for import/export.

System info

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.1~rc2-0ubuntu0.23.10.1~lo1
Calc: threaded
Comment 1 Rafael Lima 2024-03-25 22:21:23 UTC
Proposed patch here:
https://gerrit.libreoffice.org/c/core/+/165239
Comment 2 Commit Notification 2024-04-01 03:57:04 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/350c590620226c4d5b94aa01d3853e15af3cebb0

tdf#160356 Add support for hidden named expressions in Calc

It will be available in 24.8.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.