summaryrefslogtreecommitdiffstats
path: root/vbahelper
diff options
context:
space:
mode:
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index 0c35ebc5018f..f162e5cbd088 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/ui/UIElementType.hpp>
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/random.hxx>
#include <vbahelper/vbahelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <time.h>
@@ -262,8 +263,7 @@ OUString VbaCommandBarHelper::generateCustomURL()
url += CUSTOM_TOOLBAR_STR;
// use a random number to minimize possible clash with existing custom toolbars
- srand( unsigned( time( NULL ) ));
- url += OUString::number( rand(), 16 );
+ url += OUString::number(comphelper::rng::uniform_int_distribution(0, std::numeric_limits<int>::max()), 16);
return url;
}