From 92e87955954bdbd07fe103611077e6409f3f4a0d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 3 Jun 2011 12:32:14 +0100 Subject: use standard template for this --- animations/source/animcore/animcore.cxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 3d7902ce89e8..1a1258f7312f 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -53,8 +53,8 @@ #include #include #include +#include #include - #include #include @@ -2041,22 +2041,14 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis } } -// -------------------------------------------------------------------- +namespace +{ + class theAnimationNodeUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theAnimationNodeUnoTunnelId > {}; +} const ::com::sun::star::uno::Sequence< sal_Int8 > & AnimationNode::getUnoTunnelId() { - static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) - { - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theAnimationNodeUnoTunnelId::get().getSeq(); } // -------------------------------------------------------------------- -- cgit v1.2.3