summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-03 08:49:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-03 08:49:45 +0100
commit10ff4adcef1a4836245657d7c7ec41ce66f61e93 (patch)
tree3b1159eba07d3f0ca21cee8cf5c1cd40895b8510 /sd/source/ui/dlg
parent4f95f23d8b9e0c5fcea663d7477c4c8aef7e2049 (diff)
use standard template for this here
Diffstat (limited to 'sd/source/ui/dlg')
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index a892577516c9..ae7f526848f2 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -56,6 +56,7 @@
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <svtools/embedtransfer.hxx>
#include <tools/diagnose_ex.h>
+#include <comphelper/servicehelper.hxx>
#include <ViewShell.hxx>
using namespace com::sun::star;
@@ -177,22 +178,14 @@ sal_Int64 SAL_CALL SdPageObjsTLB::SdPageObjsTransferable::getSomething( const ::
return nRet;
}
-// -----------------------------------------------------------------------------
+namespace
+{
+ class theSdPageObjsTLBUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSdPageObjsTLBUnoTunnelId > {};
+}
const ::com::sun::star::uno::Sequence< sal_Int8 >& SdPageObjsTLB::SdPageObjsTransferable::getUnoTunnelId()
{
- static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
-
- if( !aSeq.getLength() )
- {
- static osl::Mutex aCreateMutex;
- osl::MutexGuard aGuard( aCreateMutex );
-
- aSeq.realloc( 16 );
- rtl_createUuid( reinterpret_cast< sal_uInt8* >( aSeq.getArray() ), 0, sal_True );
- }
-
- return aSeq;
+ return theSdPageObjsTLBUnoTunnelId::get().getSeq();
}
// -----------------------------------------------------------------------------