In solver models that reference cells from other sheets, renaming the referenced sheet should update the cell address in the original model. Steps to reproduce 1) Create a Calc file with 2 sheets "Sheet1" and "Sheet2" 2) In "Sheet1" go to Tools - Solver and set the target cell to some cell in "Sheet2" 3) Notice that the address will be something like $Sheet2.$E$20 (i.e. starting with "Sheet2" to indicate that the cell is in another sheet; close the Solver dialog 4) Now rename "Sheet2" to some other name, f.i. "NewName" 5) Go back to "Sheet1" (where the model was created) open the Solver dialog and notice that the target cell is still $Sheet2.$E$20 Expected result The target should have been updated to $NewName.$E$20 This problem happens since LO 7.6+
I would like to fix this issue, but I don't know how to listen to sheet rename events and respond to them. Can anyone provide a code pointer or a patch that implemented a similar functionality?
Here's the proposed patch to fix this issue: https://gerrit.libreoffice.org/c/core/+/156872
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/cb46ad4c4602fbb6aeab482e9370e31495e12cfe tdf#156815 Reset solver settings when a sheet is renamed It will be available in 24.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.