From 32b8c5c4a9fd03b4e05dff2a77ec186973c126b3 Mon Sep 17 00:00:00 2001 From: Alexandre Vicenzi Date: Fri, 31 Jan 2014 03:09:23 -0200 Subject: fdo#54938 Convert basctl, mysqlc, sdext, svgio, writerp. to cppu::supportsSer. Change-Id: I60128dbb5bf83f25eea847fe655d7126c9077414 Reviewed-on: https://gerrit.libreoffice.org/7756 Tested-by: LibreOffice gerrit bot Reviewed-by: Marcos Souza Tested-by: Marcos Souza --- mysqlc/source/mysqlc_driver.cxx | 23 +------- mysqlc/source/mysqlc_resultset.cxx | 107 ++-------------------------------- mysqlc/source/mysqlc_subcomponent.hxx | 57 +++++++----------- 3 files changed, 30 insertions(+), 157 deletions(-) (limited to 'mysqlc') 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 #include #include @@ -39,7 +41,6 @@ using namespace connectivity::mysqlc; #include #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) diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx index 3d595858080a..56033482696e 100644 --- a/mysqlc/source/mysqlc_resultset.cxx +++ b/mysqlc/source/mysqlc_resultset.cxx @@ -22,14 +22,15 @@ #include "mysqlc_resultset.hxx" #include "mysqlc_resultsetmetadata.hxx" -#include #include -#include +#include +#include #include #include #include +#include +#include #include -#include using namespace connectivity::mysqlc; using namespace cppu; @@ -48,7 +49,6 @@ using ::osl::MutexGuard; #include - // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); /* {{{ OResultSet::getImplementationName() -I- */ OUString SAL_CALL OResultSet::getImplementationName() @@ -59,7 +59,6 @@ OUString SAL_CALL OResultSet::getImplementationName() } /* }}} */ - /* {{{ OResultSet::getSupportedServiceNames() -I- */ Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames() throw(RuntimeException) @@ -72,22 +71,15 @@ Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames() } /* }}} */ - /* {{{ OResultSet::supportsService() -I- */ sal_Bool SAL_CALL OResultSet::supportsService(const OUString& _rServiceName) throw(RuntimeException) { OSL_TRACE("OResultSet::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); } /* }}} */ - /* {{{ OResultSet::OResultSet() -I- */ OResultSet::OResultSet(OCommonStatement * pStmt, sql::ResultSet * result, rtl_TextEncoding _encoding ) : OResultSet_BASE(m_aMutex) @@ -108,7 +100,6 @@ OResultSet::OResultSet(OCommonStatement * pStmt, sql::ResultSet * result, rtl_Te } /* }}} */ - /* {{{ OResultSet::~OResultSet() -I- */ OResultSet::~OResultSet() { @@ -116,7 +107,6 @@ OResultSet::~OResultSet() } /* }}} */ - /* {{{ OResultSet::disposing() -I- */ void OResultSet::disposing() { @@ -130,7 +120,6 @@ void OResultSet::disposing() } /* }}} */ - /* {{{ OResultSet::queryInterface() -I- */ Any SAL_CALL OResultSet::queryInterface(const Type & rType) throw(RuntimeException) @@ -144,7 +133,6 @@ Any SAL_CALL OResultSet::queryInterface(const Type & rType) } /* }}} */ - /* {{{ OResultSet::getTypes() -I- */ Sequence< Type > SAL_CALL OResultSet::getTypes() throw(RuntimeException) @@ -158,7 +146,6 @@ Sequence< Type > SAL_CALL OResultSet::getTypes() } /* }}} */ - /* {{{ OResultSet::findColumn() -I- */ sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& columnName) throw(SQLException, RuntimeException) @@ -189,7 +176,6 @@ sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& columnName) } /* }}} */ - /* {{{ OResultSet::getBinaryStream() -U- */ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream(sal_Int32 column) throw(SQLException, RuntimeException) @@ -204,7 +190,6 @@ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getCharacterStream() -U- */ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 column) throw(SQLException, RuntimeException) @@ -219,7 +204,6 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 colu } /* }}} */ - /* {{{ OResultSet::getBoolean() -I- */ sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column) throw(SQLException, RuntimeException) @@ -238,7 +222,6 @@ sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getByte() -I- */ sal_Int8 SAL_CALL OResultSet::getByte(sal_Int32 column) throw(SQLException, RuntimeException) @@ -257,7 +240,6 @@ sal_Int8 SAL_CALL OResultSet::getByte(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getBytes() -I- */ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column) throw(SQLException, RuntimeException) @@ -267,7 +249,6 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column) checkDisposed(OResultSet_BASE::rBHelper.bDisposed); MutexGuard aGuard(m_aMutex); - sql::SQLString val = m_result->getString(column); if (!val.length()) { return Sequence< sal_Int8>(); @@ -277,7 +258,6 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getDate() -I- */ Date SAL_CALL OResultSet::getDate(sal_Int32 column) throw(SQLException, RuntimeException) @@ -316,7 +296,6 @@ Date SAL_CALL OResultSet::getDate(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getDouble() -I- */ double SAL_CALL OResultSet::getDouble(sal_Int32 column) throw(SQLException, RuntimeException) @@ -335,7 +314,6 @@ double SAL_CALL OResultSet::getDouble(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getFloat() -I- */ float SAL_CALL OResultSet::getFloat(sal_Int32 column) throw(SQLException, RuntimeException) @@ -354,7 +332,6 @@ float SAL_CALL OResultSet::getFloat(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getInt() -I- */ sal_Int32 SAL_CALL OResultSet::getInt(sal_Int32 column) throw(SQLException, RuntimeException) @@ -373,7 +350,6 @@ sal_Int32 SAL_CALL OResultSet::getInt(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getRow() -I- */ sal_Int32 SAL_CALL OResultSet::getRow() throw(SQLException, RuntimeException) @@ -391,7 +367,6 @@ sal_Int32 SAL_CALL OResultSet::getRow() } /* }}} */ - /* {{{ OResultSet::getLong() -I- */ sal_Int64 SAL_CALL OResultSet::getLong(sal_Int32 column) throw(SQLException, RuntimeException) @@ -410,7 +385,6 @@ sal_Int64 SAL_CALL OResultSet::getLong(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getMetaData() -I- */ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData() throw(SQLException, RuntimeException) @@ -431,7 +405,6 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData() } /* }}} */ - /* {{{ OResultSet::getArray() -U- */ Reference< XArray > SAL_CALL OResultSet::getArray(sal_Int32 column) throw(SQLException, RuntimeException) @@ -446,7 +419,6 @@ Reference< XArray > SAL_CALL OResultSet::getArray(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getClob() -U- */ Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column) throw(SQLException, RuntimeException) @@ -461,7 +433,6 @@ Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getBlob() -U- */ Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column) throw(SQLException, RuntimeException) @@ -476,7 +447,6 @@ Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getRef() -U- */ Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column) throw(SQLException, RuntimeException) @@ -491,7 +461,6 @@ Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getObject() -U- */ Any SAL_CALL OResultSet::getObject(sal_Int32 column, const Reference< XNameAccess >& /* typeMap */) throw(SQLException, RuntimeException) @@ -508,7 +477,6 @@ Any SAL_CALL OResultSet::getObject(sal_Int32 column, const Reference< XNameAcces } /* }}} */ - /* {{{ OResultSet::getShort() -I- */ sal_Int16 SAL_CALL OResultSet::getShort(sal_Int32 column) throw(SQLException, RuntimeException) @@ -526,7 +494,6 @@ sal_Int16 SAL_CALL OResultSet::getShort(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getString() -I- */ OUString SAL_CALL OResultSet::getString(sal_Int32 column) throw(SQLException, RuntimeException) @@ -551,7 +518,6 @@ OUString SAL_CALL OResultSet::getString(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getTime() -I- */ Time SAL_CALL OResultSet::getTime(sal_Int32 column) throw(SQLException, RuntimeException) @@ -588,7 +554,6 @@ Time SAL_CALL OResultSet::getTime(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::getTimestamp() -I- */ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column) throw(SQLException, RuntimeException) @@ -612,7 +577,6 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::isBeforeFirst() -I- */ sal_Bool SAL_CALL OResultSet::isBeforeFirst() throw(SQLException, RuntimeException) @@ -630,7 +594,6 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst() } /* }}} */ - /* {{{ OResultSet::isAfterLast() -I- */ sal_Bool SAL_CALL OResultSet::isAfterLast() throw(SQLException, RuntimeException) @@ -648,7 +611,6 @@ sal_Bool SAL_CALL OResultSet::isAfterLast() } /* }}} */ - /* {{{ OResultSet::isFirst() -I- */ sal_Bool SAL_CALL OResultSet::isFirst() throw(SQLException, RuntimeException) @@ -666,7 +628,6 @@ sal_Bool SAL_CALL OResultSet::isFirst() } /* }}} */ - /* {{{ OResultSet::isLast() -I- */ sal_Bool SAL_CALL OResultSet::isLast() throw(SQLException, RuntimeException) @@ -684,7 +645,6 @@ sal_Bool SAL_CALL OResultSet::isLast() } /* }}} */ - /* {{{ OResultSet::beforeFirst() -I- */ void SAL_CALL OResultSet::beforeFirst() throw(SQLException, RuntimeException) @@ -701,7 +661,6 @@ void SAL_CALL OResultSet::beforeFirst() } /* }}} */ - /* {{{ OResultSet::afterLast() -I- */ void SAL_CALL OResultSet::afterLast() throw(SQLException, RuntimeException) @@ -718,7 +677,6 @@ void SAL_CALL OResultSet::afterLast() } /* }}} */ - /* {{{ OResultSet::close() -I- */ void SAL_CALL OResultSet::close() throw(SQLException, RuntimeException) { @@ -736,7 +694,6 @@ void SAL_CALL OResultSet::close() throw(SQLException, RuntimeException) } /* }}} */ - /* {{{ OResultSet::first() -I- */ sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException) { @@ -753,7 +710,6 @@ sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException) } /* }}} */ - /* {{{ OResultSet::last() -I- */ sal_Bool SAL_CALL OResultSet::last() throw(SQLException, RuntimeException) @@ -771,7 +727,6 @@ sal_Bool SAL_CALL OResultSet::last() } /* }}} */ - /* {{{ OResultSet::absolute() -I- */ sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 row) throw(SQLException, RuntimeException) @@ -789,7 +744,6 @@ sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 row) } /* }}} */ - /* {{{ OResultSet::relative() -I- */ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row) throw(SQLException, RuntimeException) @@ -807,7 +761,6 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row) } /* }}} */ - /* {{{ OResultSet::previous() -I- */ sal_Bool SAL_CALL OResultSet::previous() throw(SQLException, RuntimeException) @@ -825,7 +778,6 @@ sal_Bool SAL_CALL OResultSet::previous() } /* }}} */ - /* {{{ OResultSet::getStatement() -I- */ Reference< XInterface > SAL_CALL OResultSet::getStatement() throw(SQLException, RuntimeException) @@ -838,7 +790,6 @@ Reference< XInterface > SAL_CALL OResultSet::getStatement() } /* }}} */ - /* {{{ OResultSet::rowDeleted() -I- */ sal_Bool SAL_CALL OResultSet::rowDeleted() throw(SQLException, RuntimeException) @@ -851,7 +802,6 @@ sal_Bool SAL_CALL OResultSet::rowDeleted() } /* }}} */ - /* {{{ OResultSet::rowInserted() -I- */ sal_Bool SAL_CALL OResultSet::rowInserted() throw(SQLException, RuntimeException) @@ -864,7 +814,6 @@ sal_Bool SAL_CALL OResultSet::rowInserted() } /* }}} */ - /* {{{ OResultSet::rowUpdated() -I- */ sal_Bool SAL_CALL OResultSet::rowUpdated() throw(SQLException, RuntimeException) @@ -877,7 +826,6 @@ sal_Bool SAL_CALL OResultSet::rowUpdated() } /* }}} */ - /* {{{ OResultSet::next() -I- */ sal_Bool SAL_CALL OResultSet::next() throw(SQLException, RuntimeException) @@ -895,7 +843,6 @@ sal_Bool SAL_CALL OResultSet::next() } /* }}} */ - /* {{{ OResultSet::wasNull() -I- */ sal_Bool SAL_CALL OResultSet::wasNull() throw(SQLException, RuntimeException) @@ -913,7 +860,6 @@ sal_Bool SAL_CALL OResultSet::wasNull() } /* }}} */ - /* {{{ OResultSet::cancel() -I- */ void SAL_CALL OResultSet::cancel() throw(RuntimeException) @@ -924,7 +870,6 @@ void SAL_CALL OResultSet::cancel() } /* }}} */ - /* {{{ OResultSet::clearWarnings() -I- */ void SAL_CALL OResultSet::clearWarnings() throw(SQLException, RuntimeException) @@ -933,7 +878,6 @@ void SAL_CALL OResultSet::clearWarnings() } /* }}} */ - /* {{{ OResultSet::getWarnings() -I- */ Any SAL_CALL OResultSet::getWarnings() throw(SQLException, RuntimeException) @@ -944,7 +888,6 @@ Any SAL_CALL OResultSet::getWarnings() } /* }}} */ - /* {{{ OResultSet::insertRow() -I- */ void SAL_CALL OResultSet::insertRow() throw(SQLException, RuntimeException) @@ -957,7 +900,6 @@ void SAL_CALL OResultSet::insertRow() } /* }}} */ - /* {{{ OResultSet::updateRow() -I- */ void SAL_CALL OResultSet::updateRow() throw(SQLException, RuntimeException) @@ -971,7 +913,6 @@ void SAL_CALL OResultSet::updateRow() } /* }}} */ - /* {{{ OResultSet::deleteRow() -I- */ void SAL_CALL OResultSet::deleteRow() throw(SQLException, RuntimeException) @@ -983,7 +924,6 @@ void SAL_CALL OResultSet::deleteRow() } /* }}} */ - /* {{{ OResultSet::cancelRowUpdates() -I- */ void SAL_CALL OResultSet::cancelRowUpdates() throw(SQLException, RuntimeException) @@ -995,7 +935,6 @@ void SAL_CALL OResultSet::cancelRowUpdates() } /* }}} */ - /* {{{ OResultSet::moveToInsertRow() -I- */ void SAL_CALL OResultSet::moveToInsertRow() throw(SQLException, RuntimeException) @@ -1009,7 +948,6 @@ void SAL_CALL OResultSet::moveToInsertRow() } /* }}} */ - /* {{{ OResultSet::moveToCurrentRow() -I- */ void SAL_CALL OResultSet::moveToCurrentRow() throw(SQLException, RuntimeException) @@ -1020,7 +958,6 @@ void SAL_CALL OResultSet::moveToCurrentRow() } /* }}} */ - /* {{{ OResultSet::updateNull() -U- */ void SAL_CALL OResultSet::updateNull(sal_Int32 column) throw(SQLException, RuntimeException) @@ -1033,7 +970,6 @@ void SAL_CALL OResultSet::updateNull(sal_Int32 column) } /* }}} */ - /* {{{ OResultSet::updateBoolean() -U- */ void SAL_CALL OResultSet::updateBoolean(sal_Int32 column, sal_Bool /* x */) throw(SQLException, RuntimeException) @@ -1046,7 +982,6 @@ void SAL_CALL OResultSet::updateBoolean(sal_Int32 column, sal_Bool /* x */) } /* }}} */ - /* {{{ OResultSet::updateByte() -U- */ void SAL_CALL OResultSet::updateByte(sal_Int32 column, sal_Int8 /* x */) throw(SQLException, RuntimeException) @@ -1059,7 +994,6 @@ void SAL_CALL OResultSet::updateByte(sal_Int32 column, sal_Int8 /* x */) } /* }}} */ - /* {{{ OResultSet::updateShort() -U- */ void SAL_CALL OResultSet::updateShort(sal_Int32 column, sal_Int16 /* x */) throw(SQLException, RuntimeException) @@ -1072,7 +1006,6 @@ void SAL_CALL OResultSet::updateShort(sal_Int32 column, sal_Int16 /* x */) } /* }}} */ - /* {{{ OResultSet::updateInt() -U- */ void SAL_CALL OResultSet::updateInt(sal_Int32 column, sal_Int32 /* x */) throw(SQLException, RuntimeException) @@ -1085,7 +1018,6 @@ void SAL_CALL OResultSet::updateInt(sal_Int32 column, sal_Int32 /* x */) } /* }}} */ - /* {{{ OResultSet::updateLong() -U- */ void SAL_CALL OResultSet::updateLong(sal_Int32 column, sal_Int64 /* x */) throw(SQLException, RuntimeException) @@ -1098,7 +1030,6 @@ void SAL_CALL OResultSet::updateLong(sal_Int32 column, sal_Int64 /* x */) } /* }}} */ - /* {{{ OResultSet::updateFloat() -U- */ void SAL_CALL OResultSet::updateFloat(sal_Int32 column, float /* x */) throw(SQLException, RuntimeException) @@ -1111,7 +1042,6 @@ void SAL_CALL OResultSet::updateFloat(sal_Int32 column, float /* x */) } /* }}} */ - /* {{{ OResultSet::updateDouble() -U- */ void SAL_CALL OResultSet::updateDouble(sal_Int32 column, double /* x */) throw(SQLException, RuntimeException) @@ -1124,7 +1054,6 @@ void SAL_CALL OResultSet::updateDouble(sal_Int32 column, double /* x */) } /* }}} */ - /* {{{ OResultSet::updateString() -U- */ void SAL_CALL OResultSet::updateString(sal_Int32 column, const OUString& /* x */) throw(SQLException, RuntimeException) @@ -1137,7 +1066,6 @@ void SAL_CALL OResultSet::updateString(sal_Int32 column, const OUString& /* x */ } /* }}} */ - /* {{{ OResultSet::updateBytes() -U- */ void SAL_CALL OResultSet::updateBytes(sal_Int32 column, const Sequence< sal_Int8 >& /* x */) throw(SQLException, RuntimeException) @@ -1150,7 +1078,6 @@ void SAL_CALL OResultSet::updateBytes(sal_Int32 column, const Sequence< sal_Int8 } /* }}} */ - /* {{{ OResultSet::updateDate() -U- */ void SAL_CALL OResultSet::updateDate(sal_Int32 column, const Date& /* x */) throw(SQLException, RuntimeException) @@ -1163,7 +1090,6 @@ void SAL_CALL OResultSet::updateDate(sal_Int32 column, const Date& /* x */) } /* }}} */ - /* {{{ OResultSet::updateTime() -U- */ void SAL_CALL OResultSet::updateTime(sal_Int32 column, const Time& /* x */) throw(SQLException, RuntimeException) @@ -1176,7 +1102,6 @@ void SAL_CALL OResultSet::updateTime(sal_Int32 column, const Time& /* x */) } /* }}} */ - /* {{{ OResultSet::updateTimestamp() -U- */ void SAL_CALL OResultSet::updateTimestamp(sal_Int32 column, const DateTime& /* x */) throw(SQLException, RuntimeException) @@ -1189,7 +1114,6 @@ void SAL_CALL OResultSet::updateTimestamp(sal_Int32 column, const DateTime& /* x } /* }}} */ - /* {{{ OResultSet::updateBinaryStream() -U- */ void SAL_CALL OResultSet::updateBinaryStream(sal_Int32 column, const Reference< XInputStream >& /* x */, sal_Int32 /* length */) @@ -1203,7 +1127,6 @@ void SAL_CALL OResultSet::updateBinaryStream(sal_Int32 column, const Reference< } /* }}} */ - /* {{{ OResultSet::updateCharacterStream() -U- */ void SAL_CALL OResultSet::updateCharacterStream(sal_Int32 column, const Reference< XInputStream >& /* x */, sal_Int32 /* length */) @@ -1217,7 +1140,6 @@ void SAL_CALL OResultSet::updateCharacterStream(sal_Int32 column, const Referenc } /* }}} */ - /* {{{ OResultSet::refreshRow() -U- */ void SAL_CALL OResultSet::refreshRow() throw(SQLException, RuntimeException) @@ -1229,7 +1151,6 @@ void SAL_CALL OResultSet::refreshRow() } /* }}} */ - /* {{{ OResultSet::updateObject() -U- */ void SAL_CALL OResultSet::updateObject(sal_Int32 column, const Any& /* x */) throw(SQLException, RuntimeException) @@ -1242,7 +1163,6 @@ void SAL_CALL OResultSet::updateObject(sal_Int32 column, const Any& /* x */) } /* }}} */ - /* {{{ OResultSet::updateNumericObject() -U- */ void SAL_CALL OResultSet::updateNumericObject(sal_Int32 column, const Any& /* x */, sal_Int32 /* scale */) throw(SQLException, RuntimeException) @@ -1255,7 +1175,6 @@ void SAL_CALL OResultSet::updateNumericObject(sal_Int32 column, const Any& /* x } /* }}} */ - // XRowLocate /* {{{ OResultSet::getBookmark() -U- */ Any SAL_CALL OResultSet::getBookmark() @@ -1273,7 +1192,6 @@ Any SAL_CALL OResultSet::getBookmark() } /* }}} */ - /* {{{ OResultSet::moveToBookmark() -U- */ sal_Bool SAL_CALL OResultSet::moveToBookmark(const Any& /* bookmark */) throw(SQLException, RuntimeException) @@ -1286,7 +1204,6 @@ sal_Bool SAL_CALL OResultSet::moveToBookmark(const Any& /* bookmark */) } /* }}} */ - /* {{{ OResultSet::moveRelativeToBookmark() -U- */ sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark(const Any& /* bookmark */, sal_Int32 /* rows */) throw(SQLException, RuntimeException) @@ -1300,7 +1217,6 @@ sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark(const Any& /* bookmark */, } /* }}} */ - /* {{{ OResultSet::compareBookmarks() -I- */ sal_Int32 SAL_CALL OResultSet::compareBookmarks(const Any& /* n1 */, const Any& /* n2 */) throw(SQLException, RuntimeException) @@ -1315,7 +1231,6 @@ sal_Int32 SAL_CALL OResultSet::compareBookmarks(const Any& /* n1 */, const Any& } /* }}} */ - /* {{{ OResultSet::hasOrderedBookmarks() -I- */ sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks() throw(SQLException, RuntimeException) @@ -1325,7 +1240,6 @@ sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks() } /* }}} */ - /* {{{ OResultSet::hashBookmark() -U- */ sal_Int32 SAL_CALL OResultSet::hashBookmark(const Any& /* bookmark */) throw(SQLException, RuntimeException) @@ -1336,7 +1250,6 @@ sal_Int32 SAL_CALL OResultSet::hashBookmark(const Any& /* bookmark */) } /* }}} */ - // XDeleteRows /* {{{ OResultSet::deleteRows() -U- */ Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows(const Sequence< Any >& /* rows */) @@ -1352,7 +1265,6 @@ Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows(const Sequence< Any >& /* } /* }}} */ - /* {{{ OResultSet::createArrayHelper() -I- */ IPropertyArrayHelper * OResultSet::createArrayHelper() const { @@ -1370,7 +1282,6 @@ IPropertyArrayHelper * OResultSet::createArrayHelper() const } /* }}} */ - /* {{{ OResultSet::getInfoHelper() -I- */ IPropertyArrayHelper & OResultSet::getInfoHelper() { @@ -1379,7 +1290,6 @@ IPropertyArrayHelper & OResultSet::getInfoHelper() } /* }}} */ - /* {{{ OResultSet::convertFastPropertyValue() -I- */ sal_Bool OResultSet::convertFastPropertyValue(Any & /* rConvertedValue */, Any & /* rOldValue */, @@ -1403,7 +1313,6 @@ sal_Bool OResultSet::convertFastPropertyValue(Any & /* rConvertedValue */, } /* }}} */ - /* {{{ OResultSet::setFastPropertyValue_NoBroadcast() -I- */ void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& /* rValue */) throw (Exception) @@ -1425,7 +1334,6 @@ void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& } /* }}} */ - /* {{{ OResultSet::getFastPropertyValue() -I- */ void OResultSet::getFastPropertyValue(Any& _rValue, sal_Int32 nHandle) const { @@ -1455,7 +1363,6 @@ void OResultSet::getFastPropertyValue(Any& _rValue, sal_Int32 nHandle) const } /* }}} */ - /* {{{ OResultSet::acquire() -I- */ void SAL_CALL OResultSet::acquire() throw() @@ -1465,7 +1372,6 @@ void SAL_CALL OResultSet::acquire() } /* }}} */ - /* {{{ OResultSet::release() -I- */ void SAL_CALL OResultSet::release() throw() @@ -1475,7 +1381,6 @@ void SAL_CALL OResultSet::release() } /* }}} */ - /* {{{ OResultSet::getPropertySetInfo() -I- */ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException) { @@ -1484,7 +1389,6 @@ void SAL_CALL OResultSet::release() } /* }}} */ - /* {{{ OResultSet::checkColumnIndex() -I- */ void OResultSet::checkColumnIndex(sal_Int32 index) throw (SQLException, RuntimeException) @@ -1498,7 +1402,6 @@ void OResultSet::checkColumnIndex(sal_Int32 index) } /* }}} */ - /* * Local variables: * tab-width: 4 diff --git a/mysqlc/source/mysqlc_subcomponent.hxx b/mysqlc/source/mysqlc_subcomponent.hxx index 67c9b8a3669a..06475016d24c 100644 --- a/mysqlc/source/mysqlc_subcomponent.hxx +++ b/mysqlc/source/mysqlc_subcomponent.hxx @@ -20,12 +20,13 @@ #ifndef _CONNECTIVITY_OSUBCOMPONENT_HXX_ #define _CONNECTIVITY_OSUBCOMPONENT_HXX_ -#include -#include #include +#include #include -#include +#include +#include #include +#include namespace cppu { class IPropertyArrayHelper; @@ -44,9 +45,9 @@ namespace com } } } + namespace connectivity { - namespace mysqlc { void release(oslInterlockedCount& _refCount, @@ -55,9 +56,7 @@ namespace connectivity ::com::sun::star::lang::XComponent* _pObject); void checkDisposed(sal_Bool _bThrow) throw (::com::sun::star::lang::DisposedException); - //************************************************************ - // OSubComponent - //************************************************************ + template class OSubComponent { protected: @@ -91,7 +90,6 @@ namespace connectivity } }; - template class OPropertyArrayUsageHelper { @@ -141,7 +139,6 @@ namespace connectivity template ::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex; - //------------------------------------------------------------------ template OPropertyArrayUsageHelper::OPropertyArrayUsageHelper() { @@ -149,7 +146,6 @@ namespace connectivity ++s_nRefCount; } - //------------------------------------------------------------------ template ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper::getArrayHelper() { @@ -164,7 +160,6 @@ namespace connectivity return s_pProps; } - class OBase_Mutex { public: @@ -180,7 +175,7 @@ namespace connectivity *_pDest = *_pSource; } } - //------------------------------------------------------------------------- + /// concat two sequences template ::com::sun::star::uno::Sequence concatSequences(const ::com::sun::star::uno::Sequence& _rLeft, const ::com::sun::star::uno::Sequence& _rRight) @@ -199,34 +194,26 @@ namespace connectivity return aReturn; } - -#define DECLARE_SERVICE_INFO() \ - virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); \ - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException); \ +#define DECLARE_SERVICE_INFO() \ + virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); \ + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException); \ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \ -#define IMPLEMENT_SERVICE_INFO(classname, implasciiname, serviceasciiname) \ +#define IMPLEMENT_SERVICE_INFO(classname, implasciiname, serviceasciiname) \ OUString SAL_CALL classname::getImplementationName() throw (::com::sun::star::uno::RuntimeException) \ - { \ - return OUString::createFromAscii(implasciiname); \ - } \ + { \ + return OUString::createFromAscii(implasciiname); \ + } \ ::com::sun::star::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \ - { \ - ::com::sun::star::uno::Sequence< OUString > aSupported(1); \ - aSupported[0] = OUString::createFromAscii(serviceasciiname); \ - return aSupported; \ - } \ + { \ + ::com::sun::star::uno::Sequence< OUString > aSupported(1); \ + aSupported[0] = OUString::createFromAscii(serviceasciiname); \ + return aSupported; \ + } \ sal_Bool SAL_CALL classname::supportsService(const OUString& _rServiceName) throw(::com::sun::star::uno::RuntimeException) \ - { \ - 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, ServiceName); \ + } \ } } #endif // _CONNECTIVITY_OSUBCOMPONENT_HXX_ -- cgit