From 4a8175ebeb58555e5d48df134cfaf128293888f1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 5 Dec 2013 22:41:15 +0100 Subject: Get rid of DECLARE_STL_USTRINGACCESS_MAP Change-Id: I00d02eaeff3eaa5f49550eb9c1d4e4e7e0b2203c --- connectivity/source/cpool/ZPoolCollection.hxx | 6 +++++- connectivity/source/drivers/hsqldb/accesslog.cxx | 6 +++++- connectivity/source/inc/hsqldb/HStorageMap.hxx | 9 ++++++--- connectivity/source/inc/mysql/YDriver.hxx | 7 +++++-- connectivity/source/manager/mdrivermanager.cxx | 8 ++++---- connectivity/source/manager/mdrivermanager.hxx | 8 ++++++-- 6 files changed, 31 insertions(+), 13 deletions(-) (limited to 'connectivity/source') diff --git a/connectivity/source/cpool/ZPoolCollection.hxx b/connectivity/source/cpool/ZPoolCollection.hxx index b6cc41b825b3..41062127d21a 100644 --- a/connectivity/source/cpool/ZPoolCollection.hxx +++ b/connectivity/source/cpool/ZPoolCollection.hxx @@ -19,6 +19,10 @@ #ifndef CONNECTIVITY_POOLCOLLECTION_HXX #define CONNECTIVITY_POOLCOLLECTION_HXX +#include + +#include + #include #include #include @@ -55,7 +59,7 @@ namespace connectivity //========================================================================== typedef ::comphelper::OInterfaceCompare< ::com::sun::star::sdbc::XDriver > ODriverCompare; - DECLARE_STL_USTRINGACCESS_MAP(OConnectionPool*, OConnectionPools); + typedef std::map OConnectionPools; DECLARE_STL_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >, diff --git a/connectivity/source/drivers/hsqldb/accesslog.cxx b/connectivity/source/drivers/hsqldb/accesslog.cxx index 7c3aeef597c9..18b7d05d749f 100644 --- a/connectivity/source/drivers/hsqldb/accesslog.cxx +++ b/connectivity/source/drivers/hsqldb/accesslog.cxx @@ -17,8 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #ifdef HSQLDB_DBG + +#include + #include "accesslog.hxx" #include "hsqldb/HStorageMap.hxx" @@ -26,7 +30,7 @@ namespace connectivity { namespace hsqldb { - DECLARE_STL_USTRINGACCESS_MAP(FILE *,TDebugStreamMap); + typedef std::map TDebugStreamMap; TDebugStreamMap& getStreams() { static TDebugStreamMap streams; diff --git a/connectivity/source/inc/hsqldb/HStorageMap.hxx b/connectivity/source/inc/hsqldb/HStorageMap.hxx index 19bdad5513cc..112cba701d83 100644 --- a/connectivity/source/inc/hsqldb/HStorageMap.hxx +++ b/connectivity/source/inc/hsqldb/HStorageMap.hxx @@ -19,6 +19,10 @@ #ifndef CONNECTIVI_HSQLDB_HSTORAGEMAP_HXX #define CONNECTIVI_HSQLDB_HSTORAGEMAP_HXX +#include + +#include + #include #include #include @@ -26,7 +30,6 @@ #include #include #include -#include #include //........................................................................ namespace connectivity @@ -50,10 +53,10 @@ namespace connectivity }; - DECLARE_STL_USTRINGACCESS_MAP(::boost::shared_ptr,TStreamMap); + typedef std::map< OUString, ::boost::shared_ptr > TStreamMap; typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >, OUString > TStorageURLPair; typedef ::std::pair< TStorageURLPair, TStreamMap> TStoragePair; - DECLARE_STL_USTRINGACCESS_MAP(TStoragePair,TStorages); + typedef std::map TStorages; /** contains all storages so far accessed. */ class StorageContainer diff --git a/connectivity/source/inc/mysql/YDriver.hxx b/connectivity/source/inc/mysql/YDriver.hxx index 38cb3b78175f..383dbc4ec779 100644 --- a/connectivity/source/inc/mysql/YDriver.hxx +++ b/connectivity/source/inc/mysql/YDriver.hxx @@ -19,13 +19,16 @@ #ifndef CONNECTIVITY_MYSQL_DRIVER_HXX #define CONNECTIVITY_MYSQL_DRIVER_HXX +#include + +#include + #include #include #include #include #include #include -#include #include #include "connectivity/CommonTools.hxx" @@ -48,7 +51,7 @@ namespace connectivity typedef ::std::pair< ::com::sun::star::uno::WeakReferenceHelper,OMetaConnection*> TWeakConnectionPair; typedef ::std::pair< ::com::sun::star::uno::WeakReferenceHelper,TWeakConnectionPair> TWeakPair; typedef ::std::vector< TWeakPair > TWeakPairVector; - DECLARE_STL_USTRINGACCESS_MAP(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >,TJDBCDrivers); + typedef std::map< OUString, ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > > TJDBCDrivers; /** delegates all calls to the orignal driver and extend the existing one with the SDBCX layer. diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index f40e433e50f9..20aec320242a 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -563,7 +563,7 @@ OUString SAL_CALL OSDBCDriverManager::getSingletonName_static( ) throw(RuntimeE Reference< XInterface > SAL_CALL OSDBCDriverManager::getRegisteredObject( const OUString& _rName ) throw(Exception, RuntimeException) { MutexGuard aGuard(m_aMutex); - ConstDriverCollectionIterator aSearch = m_aDriversRT.find(_rName); + DriverCollection::const_iterator aSearch = m_aDriversRT.find(_rName); if (aSearch == m_aDriversRT.end()) throwNoSuchElementException(); @@ -580,7 +580,7 @@ void SAL_CALL OSDBCDriverManager::registerObject( const OUString& _rName, const _rName ); - ConstDriverCollectionIterator aSearch = m_aDriversRT.find(_rName); + DriverCollection::const_iterator aSearch = m_aDriversRT.find(_rName); if (aSearch == m_aDriversRT.end()) { Reference< XDriver > xNewDriver(_rxObject, UNO_QUERY); @@ -608,7 +608,7 @@ void SAL_CALL OSDBCDriverManager::revokeObject( const OUString& _rName ) throw(E _rName ); - DriverCollectionIterator aSearch = m_aDriversRT.find(_rName); + DriverCollection::iterator aSearch = m_aDriversRT.find(_rName); if (aSearch == m_aDriversRT.end()) throwNoSuchElementException(); @@ -673,7 +673,7 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const OUString& _rU if ( !xReturn.is() ) { // no -> search the runtime drivers - DriverCollectionIterator aPos = ::std::find_if( + DriverCollection::iterator aPos = ::std::find_if( m_aDriversRT.begin(), // begin of search range m_aDriversRT.end(), // end of search range o3tl::unary_compose< AcceptsURL, ExtractDriverFromCollectionElement >( AcceptsURL( _rURL ), ExtractDriverFromCollectionElement() ) diff --git a/connectivity/source/manager/mdrivermanager.hxx b/connectivity/source/manager/mdrivermanager.hxx index a311c0207218..85bfec4720c4 100644 --- a/connectivity/source/manager/mdrivermanager.hxx +++ b/connectivity/source/manager/mdrivermanager.hxx @@ -20,6 +20,10 @@ #ifndef _CONNECTIVITY_DRIVERMANAGER_HXX_ #define _CONNECTIVITY_DRIVERMANAGER_HXX_ +#include + +#include + #include #include #include @@ -40,7 +44,7 @@ namespace drivermanager //====================================================================== //= various //====================================================================== - DECLARE_STL_USTRINGACCESS_MAP( css::uno::Reference< css::sdbc::XDriver >, DriverCollection ); + typedef std::map< OUString, css::uno::Reference< css::sdbc::XDriver > > DriverCollection; struct DriverAccess { @@ -70,7 +74,7 @@ namespace drivermanager // for drivers registered at runtime (not bootstrapped) we don't require an XServiceInfo interface, // so we have to remember their impl-name in another way - DECLARE_STL_USTRINGACCESS_MAP(css::uno::Reference< css::sdbc::XDriver >, DriverCollection); + typedef std::map< OUString, css::uno::Reference< css::sdbc::XDriver > > DriverCollection; DriverCollection m_aDriversRT; ::connectivity::DriversConfig m_aDriverConfig; -- cgit