diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-01-20 16:24:14 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-01-20 18:12:38 +0200 |
commit | bff635be1d45ce721f5e40c64f665a247b995133 (patch) | |
tree | 5f3709f766cd02a1cdc4b1f2306bba975c7c8edd /formula/README | |
parent | OSL_ENSURE->SAL_WARN_IF where conditional deref follows (diff) | |
download | core-bff635be1d45ce721f5e40c64f665a247b995133.tar.gz core-bff635be1d45ce721f5e40c64f665a247b995133.zip |
Make the RAND() and RANDBETWEEN() Calc functions non-random when requested
We don't want such a mode to affect other uses of randomness, though. Thus use
a separate random number generator object for these two functions, and use a
fixed seed for it if the SC_RAND_REPEATABLE environment variable is set.
As RAND() is implemented in sc, and RANDBETWEEN() is implemented in scaddins,
it was a bit hard to figure out where to add the new functions needed, without
having to over-engineer things with UNO. (This functionality is totally
Calc-specific, but neither sc nor scaddins has any public (non-UNO) API.)
Caolan suggested the formula module, which seems like a good enough place to
me.
Change-Id: I4b0cb327392e51a18bce28478af91b0174d6b726
Diffstat (limited to 'formula/README')
-rw-r--r-- | formula/README | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/formula/README b/formula/README index da0d528c1cad..ab2c28a08c42 100644 --- a/formula/README +++ b/formula/README @@ -1,3 +1,5 @@ -Contains parts of the formula parser used outside Calc code. +Contains parts of the formula parser used outside Calc code that has +been pulled out from Calc's formula parser code. -Has been pulled out from Calc's formula parser code. +Also contains some functions that are needed by code in both sc and +scaddins. Located here just for convenience. So sue me. |