summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-04-03 21:38:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-04-03 21:43:01 +0100
commitab874eba0321d09c10b256b5c77f2f4e89400941 (patch)
tree0df1cbcb9ba2896ba275d05ea6e7c354408cdb90 /toolkit/source
parentf183d3a500626354508993d453e265da9614df45 (diff)
use rtl::Static where double-locked pattern used
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/controls/geometrycontrolmodel.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index ccdbe1f26fca..20abfff2654e 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -593,20 +593,16 @@
return new OCommonGeometryControlModel( _rxAggregateInstance, m_sServiceSpecifier );
}
+ namespace
+ {
+ class theOCommonGeometryControlModelImplementationId :
+ public rtl::Static< ::cppu::OImplementationId, theOCommonGeometryControlModelImplementationId > {};
+ }
+
//--------------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL OCommonGeometryControlModel::getImplementationId( ) throw (RuntimeException)
{
- static ::cppu::OImplementationId * pId = NULL;
- if ( !pId )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pId )
- {
- static ::cppu::OImplementationId s_aId;
- pId = &s_aId;
- }
- }
- return pId->getImplementationId();
+ return theOCommonGeometryControlModelImplementationId::get().getImplementationId();
}
//--------------------------------------------------------------------