Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hey tino,


Attached patch is just a simple wrapper around boost, to be used like

sc::rng::seed() to replace libc srand()
sc::rng::rand() to replace libc rand()

I pushed this part of the patch.


and a few more distributions.

I did not push them. As soon as we have users for them it makes sense
to add them. There is no good reason to add functions that might maybe
used later. If we use them somewhere we can still use the patch for
their implementation.


I've also modified ScInterpreter::ScRandom()
to simply call sc::rng::uniform()
which should solve bug 33365.

Pushed that without the old line.


I've not modified RANDBETWEEN(a,b) yet but this could simply call
sc::rng::uniform_int(a,b).

Also, the rand in Basic could be changed in the future.

Small problems:
 - compiler warnings from within boost
 - few asserts might need to be replaced


The compiler warning is fixed.

And here the link to the patch:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=8450a99c744e9005f19173e4df35d65640bcf5c4

Thanks a lot for the patch.

Regards,
Markus

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.