summaryrefslogtreecommitdiff
path: root/xmloff/source/core/attrlist.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/core/attrlist.cxx')
-rw-r--r--xmloff/source/core/attrlist.cxx20
1 files changed, 7 insertions, 13 deletions
diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx
index 3da996ee5220..9216f694bc6b 100644
--- a/xmloff/source/core/attrlist.cxx
+++ b/xmloff/source/core/attrlist.cxx
@@ -32,8 +32,8 @@
#include <vector>
#include <osl/mutex.hxx>
#include <xmloff/xmltoken.hxx>
-#include <rtl/uuid.h>
#include <rtl/memory.h>
+#include <comphelper/servicehelper.hxx>
#include <xmloff/attrlist.hxx>
@@ -256,21 +256,15 @@ sal_Int16 SvXMLAttributeList::GetIndexByName( const OUString& rName ) const
return -1;
}
+namespace
+{
+ class theSvXMLAttributeListUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvXMLAttributeListUnoTunnelId> {};
+}
+
// XUnoTunnel & co
const uno::Sequence< sal_Int8 > & SvXMLAttributeList::getUnoTunnelId() throw()
{
- static uno::Sequence< sal_Int8 > * pSeq = 0;
- if( !pSeq )
- {
- Guard< Mutex > aGuard( 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 theSvXMLAttributeListUnoTunnelId::get().getSeq();
}
SvXMLAttributeList* SvXMLAttributeList::getImplementation( uno::Reference< uno::XInterface > xInt ) throw()