summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-02 00:08:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-02 00:08:44 +0100
commit953524f87e4271ad9550ae81c087f29e43a6afd5 (patch)
treea646e60f3385ab19dcb21c82dfc83d6cdcd5a360 /forms
parent830152279ef9325fef709c6f6a25618b21ad3a7e (diff)
use standard template here
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/Columns.cxx21
1 files 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 <comphelper/property.hxx>
#include <comphelper/basicio.hxx>
#include <comphelper/types.hxx>
+#include <comphelper/servicehelper.hxx>
#include "services.hxx"
#include "frm_resource.hrc"
#include <tools/debug.hxx>
-#include <rtl/uuid.h>
#include <rtl/memory.h>
//.........................................................................
@@ -124,21 +124,14 @@ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName)
/*************************************************************************/
-//------------------------------------------------------------------
+namespace
+{
+ class theOGridColumnImplementationId : public rtl::Static< UnoTunnelIdInit, theOGridColumnImplementationId > {};
+}
+
const Sequence<sal_Int8>& 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();
}
//------------------------------------------------------------------