From 953524f87e4271ad9550ae81c087f29e43a6afd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 2 Jun 2011 00:08:44 +0100 Subject: [PATCH] use standard template here --- forms/source/component/Columns.cxx | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index f98b6cb862cc..d75ef8b5df68 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -47,10 +47,10 @@ #include #include #include +#include #include "services.hxx" #include "frm_resource.hrc" #include -#include #include //......................................................................... @@ -124,21 +124,14 @@ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName) /*************************************************************************/ -//------------------------------------------------------------------ +namespace +{ + class theOGridColumnImplementationId : public rtl::Static< UnoTunnelIdInit, theOGridColumnImplementationId > {}; +} + const Sequence& OGridColumn::getUnoTunnelImplementationId() { - static Sequence< sal_Int8 > * pSeq = 0; - if( !pSeq ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !pSeq ) - { - static Sequence< sal_Int8 > aSeq( 16 ); - rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); - pSeq = &aSeq; - } - } - return *pSeq; + return theOGridColumnImplementationId::get().getSeq(); } //------------------------------------------------------------------