Bug 160064

Summary: Named ranges created by the Solver should be hidden by default
Product: LibreOffice Reporter: Rafael Lima <rafael.palma.lima>
Component: CalcAssignee: Rafael Lima <rafael.palma.lima>
Status: RESOLVED FIXED    
Severity: enhancement CC: stephane.guillou
Priority: medium    
Version: 24.8.0.0 alpha0+   
Hardware: All   
OS: All   
Whiteboard: target:24.8.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 109178, 113360    
Attachments: Solver models created in Excel

Description Rafael Lima 2024-03-06 14:35:24 UTC
Created attachment 192995 [details]
Solver models created in Excel

When we create Solver models in a Calc file, they're save to the sheet using Named Ranges. However, these named ranges become visible in the "Manage Names" dialog, which clutters the dialog and may make users confused about why so many named ranges exist in their file.

To test this, simply create a blank Calc file, go to Tools - Solver, then close the Solver dialog and open the Manage Names dialog. You'll see a lot of named ranges there. They should be hidden by default.

In MS Excel (which also saves solver settings using named ranges), all named ranges created for the solver are hidden from the user by default. For instance, open the attached XLSX file that contains various models. If you go to Tools - Solver, you'll be able to see the solver model. But the Manage Names dialog will be empty, because all named ranges are set to "hidden".

So, I propose we also hide solver-related named ranges by default.

Note: hidden named ranges support was added after bug 154449 was fixed.
Comment 1 Stéphane Guillou (stragu) 2024-03-21 07:54:17 UTC
Thanks Rafael.
Makes perfect sense to me, for UX and consistency with MSO.
Comment 2 Rafael Lima 2024-04-01 13:58:17 UTC
Proposed patch here
https://gerrit.libreoffice.org/c/core/+/165621
Comment 3 Commit Notification 2024-04-08 14:03:15 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2533960315607bf3e86ad014d2daa4bfa7e3fa59

tdf#160064 Hide named ranges/expressions of solver models

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.