sfx2/source/doc/Metadatable.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit 1e467fa8ae06ee4953511973f1785f41d8ba9e31 Author: Michael Stahl <mst...@redhat.com> Date: Mon Oct 31 12:06:21 2016 +0100 sfx2: Metadata has no need for cryptographic randomness Change-Id: I911c15c0ea7a3cae0269c67d8bd6fd79e9b6d8c6 diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index 45775b4..03dd8bf 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -24,8 +24,7 @@ #include <osl/mutex.hxx> #include <vcl/svapp.hxx> -#include <rtl/random.h> - +#include <comphelper/random.hxx> #include <algorithm> #include <list> @@ -406,12 +405,11 @@ template< typename T > } else { - static rtlRandomPool s_Pool( rtl_random_createPool() ); do { - sal_Int32 n; - rtl_random_getBytes(s_Pool, & n, sizeof(n)); - id = prefix + OUString::number(abs(n)); + unsigned int const n(comphelper::rng::uniform_uint_distribution(0, + std::numeric_limits<unsigned int>::max())); + id = prefix + OUString::number(n); iter = i_rXmlIdMap.find(id); } while (iter != i_rXmlIdMap.end()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits