summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser/sbagrid.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-02 00:06:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-02 00:06:10 +0100
commiteb139d063ed781fd589da59cbcd1ba45c40d9b4c (patch)
tree538198ed104f477c9f856f563da4e6c7bbb1fc38 /dbaccess/source/ui/browser/sbagrid.cxx
parent8f6d0574f7c2a34d8cb494f8531bcf30689901de (diff)
use standard template here
Diffstat (limited to 'dbaccess/source/ui/browser/sbagrid.cxx')
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx22
1 files changed, 7 insertions, 15 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index d80a80281ae3..a796778822da 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -91,9 +91,9 @@
#include <connectivity/dbtools.hxx>
#include <connectivity/dbconversion.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <rtl/uuid.h>
#include <rtl/memory.h>
#include <comphelper/extract.hxx>
+#include <comphelper/servicehelper.hxx>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <vcl/msgbox.hxx>
@@ -589,24 +589,16 @@ void SAL_CALL SbaXGridPeer::removeStatusListener(const Reference< ::com::sun::st
pCont->removeInterface(xControl);
}
-//---------------------------------------------------------------------------------------
+namespace
+{
+ class theSbaXGridPeerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSbaXGridPeerUnoTunnelId > {};
+}
+
const Sequence< sal_Int8 > & SbaXGridPeer::getUnoTunnelId()
{
- static Sequence< sal_Int8 > * pSeq = 0;
- if( !pSeq )
- {
- ::osl::Guard< ::osl::Mutex > 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 theSbaXGridPeerUnoTunnelId::get().getSeq();
}
-//---------------------------------------------------------------------------------------
Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException)
{
Sequence< Type > aTypes = FmXGridPeer::getTypes();