summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-01 11:35:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-01 15:21:18 +0100
commit7b9449986d841e2649e24a3045e6b821e4016438 (patch)
treeec307e689fa220880b665efa0e6f16c5a4dd37fb /configmgr
parent45bc378eada1f8e3779797753b01ae2f037a3eeb (diff)
use tunnel pattern here
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/childaccess.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index fc8e1ca4395c..08f22d937148 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -43,6 +43,7 @@
#include "cppu/unotype.hxx"
#include "cppuhelper/queryinterface.hxx"
#include "cppuhelper/weak.hxx"
+#include "comphelper/servicehelper.hxx"
#include "osl/diagnose.h"
#include "osl/mutex.hxx"
#include "rtl/ref.hxx"
@@ -50,7 +51,6 @@
#include "rtl/ustrbuf.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
-#include "rtl/uuid.h"
#include "sal/types.h"
#include "access.hxx"
@@ -77,15 +77,14 @@ namespace css = com::sun::star;
}
-css::uno::Sequence< sal_Int8 > ChildAccess::getTunnelId() {
- static css::uno::Sequence< sal_Int8 > id;
- if (id.getLength() == 0) {
- css::uno::Sequence< sal_Int8 > uuid(16);
- rtl_createUuid(
- reinterpret_cast< sal_uInt8 * >(uuid.getArray()), 0, false);
- id = uuid;
- }
- return id;
+namespace
+{
+ class theChildAccessUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theChildAccessUnoTunnelId > {};
+}
+
+css::uno::Sequence< sal_Int8 > ChildAccess::getTunnelId()
+{
+ return theChildAccessUnoTunnelId::get().getSeq();
}
ChildAccess::ChildAccess(