Bug 132809 - Recalculation of random values on row/col resize
Summary: Recalculation of random values on row/col resize
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-07 11:46 UTC by Heiko Tietze
Modified: 2022-05-10 07:38 UTC (History)
2 users (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 Heiko Tietze 2020-05-07 11:46:29 UTC
Insert 1,2,3 into A and rand() values into B
Hide row 2 (or resize)
=> rand() is recalculated

I expect rand() to not change on sheet and format changes.
Comment 1 Eike Rathke 2020-05-07 15:14:23 UTC
Why not? Any rand is as good as another ;-)

I didn't investigate deeply but background probably is that hiding rows/columns may affect SUBTOTAL() and AGGREGATE() and dirty formulas are recalculated (of which in this example there are none explicitly, but..), including all volatile functions like RAND(). Also, changing the view may display cells previously undisplayed and not yet calculated, so some recalculation has to happen.

Given that LO 7 will have non-volatile RAND.NV() and RANDBETWEEN.NV() I don't consider this issue important enough to disentangle the volatile/subtotal logic for these; however, doing so (not recalculating all volatile when sizing/hiding/showing columns or rows) might save some recalculation cycles on larger documents using also other volatile functions like OFFSET() or INDIRECT() or others. So might be worth investigating.
Comment 2 QA Administrators 2022-05-10 03:29:14 UTC Comment hidden (obsolete)
Comment 3 Heiko Tietze 2022-05-10 07:38:49 UTC
Let's resolve NAB as rand.nv() does the trick.