diff options
Diffstat (limited to 'connectivity/source/inc/ado/ACollection.hxx')
-rw-r--r-- | connectivity/source/inc/ado/ACollection.hxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/connectivity/source/inc/ado/ACollection.hxx b/connectivity/source/inc/ado/ACollection.hxx index 485a151ca4a8..a31986512e75 100644 --- a/connectivity/source/inc/ado/ACollection.hxx +++ b/connectivity/source/inc/ado/ACollection.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,30 +40,30 @@ namespace connectivity { namespace ado { - namespace starcontainer = ::com::sun::star::container; - namespace starlang = ::com::sun::star::lang; - namespace staruno = ::com::sun::star::uno; - namespace starbeans = ::com::sun::star::beans; + namespace starcontainer = ::com::sun::star::container; + namespace starlang = ::com::sun::star::lang; + namespace staruno = ::com::sun::star::uno; + namespace starbeans = ::com::sun::star::beans; typedef ::cppu::WeakImplHelper3< starcontainer::XNameAccess, starcontainer::XIndexAccess, starlang::XServiceInfo> OCollectionBase; //************************************************************ - // OCollection + // OCollection //************************************************************ template <class T,class SimT,class OCl> class OCollection : public OCollectionBase { private: - OCollection( const OCollection& ); // never implemented - OCollection& operator=( const OCollection& ); // never implemented - - protected: - vector<OCl*> m_aElements; - ::cppu::OWeakObject& m_rParent; - ::osl::Mutex& m_rMutex; // mutex of the parent - T* m_pCollection; + OCollection( const OCollection& ); // never implemented + OCollection& operator=( const OCollection& ); // never implemented + protected: + vector<OCl*> m_aElements; + ::cppu::OWeakObject& m_rParent; + ::osl::Mutex& m_rMutex; // mutex of the parent + T* m_pCollection; + public: OCollection(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,T* _pCollection) @@ -90,7 +90,7 @@ namespace connectivity for (sal_Int32 i=0; i<aSupported.getLength(); ++i, ++pSupported) if (pSupported->equals(_rServiceName)) return sal_True; - + return sal_False; } virtual staruno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(staruno::RuntimeException) @@ -115,13 +115,13 @@ namespace connectivity { return::getCppuType(static_cast< staruno::Reference< starbeans::XPropertySet>*>(NULL)); } - + virtual sal_Bool SAL_CALL hasElements( ) throw(staruno::RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); return getCount() > 0; } - + // starcontainer::XIndexAccess virtual sal_Int32 SAL_CALL getCount( ) throw(staruno::RuntimeException) { @@ -153,7 +153,7 @@ namespace connectivity virtual staruno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(starcontainer::NoSuchElementException, starlang::WrappedTargetException, staruno::RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); - + SimT* pCol = NULL; m_pCollection->get_Item(OLEVariant(aName),&pCol); if(!pCol) @@ -179,7 +179,7 @@ namespace connectivity SimT* pIdx = NULL; m_pCollection->get_Item(aVar,&pIdx); pIdx->AddRef(); - _bstr_t sBSTR; + _bstr_t sBSTR; pIdx->get_Name(&sBSTR); (*pStringArray) = (sal_Unicode*)sBSTR; pIdx->Release(); @@ -216,13 +216,13 @@ namespace connectivity class OGroup; class OUser; - typedef OCollection< ADOIndexes,ADOIndex,OIndex> OIndexes; - typedef OCollection< ADOKeys,ADOKey,OKey> OKeys; - typedef OCollection< ADOColumns,ADOColumn,OColumn> OColumns; - typedef OCollection< ADOTables,ADOTable,OTable> OTables; - typedef OCollection< ADOViews,ADOView,OView> OViews; - typedef OCollection< ADOGroups,ADOGroup,OGroup> OGroups; - typedef OCollection< ADOUsers,ADOUser,OUser> OUsers; + typedef OCollection< ADOIndexes,ADOIndex,OIndex> OIndexes; + typedef OCollection< ADOKeys,ADOKey,OKey> OKeys; + typedef OCollection< ADOColumns,ADOColumn,OColumn> OColumns; + typedef OCollection< ADOTables,ADOTable,OTable> OTables; + typedef OCollection< ADOViews,ADOView,OView> OViews; + typedef OCollection< ADOGroups,ADOGroup,OGroup> OGroups; + typedef OCollection< ADOUsers,ADOUser,OUser> OUsers; } } |