summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/app/transobj.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 739bafe455a3..490c3791b140 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -44,6 +44,7 @@
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <comphelper/storagehelper.hxx>
+#include <comphelper/servicehelper.hxx>
#include <sot/storage.hxx>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
@@ -846,17 +847,14 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
}
}
+namespace
+{
+ class theScTransferUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScTransferUnoTunnelId> {};
+}
+
const com::sun::star::uno::Sequence< sal_Int8 >& ScTransferObj::getUnoTunnelId()
{
- static com::sun::star::uno::Sequence< sal_Int8 > aSeq;
- if( !aSeq.getLength() )
- {
- static osl::Mutex aCreateMutex;
- osl::Guard< osl::Mutex > aGuard( aCreateMutex );
- aSeq.realloc( 16 );
- rtl_createUuid( reinterpret_cast< sal_uInt8* >( aSeq.getArray() ), 0, sal_True );
- }
- return aSeq;
+ return theScTransferUnoTunnelId::get().getSeq();
}
sal_Int64 SAL_CALL ScTransferObj::getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException )