Bug 165370 - Calc solver doesn't update cell reference after adding lines
Summary: Calc solver doesn't update cell reference after adding lines
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Solver
  Show dependency treegraph
 
Reported: 2025-02-21 12:16 UTC by Michel Le Bihan
Modified: 2025-02-24 09:59 UTC (History)
1 user (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 Michel Le Bihan 2025-02-21 12:16:52 UTC
Description:
LibreOffice Calc Solver (Tools->Solver) doesn't update cell references. When there are cell references inside the sheet, even if they are locked like `=$B$4`, the reference gets updated after a line is added.

Steps to Reproduce:
1. Create a new sheet
2. Enter a expression in B4 like `=B1+B2`
3. Add a reference to B4 in D1 like `=$B$4`
4. Open Solver (Tools->Solver), set target to B4, add some conditions and solve
5. Add some lines before line 4
6. Notice that the reference in D1 got updated and is now `=$B$7`
7. Open the solver again. Notice that target still references `$B$4` that is now empty
8. Attempt to solve

Actual Results:
1. The references in solver aren't updated.
2. Attempting to solve with an empty target (without any expression) will produce a null result.

Expected Results:
1. The references in solver should also be updated
2. Solver should show an error or warning if there is no expression in the target cell instead of producing a null result


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: pl-PL (fr_FR.UTF-8); UI: fr-FR
Debian package version: 4:24.8.4-4
Calc: threaded
Comment 1 Jessica 2025-02-24 09:59:53 UTC
Thank you for reporting the bug. I can confirm that the bug is present in

Version: 25.2.0.3 (X86_64) / LibreOffice Community
Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

also in 

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1fc03eaed2899ac041f660f54cb1facb71390ccf
CPU threads: 16; OS: Windows 11 X86_64 (build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded