diff options
Diffstat (limited to 'mysqlc/source/mysqlc_driver.cxx')
-rw-r--r-- | mysqlc/source/mysqlc_driver.cxx | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx index f6225d82086b..7d8d261ed106 100644 --- a/mysqlc/source/mysqlc_driver.cxx +++ b/mysqlc/source/mysqlc_driver.cxx @@ -32,6 +32,8 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace connectivity::mysqlc; + +#include <cppuhelper/supportsservice.hxx> #include <stdio.h> #include <cppconn/exception.h> @@ -39,7 +41,6 @@ using namespace connectivity::mysqlc; #include <mysql_driver.h> #endif - /* {{{ MysqlCDriver::MysqlCDriver() -I- */ MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory) : ODriver_BASE(m_aMutex) @@ -54,7 +55,6 @@ MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory) } /* }}} */ - /* {{{ MysqlCDriver::disposing() -I- */ void MysqlCDriver::disposing() { @@ -75,7 +75,6 @@ void MysqlCDriver::disposing() } /* }}} */ - // static ServiceInfo /* {{{ MysqlCDriver::getImplementationName_Static() -I- */ OUString MysqlCDriver::getImplementationName_Static() @@ -86,7 +85,6 @@ OUString MysqlCDriver::getImplementationName_Static() } /* }}} */ - /* {{{ MysqlCDriver::getSupportedServiceNames_Static() -I- */ Sequence< OUString > MysqlCDriver::getSupportedServiceNames_Static() throw(RuntimeException) @@ -110,22 +108,15 @@ OUString SAL_CALL MysqlCDriver::getImplementationName() } /* }}} */ - /* {{{ MysqlCDriver::supportsService() -I- */ sal_Bool SAL_CALL MysqlCDriver::supportsService(const OUString& _rServiceName) throw(RuntimeException) { OSL_TRACE("MysqlCDriver::supportsService"); - Sequence< OUString > aSupported(getSupportedServiceNames()); - const OUString* pSupported = aSupported.getConstArray(); - const OUString* pEnd = pSupported + aSupported.getLength(); - for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported){} - - return (pSupported != pEnd); + return cppu::supportsService(this, _rServiceName); } /* }}} */ - /* {{{ MysqlCDriver::getSupportedServiceNames() -I- */ Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames() throw(RuntimeException) @@ -135,7 +126,6 @@ Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames() } /* }}} */ - extern "C" { static void SAL_CALL thisModule() {} } void MysqlCDriver::impl_initCppConn_lck_throw() @@ -251,7 +241,6 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const OUString& url, con } /* }}} */ - /* {{{ MysqlCDriver::acceptsURL() -I- */ sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url) throw(SQLException, RuntimeException) @@ -261,7 +250,6 @@ sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url) } /* }}} */ - /* {{{ MysqlCDriver::getPropertyInfo() -I- */ Sequence< DriverPropertyInfo > SAL_CALL MysqlCDriver::getPropertyInfo(const OUString& url, const Sequence< PropertyValue >& /* info */) throw(SQLException, RuntimeException) @@ -291,7 +279,6 @@ Sequence< DriverPropertyInfo > SAL_CALL MysqlCDriver::getPropertyInfo(const OUSt } /* }}} */ - /* {{{ MysqlCDriver::getMajorVersion() -I- */ sal_Int32 SAL_CALL MysqlCDriver::getMajorVersion() throw(RuntimeException) @@ -301,7 +288,6 @@ sal_Int32 SAL_CALL MysqlCDriver::getMajorVersion() } /* }}} */ - /* {{{ MysqlCDriver::getMinorVersion() -I- */ sal_Int32 SAL_CALL MysqlCDriver::getMinorVersion() throw(RuntimeException) @@ -311,7 +297,6 @@ sal_Int32 SAL_CALL MysqlCDriver::getMinorVersion() } /* }}} */ - namespace connectivity { namespace mysqlc @@ -359,8 +344,6 @@ void release(oslInterlockedCount& _refCount, } /* }}} */ - - /* {{{ connectivity::mysqlc::checkDisposed() -I- */ void checkDisposed(sal_Bool _bThrow) throw (DisposedException) |