mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-09 12:00:01 -06:00
rewrite_all_formulas borrows each tree with Formula::with_expr and calls adjust_if_changed, so a formula the edit leaves alone is neither copied nor printed, and a changed one is printed once. A legacy array whose range moves while its formula stays the same still gets the new range. Sheet rename and delete compare the adjusted tree with the old one instead of printed text, and replace only formulas that changed. Delete no longer rebuilds every formula in the workbook, so unrelated formulas keep their array range and dynamic-array mark. A stored non-canonical formula text is no longer re-printed by an edit that does not change the formula; a test pins this. Part of #3576 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>