Bug 118624 - RAND() in an array returns the same value for each cell
Summary: RAND() in an array returns the same value for each cell
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.2.0 target:6.1.0.2 target:7.1.0
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2018-07-08 17:11 UTC by david.cortes.rivera
Modified: 2020-06-26 18:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Table giving a different filling in Excel and in Calc (8.79 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-07-09 08:17 UTC, Jacques Guilleron
Details
How it looks in LibreOffice 3.3 (48.05 KB, image/png)
2018-07-10 14:01 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description david.cortes.rivera 2018-07-08 17:11:32 UTC
When creating a random array using the RAND() function in LO Calc, all the cells in the array are filled with the same number.

Steps to reproduce:
-Select multiple cells.
-Type =RAND().
-Press Ctrl+Shift+Enter.

Expected behavior:
-Each cell should be filled in with a different random number.

Actual behavior:
-Each cell is filled in with the same random number.

Setup: LO Calc 6.0.5.2, running on Linux (Debian buster/sid).
Comment 1 MM 2018-07-08 22:17:35 UTC
Unconfirmed on windows 7 x64 with Version: 6.0.5.2 (x64)
Build ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU threads: 3; OS: Windows 6.1; UI render: default
Comment 2 Jacques Guilleron 2018-07-09 08:17:57 UTC
Created attachment 143393 [details]
Table giving a different filling in Excel and in Calc
Comment 3 Jacques Guilleron 2018-07-09 08:25:24 UTC
Hi David, MM,

I see there a compatibility issue.
Tried with
LO  6.0.5.1 Build ID: 0588a1cb9a40c4a6a029e1d442a2b9767d612751
Threads CPU : 2; OS : Windows 6.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: CL
Comment 4 Xisco Faulí 2018-07-10 12:10:58 UTC
Regression introduced in range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=c2aac3b42e7122569770377091be502939fc9a26..d8d55787b81cdc955b73c8befa4ab608f46e32aa

@Eike, I thought you could be interested in this issue...
Comment 5 Eike Rathke 2018-07-10 13:24:33 UTC
Sure this is a regression? I get the same with OOo3.3 already.
Comment 6 Xisco Faulí 2018-07-10 14:01:16 UTC
Created attachment 143424 [details]
How it looks in LibreOffice 3.3
Comment 7 Eike Rathke 2018-07-10 14:11:35 UTC
Can only have worked by chance ;-)
Comment 8 Commit Notification 2018-07-10 20:20:54 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8afccbd129ecda81ff00dd2c6e5e10af254ae0ef

Resolves: tdf#118624 let RAND() in array/matrix mode fill a matrix

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Eike Rathke 2018-07-10 21:01:01 UTC
Pending review for 6-1 https://gerrit.libreoffice.org/57247
Comment 10 Jacques Guilleron 2018-07-12 13:19:30 UTC
Fine,

Works as expected in
LO 6.2.0.0.alpha0+ Build ID: 8e9d43546c8e46ea635472ddf07f5c183dc13360
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-07-12_01:16:00
Locale: fr-FR (fr_FR); Calc: CL
Thank you, Eike.
Comment 11 Commit Notification 2018-07-13 20:01:32 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2dc7a3b7515ffd6181d740aca4ad6e0549ea4a3a&h=libreoffice-6-1

Resolves: tdf#118624 let RAND() in array/matrix mode fill a matrix

It will be available in 6.1.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2020-06-26 18:15:30 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ec0554c5eabce108f6fb5b6a44e3e16425a1d650

tdf#118624: sc: Add unittest

It will be available in 7.1.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.