summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-01 09:20:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-01 15:21:18 +0100
commit45bc378eada1f8e3779797753b01ae2f037a3eeb (patch)
treed1fed4418d0b219bce50db14cbcab39a5b0a0cf9 /sfx2
parent78d2ed5cc75483af061ad4e21b220c45b1cf0aea (diff)
use this tunnel pattern
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx1
-rw-r--r--sfx2/source/doc/objserv.cxx19
2 files changed, 7 insertions, 13 deletions
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 7da63d650dfd..e2c407138069 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -44,7 +44,6 @@
#include <com/sun/star/rdf/URI.hpp>
#include <com/sun/star/rdf/Repository.hpp>
-#include <rtl/uuid.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/uri.hxx>
#include <rtl/bootstrap.hxx>
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 5baeca27a012..cef38fe0416a 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/frame/XDocumentTemplates.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/servicehelper.hxx>
#include <com/sun/star/security/CertificateValidity.hpp>
#include <com/sun/star/security/DocumentSignatureInformation.hpp>
@@ -1466,20 +1467,14 @@ void SfxObjectShell::SignScriptingContent()
ImplSign( sal_True );
}
+namespace
+{
+ class theSfxObjectShellUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSfxObjectShellUnoTunnelId > {};
+}
+
const uno::Sequence<sal_Int8>& SfxObjectShell::getUnoTunnelId()
{
- static uno::Sequence<sal_Int8> * pSeq = 0;
- if( !pSeq )
- {
- osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
- if( !pSeq )
- {
- static uno::Sequence< sal_Int8 > aSeq( 16 );
- rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
- pSeq = &aSeq;
- }
- }
- return *pSeq;
+ return theSfxObjectShellUnoTunnelId::get().getSeq();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */