summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
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
commit5fcbcda7908f6609172ccf14295eb0be2b089fce (patch)
tree6fcb88894411dd67df4455e2c187f090d3da884d /dbaccess/source/ui
parent9e11c23288b2bd661ada57eb065671d20aedb8ad (diff)
use standard template here
Diffstat (limited to 'dbaccess/source/ui')
-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 90b784ea9..dc1582a9a 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();