summaryrefslogtreecommitdiff
path: root/xmloff/source/transform/OOo2Oasis.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-31 22:55:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-01 15:21:18 +0100
commit6ae5667c07ae7047ce47e8f9fba5ea3e5f569286 (patch)
tree6498d230b3a8ea49b6e92e10bd2ddb20d1b74846 /xmloff/source/transform/OOo2Oasis.cxx
parentd322f8701aa8eb9ba69385d1cbcd4435a2d2b297 (diff)
use this pattern throughout
Diffstat (limited to 'xmloff/source/transform/OOo2Oasis.cxx')
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 2df52defcf0c..f94794ef4831 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -28,9 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmloff.hxx"
-#include <rtl/uuid.h>
#include <rtl/ustrbuf.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/servicehelper.hxx>
#include <xmloff/nmspmap.hxx>
#include "xmloff/xmlnmspe.hxx"
#include <xmloff/xmltoken.hxx>
@@ -1996,20 +1996,14 @@ void SAL_CALL OOo2OasisTransformer::Initialize(
}
}
-
-Sequence< sal_Int8 > static CreateUnoTunnelId()
+namespace
{
- static osl::Mutex aCreateMutex;
- ::osl::Guard<osl::Mutex> aGuard( aCreateMutex );
- Sequence< sal_Int8 > aSeq( 16 );
- rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
- return aSeq;
+ class theOOo2OasisTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOOo2OasisTransformerUnoTunnelId> {};
}
const Sequence< sal_Int8 > & OOo2OasisTransformer::getUnoTunnelId() throw()
{
- static Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
- return aSeq;
+ return theOOo2OasisTransformerUnoTunnelId::get().getSeq();
}
// XUnoTunnel