summaryrefslogtreecommitdiff
path: root/comphelper/inc/comphelper/uno3.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/inc/comphelper/uno3.hxx')
-rw-r--r--comphelper/inc/comphelper/uno3.hxx17
1 files changed, 6 insertions, 11 deletions
diff --git a/comphelper/inc/comphelper/uno3.hxx b/comphelper/inc/comphelper/uno3.hxx
index 617c200d3fd5..dff10cc994d3 100644
--- a/comphelper/inc/comphelper/uno3.hxx
+++ b/comphelper/inc/comphelper/uno3.hxx
@@ -30,6 +30,7 @@
#define _COMPHELPER_UNO3_HXX_
#include <osl/interlck.h>
+#include <rtl/instance.hxx>
#include <comphelper/types.hxx>
#include <com/sun/star/uno/XAggregation.hpp>
#include <comphelper/sequence.hxx>
@@ -197,19 +198,13 @@ namespace comphelper
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
#define IMPLEMENT_GET_IMPLEMENTATION_ID( classname ) \
+ namespace \
+ { \
+ class the##classname##ImplementationId : public rtl::Static< ::cppu::OImplementationId, the##classname##ImplementationId> {}; \
+ } \
::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL classname::getImplementationId( ) throw (::com::sun::star::uno::RuntimeException) \
{ \
- static ::cppu::OImplementationId* pId = NULL; \
- if (!pId) \
- { \
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
- if (!pId) \
- { \
- static ::cppu::OImplementationId aId; \
- pId = &aId; \
- } \
- } \
- return pId->getImplementationId(); \
+ return the##classname##ImplementationId::get().getImplementationId(); \
}
#define IMPLEMENT_FORWARD_XTYPEPROVIDER2( classname, baseclass1, baseclass2 ) \