[Libreoffice-commits] .: comphelper/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jun 2 03:43:31 PDT 2011


 comphelper/source/property/genericpropertyset.cxx |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 1f72832e348836e895540e3bbcbe57a6ce83f0fd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jun 1 23:59:50 2011 +0100

    use standard template here

diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx
index 18ca6db..25a4994 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -37,6 +37,7 @@
 #include <comphelper/genericpropertyset.hxx>
 #include <comphelper/propertysetinfo.hxx>
 #include <comphelper/stl_types.hxx>
+#include <comphelper/servicehelper.hxx>
 #include <osl/mutex.hxx>
 #include <rtl/uuid.h>
 
@@ -251,18 +252,15 @@ uno::Sequence< uno::Type > SAL_CALL GenericPropertySet::getTypes()
     return aTypes;
 }
 
+namespace
+{
+    class theGenericPropertySetImplmentationId : public rtl::Static< UnoTunnelIdInit, theGenericPropertySetImplmentationId > {};
+}
+
 uno::Sequence< sal_Int8 > SAL_CALL GenericPropertySet::getImplementationId()
     throw (uno::RuntimeException)
 {
-    MutexGuard aGuard( maMutex );
-
-    static uno::Sequence< sal_Int8 > aId;
-    if( aId.getLength() == 0 )
-    {
-        aId.realloc( 16 );
-        rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
-    }
-    return aId;
+    return theGenericPropertySetImplmentationId::get().getSeq();
 }
 
 // XServiceInfo


More information about the Libreoffice-commits mailing list