summaryrefslogtreecommitdiff
path: root/package/source/xstor/xstorage.cxx
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2010-09-28 14:51:09 +0200
committerMikhail Voytenko <mav@openoffice.org>2010-09-28 14:51:09 +0200
commit1724393d0044cdc535f635cc15d957176554c6ea (patch)
tree25809256f955938410e9612c6deb40cf1256d94e /package/source/xstor/xstorage.cxx
parent5762777d4910b51df2f76f6e442564170c83cad9 (diff)
fwk149: #i112602# integrate the patch
Diffstat (limited to 'package/source/xstor/xstorage.cxx')
-rw-r--r--package/source/xstor/xstorage.cxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 9c90c4ce35dd..01489c5b4f5d 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -49,6 +49,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <rtl/logfile.hxx>
+#include <rtl/instance.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/componentcontext.hxx>
@@ -2368,25 +2369,14 @@ uno::Sequence< uno::Type > SAL_CALL OStorage::getTypes()
return m_pData->m_pTypeCollection->getTypes() ;
}
+namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
+
//-----------------------------------------------
uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId()
throw( uno::RuntimeException )
{
- static ::cppu::OImplementationId* pID = NULL ;
-
- if ( pID == NULL )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ;
-
- if ( pID == NULL )
- {
- static ::cppu::OImplementationId aID( sal_False ) ;
- pID = &aID ;
- }
- }
-
- return pID->getImplementationId() ;
-
+ ::cppu::OImplementationId &rID = lcl_ImplId::get();
+ return rID.getImplementationId();
}
//____________________________________________________________________________________________________