diff options
author | Alexander Wilms <f.alexander.wilms@gmail.com> | 2014-02-22 21:20:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-23 03:38:49 +0000 |
commit | 0ce0c369aa8880dff9fe874ba85ec6f52ee37ddf (patch) | |
tree | 5024cba9f9ea5e3b23ea26025323f6aef39488d0 /connectivity | |
parent | b81ac16e65b311d6e43c05c22c65d2040c9d7e04 (diff) |
Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
314 files changed, 6529 insertions, 6529 deletions
diff --git a/connectivity/source/commontools/BlobHelper.cxx b/connectivity/source/commontools/BlobHelper.cxx index fff3e093d59b..081f18e8dc77 100644 --- a/connectivity/source/commontools/BlobHelper.cxx +++ b/connectivity/source/commontools/BlobHelper.cxx @@ -28,24 +28,24 @@ using namespace ::com::sun::star::uno; BlobHelper::BlobHelper(const ::com::sun::star::uno::Sequence< sal_Int8 >& _val) : m_aValue(_val) { } -// ----------------------------------------------------------------------------- + ::sal_Int64 SAL_CALL BlobHelper::length( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return m_aValue.getLength(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL BlobHelper::getBytes( ::sal_Int64 pos, ::sal_Int32 _length ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { if ( sal_Int32(pos + _length) > m_aValue.getLength() ) throw ::com::sun::star::sdbc::SQLException(); return ::com::sun::star::uno::Sequence< ::sal_Int8 >(m_aValue.getConstArray() + sal_Int32(pos),_length); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL BlobHelper::getBinaryStream( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return new ::comphelper::SequenceInputStream(m_aValue); } -// ----------------------------------------------------------------------------- + // The "return" after a call to throwFeatureNotImplementedException() // (which always throws) will be detected as unreachable when doing @@ -58,7 +58,7 @@ SAL_WNOUNREACHABLE_CODE_PUSH ::dbtools::throwFeatureNotImplementedException( "XBlob::position", *this ); return 0; } -// ----------------------------------------------------------------------------- + ::sal_Int64 SAL_CALL BlobHelper::positionOfBlob( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob >& /*pattern*/, ::sal_Int64 /*start*/ ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XBlob::positionOfBlob", *this ); diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index ef33afc7143e..6222ddbbacc0 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -50,10 +50,10 @@ namespace connectivity using namespace ::com::sun::star::beans; using namespace ::com::sun::star::java; using namespace dbtools; - //------------------------------------------------------------------------------ + const sal_Unicode CHAR_PLACE = '_'; const sal_Unicode CHAR_WILD = '%'; - // ------------------------------------------------------------------------- + sal_Bool match(const sal_Unicode* pWild, const sal_Unicode* pStr, const sal_Unicode cEscape) { int pos=0; @@ -111,7 +111,7 @@ namespace connectivity } return ( *pStr == 0 ) && ( *pWild == 0 ); } - //------------------------------------------------------------------ + #if HAVE_FEATURE_JAVA ::rtl::Reference< jvmaccess::VirtualMachine > getJavaVM(const Reference<XComponentContext >& _rxContext) { @@ -154,7 +154,7 @@ namespace connectivity return aRet; } - //------------------------------------------------------------------------------ + sal_Bool existsJavaClassByName( const ::rtl::Reference< jvmaccess::VirtualMachine >& _pJVM,const OUString& _sClassName ) { sal_Bool bRet = sal_False; @@ -179,7 +179,7 @@ namespace connectivity #include <ctype.h> namespace dbtools { -//------------------------------------------------------------------ + sal_Bool isCharOk(sal_Unicode c,const OUString& _rSpecials) { @@ -187,7 +187,7 @@ sal_Bool isCharOk(sal_Unicode c,const OUString& _rSpecials) c == '_' || _rSpecials.indexOf(c) != -1); } -//------------------------------------------------------------------------------ + sal_Bool isValidSQLName(const OUString& rName,const OUString& _rSpecials) { // Test for correct naming (in SQL sense) @@ -215,7 +215,7 @@ sal_Bool isValidSQLName(const OUString& rName,const OUString& _rSpecials) return sal_True; } -//------------------------------------------------------------------ + // Creates a new name if necessary OUString convertName2SQLName(const OUString& rName,const OUString& _rSpecials) { @@ -237,7 +237,7 @@ OUString convertName2SQLName(const OUString& rName,const OUString& _rSpecials) return aNewName; } -//------------------------------------------------------------------------------ + OUString quoteName(const OUString& _rQuote, const OUString& _rName) { OUString sName = _rName; diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index 19b38fa308b2..f607209f8d61 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -31,18 +31,18 @@ #include <string.h> using namespace connectivity; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace ::com::sun::star::reflection; -// -------------------------------------------------------------------------------- + OConnectionWrapper::OConnectionWrapper() { } -// ----------------------------------------------------------------------------- + void OConnectionWrapper::setDelegation(Reference< XAggregation >& _rxProxyConnection,oslInterlockedCount& _rRefCount) { OSL_ENSURE(_rxProxyConnection.is(),"OConnectionWrapper: Connection must be valid!"); @@ -64,7 +64,7 @@ void OConnectionWrapper::setDelegation(Reference< XAggregation >& _rxProxyConnec } osl_atomic_decrement( &_rRefCount ); } -// ----------------------------------------------------------------------------- + void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnection ,const Reference< XComponentContext>& _rxContext ,oslInterlockedCount& _rRefCount) @@ -91,12 +91,12 @@ void OConnectionWrapper::setDelegation(const Reference< XConnection >& _xConnect } osl_atomic_decrement( &_rRefCount ); } -// ----------------------------------------------------------------------------- + void OConnectionWrapper::disposing() { m_xConnection.clear(); } -//----------------------------------------------------------------------------- + OConnectionWrapper::~OConnectionWrapper() { if (m_xProxyConnection.is()) @@ -104,13 +104,13 @@ OConnectionWrapper::~OConnectionWrapper() } // XServiceInfo -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnectionWrapper::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { return OUString( "com.sun.star.sdbc.drivers.OConnectionWrapper" ); } -// -------------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OConnectionWrapper::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { // first collect the services which are supported by our aggregate @@ -131,19 +131,19 @@ OUString SAL_CALL OConnectionWrapper::getImplementationName( ) throw (::com::su return aSupported; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnectionWrapper::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException) { return cppu::supportsService(this, _rServiceName); } -// -------------------------------------------------------------------------------- + Any SAL_CALL OConnectionWrapper::queryInterface( const Type& _rType ) throw (RuntimeException) { Any aReturn = OConnection_BASE::queryInterface(_rType); return aReturn.hasValue() ? aReturn : (m_xProxyConnection.is() ? m_xProxyConnection->queryAggregation(_rType) : aReturn); } -// -------------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OConnectionWrapper::getTypes( ) throw (::com::sun::star::uno::RuntimeException) { return ::comphelper::concatSequences( @@ -151,7 +151,7 @@ Sequence< Type > SAL_CALL OConnectionWrapper::getTypes( ) throw (::com::sun::st m_xTypeProvider->getTypes() ); } -// ----------------------------------------------------------------------------- + // com::sun::star::lang::XUnoTunnel sal_Int64 SAL_CALL OConnectionWrapper::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException) { @@ -163,7 +163,7 @@ sal_Int64 SAL_CALL OConnectionWrapper::getSomething( const Sequence< sal_Int8 >& return 0; } -// ----------------------------------------------------------------------------- + Sequence< sal_Int8 > OConnectionWrapper::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -178,7 +178,7 @@ Sequence< sal_Int8 > OConnectionWrapper::getUnoTunnelImplementationId() } return pId->getImplementationId(); } -// ----------------------------------------------------------------------------- + namespace { class TPropertyValueLessFunctor : public ::std::binary_function< ::com::sun::star::beans::PropertyValue,::com::sun::star::beans::PropertyValue,bool> @@ -194,7 +194,7 @@ namespace } -// ----------------------------------------------------------------------------- + // creates a unique id out of the url and sequence of properties void OConnectionWrapper::createUniqueId( const OUString& _rURL ,Sequence< PropertyValue >& _rInfo @@ -250,7 +250,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL // we have to destroy the digest rtl_digest_destroy(aDigest); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 8ccf9d050fdc..0bcc9509133f 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; -// ----------------------------------------------------------------------------- + OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, sal_Bool bQuote, const Reference< XTypeConverter >& _rxTypeConverter) { @@ -209,7 +209,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, sal_Bo aRet.appendAscii(" NULL "); return aRet.makeStringAndClear(); } -// ----------------------------------------------------------------------------- + Date DBTypeConversion::getNULLDate(const Reference< XNumberFormatsSupplier > &xSupplier) { OSL_ENSURE(xSupplier.is(), "getNULLDate : the formatter doesn't implement a supplier !"); @@ -229,7 +229,7 @@ Date DBTypeConversion::getNULLDate(const Reference< XNumberFormatsSupplier > &xS return getStandardDate(); } -// ----------------------------------------------------------------------------- + void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, const Reference<XNumberFormatter>& xFormatter, const Date& rNullDate, @@ -303,7 +303,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, } } -//------------------------------------------------------------------------------ + void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, const Date& rNullDate, const double& rValue, @@ -349,7 +349,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, } } -//------------------------------------------------------------------------------ + double DBTypeConversion::getValue( const Reference< XColumn >& i_column, const Date& i_relativeToNullDate ) { try @@ -396,7 +396,7 @@ double DBTypeConversion::getValue( const Reference< XColumn >& i_column, const D return 0.0; } } -//------------------------------------------------------------------------------ + OUString DBTypeConversion::getFormattedValue(const Reference< XPropertySet>& _xColumn, const Reference<XNumberFormatter>& _xFormatter, const ::com::sun::star::lang::Locale& _rLocale, @@ -432,7 +432,7 @@ OUString DBTypeConversion::getFormattedValue(const Reference< XPropertySet>& _xC return DBTypeConversion::getFormattedValue(Reference< XColumn > (_xColumn, UNO_QUERY), _xFormatter, _rNullDate, nKey, nKeyType); } -//------------------------------------------------------------------------------ + OUString DBTypeConversion::getFormattedValue(const Reference<XColumn>& xVariant, const Reference<XNumberFormatter>& xFormatter, const Date& rNullDate, @@ -502,6 +502,6 @@ OUString DBTypeConversion::getFormattedValue(const Reference<XColumn>& xVariant, } return aString; } -//------------------------------------------------------------------ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index bf70fbac5714..7804ad9f6fab 100644 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -86,11 +86,11 @@ namespace } } } -// ----------------------------------------------------------------------------- + DriversConfigImpl::DriversConfigImpl() { } -// ----------------------------------------------------------------------------- + void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rxORB) const { if ( m_aDrivers.empty() ) @@ -120,24 +120,24 @@ void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rx } // if ( m_aInstalled.isValid() ) } } -// ----------------------------------------------------------------------------- + DriversConfig::DriversConfig(const uno::Reference< uno::XComponentContext >& _rxORB) :m_xORB(_rxORB) { } -// ----------------------------------------------------------------------------- + DriversConfig::~DriversConfig() { } -// ----------------------------------------------------------------------------- + DriversConfig::DriversConfig( const DriversConfig& _rhs ) { *this = _rhs; } -// ----------------------------------------------------------------------------- + DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) { if ( this != &_rhs ) @@ -147,7 +147,7 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) return *this; } -// ----------------------------------------------------------------------------- + OUString DriversConfig::getDriverFactoryName(const OUString& _sURL) const { const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); @@ -167,7 +167,7 @@ OUString DriversConfig::getDriverFactoryName(const OUString& _sURL) const return sRet; } -// ----------------------------------------------------------------------------- + OUString DriversConfig::getDriverTypeDisplayName(const OUString& _sURL) const { const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); @@ -187,22 +187,22 @@ OUString DriversConfig::getDriverTypeDisplayName(const OUString& _sURL) const return sRet; } -// ----------------------------------------------------------------------------- + const ::comphelper::NamedValueCollection& DriversConfig::getProperties(const OUString& _sURL) const { return impl_get(_sURL,1); } -// ----------------------------------------------------------------------------- + const ::comphelper::NamedValueCollection& DriversConfig::getFeatures(const OUString& _sURL) const { return impl_get(_sURL,0); } -// ----------------------------------------------------------------------------- + const ::comphelper::NamedValueCollection& DriversConfig::getMetaData(const OUString& _sURL) const { return impl_get(_sURL,2); } -// ----------------------------------------------------------------------------- + const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const OUString& _sURL,sal_Int32 _nProps) const { const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); @@ -237,7 +237,7 @@ const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const OUString } return *pRet; } -// ----------------------------------------------------------------------------- + uno::Sequence< OUString > DriversConfig::getURLs() const { const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index b580d377f013..162531ceb710 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -44,14 +44,14 @@ using namespace connectivity; using namespace dbtools; using namespace cppu; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet() :ODatabaseMetaDataResultSet_BASE(m_aMutex) ,::comphelper::OPropertyContainer(ODatabaseMetaDataResultSet_BASE::rBHelper) @@ -64,7 +64,7 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet() construct(); } -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet( MetaDataResultSetType _eType ) :ODatabaseMetaDataResultSet_BASE(m_aMutex) ,::comphelper::OPropertyContainer(ODatabaseMetaDataResultSet_BASE::rBHelper) @@ -79,11 +79,11 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet( MetaDataResultSetType _e setType(_eType); } -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet() { } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::construct() { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, 0,&m_nFetchSize, ::getCppuType(static_cast<sal_Int32*>(0))); @@ -91,7 +91,7 @@ void ODatabaseMetaDataResultSet::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, 0, &m_nFetchDirection, ::getCppuType(static_cast<sal_Int32*>(0))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY, PropertyAttribute::READONLY,&m_nResultSetConcurrency, ::getCppuType(static_cast<sal_Int32*>(0))); } -// ----------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setType(MetaDataResultSetType _eType) { switch( _eType ) @@ -118,7 +118,7 @@ void ODatabaseMetaDataResultSet::setType(MetaDataResultSetType _eType) OSL_FAIL("Wrong type!"); } } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::disposing(void) { OPropertySetHelper::disposing(); @@ -130,23 +130,23 @@ m_xMetaData.clear(); m_aRows.clear(); m_aRowsIter = m_aRows.end(); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::acquire() throw() { ODatabaseMetaDataResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::release() throw() { ODatabaseMetaDataResultSet_BASE::release(); } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); return aRet.hasValue() ? aRet : ODatabaseMetaDataResultSet_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), @@ -155,14 +155,14 @@ Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(Runtime return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } -// ----------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setRows(const ORows& _rRows) { m_aRows = _rRows; m_bBOF = sal_True; m_bEOF = m_aRows.empty(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -184,78 +184,78 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const OUString& colum assert(false); return 0; // Never reached } -// ----------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException) { if(columnIndex >= (sal_Int32)(*m_aRowsIter).size() || columnIndex < 1) ::dbtools::throwInvalidIndexException(*this); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL ODatabaseMetaDataResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL ODatabaseMetaDataResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + double SAL_CALL ODatabaseMetaDataResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + float SAL_CALL ODatabaseMetaDataResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getRow( ) throw(SQLException, RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL ODatabaseMetaDataResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData( ) throw(SQLException, RuntimeException) { @@ -268,69 +268,69 @@ Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData return m_xMetaData; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { return getValue(columnIndex).makeAny(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL ODatabaseMetaDataResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL ODatabaseMetaDataResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { return m_bEOF; } -// ------------------------------------------------------------------------- + SAL_WNOUNREACHABLE_CODE_PUSH @@ -339,7 +339,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, Ru ::dbtools::throwFunctionSequenceException(*this); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); @@ -348,17 +348,17 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, Run SAL_WNOUNREACHABLE_CODE_POP -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::afterLast( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeException) { @@ -369,7 +369,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeE } dispose(); } -// ------------------------------------------------------------------------- + SAL_WNOUNREACHABLE_CODE_PUSH @@ -378,26 +378,26 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, Runt ::dbtools::throwFunctionSequenceException(*this); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); @@ -406,12 +406,12 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, R SAL_WNOUNREACHABLE_CODE_POP -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) throw(SQLException, RuntimeException) { return m_aStatement.get(); } -// ------------------------------------------------------------------------- + SAL_WNOUNREACHABLE_CODE_PUSH @@ -420,13 +420,13 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, ::dbtools::throwFunctionSequenceException(*this); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionSequenceException(*this); @@ -435,13 +435,13 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, SAL_WNOUNREACHABLE_CODE_POP -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { return m_bBOF; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, RuntimeException) { @@ -470,7 +470,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, Runti } return bSuccess; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -483,65 +483,65 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::wasNull( ) throw(SQLException, Ru return (*m_aRowsIter)[m_nColPos]->getValue().isNull(); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::refreshRow( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::cancel( ) throw(RuntimeException) { } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::getWarnings( ) throw(SQLException, RuntimeException) { return Any(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* ODatabaseMetaDataResultSet::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & ODatabaseMetaDataResultSet::getInfoHelper() { return *const_cast<ODatabaseMetaDataResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setProceduresMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setProceduresMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setCatalogsMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setCatalogsMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setSchemasMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setSchemasMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setColumnPrivilegesMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setColumnPrivilegesMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setColumnsMap() { @@ -549,7 +549,7 @@ void ODatabaseMetaDataResultSet::setColumnsMap() pMetaData->setColumnsMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setTablesMap() { @@ -557,102 +557,102 @@ void ODatabaseMetaDataResultSet::setTablesMap() pMetaData->setTablesMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setProcedureColumnsMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setProcedureColumnsMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setPrimaryKeysMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setPrimaryKeysMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setIndexInfoMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setIndexInfoMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setTablePrivilegesMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setTablePrivilegesMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setCrossReferenceMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setCrossReferenceMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setVersionColumnsMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setVersionColumnsMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setBestRowIdentifierMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setBestRowIdentifierMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setTypeInfoMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setTypeInfoMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setUDTsMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setUDTsMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setTableTypes() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setTableTypes(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setExportedKeysMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setExportedKeysMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setImportedKeysMap() { ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(); pMetaData->setImportedKeysMap(); m_xMetaData = pMetaData; } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL ODatabaseMetaDataResultSet::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + ORowSetValueDecorator& ORowSetValueDecorator::operator=(const ORowSetValue& _aValue) { m_aValue = _aValue; return *this; } -// ----------------------------------------------------------------------------- + const ORowSetValue& ODatabaseMetaDataResultSet::getValue(sal_Int32 columnIndex) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -668,89 +668,89 @@ const ORowSetValue& ODatabaseMetaDataResultSet::getValue(sal_Int32 columnIndex) return *(*m_aRowsIter)[columnIndex]; return m_aEmptyValue; } -// ----------------------------------------------------------------------------- + /// return an empty ORowSetValueDecorator ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getEmptyValue() { static ORowSetValueDecoratorRef aEmptyValueRef = new ORowSetValueDecorator(); return aEmptyValueRef; } -// ----------------------------------------------------------------------------- + /// return an ORowSetValueDecorator with 0 as value ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::get0Value() { static ORowSetValueDecoratorRef a0ValueRef = new ORowSetValueDecorator((sal_Int32)0); return a0ValueRef; } -// ----------------------------------------------------------------------------- + /// return an ORowSetValueDecorator with 1 as value ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::get1Value() { static ORowSetValueDecoratorRef a1ValueRef = new ORowSetValueDecorator((sal_Int32)1); return a1ValueRef; } -// ----------------------------------------------------------------------------- + /// return an ORowSetValueDecorator with ColumnSearch::BASIC as value ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getBasicValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(ColumnSearch::BASIC); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getSelectValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("SELECT")); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getInsertValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("INSERT")); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getDeleteValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("DELETE")); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getUpdateValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("UPDATE")); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getCreateValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("CREATE")); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getReadValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("READ")); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getAlterValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("ALTER")); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getDropValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("DROP")); return aValueRef; } -// ----------------------------------------------------------------------------- + ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getQuoteValue() { static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("'")); return aValueRef; } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aArguments ) throw (Exception, RuntimeException) { if ( _aArguments.getLength() == 2 ) @@ -847,20 +847,20 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA } } // XServiceInfo - // -------------------------------------------------------------------------------- - //------------------------------------------------------------------------------ + + OUString ODatabaseMetaDataResultSet::getImplementationName_Static( ) throw(RuntimeException) { return OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet"); } - //------------------------------------------------------------------------------ + Sequence< OUString > ODatabaseMetaDataResultSet::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 1 ); aSNS[0] = "com.sun.star.sdbc.ResultSet"; return aSNS; } - //------------------------------------------------------------------ + OUString SAL_CALL ODatabaseMetaDataResultSet::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -870,12 +870,12 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA { return cppu::supportsService(this, _rServiceName); } - //------------------------------------------------------------------ + Sequence< OUString > SAL_CALL ODatabaseMetaDataResultSet::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } - // ------------------------------------------------------------------------- + namespace connectivity { Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet_CreateInstance(const Reference< XComponentContext >& ) throw( Exception ) @@ -884,7 +884,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA } } -// ----------------------------------------------------------------------------- + namespace { cppu::ImplementationEntry entries[] = { @@ -908,7 +908,7 @@ using ::com::sun::star::lang::XMultiServiceFactory; extern "C" { -//--------------------------------------------------------------------------------------- + SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbtools_component_getFactory(const sal_Char* implName, ::com::sun::star::lang::XMultiServiceFactory* serviceManager, void* registryKey) { return cppu::component_getFactoryHelper(implName, serviceManager, registryKey, entries); diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index 5e99163f635c..646a80c9a32c 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -108,7 +108,7 @@ namespace { } } -// ----------------------------------------------------------------------------- + #ifdef DBG_UTIL #include <vector> @@ -190,7 +190,7 @@ namespace tracing #define TRACE_FREE( type ) #endif -// ----------------------------------------------------------------------------- + void ORowSetValue::setTypeKind(sal_Int32 _eType) { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::setTypeKind" ); @@ -272,7 +272,7 @@ void ORowSetValue::setTypeKind(sal_Int32 _eType) m_eTypeKind = _eType; } -// ----------------------------------------------------------------------------- + void ORowSetValue::free() { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::free" ); @@ -341,7 +341,7 @@ void ORowSetValue::free() m_bNull = true; } } -// ----------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const ORowSetValue& _rRH) { if(&_rRH == this) @@ -495,7 +495,7 @@ ORowSetValue& ORowSetValue::operator=(const ORowSetValue& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const Date& _rRH) { @@ -514,7 +514,7 @@ ORowSetValue& ORowSetValue::operator=(const Date& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const Time& _rRH) { if(m_eTypeKind != DataType::TIME) @@ -532,7 +532,7 @@ ORowSetValue& ORowSetValue::operator=(const Time& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const DateTime& _rRH) { if(m_eTypeKind != DataType::TIMESTAMP) @@ -549,7 +549,7 @@ ORowSetValue& ORowSetValue::operator=(const DateTime& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const OUString& _rRH) { @@ -565,7 +565,7 @@ ORowSetValue& ORowSetValue::operator=(const OUString& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const double& _rRH) { @@ -578,7 +578,7 @@ ORowSetValue& ORowSetValue::operator=(const double& _rRH) return *this; } -// ----------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const float& _rRH) { if(m_eTypeKind != DataType::FLOAT) @@ -590,7 +590,7 @@ ORowSetValue& ORowSetValue::operator=(const float& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const sal_Int8& _rRH) { @@ -603,7 +603,7 @@ ORowSetValue& ORowSetValue::operator=(const sal_Int8& _rRH) m_bSigned = true; return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const sal_uInt8& _rRH) { @@ -616,7 +616,7 @@ ORowSetValue& ORowSetValue::operator=(const sal_uInt8& _rRH) m_bSigned = false; return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const sal_Int16& _rRH) { @@ -630,7 +630,7 @@ ORowSetValue& ORowSetValue::operator=(const sal_Int16& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const sal_uInt16& _rRH) { @@ -644,7 +644,7 @@ ORowSetValue& ORowSetValue::operator=(const sal_uInt16& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const sal_Int32& _rRH) { @@ -659,7 +659,7 @@ ORowSetValue& ORowSetValue::operator=(const sal_Int32& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const sal_uInt32& _rRH) { @@ -674,7 +674,7 @@ ORowSetValue& ORowSetValue::operator=(const sal_uInt32& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const bool _rRH) { @@ -687,7 +687,7 @@ ORowSetValue& ORowSetValue::operator=(const bool _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const sal_Int64& _rRH) { if ( DataType::BIGINT != m_eTypeKind) @@ -700,7 +700,7 @@ ORowSetValue& ORowSetValue::operator=(const sal_Int64& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const sal_uInt64& _rRH) { if ( DataType::BIGINT != m_eTypeKind) @@ -713,7 +713,7 @@ ORowSetValue& ORowSetValue::operator=(const sal_uInt64& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const Sequence<sal_Int8>& _rRH) { if (!isStorageCompatible(DataType::LONGVARBINARY,m_eTypeKind)) @@ -732,7 +732,7 @@ ORowSetValue& ORowSetValue::operator=(const Sequence<sal_Int8>& _rRH) return *this; } -// ------------------------------------------------------------------------- + ORowSetValue& ORowSetValue::operator=(const Any& _rAny) { if (!isStorageCompatible(DataType::OBJECT,m_eTypeKind)) @@ -751,26 +751,26 @@ ORowSetValue& ORowSetValue::operator=(const Any& _rAny) return *this; } -// ------------------------------------------------------------------------- + bool operator==(const Date& _rLH,const Date& _rRH) { return _rLH.Day == _rRH.Day && _rLH.Month == _rRH.Month && _rLH.Year == _rRH.Year; } -// ------------------------------------------------------------------------- + bool operator==(const Time& _rLH,const Time& _rRH) { return _rLH.Minutes == _rRH.Minutes && _rLH.Hours == _rRH.Hours && _rLH.Seconds == _rRH.Seconds && _rLH.NanoSeconds == _rRH.NanoSeconds; } -// ------------------------------------------------------------------------- + bool operator==(const DateTime& _rLH,const DateTime& _rRH) { return _rLH.Day == _rRH.Day && _rLH.Month == _rRH.Month && _rLH.Year == _rRH.Year && _rLH.Minutes == _rRH.Minutes && _rLH.Hours == _rRH.Hours && _rLH.Seconds == _rRH.Seconds && _rLH.NanoSeconds == _rRH.NanoSeconds; } -// ------------------------------------------------------------------------- + bool ORowSetValue::operator==(const ORowSetValue& _rRH) const { @@ -881,7 +881,7 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const } return bRet; } -// ------------------------------------------------------------------------- + Any ORowSetValue::makeAny() const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::makeAny" ); @@ -975,7 +975,7 @@ Any ORowSetValue::makeAny() const } return rValue; } -// ------------------------------------------------------------------------- + OUString ORowSetValue::getString( ) const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::getString" ); @@ -1063,7 +1063,7 @@ OUString ORowSetValue::getString( ) const } return aRet; } -// ------------------------------------------------------------------------- + bool ORowSetValue::getBool() const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::getBool" ); @@ -1137,7 +1137,7 @@ bool ORowSetValue::getBool() const } return bRet; } -// ------------------------------------------------------------------------- + sal_Int8 ORowSetValue::getInt8() const { @@ -1211,7 +1211,7 @@ sal_Int8 ORowSetValue::getInt8() const } return nRet; } -// ------------------------------------------------------------------------- + sal_uInt8 ORowSetValue::getUInt8() const { @@ -1283,7 +1283,7 @@ sal_uInt8 ORowSetValue::getUInt8() const return nRet; } -// ------------------------------------------------------------------------- + sal_Int16 ORowSetValue::getInt16() const { @@ -1357,7 +1357,7 @@ sal_Int16 ORowSetValue::getInt16() const } return nRet; } -// ------------------------------------------------------------------------- + sal_uInt16 ORowSetValue::getUInt16() const { @@ -1428,7 +1428,7 @@ sal_uInt16 ORowSetValue::getUInt16() const } return nRet; } -// ------------------------------------------------------------------------- + sal_Int32 ORowSetValue::getInt32() const { @@ -1502,7 +1502,7 @@ sal_Int32 ORowSetValue::getInt32() const } return nRet; } -// ------------------------------------------------------------------------- + sal_uInt32 ORowSetValue::getUInt32() const { @@ -1575,7 +1575,7 @@ sal_uInt32 ORowSetValue::getUInt32() const } return nRet; } -// ------------------------------------------------------------------------- + sal_Int64 ORowSetValue::getLong() const { @@ -1649,7 +1649,7 @@ sal_Int64 ORowSetValue::getLong() const } return nRet; } -// ------------------------------------------------------------------------- + sal_uInt64 ORowSetValue::getULong() const { @@ -1723,7 +1723,7 @@ sal_uInt64 ORowSetValue::getULong() const return nRet; } -// ------------------------------------------------------------------------- + float ORowSetValue::getFloat() const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::getFloat" ); @@ -1800,7 +1800,7 @@ float ORowSetValue::getFloat() const } return nRet; } -// ------------------------------------------------------------------------- + double ORowSetValue::getDouble() const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::getDouble" ); @@ -1879,7 +1879,7 @@ double ORowSetValue::getDouble() const } return nRet; } -// ----------------------------------------------------------------------------- + Sequence<sal_Int8> ORowSetValue::getSequence() const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::getSequence" ); @@ -1952,7 +1952,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const return aSeq; } -// ----------------------------------------------------------------------------- + ::com::sun::star::util::Date ORowSetValue::getDate() const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::getDate" ); @@ -2011,7 +2011,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const } return aValue; } -// ----------------------------------------------------------------------------- + ::com::sun::star::util::Time ORowSetValue::getTime() const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::getTime" ); @@ -2056,7 +2056,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const } return aValue; } -// ----------------------------------------------------------------------------- + ::com::sun::star::util::DateTime ORowSetValue::getDateTime() const { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::getDateTime" ); @@ -2109,7 +2109,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const } return aValue; } -// ----------------------------------------------------------------------------- + void ORowSetValue::setSigned(bool _bMod) { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::setSigned" ); @@ -2163,7 +2163,7 @@ void ORowSetValue::setSigned(bool _bMod) } } -// ----------------------------------------------------------------------------- + namespace detail { class SAL_NO_VTABLE IValueSource @@ -2258,21 +2258,21 @@ namespace detail }; } -// ----------------------------------------------------------------------------- + void ORowSetValue::fill( const sal_Int32 _nType, const Reference< XColumn >& _rxColumn ) { detail::ColumnValue aColumnValue( _rxColumn ); impl_fill( _nType, true, aColumnValue ); } -// ----------------------------------------------------------------------------- + void ORowSetValue::fill( sal_Int32 _nPos, sal_Int32 _nType, bool _bNullable, const Reference< XRow>& _xRow ) { detail::RowValue aRowValue( _xRow, _nPos ); impl_fill( _nType, _bNullable, aRowValue ); } -// ----------------------------------------------------------------------------- + void ORowSetValue::fill(sal_Int32 _nPos, sal_Int32 _nType, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow>& _xRow) @@ -2281,7 +2281,7 @@ void ORowSetValue::fill(sal_Int32 _nPos, fill(_nPos,_nType,true,_xRow); } -// ----------------------------------------------------------------------------- + void ORowSetValue::impl_fill( const sal_Int32 _nType, bool _bNullable, const detail::IValueSource& _rValueSource ) { @@ -2370,7 +2370,7 @@ void ORowSetValue::impl_fill( const sal_Int32 _nType, bool _bNullable, const det setNull(); setTypeKind(_nType); } -// ----------------------------------------------------------------------------- + void ORowSetValue::fill(const Any& _rValue) { SAL_INFO( "connectivity.commontools", "dbtools Ocke.Janssen@sun.com ORowSetValue::fill (3)" ); diff --git a/connectivity/source/commontools/ParamterSubstitution.cxx b/connectivity/source/commontools/ParamterSubstitution.cxx index 57150ad7a49a..0ea7c652ddc1 100644 --- a/connectivity/source/commontools/ParamterSubstitution.cxx +++ b/connectivity/source/commontools/ParamterSubstitution.cxx @@ -39,12 +39,12 @@ namespace connectivity xConnection = aArgs.getUnpackedValueOrDefault("ActiveConnection",xConnection); m_xConnection = xConnection; } - //------------------------------------------------------------------------------ + OUString ParameterSubstitution::getImplementationName_Static( ) throw(RuntimeException) { return OUString("org.openoffice.comp.helper.ParameterSubstitution"); } - //------------------------------------------------------------------------------ + OUString SAL_CALL ParameterSubstitution::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -54,12 +54,12 @@ namespace connectivity { return cppu::supportsService(this, _rServiceName); } - //------------------------------------------------------------------ + Sequence< OUString > SAL_CALL ParameterSubstitution::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } - //------------------------------------------------------------------ + Sequence< OUString > ParameterSubstitution::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 1 ); @@ -67,12 +67,12 @@ namespace connectivity return aSNS; } - //------------------------------------------------------------------ + Reference< XInterface > ParameterSubstitution::create(const Reference< XComponentContext >& _xContext) { return *(new ParameterSubstitution(_xContext)); } - //------------------------------------------------------------------ + OUString SAL_CALL ParameterSubstitution::substituteVariables( const OUString& _sText, ::sal_Bool /*bSubstRequired*/ ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { OUString sRet = _sText; @@ -99,17 +99,17 @@ namespace connectivity } return sRet; } - //------------------------------------------------------------------ + OUString SAL_CALL ParameterSubstitution::reSubstituteVariables( const OUString& _sText ) throw (::com::sun::star::uno::RuntimeException) { return _sText; } - //------------------------------------------------------------------ + OUString SAL_CALL ParameterSubstitution::getSubstituteVariableValue( const OUString& /*variable*/ ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { throw container::NoSuchElementException(); } - //------------------------------------------------------------------ + // ================================== diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index 527fd6f6b584..7705e5caaff0 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -68,13 +68,13 @@ OColumnsHelper::OColumnsHelper( ::cppu::OWeakObject& _rParent ,m_pTable(NULL) { } -// ----------------------------------------------------------------------------- + OColumnsHelper::~OColumnsHelper() { delete m_pImpl; m_pImpl = NULL; } -// ----------------------------------------------------------------------------- + sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName) { @@ -153,7 +153,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OColumnsHelper::impl_refresh() throw(RuntimeException) { if ( m_pTable ) @@ -162,12 +162,12 @@ void OColumnsHelper::impl_refresh() throw(RuntimeException) m_pTable->refreshColumns(); } } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OColumnsHelper::createDescriptor() { return new OColumn(sal_True); } -// ----------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OColumnsHelper::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -190,7 +190,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const OUString& _rForName, const } return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { @@ -212,7 +212,7 @@ void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName } } } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx index dd1a60cf9bad..94e7d431b47b 100644 --- a/connectivity/source/commontools/TConnection.cxx +++ b/connectivity/source/commontools/TConnection.cxx @@ -31,13 +31,13 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::beans; using namespace ::osl; -//------------------------------------------------------------------------------ + OMetaConnection::OMetaConnection() : OMetaConnection_BASE(m_aMutex) , m_nTextEncoding(RTL_TEXTENCODING_MS_1252) { } -//------------------------------------------------------------------------------ + void OMetaConnection::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -62,7 +62,7 @@ sal_Int64 SAL_CALL OMetaConnection::getSomething( const ::com::sun::star::uno::S ? reinterpret_cast< sal_Int64 >( this ) : (sal_Int64)0; } -// ----------------------------------------------------------------------------- + Sequence< sal_Int8 > OMetaConnection::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -77,13 +77,13 @@ Sequence< sal_Int8 > OMetaConnection::getUnoTunnelImplementationId() } return pId->getImplementationId(); } -// ----------------------------------------------------------------------------- + ::dbtools::OPropertyMap& OMetaConnection::getPropMap() { static ::dbtools::OPropertyMap s_aPropertyNameMap; return s_aPropertyNameMap; } -// ----------------------------------------------------------------------------- + void OMetaConnection::throwGenericSQLException( sal_uInt16 _nErrorResourceId,const Reference< XInterface>& _xContext ) { OUString sErrorMessage; diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index db0b796b621d..c63667eee210 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -62,25 +62,25 @@ ODatabaseMetaDataBase::ODatabaseMetaDataBase(const Reference< XConnection >& _rx } osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + ODatabaseMetaDataBase::~ODatabaseMetaDataBase() { } -// ----------------------------------------------------------------------------- + Sequence< PropertyValue > SAL_CALL ODatabaseMetaDataBase::getConnectionInfo( ) throw (RuntimeException) { return m_aConnectionInfo; } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataBase::disposing( const EventObject& /*Source*/ ) throw(RuntimeException) { // cut off all references to the connection m_xConnection.clear(); m_xListenerHelper.clear(); } -// ----------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -167,39 +167,39 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ pResult->setRows(m_aTypeInfoRows); return xRet; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getExportedKeys( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eExportedKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getImportedKeys( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eImportedKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getPrimaryKeys( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::ePrimaryKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getIndexInfo( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/, sal_Bool /*unique*/, sal_Bool /*approximate*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eIndexInfo ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getBestRowIdentifier( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/, sal_Int32 /*scope*/, sal_Bool /*nullable*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eBestRowIdentifier ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getCrossReference( const Any& /*primaryCatalog*/, const OUString& /*primarySchema*/, const OUString& /*primaryTable*/, const Any& /*foreignCatalog*/, @@ -207,119 +207,119 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getCrossReference( { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCrossReference ); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL ODatabaseMetaDataBase::getConnection( ) throw(SQLException, RuntimeException) { return m_xConnection; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getProcedureColumns( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*procedureNamePattern*/, const OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedureColumns ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getProcedures( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*procedureNamePattern*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedures ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getVersionColumns( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eVersionColumns ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getSchemas( ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eSchemas ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getColumnPrivileges( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/, const OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumnPrivileges ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTablePrivileges( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getCatalogs( ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCatalogs ); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataBase::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) { return callImplMethod(m_sIdentifierQuoteString,::std::mem_fun_t< OUString ,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_getIdentifierQuoteString_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::isCatalogAtStart( ) throw(SQLException, RuntimeException) { return callImplMethod(m_isCatalogAtStart,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_isCatalogAtStart_throw)); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataBase::getCatalogSeparator( ) throw(SQLException, RuntimeException) { return callImplMethod(m_sCatalogSeparator,::std::mem_fun_t< OUString,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_getCatalogSeparator_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException) { return callImplMethod(m_supportsCatalogsInTableDefinitions,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsCatalogsInTableDefinitions_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsSchemasInTableDefinitions( ) throw(SQLException, RuntimeException) { return callImplMethod(m_supportsSchemasInTableDefinitions,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsSchemasInTableDefinitions_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsCatalogsInDataManipulation( ) throw(SQLException, RuntimeException) { return callImplMethod(m_supportsCatalogsInDataManipulation,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsCatalogsInDataManipulation_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsSchemasInDataManipulation( ) throw(SQLException, RuntimeException) { return callImplMethod(m_supportsSchemasInDataManipulation,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsSchemasInDataManipulation_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return callImplMethod(m_supportsMixedCaseQuotedIdentifiers,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsMixedCaseQuotedIdentifiers_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException) { return callImplMethod(m_supportsAlterTableWithAddColumn,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsAlterTableWithAddColumn_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException) { return callImplMethod(m_supportsAlterTableWithDropColumn,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsAlterTableWithDropColumn_throw)); } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataBase::getMaxStatements( ) throw(SQLException, RuntimeException) { return callImplMethod(m_MaxStatements,::std::mem_fun_t< sal_Int32,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_getMaxStatements_throw)); } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataBase::getMaxTablesInSelect( ) throw(SQLException, RuntimeException) { return callImplMethod(m_MaxTablesInSelect,::std::mem_fun_t< sal_Int32,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_getMaxTablesInSelect_throw)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataBase::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return callImplMethod(m_storesMixedCaseQuotedIdentifiers,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_storesMixedCaseQuotedIdentifiers_throw)); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TIndex.cxx b/connectivity/source/commontools/TIndex.cxx index b63dd4699dca..d10516773574 100644 --- a/connectivity/source/commontools/TIndex.cxx +++ b/connectivity/source/commontools/TIndex.cxx @@ -31,7 +31,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OIndexHelper::OIndexHelper( OTableHelper* _pTable) : connectivity::sdbcx::OIndex(sal_True) , m_pTable(_pTable) { @@ -39,7 +39,7 @@ OIndexHelper::OIndexHelper( OTableHelper* _pTable) : connectivity::sdbcx::OIndex ::std::vector< OUString> aVector; m_pColumns = new OIndexColumns(this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + OIndexHelper::OIndexHelper( OTableHelper* _pTable, const OUString& _Name, const OUString& _Catalog, @@ -56,7 +56,7 @@ OIndexHelper::OIndexHelper( OTableHelper* _pTable, construct(); refreshColumns(); } -// ------------------------------------------------------------------------- + void OIndexHelper::refreshColumns() { @@ -95,6 +95,6 @@ void OIndexHelper::refreshColumns() else m_pColumns = new OIndexColumns(this,m_aMutex,aVector); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx index 93a395acc53c..025e13123ad1 100644 --- a/connectivity/source/commontools/TIndexColumns.cxx +++ b/connectivity/source/commontools/TIndexColumns.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OIndexColumns::OIndexColumns( OIndexHelper* _pIndex, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) @@ -43,7 +43,7 @@ OIndexColumns::OIndexColumns( OIndexHelper* _pIndex, ,m_pIndex(_pIndex) { } -// ------------------------------------------------------------------------- + sdbcx::ObjectType OIndexColumns::createObject(const OUString& _rName) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); @@ -104,16 +104,16 @@ sdbcx::ObjectType OIndexColumns::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OIndexColumns::createDescriptor() { return new OIndexColumn(sal_True); } -// ------------------------------------------------------------------------- + void OIndexColumns::impl_refresh() throw(RuntimeException) { m_pIndex->refreshColumns(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx index 41e8652cbd9a..165c2fd93688 100644 --- a/connectivity/source/commontools/TIndexes.cxx +++ b/connectivity/source/commontools/TIndexes.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace cppu; -// ----------------------------------------------------------------------------- + OIndexesHelper::OIndexesHelper(OTableHelper* _pTable, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector @@ -46,7 +46,7 @@ OIndexesHelper::OIndexesHelper(OTableHelper* _pTable, ,m_pTable(_pTable) { } -// ----------------------------------------------------------------------------- + sdbcx::ObjectType OIndexesHelper::createObject(const OUString& _rName) { @@ -109,17 +109,17 @@ sdbcx::ObjectType OIndexesHelper::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OIndexesHelper::impl_refresh() throw(RuntimeException) { m_pTable->refreshIndexes(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OIndexesHelper::createDescriptor() { return new OIndexHelper(m_pTable); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -207,7 +207,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { @@ -243,7 +243,7 @@ void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName } } } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/commontools/TKey.cxx b/connectivity/source/commontools/TKey.cxx index b09b5fee1b40..4b984bf2198d 100644 --- a/connectivity/source/commontools/TKey.cxx +++ b/connectivity/source/commontools/TKey.cxx @@ -30,13 +30,13 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OTableKeyHelper::OTableKeyHelper(OTableHelper* _pTable) : connectivity::sdbcx::OKey(sal_True) ,m_pTable(_pTable) { construct(); } -// ------------------------------------------------------------------------- + OTableKeyHelper::OTableKeyHelper( OTableHelper* _pTable ,const OUString& _Name ,const sdbcx::TKeyProperties& _rProps @@ -46,7 +46,7 @@ OTableKeyHelper::OTableKeyHelper( OTableHelper* _pTable construct(); refreshColumns(); } -// ------------------------------------------------------------------------- + void OTableKeyHelper::refreshColumns() { if ( !m_pTable ) @@ -102,6 +102,6 @@ void OTableKeyHelper::refreshColumns() else m_pColumns = new OKeyColumnsHelper(this,m_aMutex,aVector); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TKeyColumns.cxx b/connectivity/source/commontools/TKeyColumns.cxx index 9325b080fee5..73ab71ce7eb0 100644 --- a/connectivity/source/commontools/TKeyColumns.cxx +++ b/connectivity/source/commontools/TKeyColumns.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OKeyColumnsHelper::OKeyColumnsHelper( OTableKeyHelper* _pKey, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector) @@ -44,7 +44,7 @@ OKeyColumnsHelper::OKeyColumnsHelper( OTableKeyHelper* _pKey, ,m_pKey(_pKey) { } -// ------------------------------------------------------------------------- + sdbcx::ObjectType OKeyColumnsHelper::createObject(const OUString& _rName) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); @@ -123,17 +123,17 @@ sdbcx::ObjectType OKeyColumnsHelper::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OKeyColumnsHelper::createDescriptor() { return new OKeyColumn(isCaseSensitive()); } -// ------------------------------------------------------------------------- + void OKeyColumnsHelper::impl_refresh() throw(::com::sun::star::uno::RuntimeException) { m_pKey->refreshColumns(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx index 7466d5b3513d..6e83e7be05c3 100644 --- a/connectivity/source/commontools/TKeys.cxx +++ b/connectivity/source/commontools/TKeys.cxx @@ -50,7 +50,7 @@ OKeysHelper::OKeysHelper( OTableHelper* _pTable, ,m_pTable(_pTable) { } -// ------------------------------------------------------------------------- + sdbcx::ObjectType OKeysHelper::createObject(const OUString& _rName) { sdbcx::ObjectType xRet = NULL; @@ -69,17 +69,17 @@ sdbcx::ObjectType OKeysHelper::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OKeysHelper::impl_refresh() throw(RuntimeException) { m_pTable->refreshKeys(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OKeysHelper::createDescriptor() { return new OTableKeyHelper(m_pTable); } -// ----------------------------------------------------------------------------- + /** returns the keyrule string for the primary key */ OUString getKeyRuleString(sal_Bool _bUpdate,sal_Int32 _nKeyRule) @@ -107,7 +107,7 @@ OUString getKeyRuleString(sal_Bool _bUpdate,sal_Int32 _nKeyRule) sRet = OUString::createFromAscii(pKeyRule); return sRet; } -// ------------------------------------------------------------------------- + void OKeysHelper::cloneDescriptorColumns( const sdbcx::ObjectType& _rSourceDescriptor, const sdbcx::ObjectType& _rDestDescriptor ) { Reference< XColumnsSupplier > xColSupp( _rSourceDescriptor, UNO_QUERY_THROW ); @@ -123,7 +123,7 @@ void OKeysHelper::cloneDescriptorColumns( const sdbcx::ObjectType& _rSourceDescr xDestAppend->appendByDescriptor( xColProp ); } } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -254,12 +254,12 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re return createObject( sNewName ); } -// ----------------------------------------------------------------------------- + OUString OKeysHelper::getDropForeignKey() const { return OUString(" DROP CONSTRAINT "); } -// ------------------------------------------------------------------------- + // XDrop void OKeysHelper::dropObject(sal_Int32 _nPos,const OUString _sElementName) { @@ -304,8 +304,8 @@ void OKeysHelper::dropObject(sal_Int32 _nPos,const OUString _sElementName) } } } -// ----------------------------------------------------------------------------- + } // namespace connectivity -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx b/connectivity/source/commontools/TPrivilegesResultSet.cxx index c26a61eec22f..6906e57d5c10 100644 --- a/connectivity/source/commontools/TPrivilegesResultSet.cxx +++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx @@ -20,14 +20,14 @@ #include "TPrivilegesResultSet.hxx" using namespace connectivity; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -//------------------------------------------------------------------------------ + OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& _rxMeta , const Any& catalog , const OUString& schemaPattern @@ -81,7 +81,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& } osl_atomic_decrement( &m_refCount ); } -//------------------------------------------------------------------------------ + const ORowSetValue& OResultSetPrivileges::getValue(sal_Int32 columnIndex) { switch(columnIndex) @@ -106,14 +106,14 @@ const ORowSetValue& OResultSetPrivileges::getValue(sal_Int32 columnIndex) } return ODatabaseMetaDataResultSet::getValue(columnIndex); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSetPrivileges::disposing(void) { ODatabaseMetaDataResultSet::disposing(); m_xTables.clear(); m_xRow.clear(); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetPrivileges::next( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -138,6 +138,6 @@ sal_Bool SAL_CALL OResultSetPrivileges::next( ) throw(SQLException, RuntimeExce } return bReturn; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TSkipDeletedSet.cxx b/connectivity/source/commontools/TSkipDeletedSet.cxx index f7808c67f6e7..b5925246556a 100644 --- a/connectivity/source/commontools/TSkipDeletedSet.cxx +++ b/connectivity/source/commontools/TSkipDeletedSet.cxx @@ -22,7 +22,7 @@ #include "sal/log.hxx" using namespace connectivity; -// ----------------------------------------------------------------------------- + OSkipDeletedSet::OSkipDeletedSet(IResultSetHelper* _pHelper) : m_pHelper(_pHelper) ,m_bDeletedVisible(false) @@ -30,13 +30,13 @@ OSkipDeletedSet::OSkipDeletedSet(IResultSetHelper* _pHelper) SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::OSkipDeletedSet" ); m_aBookmarksPositions.reserve(256); } -// ----------------------------------------------------------------------------- + OSkipDeletedSet::~OSkipDeletedSet() { m_aBookmarksPositions.clear(); //m_aBookmarks.clear(); } -// ----------------------------------------------------------------------------- + sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) { SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::skipDeleted" ); @@ -161,7 +161,7 @@ sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPositio return bDataFound; } -// ------------------------------------------------------------------------- + sal_Bool OSkipDeletedSet::moveAbsolute(sal_Int32 _nPos,sal_Bool _bRetrieveData) { SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::moveAbsolute" ); @@ -224,14 +224,14 @@ sal_Bool OSkipDeletedSet::moveAbsolute(sal_Int32 _nPos,sal_Bool _bRetrieveData) } return bDataFound; } -// ----------------------------------------------------------------------------- + void OSkipDeletedSet::clear() { SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::clear" ); ::std::vector<sal_Int32>().swap(m_aBookmarksPositions); //TInt2IntMap().swap(m_aBookmarks); } -// ----------------------------------------------------------------------------- + sal_Int32 OSkipDeletedSet::getMappedPosition(sal_Int32 _nPos) const { SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::getMappedPosition" ); @@ -244,7 +244,7 @@ sal_Int32 OSkipDeletedSet::getMappedPosition(sal_Int32 _nPos) const OSL_FAIL("Why!"); return -1; } -// ----------------------------------------------------------------------------- + void OSkipDeletedSet::insertNewPosition(sal_Int32 _nPos) { SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::insertNewPosition" ); @@ -253,7 +253,7 @@ void OSkipDeletedSet::insertNewPosition(sal_Int32 _nPos) //OSL_ENSURE(::std::find(m_aBookmarksPositions.begin(),m_aBookmarksPositions.end(),_nPos) == m_aBookmarksPositions.end(),"Invalid driver pos"); m_aBookmarksPositions.push_back(_nPos); } -// ----------------------------------------------------------------------------- + void OSkipDeletedSet::deletePosition(sal_Int32 _nBookmark) { SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::deletePosition" ); @@ -270,6 +270,6 @@ void OSkipDeletedSet::deletePosition(sal_Int32 _nBookmark) //m_aBookmarksPositions.erase(m_aBookmarksPositions.begin() + aFind->second-1); //m_aBookmarks.erase(_nPos); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx index a9d5bc5028b7..28ee408e4d9f 100644 --- a/connectivity/source/commontools/TSortIndex.cxx +++ b/connectivity/source/commontools/TSortIndex.cxx @@ -24,7 +24,7 @@ #include <o3tl/compat_functional.hxx> using namespace connectivity; -//------------------------------------------------------------------ + /// binary_function Functor object for class OSortIndex::TIntValuePairVector::value_type returntype is bool struct TKeyValueFunc : ::std::binary_function<OSortIndex::TIntValuePairVector::value_type,OSortIndex::TIntValuePairVector::value_type,bool> { @@ -76,7 +76,7 @@ struct TKeyValueFunc : ::std::binary_function<OSortIndex::TIntValuePairVector::v } }; -// ----------------------------------------------------------------------------- + ::rtl::Reference<OKeySet> OSortIndex::CreateKeySet() { Freeze(); @@ -90,7 +90,7 @@ struct TKeyValueFunc : ::std::binary_function<OSortIndex::TIntValuePairVector::v pKeySet->setFrozen(); return pKeySet; } -// ----------------------------------------------------------------------------- + OSortIndex::OSortIndex( const ::std::vector<OKeyType>& _aKeyType, const ::std::vector<TAscendingOrder>& _aAscending) :m_aKeyType(_aKeyType) @@ -98,11 +98,11 @@ OSortIndex::OSortIndex( const ::std::vector<OKeyType>& _aKeyType, ,m_bFrozen(sal_False) { } -//------------------------------------------------------------------ + OSortIndex::~OSortIndex() { } -//------------------------------------------------------------------ + void OSortIndex::AddKeyValue(OKeyValue * pKeyValue) { OSL_ENSURE(pKeyValue,"Can not be null here!"); @@ -116,7 +116,7 @@ void OSortIndex::AddKeyValue(OKeyValue * pKeyValue) } -//------------------------------------------------------------------ + void OSortIndex::Freeze() { OSL_ENSURE(! m_bFrozen,"OSortIndex::Freeze: already frozen!"); @@ -135,20 +135,20 @@ void OSortIndex::Freeze() m_bFrozen = sal_True; } -// ----------------------------------------------------------------------------- + OKeyValue::OKeyValue(sal_Int32 nVal) : m_nValue(nVal) { } -// ----------------------------------------------------------------------------- + OKeyValue::~OKeyValue() { } -// ----------------------------------------------------------------------------- + OKeyValue* OKeyValue::createKeyValue(sal_Int32 _nVal) { return new OKeyValue(_nVal); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index e7e4da0ec9fe..c186b67c4946 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -147,7 +147,7 @@ OTableHelper::OTableHelper( sdbcx::OCollection* _pTables, ,m_pImpl(new OTableHelperImpl(_xConnection)) { } -// ------------------------------------------------------------------------- + OTableHelper::OTableHelper( sdbcx::OCollection* _pTables, const Reference< XConnection >& _xConnection, sal_Bool _bCase, @@ -166,11 +166,11 @@ OTableHelper::OTableHelper( sdbcx::OCollection* _pTables, ,m_pImpl(new OTableHelperImpl(_xConnection)) { } -// ----------------------------------------------------------------------------- + OTableHelper::~OTableHelper() { } -// ----------------------------------------------------------------------------- + void SAL_CALL OTableHelper::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -187,7 +187,7 @@ void SAL_CALL OTableHelper::disposing() } -// ------------------------------------------------------------------------- + namespace { /** collects ColumnDesc's from a resultset produced by XDatabaseMetaData::getColumns @@ -259,7 +259,7 @@ namespace } } -// ------------------------------------------------------------------------- + void OTableHelper::refreshColumns() { TStringVector aVector; @@ -305,7 +305,7 @@ void OTableHelper::refreshColumns() else m_pColumns = createColumns(aVector); } -// ----------------------------------------------------------------------------- + const ColumnDesc* OTableHelper::getColumnDescription(const OUString& _sName) const { const ColumnDesc* pRet = NULL; @@ -320,7 +320,7 @@ const ColumnDesc* OTableHelper::getColumnDescription(const OUString& _sName) con } // for (::std::vector< ColumnDesc >::const_iterator aIter = m_pImpl->m_aColumnDesc.begin();aIter != aEnd;++aIter) return pRet; } -// ------------------------------------------------------------------------- + void OTableHelper::refreshPrimaryKeys(TStringVector& _rNames) { Any aCatalog; @@ -356,7 +356,7 @@ void OTableHelper::refreshPrimaryKeys(TStringVector& _rNames) } // if ( xResult.is() && xResult->next() ) ::comphelper::disposeComponent(xResult); } -// ------------------------------------------------------------------------- + void OTableHelper::refreshForeignKeys(TStringVector& _rNames) { Any aCatalog; @@ -419,7 +419,7 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames) ::comphelper::disposeComponent(xResult); } } -// ------------------------------------------------------------------------- + void OTableHelper::refreshKeys() { m_pImpl->m_aKeys.clear(); @@ -439,7 +439,7 @@ void OTableHelper::refreshKeys() else*/ } -// ------------------------------------------------------------------------- + void OTableHelper::refreshIndexes() { TStringVector aVector; @@ -480,7 +480,7 @@ void OTableHelper::refreshIndexes() else m_pIndexes = createIndexes(aVector); } -// ----------------------------------------------------------------------------- + OUString OTableHelper::getRenameStart() const { OUString sSql("RENAME "); @@ -491,7 +491,7 @@ OUString OTableHelper::getRenameStart() const return sSql; } -// ------------------------------------------------------------------------- + // XRename void SAL_CALL OTableHelper::rename( const OUString& newName ) throw(SQLException, ElementExistException, RuntimeException) { @@ -537,12 +537,12 @@ void SAL_CALL OTableHelper::rename( const OUString& newName ) throw(SQLException else ::dbtools::qualifiedNameComponents(getMetaData(),newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::eInTableDefinitions); } -// ----------------------------------------------------------------------------- + Reference< XDatabaseMetaData> OTableHelper::getMetaData() const { return m_pImpl->m_xMetaData; } -// ------------------------------------------------------------------------- + void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference< XPropertySet >& descriptor ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -559,24 +559,24 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference alterColumnByName(getString(xOld->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),descriptor); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OTableHelper::getName() throw(RuntimeException) { OUString sComposedName; sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,sal_False,::dbtools::eInDataManipulation); return sComposedName; } -// ----------------------------------------------------------------------------- + void SAL_CALL OTableHelper::acquire() throw() { OTable_TYPEDEF::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OTableHelper::release() throw() { OTable_TYPEDEF::release(); } -// ----------------------------------------------------------------------------- + sdbcx::TKeyProperties OTableHelper::getKeyProperties(const OUString& _sName) const { sdbcx::TKeyProperties pKeyProps; @@ -593,41 +593,41 @@ sdbcx::TKeyProperties OTableHelper::getKeyProperties(const OUString& _sName) con return pKeyProps; } -// ----------------------------------------------------------------------------- + void OTableHelper::addKey(const OUString& _sName,const sdbcx::TKeyProperties& _aKeyProperties) { m_pImpl->m_aKeys.insert(TKeyMap::value_type(_sName,_aKeyProperties)); } -// ----------------------------------------------------------------------------- + OUString OTableHelper::getTypeCreatePattern() const { return OUString(); } -// ----------------------------------------------------------------------------- + Reference< XConnection> OTableHelper::getConnection() const { return m_pImpl->m_xConnection; } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::sdb::tools::XTableRename> OTableHelper::getRenameService() const { return m_pImpl->m_xRename; } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::sdb::tools::XTableAlteration> OTableHelper::getAlterService() const { return m_pImpl->m_xAlter; } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::sdb::tools::XKeyAlteration> OTableHelper::getKeyService() const { return m_pImpl->m_xKeyAlter; } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::sdb::tools::XIndexAlteration> OTableHelper::getIndexService() const { return m_pImpl->m_xIndexAlter; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx index 05e6a448122a..8a45b8b99dd7 100644 --- a/connectivity/source/commontools/conncleanup.cxx +++ b/connectivity/source/commontools/conncleanup.cxx @@ -42,7 +42,7 @@ namespace dbtools //===================================================================== //= OAutoConnectionDisposer //===================================================================== - //--------------------------------------------------------------------- + OAutoConnectionDisposer::OAutoConnectionDisposer(const Reference< XRowSet >& _rxRowSet, const Reference< XConnection >& _rxConnection) :m_xRowSet( _rxRowSet ) ,m_bRSListening( sal_False ) @@ -66,7 +66,7 @@ namespace dbtools } } - //--------------------------------------------------------------------- + void OAutoConnectionDisposer::startPropertyListening( const Reference< XPropertySet >& _rxRowSet ) { try @@ -80,7 +80,7 @@ namespace dbtools } } - //--------------------------------------------------------------------- + void OAutoConnectionDisposer::stopPropertyListening( const Reference< XPropertySet >& _rxEventSource ) { // prevent deletion of ourself while we're herein @@ -101,7 +101,7 @@ namespace dbtools } } - //--------------------------------------------------------------------- + void OAutoConnectionDisposer::startRowSetListening() { OSL_ENSURE( !m_bRSListening, "OAutoConnectionDisposer::startRowSetListening: already listening!" ); @@ -117,7 +117,7 @@ namespace dbtools m_bRSListening = sal_True; } - //--------------------------------------------------------------------- + void OAutoConnectionDisposer::stopRowSetListening() { OSL_ENSURE( m_bRSListening, "OAutoConnectionDisposer::stopRowSetListening: not listening!" ); @@ -132,7 +132,7 @@ namespace dbtools m_bRSListening = sal_False; } - //--------------------------------------------------------------------- + void SAL_CALL OAutoConnectionDisposer::propertyChange( const PropertyChangeEvent& _rEvent ) throw (RuntimeException) { if ( _rEvent.PropertyName.equals( getActiveConnectionPropertyName() ) ) @@ -184,7 +184,7 @@ namespace dbtools } } - //--------------------------------------------------------------------- + void SAL_CALL OAutoConnectionDisposer::disposing( const EventObject& _rSource ) throw (RuntimeException) { // the rowset is beeing disposed, and nobody has set a new ActiveConnection in the meantime @@ -196,7 +196,7 @@ namespace dbtools if ( isPropertyListening() ) stopPropertyListening( Reference< XPropertySet >( _rSource.Source, UNO_QUERY ) ); } - //--------------------------------------------------------------------- + void OAutoConnectionDisposer::clearConnection() { try @@ -212,22 +212,22 @@ namespace dbtools OSL_FAIL("OAutoConnectionDisposer::clearConnection: caught an exception!"); } } - //--------------------------------------------------------------------- + void SAL_CALL OAutoConnectionDisposer::cursorMoved( const ::com::sun::star::lang::EventObject& /*event*/ ) throw (::com::sun::star::uno::RuntimeException) { } - //--------------------------------------------------------------------- + void SAL_CALL OAutoConnectionDisposer::rowChanged( const ::com::sun::star::lang::EventObject& /*event*/ ) throw (::com::sun::star::uno::RuntimeException) { } - //--------------------------------------------------------------------- + void SAL_CALL OAutoConnectionDisposer::rowSetChanged( const ::com::sun::star::lang::EventObject& /*event*/ ) throw (::com::sun::star::uno::RuntimeException) { stopRowSetListening(); clearConnection(); } - //--------------------------------------------------------------------- + //......................................................................... } // namespace dbtools diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index 04c9aec71b10..9dd38289dc04 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -30,12 +30,12 @@ namespace dbtools //========================================================================= //= OCharsetMap //========================================================================= - //------------------------------------------------------------------------- + OCharsetMap::OCharsetMap() { } - //------------------------------------------------------------------------- + void OCharsetMap::lateConstruct() { const rtl_TextEncoding eFirstEncoding = RTL_TEXTENCODING_DONTKNOW; @@ -69,7 +69,7 @@ namespace dbtools OSL_ENSURE( find( RTL_TEXTENCODING_BIG5_HKSCS ) != end(), "OCharsetMap::lateConstruct: missing compatibility encoding Big5-HKSCS!" ); } - //------------------------------------------------------------------------- + sal_Bool OCharsetMap::approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const { sal_Bool bIsMimeEncoding = 0 != ( _rInfo.Flags & RTL_TEXTENCODING_INFO_MIME ); @@ -79,26 +79,26 @@ namespace dbtools return bIsMimeEncoding; } - //------------------------------------------------------------------------- + OCharsetMap::~OCharsetMap() { } - //------------------------------------------------------------------------- + OCharsetMap::CharsetIterator OCharsetMap::begin() const { ensureConstructed( ); return CharsetIterator(this, m_aEncodings.begin() ); } - //------------------------------------------------------------------------- + OCharsetMap::CharsetIterator OCharsetMap::find(const rtl_TextEncoding _eEncoding) const { ensureConstructed( ); return CharsetIterator( this, m_aEncodings.find( _eEncoding ) ); } - //------------------------------------------------------------------------- + OCharsetMap::CharsetIterator OCharsetMap::find(const OUString& _rIanaName, const IANA&) const { ensureConstructed( ); @@ -120,7 +120,7 @@ namespace dbtools return find( eEncoding ); } - //------------------------------------------------------------------------- + OCharsetMap::CharsetIterator OCharsetMap::end() const { ensureConstructed( ); @@ -131,14 +131,14 @@ namespace dbtools //========================================================================= //= CharsetIteratorDerefHelper //========================================================================= - //------------------------------------------------------------------------- + CharsetIteratorDerefHelper::CharsetIteratorDerefHelper( const CharsetIteratorDerefHelper& _rSource ) :m_eEncoding( _rSource.m_eEncoding ) ,m_aIanaName( _rSource.m_aIanaName ) { } - //------------------------------------------------------------------------- + CharsetIteratorDerefHelper:: CharsetIteratorDerefHelper(const rtl_TextEncoding _eEncoding, const OUString& _rIanaName ) :m_eEncoding( _eEncoding ) ,m_aIanaName( _rIanaName ) @@ -148,7 +148,7 @@ namespace dbtools //========================================================================= //= OCharsetMap::CharsetIterator //========================================================================= - //------------------------------------------------------------------------- + OCharsetMap::CharsetIterator::CharsetIterator(const OCharsetMap* _pContainer, OCharsetMap::TextEncBag::const_iterator _aPos ) :m_pContainer( _pContainer ) ,m_aPos( _aPos ) @@ -156,19 +156,19 @@ namespace dbtools OSL_ENSURE( m_pContainer, "OCharsetMap::CharsetIterator::CharsetIterator : invalid container!" ); } - //------------------------------------------------------------------------- + OCharsetMap::CharsetIterator::CharsetIterator(const CharsetIterator& _rSource) :m_pContainer( _rSource.m_pContainer ) ,m_aPos( _rSource.m_aPos ) { } - //------------------------------------------------------------------------- + OCharsetMap::CharsetIterator::~CharsetIterator() { } - //------------------------------------------------------------------------- + CharsetIteratorDerefHelper OCharsetMap::CharsetIterator::operator*() const { OSL_ENSURE( m_aPos != m_pContainer->m_aEncodings.end(), "OCharsetMap::CharsetIterator::operator*: invalid position!"); @@ -186,7 +186,7 @@ namespace dbtools return CharsetIteratorDerefHelper( eEncoding, sIanaName ); } - //------------------------------------------------------------------------- + const OCharsetMap::CharsetIterator& OCharsetMap::CharsetIterator::operator++() { OSL_ENSURE( m_aPos != m_pContainer->m_aEncodings.end(), "OCharsetMap::CharsetIterator::operator++ : invalid position!" ); @@ -195,7 +195,7 @@ namespace dbtools return *this; } - //------------------------------------------------------------------------- + const OCharsetMap::CharsetIterator& OCharsetMap::CharsetIterator::operator--() { OSL_ENSURE( m_aPos != m_pContainer->m_aEncodings.begin(), "OCharsetMap::CharsetIterator::operator-- : invalid position!" ); @@ -204,7 +204,7 @@ namespace dbtools return *this; } - //------------------------------------------------------------------------- + bool operator==(const OCharsetMap::CharsetIterator& lhs, const OCharsetMap::CharsetIterator& rhs) { return ( lhs.m_pContainer == rhs.m_pContainer ) && ( lhs.m_aPos == rhs.m_aPos ); diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index d6e48315806b..579c0e2a2087 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -60,13 +60,13 @@ namespace dbtools using namespace ::com::sun::star::beans; - //------------------------------------------------------------------------------ + ::com::sun::star::util::Date DBTypeConversion::getStandardDate() { static ::com::sun::star::util::Date STANDARD_DB_DATE(1,1,1900); return STANDARD_DB_DATE; } - //------------------------------------------------------------------------------ + OUString DBTypeConversion::toDateString(const utl::Date& rDate) { sal_Char s[11]; @@ -79,7 +79,7 @@ namespace dbtools s[10] = 0; return OUString::createFromAscii(s); } - //------------------------------------------------------------------ + OUString DBTypeConversion::toTimeStringS(const utl::Time& rTime) { std::ostringstream ostr; @@ -90,7 +90,7 @@ namespace dbtools << setw(2) << rTime.Seconds; return OUString::createFromAscii(ostr.str().c_str()); } - //------------------------------------------------------------------ + OUString DBTypeConversion::toTimeString(const utl::Time& rTime) { std::ostringstream ostr; @@ -102,7 +102,7 @@ namespace dbtools << setw(9) << rTime.NanoSeconds; return OUString::createFromAscii(ostr.str().c_str()); } - //------------------------------------------------------------------ + OUString DBTypeConversion::toDateTimeString(const utl::DateTime& _rDateTime) { utl::Date aDate(_rDateTime.Day,_rDateTime.Month,_rDateTime.Year); @@ -113,7 +113,7 @@ namespace dbtools aTemp.append( toTimeString(aTime) ); return aTemp.makeStringAndClear(); } - //------------------------------------------------------------------------------ + utl::Date DBTypeConversion::toDate(sal_Int32 _nVal) { utl::Date aReturn; @@ -123,7 +123,7 @@ namespace dbtools return aReturn; } - //------------------------------------------------------------------------------ + utl::Time DBTypeConversion::toTime(sal_Int64 _nVal) { utl::Time aReturn; @@ -148,11 +148,11 @@ namespace dbtools nHour * (minInHour * secInMin * nanoSecInSec); } - //------------------------------------------------------------------------------ + static const sal_Int32 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; - //------------------------------------------------------------------------------ + static sal_Bool implIsLeapYear(sal_Int32 _nYear) { return ( ( ((_nYear % 4) == 0) @@ -163,7 +163,7 @@ namespace dbtools ; } - //------------------------------------------------------------------------------ + static sal_Int32 implDaysInMonth(sal_Int32 _nMonth, sal_Int32 _nYear) { OSL_ENSURE(_nMonth > 0 && _nMonth < 13,"Month as invalid value!"); @@ -178,7 +178,7 @@ namespace dbtools } } - //------------------------------------------------------------------------------ + static sal_Int32 implRelativeToAbsoluteNull(const utl::Date& _rDate) { sal_Int32 nDays = 0; @@ -195,7 +195,7 @@ namespace dbtools nDays += _rDate.Day; return nDays; } - //------------------------------------------------------------------------------ + static void implBuildFromRelative( sal_Int32 nDays, sal_uInt16& rDay, sal_uInt16& rMonth, sal_Int16& rYear) { sal_Int32 nTempDays; @@ -236,25 +236,25 @@ namespace dbtools } rDay = (sal_uInt16)nTempDays; } - //------------------------------------------------------------------------------ + sal_Int32 DBTypeConversion::toDays(const utl::Date& _rVal, const utl::Date& _rNullDate) { return implRelativeToAbsoluteNull(_rVal) - implRelativeToAbsoluteNull(_rNullDate); } - //------------------------------------------------------------------------------ + double DBTypeConversion::toDouble(const utl::Date& rVal, const utl::Date& _rNullDate) { return (double)toDays(rVal, _rNullDate); } - //------------------------------------------------------------------------------ + double DBTypeConversion::toDouble(const utl::Time& rVal) { return (double)getNsFromTime(rVal) / fNanoSecondsPerDay; } - //------------------------------------------------------------------------------ + double DBTypeConversion::toDouble(const utl::DateTime& _rVal, const utl::Date& _rNullDate) { sal_Int64 nTime = toDays(utl::Date(_rVal.Day, _rVal.Month, _rVal.Year), _rNullDate); @@ -267,7 +267,7 @@ namespace dbtools return ((double)nTime) + toDouble(aTimePart); } - // ------------------------------------------------------------------------- + static void addDays(sal_Int32 nDays, utl::Date& _rDate) { sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate ); @@ -288,7 +288,7 @@ namespace dbtools else implBuildFromRelative( nTempDays, _rDate.Day, _rDate.Month, _rDate.Year ); } - // ----------------------------------------------------------------------- + static void subDays( sal_Int32 nDays, utl::Date& _rDate ) { sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate ); @@ -309,7 +309,7 @@ namespace dbtools else implBuildFromRelative( nTempDays, _rDate.Day, _rDate.Month, _rDate.Year ); } - // ------------------------------------------------------------------------- + utl::Date DBTypeConversion::toDate(double dVal, const utl::Date& _rNullDate) { utl::Date aRet = _rNullDate; @@ -322,7 +322,7 @@ namespace dbtools return aRet; } - // ------------------------------------------------------------------------- + utl::Time DBTypeConversion::toTime(double dVal, short nDigits) { sal_Int32 nDays = (sal_Int32)dVal; @@ -370,7 +370,7 @@ namespace dbtools } return xRet; } - //------------------------------------------------------------------------------ + utl::DateTime DBTypeConversion::toDateTime(double dVal, const utl::Date& _rNullDate) { utl::Date aDate = toDate(dVal, _rNullDate); @@ -394,7 +394,7 @@ namespace dbtools return xRet; } - //------------------------------------------------------------------------------ + utl::Date DBTypeConversion::toDate(const OUString& _sSQLString) { // get the token out of a string @@ -415,7 +415,7 @@ namespace dbtools return utl::Date(nDay,nMonth,nYear); } - //----------------------------------------------------------------------------- + utl::DateTime DBTypeConversion::toDateTime(const OUString& _sSQLString) { //@see http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Timestamp.html#valueOf(java.lang.String) @@ -439,7 +439,7 @@ namespace dbtools aDate.Day, aDate.Month, aDate.Year, false); } - //----------------------------------------------------------------------------- + utl::Time DBTypeConversion::toTime(const OUString& _sSQLString) { utl::Time aTime; diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index 9e8dc91e7819..931c2cc45562 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -42,34 +42,34 @@ namespace dbtools //============================================================================== //= SQLExceptionInfo - encapsulating the type info of an SQLException-derived class //============================================================================== -//------------------------------------------------------------------------------ + SQLExceptionInfo::SQLExceptionInfo() :m_eType(UNDEFINED) { } -//------------------------------------------------------------------------------ + SQLExceptionInfo::SQLExceptionInfo(const ::com::sun::star::sdbc::SQLException& _rError) { m_aContent <<= _rError; implDetermineType(); } -//------------------------------------------------------------------------------ + SQLExceptionInfo::SQLExceptionInfo(const ::com::sun::star::sdbc::SQLWarning& _rError) { m_aContent <<= _rError; implDetermineType(); } -//------------------------------------------------------------------------------ + SQLExceptionInfo::SQLExceptionInfo(const ::com::sun::star::sdb::SQLContext& _rError) { m_aContent <<= _rError; implDetermineType(); } -//------------------------------------------------------------------------------ + SQLExceptionInfo::SQLExceptionInfo( const OUString& _rSimpleErrorMessage ) { SQLException aError; @@ -78,14 +78,14 @@ SQLExceptionInfo::SQLExceptionInfo( const OUString& _rSimpleErrorMessage ) implDetermineType(); } -//------------------------------------------------------------------------------ + SQLExceptionInfo::SQLExceptionInfo(const SQLExceptionInfo& _rCopySource) :m_aContent(_rCopySource.m_aContent) ,m_eType(_rCopySource.m_eType) { } -//------------------------------------------------------------------------------ + const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdbc::SQLException& _rError) { m_aContent <<= _rError; @@ -93,7 +93,7 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdbc return *this; } -//------------------------------------------------------------------------------ + const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdbc::SQLWarning& _rError) { m_aContent <<= _rError; @@ -101,7 +101,7 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdbc return *this; } -//------------------------------------------------------------------------------ + const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdb::SQLContext& _rError) { m_aContent <<= _rError; @@ -109,7 +109,7 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdb: return *this; } -//------------------------------------------------------------------------------ + const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdb::SQLErrorEvent& _rErrorEvent) { m_aContent = _rErrorEvent.Reason; @@ -117,7 +117,7 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdb: return *this; } -//------------------------------------------------------------------------------ + const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::uno::Any& _rCaughtSQLException) { m_aContent = _rCaughtSQLException; @@ -125,7 +125,7 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::uno: return *this; } -//------------------------------------------------------------------------------ + SQLExceptionInfo::SQLExceptionInfo(const staruno::Any& _rError) { const staruno::Type& aSQLExceptionType = ::getCppuType(static_cast< ::com::sun::star::sdbc::SQLException*>(0)); @@ -137,7 +137,7 @@ SQLExceptionInfo::SQLExceptionInfo(const staruno::Any& _rError) implDetermineType(); } -//------------------------------------------------------------------------------ + void SQLExceptionInfo::implDetermineType() { const Type& aSQLExceptionType = ::getCppuType( static_cast< SQLException* >( 0 ) ); @@ -157,7 +157,7 @@ void SQLExceptionInfo::implDetermineType() } } -//------------------------------------------------------------------------------ + sal_Bool SQLExceptionInfo::isKindOf(TYPE _eType) const { switch (_eType) @@ -174,28 +174,28 @@ sal_Bool SQLExceptionInfo::isKindOf(TYPE _eType) const return sal_False; } -//------------------------------------------------------------------------------ + SQLExceptionInfo::operator const ::com::sun::star::sdbc::SQLException*() const { OSL_ENSURE(isKindOf(SQL_EXCEPTION), "SQLExceptionInfo::operator SQLException* : invalid call !"); return reinterpret_cast<const ::com::sun::star::sdbc::SQLException*>(m_aContent.getValue()); } -//------------------------------------------------------------------------------ + SQLExceptionInfo::operator const ::com::sun::star::sdbc::SQLWarning*() const { OSL_ENSURE(isKindOf(SQL_WARNING), "SQLExceptionInfo::operator SQLException* : invalid call !"); return reinterpret_cast<const ::com::sun::star::sdbc::SQLWarning*>(m_aContent.getValue()); } -//------------------------------------------------------------------------------ + SQLExceptionInfo::operator const ::com::sun::star::sdb::SQLContext*() const { OSL_ENSURE(isKindOf(SQL_CONTEXT), "SQLExceptionInfo::operator SQLException* : invalid call !"); return reinterpret_cast<const ::com::sun::star::sdb::SQLContext*>(m_aContent.getValue()); } -//------------------------------------------------------------------------------ + void SQLExceptionInfo::prepend( const OUString& _rErrorMessage, const OUString& _rSQLState, const sal_Int32 _nErrorCode ) { SQLException aException; @@ -208,7 +208,7 @@ void SQLExceptionInfo::prepend( const OUString& _rErrorMessage, const OUString& m_eType = SQL_EXCEPTION; } -//------------------------------------------------------------------------------ + void SQLExceptionInfo::append( TYPE _eType, const OUString& _rErrorMessage, const OUString& _rSQLState, const sal_Int32 _nErrorCode ) { // create the to-be-appended exception @@ -254,7 +254,7 @@ void SQLExceptionInfo::append( TYPE _eType, const OUString& _rErrorMessage, cons } } -//------------------------------------------------------------------------------ + void SQLExceptionInfo::doThrow() { if ( m_aContent.getValueTypeClass() == TypeClass_EXCEPTION ) @@ -266,7 +266,7 @@ void SQLExceptionInfo::doThrow() //= SQLExceptionIteratorHelper //============================================================================== -//------------------------------------------------------------------------------ + SQLExceptionIteratorHelper::SQLExceptionIteratorHelper( const SQLExceptionInfo& _rChainStart ) :m_pCurrent( NULL ) ,m_eCurrentType( SQLExceptionInfo::UNDEFINED ) @@ -278,14 +278,14 @@ SQLExceptionIteratorHelper::SQLExceptionIteratorHelper( const SQLExceptionInfo& } } -//------------------------------------------------------------------------------ + SQLExceptionIteratorHelper::SQLExceptionIteratorHelper( const ::com::sun::star::sdbc::SQLException& _rChainStart ) :m_pCurrent( &_rChainStart ) ,m_eCurrentType( SQLExceptionInfo::SQL_EXCEPTION ) { } -//------------------------------------------------------------------------------ + void SQLExceptionIteratorHelper::current( SQLExceptionInfo& _out_rInfo ) const { switch ( m_eCurrentType ) @@ -308,7 +308,7 @@ void SQLExceptionIteratorHelper::current( SQLExceptionInfo& _out_rInfo ) const } } -//------------------------------------------------------------------------------ + const ::com::sun::star::sdbc::SQLException* SQLExceptionIteratorHelper::next() { OSL_ENSURE( hasMoreElements(), "SQLExceptionIteratorHelper::next : invalid call (please use hasMoreElements)!" ); @@ -351,14 +351,14 @@ const ::com::sun::star::sdbc::SQLException* SQLExceptionIteratorHelper::next() return pReturn; } -//------------------------------------------------------------------------------ + void SQLExceptionIteratorHelper::next( SQLExceptionInfo& _out_rInfo ) { current( _out_rInfo ); next(); } -//------------------------------------------------------------ + void throwFunctionSequenceException(const Reference< XInterface >& _Context, const Any& _Next) throw ( ::com::sun::star::sdbc::SQLException ) { ::connectivity::SharedResources aResources; @@ -370,7 +370,7 @@ void throwFunctionSequenceException(const Reference< XInterface >& _Context, con _Next ); } -// ----------------------------------------------------------------------------- + void throwInvalidIndexException(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _Context, const ::com::sun::star::uno::Any& _Next) throw ( ::com::sun::star::sdbc::SQLException ) { @@ -383,7 +383,7 @@ void throwInvalidIndexException(const ::com::sun::star::uno::Reference< ::com::s _Next ); } -// ----------------------------------------------------------------------------- + void throwFunctionNotSupportedException( const OUString& _rFunctionName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext, const ::com::sun::star::uno::Any& _rNextException ) throw ( ::com::sun::star::sdbc::SQLException ) { @@ -400,21 +400,21 @@ void throwFunctionNotSupportedException( const OUString& _rFunctionName, const : _rNextException ); } -// ----------------------------------------------------------------------------- + void throwGenericSQLException(const OUString& _rMsg, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxSource) throw (::com::sun::star::sdbc::SQLException) { throwGenericSQLException(_rMsg, _rxSource, Any()); } -// ----------------------------------------------------------------------------- + void throwGenericSQLException(const OUString& _rMsg, const Reference< XInterface >& _rxSource, const Any& _rNextException) throw (SQLException) { throw SQLException( _rMsg, _rxSource, getStandardSQLState( SQL_GENERAL_ERROR ), 0, _rNextException); } -// ----------------------------------------------------------------------------- + void throwFeatureNotImplementedException( const OUString& _rFeatureName, const Reference< XInterface >& _rxContext, const Any* _pNextException ) throw (SQLException) { @@ -442,7 +442,7 @@ void throwInvalidColumnException( const OUString& _rColumnName, const Reference< "$columnname$",_rColumnName) ); throwSQLException( sErrorMessage, SQL_COLUMN_NOT_FOUND, _rxContext ); } -// ----------------------------------------------------------------------------- + void throwSQLException( const OUString& _rMessage, const OUString& _rSQLState, const Reference< XInterface >& _rxContext, const sal_Int32 _nErrorCode, const Any* _pNextException ) throw (SQLException) { @@ -455,7 +455,7 @@ void throwSQLException( const OUString& _rMessage, const OUString& _rSQLState, ); } -// ----------------------------------------------------------------------------- + void throwSQLException( const OUString& _rMessage, StandardSQLState _eSQLState, const Reference< XInterface >& _rxContext, const sal_Int32 _nErrorCode, const Any* _pNextException ) throw (SQLException) @@ -463,7 +463,7 @@ void throwSQLException( const OUString& _rMessage, StandardSQLState _eSQLState, throwSQLException( _rMessage, getStandardSQLState( _eSQLState ), _rxContext, _nErrorCode, _pNextException ); } -// ----------------------------------------------------------------------------- + OUString getStandardSQLState( StandardSQLState _eState ) { switch ( _eState ) @@ -495,7 +495,7 @@ OUString getStandardSQLState( StandardSQLState _eState ) throw RuntimeException(); } -// ----------------------------------------------------------------------------- + //......................................................................... } // namespace dbtools //......................................................................... diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index 86527aa6ea98..dad2ceb77424 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -94,7 +94,7 @@ namespace dbtools } }; - //-------------------------------------------------------------------- + namespace { //................................................................ @@ -183,26 +183,26 @@ namespace dbtools //==================================================================== //= DatabaseMetaData //==================================================================== - //-------------------------------------------------------------------- + DatabaseMetaData::DatabaseMetaData() :m_pImpl( new DatabaseMetaData_Impl ) { } - //-------------------------------------------------------------------- + DatabaseMetaData::DatabaseMetaData( const Reference< XConnection >& _connection ) :m_pImpl( new DatabaseMetaData_Impl ) { lcl_construct( *m_pImpl, _connection ); } - //-------------------------------------------------------------------- + DatabaseMetaData::DatabaseMetaData( const DatabaseMetaData& _copyFrom ) :m_pImpl( new DatabaseMetaData_Impl( *_copyFrom.m_pImpl ) ) { } - //-------------------------------------------------------------------- + DatabaseMetaData& DatabaseMetaData::operator=( const DatabaseMetaData& _copyFrom ) { if ( this == &_copyFrom ) @@ -212,18 +212,18 @@ namespace dbtools return *this; } - //-------------------------------------------------------------------- + DatabaseMetaData::~DatabaseMetaData() { } - //-------------------------------------------------------------------- + bool DatabaseMetaData::isConnected() const { return m_pImpl->xConnection.is(); } - //-------------------------------------------------------------------- + bool DatabaseMetaData::supportsSubqueriesInFrom() const { lcl_checkConnected( *m_pImpl ); @@ -243,7 +243,7 @@ namespace dbtools return supportsSubQueries; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::supportsPrimaryKeys() const { lcl_checkConnected( *m_pImpl ); @@ -264,19 +264,19 @@ namespace dbtools return doesSupportPrimaryKeys; } - //-------------------------------------------------------------------- + const OUString& DatabaseMetaData::getIdentifierQuoteString() const { return lcl_getConnectionStringSetting( *m_pImpl, m_pImpl->sCachedIdentifierQuoteString, &XDatabaseMetaData::getIdentifierQuoteString ); } - //-------------------------------------------------------------------- + const OUString& DatabaseMetaData::getCatalogSeparator() const { return lcl_getConnectionStringSetting( *m_pImpl, m_pImpl->sCachedCatalogSeparator, &XDatabaseMetaData::getCatalogSeparator ); } - //-------------------------------------------------------------------- + bool DatabaseMetaData::restrictIdentifiersToSQL92() const { lcl_checkConnected( *m_pImpl ); @@ -288,7 +288,7 @@ namespace dbtools return restrict; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::generateASBeforeCorrelationName() const { bool doGenerate( true ); @@ -297,7 +297,7 @@ namespace dbtools OSL_VERIFY( setting >>= doGenerate ); return doGenerate; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::shouldEscapeDateTime() const { bool doGenerate( true ); @@ -306,7 +306,7 @@ namespace dbtools OSL_VERIFY( setting >>= doGenerate ); return doGenerate; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::isAutoIncrementPrimaryKey() const { bool is( true ); @@ -315,7 +315,7 @@ namespace dbtools OSL_VERIFY( setting >>= is ); return is; } - //-------------------------------------------------------------------- + sal_Int32 DatabaseMetaData::getBooleanComparisonMode() const { sal_Int32 mode( BooleanComparisonMode::EQUAL_INTEGER ); @@ -324,7 +324,7 @@ namespace dbtools OSL_VERIFY( setting >>= mode ); return mode; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::supportsRelations() const { lcl_checkConnected( *m_pImpl ); @@ -353,7 +353,7 @@ namespace dbtools return bSupport; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::supportsColumnAliasInOrderBy() const { bool doGenerate( true ); @@ -363,7 +363,7 @@ namespace dbtools return doGenerate; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::supportsUserAdministration( const Reference<XComponentContext>& _rContext ) const { lcl_checkConnected( *m_pImpl ); @@ -392,7 +392,7 @@ namespace dbtools return isSupported; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::displayEmptyTableFolders() const { bool doDisplay( true ); @@ -414,7 +414,7 @@ namespace dbtools #endif return doDisplay; } - //-------------------------------------------------------------------- + bool DatabaseMetaData::supportsThreads() const { bool bSupported( true ); diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 7f73de093a97..65f103961826 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -202,7 +202,7 @@ OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,cons return aSql.makeStringAndClear(); } -// ----------------------------------------------------------------------------- + OUString createStandardCreateStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const OUString& _sCreatePattern) { @@ -266,7 +266,7 @@ namespace return sSql; } } -// ----------------------------------------------------------------------------- + OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection) { Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData(); @@ -372,7 +372,7 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor, return aSql.makeStringAndClear(); } -// ----------------------------------------------------------------------------- + OUString createSqlCreateTableStatement( const Reference< XPropertySet >& descriptor, const Reference< XConnection>& _xConnection, ISQLStatementHelper* _pHelper, @@ -507,7 +507,7 @@ namespace return xProp; } - //------------------------------------------------------------------ + Reference< XModel> lcl_getXModel(const Reference< XInterface>& _xIface) { Reference< XInterface > xParent = _xIface; @@ -521,7 +521,7 @@ namespace return xModel; } } -// ----------------------------------------------------------------------------- + Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable, const Reference<XConnection>& _xConnection, const OUString& _rName, @@ -573,7 +573,7 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable return xProp; } -// ----------------------------------------------------------------------------- + bool getBooleanDataSourceSetting( const Reference< XConnection >& _rxConnection, const sal_Char* _pAsciiSettingName ) { bool bValue( false ); @@ -596,7 +596,7 @@ bool getBooleanDataSourceSetting( const Reference< XConnection >& _rxConnection, } return bValue; } -// ------------------------------------------------------------------------- + bool getDataSourceSetting( const Reference< XInterface >& _xChild, const OUString& _sAsciiSettingsName, Any& /* [out] */ _rSettingsValue ) { @@ -621,14 +621,14 @@ bool getDataSourceSetting( const Reference< XInterface >& _xChild, const OUStrin } return bIsPresent; } -// ------------------------------------------------------------------------- + bool getDataSourceSetting( const Reference< XInterface >& _rxDataSource, const sal_Char* _pAsciiSettingsName, Any& /* [out] */ _rSettingsValue ) { OUString sAsciiSettingsName = OUString::createFromAscii(_pAsciiSettingsName); return getDataSourceSetting( _rxDataSource, sAsciiSettingsName,_rSettingsValue ); } -// ----------------------------------------------------------------------------- + sal_Bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp,const OUString& _sProperty,sal_Bool _bDefault) { sal_Bool bEnabled = _bDefault; @@ -652,7 +652,7 @@ sal_Bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp,const O } return bEnabled; } -// ----------------------------------------------------------------------------- + Reference< XTablesSupplier> getDataDefinitionByURLAndConnection( const OUString& _rsUrl, const Reference< XConnection>& _xConnection, @@ -677,7 +677,7 @@ Reference< XTablesSupplier> getDataDefinitionByURLAndConnection( return xTablesSup; } -// ----------------------------------------------------------------------------- + sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, const OUString& _sCatalog, const OUString& _sSchema, @@ -817,7 +817,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, } return nPrivileges; } -// ----------------------------------------------------------------------------- + // we need some more information about the column void collectColumnInformation(const Reference< XConnection>& _xConnection, const OUString& _sComposedName, @@ -851,7 +851,7 @@ void collectColumnInformation(const Reference< XConnection>& _xConnection, } } -// ----------------------------------------------------------------------------- + bool isEmbeddedInDatabase( const Reference< XInterface >& _rxComponent, Reference< XConnection >& _rxActualConnection ) { bool bIsEmbedded = false; @@ -893,7 +893,7 @@ bool isEmbeddedInDatabase( const Reference< XInterface >& _rxComponent, Referenc } return bIsEmbedded; } -// ----------------------------------------------------------------------------- + namespace { OUString lcl_getEncodingName( rtl_TextEncoding _eEncoding ) @@ -910,7 +910,7 @@ namespace } } -// ----------------------------------------------------------------------------- + sal_Int32 DBTypeConversion::convertUnicodeString( const OUString& _rSource, OString& _rDest, rtl_TextEncoding _eEncoding ) SAL_THROW((com::sun::star::sdbc::SQLException)) { if ( !rtl_convertUStringToString( &_rDest.pData, _rSource.getStr(), _rSource.getLength(), @@ -939,7 +939,7 @@ sal_Int32 DBTypeConversion::convertUnicodeString( const OUString& _rSource, OStr return _rDest.getLength(); } -// ----------------------------------------------------------------------------- + sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSource, OString& _rDest, sal_Int32 _nMaxLen, rtl_TextEncoding _eEncoding ) SAL_THROW((SQLException)) { @@ -969,19 +969,19 @@ OUString lcl_getReportEngines() static OUString s_sNodeName("org.openoffice.Office.DataAccess/ReportEngines"); return s_sNodeName; } -// ----------------------------------------------------------------------------- + OUString lcl_getDefaultReportEngine() { static OUString s_sNodeName("DefaultReportEngine"); return s_sNodeName; } -// ----------------------------------------------------------------------------- + OUString lcl_getReportEngineNames() { static OUString s_sNodeName("ReportEngineNames"); return s_sNodeName; } -// ----------------------------------------------------------------------------- + OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& _rxORB) { ::utl::OConfigurationTreeRoot aReportEngines = ::utl::OConfigurationTreeRoot::createWithComponentContext( @@ -1013,7 +1013,7 @@ OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& return OUString("org.libreoffice.report.pentaho.SOReportJobFactory"); return OUString(); } -// ----------------------------------------------------------------------------- + //......................................................................... } // namespace dbtools //......................................................................... diff --git a/connectivity/source/commontools/filtermanager.cxx b/connectivity/source/commontools/filtermanager.cxx index e8a4a2ddd4a4..3612ef8a3940 100644 --- a/connectivity/source/commontools/filtermanager.cxx +++ b/connectivity/source/commontools/filtermanager.cxx @@ -41,14 +41,14 @@ namespace dbtools //==================================================================== //= FilterManager //==================================================================== - //-------------------------------------------------------------------- + FilterManager::FilterManager( ) :m_aFilterComponents( FC_COMPONENT_COUNT ) ,m_bApplyPublicFilter( true ) { } - //-------------------------------------------------------------------- + void FilterManager::initialize( const Reference< XPropertySet >& _rxComponentAggregate ) { m_xComponentAggregate = _rxComponentAggregate; @@ -58,19 +58,19 @@ namespace dbtools m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_APPLYFILTER), makeAny( (sal_Bool)sal_True ) ); } - //-------------------------------------------------------------------- + void FilterManager::dispose( ) { m_xComponentAggregate.clear(); } - //-------------------------------------------------------------------- + const OUString& FilterManager::getFilterComponent( FilterComponent _eWhich ) const { return m_aFilterComponents[ _eWhich ]; } - //-------------------------------------------------------------------- + void FilterManager::setFilterComponent( FilterComponent _eWhich, const OUString& _rComponent ) { m_aFilterComponents[ _eWhich ] = _rComponent; @@ -85,7 +85,7 @@ namespace dbtools } } - //-------------------------------------------------------------------- + void FilterManager::setApplyPublicFilter( sal_Bool _bApply ) { if ( m_bApplyPublicFilter == _bApply ) @@ -106,7 +106,7 @@ namespace dbtools } } - //-------------------------------------------------------------------- + void FilterManager::appendFilterComponent( OUStringBuffer& io_appendTo, const OUString& i_component ) const { if ( !io_appendTo.isEmpty() ) @@ -121,7 +121,7 @@ namespace dbtools io_appendTo.appendAscii( " )" ); } - //-------------------------------------------------------------------- + bool FilterManager::isThereAtMostOneComponent( OUStringBuffer& o_singleComponent ) const { sal_Int32 nOnlyNonEmpty = -1; @@ -152,7 +152,7 @@ namespace dbtools return false; } - //-------------------------------------------------------------------- + OUString FilterManager::getComposedFilter( ) const { OUStringBuffer aComposedFilter; diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx index 5c89a7117a7f..393414095f80 100644 --- a/connectivity/source/commontools/formattedcolumnvalue.cxx +++ b/connectivity/source/commontools/formattedcolumnvalue.cxx @@ -94,7 +94,7 @@ namespace dbtools } }; - //-------------------------------------------------------------------- + namespace { //................................................................ @@ -214,7 +214,7 @@ namespace dbtools //==================================================================== //= FormattedColumnValue //==================================================================== - //-------------------------------------------------------------------- + FormattedColumnValue::FormattedColumnValue( const Reference< XComponentContext >& _rxContext, const Reference< XRowSet >& _rxRowSet, const Reference< XPropertySet >& i_rColumn ) :m_pData( new FormattedColumnValue_Data ) @@ -222,7 +222,7 @@ namespace dbtools lcl_initColumnDataValue_nothrow( _rxContext, *m_pData, _rxRowSet, i_rColumn ); } - //-------------------------------------------------------------------- + FormattedColumnValue::FormattedColumnValue( const Reference< XNumberFormatter >& i_rNumberFormatter, const Reference< XPropertySet >& _rxColumn ) :m_pData( new FormattedColumnValue_Data ) @@ -230,49 +230,49 @@ namespace dbtools lcl_initColumnDataValue_nothrow( *m_pData, i_rNumberFormatter, _rxColumn ); } - //-------------------------------------------------------------------- + void FormattedColumnValue::clear() { lcl_clear_nothrow( *m_pData ); } - //-------------------------------------------------------------------- + FormattedColumnValue::~FormattedColumnValue() { clear(); } - //-------------------------------------------------------------------- + sal_Int32 FormattedColumnValue::getFormatKey() const { return m_pData->m_nFormatKey; } - //-------------------------------------------------------------------- + sal_Int32 FormattedColumnValue::getFieldType() const { return m_pData->m_nFieldType; } - //-------------------------------------------------------------------- + sal_Int16 FormattedColumnValue::getKeyType() const { return m_pData->m_nKeyType; } - //-------------------------------------------------------------------- + const Reference< XColumn >& FormattedColumnValue::getColumn() const { return m_pData->m_xColumn; } - //-------------------------------------------------------------------- + const Reference< XColumnUpdate >& FormattedColumnValue::getColumnUpdate() const { return m_pData->m_xColumnUpdate; } - //-------------------------------------------------------------------- + bool FormattedColumnValue::setFormattedValue( const OUString& _rFormattedStringValue ) const { OSL_PRECOND( m_pData->m_xColumnUpdate.is(), "FormattedColumnValue::setFormattedValue: no column!" ); @@ -299,7 +299,7 @@ namespace dbtools return true; } - //-------------------------------------------------------------------- + OUString FormattedColumnValue::getFormattedValue() const { OSL_PRECOND( m_pData->m_xColumn.is(), "FormattedColumnValue::setFormattedValue: no column!" ); diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index 9ecb37275a9c..48becea7eaba 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -62,7 +62,7 @@ namespace dbtools //==================================================================== //= ParameterManager //==================================================================== - //-------------------------------------------------------------------- + ParameterManager::ParameterManager( ::osl::Mutex& _rMutex, const Reference< XComponentContext >& _rxContext ) :m_rMutex ( _rMutex ) ,m_aParameterListeners( _rMutex ) @@ -74,7 +74,7 @@ namespace dbtools OSL_ENSURE( m_xContext.is(), "ParameterManager::ParameterManager: no service factory!" ); } - //-------------------------------------------------------------------- + void ParameterManager::initialize( const Reference< XPropertySet >& _rxComponent, const Reference< XAggregation >& _rxComponentAggregate ) { OSL_ENSURE( !m_xComponent.get().is(), "ParameterManager::initialize: already initialized!" ); @@ -88,7 +88,7 @@ namespace dbtools return; } - //-------------------------------------------------------------------- + void ParameterManager::dispose( ) { clearAllParameterInformation(); @@ -100,7 +100,7 @@ namespace dbtools m_xAggregatedRowSet.clear(); } - //-------------------------------------------------------------------- + void ParameterManager::clearAllParameterInformation() { m_xInnerParamColumns.clear(); @@ -118,12 +118,12 @@ namespace dbtools m_bUpToDate = false; } - //-------------------------------------------------------------------- + void ParameterManager::disposing( const EventObject& /*_rDisposingEvent*/ ) { } - //-------------------------------------------------------------------- + void ParameterManager::setAllParametersNull() SAL_THROW( ( SQLException, RuntimeException ) ) { OSL_PRECOND( isAlive(), "ParameterManager::setAllParametersNull: not initialized, or already disposed!" ); @@ -134,7 +134,7 @@ namespace dbtools m_xInnerParamUpdate->setNull( i, DataType::VARCHAR ); } - //-------------------------------------------------------------------- + bool ParameterManager::initializeComposerByComponent( const Reference< XPropertySet >& _rxComponent ) { OSL_PRECOND( _rxComponent.is(), "ParameterManager::initializeComposerByComponent: invalid !" ); @@ -164,7 +164,7 @@ namespace dbtools return m_xInnerParamColumns.is(); } - //-------------------------------------------------------------------- + void ParameterManager::collectInnerParameters( bool _bSecondRun ) { OSL_PRECOND( m_xInnerParamColumns.is(), "ParameterManager::collectInnerParameters: missing some internal data!" ); @@ -219,7 +219,7 @@ namespace dbtools } } - //-------------------------------------------------------------------- + OUString ParameterManager::createFilterConditionFromColumnLink( const OUString& _rMasterColumn, const OUString& _rDetailLink, OUString& _rNewParamName ) { @@ -241,7 +241,7 @@ namespace dbtools return sFilter += _rNewParamName; } - //-------------------------------------------------------------------- + void ParameterManager::classifyLinks( const Reference< XNameAccess >& _rxParentColumns, const Reference< XNameAccess >& _rxColumns, ::std::vector< OUString >& _out_rAdditionalFilterComponents ) SAL_THROW(( Exception )) { @@ -334,7 +334,7 @@ namespace dbtools } } - //-------------------------------------------------------------------- + void ParameterManager::analyzeFieldLinks( FilterManager& _rFilterManager, bool& /* [out] */ _rColumnsInLinkDetails ) { OSL_PRECOND( isAlive(), "ParameterManager::analyzeFieldLinks: not initialized, or already disposed!" ); @@ -408,7 +408,7 @@ namespace dbtools } } - //-------------------------------------------------------------------- + void ParameterManager::createOuterParameters() { OSL_PRECOND( !m_pOuterParameters.is(), "ParameterManager::createOuterParameters: outer parameters not initialized!" ); @@ -481,7 +481,7 @@ namespace dbtools #endif } - //-------------------------------------------------------------------- + void ParameterManager::updateParameterInfo( FilterManager& _rFilterManager ) { OSL_PRECOND( isAlive(), "ParameterManager::updateParameterInfo: not initialized, or already disposed!" ); @@ -535,7 +535,7 @@ namespace dbtools m_bUpToDate = true; } - //-------------------------------------------------------------------- + void ParameterManager::fillLinkedParameters( const Reference< XNameAccess >& _rxParentColumns ) { OSL_PRECOND( isAlive(), "ParameterManager::fillLinkedParameters: not initialized, or already disposed!" ); @@ -621,7 +621,7 @@ namespace dbtools } } - //-------------------------------------------------------------------- + bool ParameterManager::completeParameters( const Reference< XInteractionHandler >& _rxCompletionHandler, const Reference< XConnection > _rxConnection ) { OSL_PRECOND( isAlive(), "ParameterManager::completeParameters: not initialized, or already disposed!" ); @@ -684,7 +684,7 @@ namespace dbtools return true; } - //-------------------------------------------------------------------- + bool ParameterManager::consultParameterListeners( ::osl::ResettableMutexGuard& _rClearForNotifies ) { bool bCanceled = false; @@ -707,7 +707,7 @@ namespace dbtools return !bCanceled; } - //-------------------------------------------------------------------- + bool ParameterManager::fillParameterValues( const Reference< XInteractionHandler >& _rxCompletionHandler, ::osl::ResettableMutexGuard& _rClearForNotifies ) { OSL_PRECOND( isAlive(), "ParameterManager::fillParameterValues: not initialized, or already disposed!" ); @@ -733,7 +733,7 @@ namespace dbtools return consultParameterListeners( _rClearForNotifies ); } - //-------------------------------------------------------------------- + bool ParameterManager::getConnection( Reference< XConnection >& /* [out] */ _rxConnection ) { OSL_PRECOND( isAlive(), "ParameterManager::getConnection: not initialized, or already disposed!" ); @@ -755,7 +755,7 @@ namespace dbtools return _rxConnection.is(); } - //-------------------------------------------------------------------- + void ParameterManager::cacheConnectionInfo() SAL_THROW(( )) { try @@ -777,7 +777,7 @@ namespace dbtools } } - //-------------------------------------------------------------------- + bool ParameterManager::getColumns( Reference< XNameAccess >& /* [out] */ _rxColumns, bool _bFromComposer ) SAL_THROW(( Exception )) { _rxColumns.clear(); @@ -794,7 +794,7 @@ namespace dbtools return _rxColumns.is(); } - //-------------------------------------------------------------------- + bool ParameterManager::getParentColumns( Reference< XNameAccess >& /* [out] */ _out_rxParentColumns, bool _bFromComposer ) { OSL_PRECOND( isAlive(), "ParameterManager::getParentColumns: not initialized, or already disposed!" ); @@ -834,20 +834,20 @@ namespace dbtools return _out_rxParentColumns.is(); } - //-------------------------------------------------------------------- + void ParameterManager::addParameterListener( const Reference< XDatabaseParameterListener >& _rxListener ) { if ( _rxListener.is() ) m_aParameterListeners.addInterface( _rxListener ); } - //-------------------------------------------------------------------- + void ParameterManager::removeParameterListener( const Reference< XDatabaseParameterListener >& _rxListener ) { m_aParameterListeners.removeInterface( _rxListener ); } - //-------------------------------------------------------------------- + void ParameterManager::resetParameterValues( ) SAL_THROW(()) { OSL_PRECOND( isAlive(), "ParameterManager::resetParameterValues: not initialized, or already disposed!" ); @@ -933,7 +933,7 @@ namespace dbtools } - //-------------------------------------------------------------------- + void ParameterManager::externalParameterVisited( sal_Int32 _nIndex ) { if ( m_aParametersVisited.size() < (size_t)_nIndex ) @@ -953,139 +953,139 @@ namespace dbtools m_xInnerParamUpdate->method; \ externalParameterVisited( _nIndex ) \ - //-------------------------------------------------------------------- + void ParameterManager::setNull( sal_Int32 _nIndex, sal_Int32 sqlType ) { VISIT_PARAMETER( setNull( _nIndex, sqlType ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setObjectNull( sal_Int32 _nIndex, sal_Int32 sqlType, const OUString& typeName ) { VISIT_PARAMETER( setObjectNull( _nIndex, sqlType, typeName ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setBoolean( sal_Int32 _nIndex, sal_Bool x ) { VISIT_PARAMETER( setBoolean( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setByte( sal_Int32 _nIndex, sal_Int8 x ) { VISIT_PARAMETER( setByte( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setShort( sal_Int32 _nIndex, sal_Int16 x ) { VISIT_PARAMETER( setShort( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setInt( sal_Int32 _nIndex, sal_Int32 x ) { VISIT_PARAMETER( setInt( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setLong( sal_Int32 _nIndex, sal_Int64 x ) { VISIT_PARAMETER( setLong( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setFloat( sal_Int32 _nIndex, float x ) { VISIT_PARAMETER( setFloat( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setDouble( sal_Int32 _nIndex, double x ) { VISIT_PARAMETER( setDouble( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setString( sal_Int32 _nIndex, const OUString& x ) { VISIT_PARAMETER( setString( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setBytes( sal_Int32 _nIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) { VISIT_PARAMETER( setBytes( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setDate( sal_Int32 _nIndex, const ::com::sun::star::util::Date& x ) { VISIT_PARAMETER( setDate( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setTime( sal_Int32 _nIndex, const ::com::sun::star::util::Time& x ) { VISIT_PARAMETER( setTime( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setTimestamp( sal_Int32 _nIndex, const ::com::sun::star::util::DateTime& x ) { VISIT_PARAMETER( setTimestamp( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setBinaryStream( sal_Int32 _nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x, sal_Int32 length ) { VISIT_PARAMETER( setBinaryStream( _nIndex, x, length ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setCharacterStream( sal_Int32 _nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x, sal_Int32 length ) { VISIT_PARAMETER( setCharacterStream( _nIndex, x, length ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setObject( sal_Int32 _nIndex, const ::com::sun::star::uno::Any& x ) { VISIT_PARAMETER( setObject( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setObjectWithInfo( sal_Int32 _nIndex, const ::com::sun::star::uno::Any& x, sal_Int32 targetSqlType, sal_Int32 scale ) { VISIT_PARAMETER( setObjectWithInfo( _nIndex, x, targetSqlType, scale ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setRef( sal_Int32 _nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef>& x ) { VISIT_PARAMETER( setRef( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setBlob( sal_Int32 _nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob>& x ) { VISIT_PARAMETER( setBlob( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setClob( sal_Int32 _nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob>& x ) { VISIT_PARAMETER( setClob( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::setArray( sal_Int32 _nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray>& x ) { VISIT_PARAMETER( setArray( _nIndex, x ) ); } - //-------------------------------------------------------------------- + void ParameterManager::clearParameters( ) { if ( m_xInnerParamUpdate.is() ) @@ -1095,7 +1095,7 @@ namespace dbtools //==================================================================== //= OParameterContinuation //==================================================================== - //-------------------------------------------------------------------- + void SAL_CALL OParameterContinuation::setParameters( const Sequence< PropertyValue >& _rValues ) throw( RuntimeException ) { m_aValues = _rValues; diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx index f928945c5811..f8289fe5de2a 100644 --- a/connectivity/source/commontools/paramwrapper.cxx +++ b/connectivity/source/commontools/paramwrapper.cxx @@ -65,7 +65,7 @@ namespace param //==================================================================== //= ParameterWrapper //==================================================================== - //-------------------------------------------------------------------- + ParameterWrapper::ParameterWrapper( const Reference< XPropertySet >& _rxColumn ) :PropertyBase( m_aBHelper ) ,m_xDelegator( _rxColumn ) @@ -76,7 +76,7 @@ namespace param throw RuntimeException(); } - //-------------------------------------------------------------------- + ParameterWrapper::ParameterWrapper( const Reference< XPropertySet >& _rxColumn, const Reference< XParameters >& _rxAllParameters, const ::std::vector< sal_Int32 >& _rIndexes ) :PropertyBase( m_aBHelper ) @@ -92,15 +92,15 @@ namespace param OSL_ENSURE( !m_aIndexes.empty(), "ParameterWrapper::ParameterWrapper: sure about the indexes?" ); } - //-------------------------------------------------------------------- + ParameterWrapper::~ParameterWrapper() { } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( ParameterWrapper, UnoBase, PropertyBase ) - //-------------------------------------------------------------------- + Sequence< Type > SAL_CALL ParameterWrapper::getTypes( ) throw(RuntimeException) { Sequence< Type > aTypes( 4 ); @@ -111,10 +111,10 @@ namespace param return aTypes; } - //-------------------------------------------------------------------- + IMPLEMENT_GET_IMPLEMENTATION_ID( ParameterWrapper ) - //-------------------------------------------------------------------- + OUString ParameterWrapper::impl_getPseudoAggregatePropertyName( sal_Int32 _nHandle ) const { Reference< XPropertySetInfo > xInfo = const_cast<ParameterWrapper*>( this )->getPropertySetInfo(); @@ -130,13 +130,13 @@ namespace param return OUString(); } - //-------------------------------------------------------------------- + Reference< XPropertySetInfo > ParameterWrapper::getPropertySetInfo() throw( RuntimeException ) { return createPropertySetInfo( getInfoHelper() ); } - //-------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper& ParameterWrapper::getInfoHelper() { if ( !m_pInfoHelper.get() ) @@ -164,7 +164,7 @@ namespace param return *m_pInfoHelper; } - //-------------------------------------------------------------------- + sal_Bool ParameterWrapper::convertFastPropertyValue(Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue) throw( IllegalArgumentException ) { OSL_ENSURE( PROPERTY_ID_VALUE == nHandle, "ParameterWrapper::convertFastPropertyValue: the only non-readonly prop should be our PROPERTY_VALUE!" ); @@ -176,7 +176,7 @@ namespace param return sal_True; // assume "modified" ... } - //-------------------------------------------------------------------- + void ParameterWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw( Exception ) { if ( nHandle == PROPERTY_ID_VALUE ) @@ -218,7 +218,7 @@ namespace param } } - //-------------------------------------------------------------------- + void ParameterWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const { if ( nHandle == PROPERTY_ID_VALUE ) @@ -232,7 +232,7 @@ namespace param } } - //-------------------------------------------------------------------- + void SAL_CALL ParameterWrapper::dispose() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -249,13 +249,13 @@ namespace param //==================================================================== //= ParameterWrapperContainer //==================================================================== - //-------------------------------------------------------------------- + ParameterWrapperContainer::ParameterWrapperContainer() :ParameterWrapperContainer_Base( m_aMutex ) { } - //-------------------------------------------------------------------- + ParameterWrapperContainer::ParameterWrapperContainer( const Reference< XSingleSelectQueryAnalyzer >& _rxComposer ) :ParameterWrapperContainer_Base( m_aMutex ) { @@ -269,12 +269,12 @@ namespace param } } - //-------------------------------------------------------------------- + ParameterWrapperContainer::~ParameterWrapperContainer() { } - //-------------------------------------------------------------------- + Type SAL_CALL ParameterWrapperContainer::getElementType() throw( RuntimeException ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -282,7 +282,7 @@ namespace param return ::getCppuType( static_cast< Reference< XPropertySet >* >( NULL ) ); } - //-------------------------------------------------------------------- + sal_Bool SAL_CALL ParameterWrapperContainer::hasElements() throw( RuntimeException ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -290,7 +290,7 @@ namespace param return !m_aParameters.empty(); } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL ParameterWrapperContainer::getCount() throw( RuntimeException ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -298,7 +298,7 @@ namespace param return m_aParameters.size(); } - //-------------------------------------------------------------------- + Any SAL_CALL ParameterWrapperContainer::getByIndex( sal_Int32 _nIndex ) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -310,7 +310,7 @@ namespace param return makeAny( Reference< XPropertySet >( m_aParameters[ _nIndex ].get() ) ); } - //-------------------------------------------------------------------- + Reference< XEnumeration > ParameterWrapperContainer::createEnumeration() throw( RuntimeException ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -319,14 +319,14 @@ namespace param return new ::comphelper::OEnumerationByIndex( static_cast< XIndexAccess* >( this ) ); } - //-------------------------------------------------------------------- + void ParameterWrapperContainer::impl_checkDisposed_throw() { if ( rBHelper.bDisposed ) throw DisposedException( OUString(), *this ); } - //-------------------------------------------------------------------- + void SAL_CALL ParameterWrapperContainer::disposing() { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index 79cc2697c64b..74e00aefb966 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -61,7 +61,7 @@ namespace dbtools using ::connectivity::OSQLParseNode; //===================================================================== - //--------------------------------------------------------------------- + static sal_Unicode lcl_getSeparatorChar( const OUString& _rSeparator, sal_Unicode _nFallback ) { OSL_ENSURE( !_rSeparator.isEmpty(), "::lcl_getSeparatorChar: invalid separator string!" ); @@ -75,7 +75,7 @@ namespace dbtools //===================================================================== //= OPredicateInputController //===================================================================== - //--------------------------------------------------------------------- + sal_Bool OPredicateInputController::getSeparatorChars( const Locale& _rLocale, sal_Unicode& _rDecSep, sal_Unicode& _rThdSep ) const { _rDecSep = '.'; @@ -98,7 +98,7 @@ namespace dbtools return sal_False; } - //--------------------------------------------------------------------- + OPredicateInputController::OPredicateInputController( const Reference< XComponentContext >& rxContext, const Reference< XConnection >& _rxConnection, const IParseContext* _pParseContext ) : m_xConnection( _rxConnection ) @@ -134,7 +134,7 @@ namespace dbtools } } - //--------------------------------------------------------------------- + OSQLParseNode* OPredicateInputController::implPredicateTree(OUString& _rErrorMessage, const OUString& _rStatement, const Reference< XPropertySet > & _rxField) const { OSQLParseNode* pReturn = const_cast< OSQLParser& >( m_aParser ).predicateTree( _rErrorMessage, _rStatement, m_xFormatter, _rxField ); @@ -244,7 +244,7 @@ namespace dbtools return pReturn; } - //--------------------------------------------------------------------- + sal_Bool OPredicateInputController::normalizePredicateString( OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, OUString* _pErrorMessage ) const { @@ -282,7 +282,7 @@ namespace dbtools return bSuccess; } - //--------------------------------------------------------------------- + OUString OPredicateInputController::getPredicateValue( const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, sal_Bool _bForStatementUse, OUString* _pErrorMessage ) const diff --git a/connectivity/source/commontools/propertyids.cxx b/connectivity/source/commontools/propertyids.cxx index 30df7cb335ae..863e962f7545 100644 --- a/connectivity/source/commontools/propertyids.cxx +++ b/connectivity/source/commontools/propertyids.cxx @@ -100,7 +100,7 @@ namespace dbtools if(aIter->second) rtl_uString_release(aIter->second); } - // ------------------------------------------------------------------------------ + OUString OPropertyMap::getNameByIndex(sal_Int32 _nIndex) const { OUString sRet; @@ -111,7 +111,7 @@ namespace dbtools sRet = aIter->second; return sRet; } - // ------------------------------------------------------------------------------ + OUString OPropertyMap::fillValue(sal_Int32 _nIndex) { rtl_uString* pStr = NULL; diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index de58dae08b47..c9db24fa3199 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -97,7 +97,7 @@ namespace connectivity //==================================================================== //= SQLError_Impl - implementation //==================================================================== - //-------------------------------------------------------------------- + SQLError_Impl::SQLError_Impl( const Reference<XComponentContext> & _rxContext ) :m_aContext( _rxContext ) ,m_pResources( ) @@ -105,19 +105,19 @@ namespace connectivity { } - //-------------------------------------------------------------------- + SQLError_Impl::~SQLError_Impl() { } - //-------------------------------------------------------------------- + const OUString& SQLError_Impl::getMessagePrefix() { static const OUString s_sMessagePrefix( "[OOoBase]" ); return s_sMessagePrefix; } - //-------------------------------------------------------------------- + namespace { //................................................................ @@ -145,7 +145,7 @@ namespace connectivity } } - //-------------------------------------------------------------------- + OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) { OUString sErrorMessage( impl_getErrorMessage( _eCondition ) ); @@ -157,19 +157,19 @@ namespace connectivity return sErrorMessage; } - //-------------------------------------------------------------------- + OUString SQLError_Impl::getSQLState( const ErrorCondition _eCondition ) { return impl_getSQLState( _eCondition ); } - //-------------------------------------------------------------------- + ErrorCode SQLError_Impl::getErrorCode( const ErrorCondition _eCondition ) { return 0 - ::sal::static_int_cast< ErrorCode, ErrorCondition >( _eCondition ); } - //-------------------------------------------------------------------- + void SQLError_Impl::raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) { raiseTypedException( @@ -182,7 +182,7 @@ namespace connectivity ); } - //-------------------------------------------------------------------- + void SQLError_Impl::raiseException( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) { raiseTypedException( @@ -195,7 +195,7 @@ namespace connectivity ); } - //-------------------------------------------------------------------- + void SQLError_Impl::raiseTypedException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const Type& _rExceptionType, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) { @@ -213,14 +213,14 @@ namespace connectivity ::cppu::throwException( aException ); } - //-------------------------------------------------------------------- + SQLException SQLError_Impl::getSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) { return impl_buildSQLException( _eCondition, _rxContext, _rParamValue1, _rParamValue2, _rParamValue3 ); } - //-------------------------------------------------------------------- + SQLException SQLError_Impl::impl_buildSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) { @@ -233,7 +233,7 @@ namespace connectivity ); } - //-------------------------------------------------------------------- + OUString SQLError_Impl::impl_getErrorMessage( const ErrorCondition& _eCondition ) { OUStringBuffer aMessage; @@ -248,7 +248,7 @@ namespace connectivity return aMessage.makeStringAndClear(); } - //-------------------------------------------------------------------- + OUString SQLError_Impl::impl_getSQLState( const ErrorCondition& _eCondition ) { OUString sState; @@ -266,7 +266,7 @@ namespace connectivity return sState; } - //-------------------------------------------------------------------- + bool SQLError_Impl::impl_initResources() { if ( m_pResources.get() ) @@ -284,55 +284,55 @@ namespace connectivity //==================================================================== //= SQLError //==================================================================== - //-------------------------------------------------------------------- + SQLError::SQLError( const Reference<XComponentContext> & _rxContext ) :m_pImpl( new SQLError_Impl( _rxContext ) ) { } - //-------------------------------------------------------------------- + SQLError::~SQLError() { } - //-------------------------------------------------------------------- + const OUString& SQLError::getMessagePrefix() { return SQLError_Impl::getMessagePrefix(); } - //-------------------------------------------------------------------- + OUString SQLError::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const { return m_pImpl->getErrorMessage( _eCondition, _rParamValue1, _rParamValue2, _rParamValue3 ); } - //-------------------------------------------------------------------- + ErrorCode SQLError::getErrorCode( const ErrorCondition _eCondition ) { return SQLError_Impl::getErrorCode( _eCondition ); } - //-------------------------------------------------------------------- + void SQLError::raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const { m_pImpl->raiseException( _eCondition, _rxContext, _rParamValue1, _rParamValue2, _rParamValue3 ); } - //-------------------------------------------------------------------- + void SQLError::raiseException( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const { m_pImpl->raiseException( _eCondition, _rParamValue1, _rParamValue2, _rParamValue3 ); } - //-------------------------------------------------------------------- + void SQLError::raiseTypedException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const Type& _rExceptionType, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const { m_pImpl->raiseTypedException( _eCondition, _rxContext, _rExceptionType, _rParamValue1, _rParamValue2, _rParamValue3 ); } - //-------------------------------------------------------------------- + SQLException SQLError::getSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const { diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index f80bc1e03b02..a00356280ef2 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -82,10 +82,10 @@ namespace dbtools } }; - //-------------------------------------------------------------------- + namespace { - //---------------------------------------------------------------- + void lcl_resetComposer( StatementComposer_Data& _rData ) { if ( _rData.bDisposeComposer && _rData.xComposer.is() ) @@ -103,7 +103,7 @@ namespace dbtools _rData.xComposer.clear(); } - //---------------------------------------------------------------- + bool lcl_ensureUpToDateComposer_nothrow( StatementComposer_Data& _rData ) { if ( !_rData.bComposerDirty ) @@ -236,7 +236,7 @@ namespace dbtools //==================================================================== //= StatementComposer //==================================================================== - //-------------------------------------------------------------------- + StatementComposer::StatementComposer( const Reference< XConnection >& _rxConnection, const OUString& _rCommand, const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing ) :m_pData( new StatementComposer_Data( _rxConnection ) ) @@ -247,40 +247,40 @@ namespace dbtools m_pData->bEscapeProcessing = _bEscapeProcessing; } - //-------------------------------------------------------------------- + StatementComposer::~StatementComposer() { lcl_resetComposer( *m_pData ); } - //-------------------------------------------------------------------- + void StatementComposer::setDisposeComposer( bool _bDoDispose ) { m_pData->bDisposeComposer = _bDoDispose; } - //-------------------------------------------------------------------- + void StatementComposer::setFilter( const OUString& _rFilter ) { m_pData->sFilter = _rFilter; m_pData->bComposerDirty = true; } - //-------------------------------------------------------------------- + void StatementComposer::setOrder( const OUString& _rOrder ) { m_pData->sOrder = _rOrder; m_pData->bComposerDirty = true; } - //-------------------------------------------------------------------- + Reference< XSingleSelectQueryComposer > StatementComposer::getComposer() { lcl_ensureUpToDateComposer_nothrow( *m_pData ); return m_pData->xComposer; } - //-------------------------------------------------------------------- + OUString StatementComposer::getQuery() { if ( lcl_ensureUpToDateComposer_nothrow( *m_pData ) ) diff --git a/connectivity/source/commontools/warningscontainer.cxx b/connectivity/source/commontools/warningscontainer.cxx index 44b7a69de9e8..0681bcb11040 100644 --- a/connectivity/source/commontools/warningscontainer.cxx +++ b/connectivity/source/commontools/warningscontainer.cxx @@ -35,7 +35,7 @@ namespace dbtools //==================================================================== //= WarningsContainer //==================================================================== - //-------------------------------------------------------------------- + static void lcl_concatWarnings( Any& _rChainLeft, const Any& _rChainRight ) { if ( !_rChainLeft.hasValue() ) @@ -58,30 +58,30 @@ namespace dbtools } } - //-------------------------------------------------------------------- + WarningsContainer::~WarningsContainer() { } - //-------------------------------------------------------------------- + void WarningsContainer::appendWarning(const SQLException& _rWarning) { lcl_concatWarnings( m_aOwnWarnings, makeAny( _rWarning ) ); } - //-------------------------------------------------------------------- + void WarningsContainer::appendWarning( const SQLContext& _rContext ) { lcl_concatWarnings( m_aOwnWarnings, makeAny( _rContext )); } - //-------------------------------------------------------------------- + void WarningsContainer::appendWarning(const SQLWarning& _rWarning) { lcl_concatWarnings( m_aOwnWarnings, makeAny( _rWarning ) ); } - //-------------------------------------------------------------------- + Any SAL_CALL WarningsContainer::getWarnings( ) const { Any aAllWarnings; @@ -94,7 +94,7 @@ namespace dbtools return aAllWarnings; } - //-------------------------------------------------------------------- + void SAL_CALL WarningsContainer::clearWarnings( ) { if ( m_xExternalWarnings.is() ) @@ -102,7 +102,7 @@ namespace dbtools m_aOwnWarnings.clear(); } - //-------------------------------------------------------------------- + void WarningsContainer::appendWarning( const OUString& _rWarning, const sal_Char* _pAsciiSQLState, const Reference< XInterface >& _rxContext ) { appendWarning( SQLWarning( _rWarning, _rxContext, OUString::createFromAscii( _pAsciiSQLState ), 0, Any() ) ); diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx index 476106b7606d..869b95e6e5ba 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -50,7 +50,7 @@ void SAL_CALL OPoolTimer::onShot() } namespace { - //-------------------------------------------------------------------- + static const OUString& getTimeoutNodeName() { static OUString s_sNodeName( "Timeout" ); @@ -61,7 +61,7 @@ namespace //========================================================================== //= OConnectionPool //========================================================================== -//-------------------------------------------------------------------------- + OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver, const Reference< XInterface >& _xDriverNode, const Reference< ::com::sun::star::reflection::XProxyFactory >& _rxProxyFactory) @@ -86,12 +86,12 @@ OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver, m_xInvalidator = new OPoolTimer(this,::salhelper::TTimeValue(m_nTimeOut,0)); m_xInvalidator->start(); } -// ----------------------------------------------------------------------------- + OConnectionPool::~OConnectionPool() { clear(sal_False); } -// ----------------------------------------------------------------------------- + struct TRemoveEventListenerFunctor : ::std::unary_function<TPooledConnections::value_type,void> ,::std::unary_function<TActiveConnectionMap::value_type,void> { @@ -104,7 +104,7 @@ struct TRemoveEventListenerFunctor : ::std::unary_function<TPooledConnections::v { OSL_ENSURE(m_pConnectionPool,"No connection pool!"); } - // ----------------------------------------------------------------------------- + void dispose(const Reference<XInterface>& _xComponent) { Reference< XComponent > xComponent(_xComponent, UNO_QUERY); @@ -116,18 +116,18 @@ struct TRemoveEventListenerFunctor : ::std::unary_function<TPooledConnections::v xComponent->dispose(); } } - // ----------------------------------------------------------------------------- + void operator()(const TPooledConnections::value_type& _aValue) { dispose(_aValue); } - // ----------------------------------------------------------------------------- + void operator()(const TActiveConnectionMap::value_type& _aValue) { dispose(_aValue.first); } }; -// ----------------------------------------------------------------------------- + struct TConnectionPoolFunctor : ::std::unary_function<TConnectionMap::value_type,void> { OConnectionPool* m_pConnectionPool; @@ -142,7 +142,7 @@ struct TConnectionPoolFunctor : ::std::unary_function<TConnectionMap::value_type ::std::for_each(_aValue.second.aConnections.begin(),_aValue.second.aConnections.end(),TRemoveEventListenerFunctor(m_pConnectionPool,sal_True)); } }; -// ----------------------------------------------------------------------------- + void OConnectionPool::clear(sal_Bool _bDispose) { MutexGuard aGuard(m_aMutex); @@ -166,7 +166,7 @@ void OConnectionPool::clear(sal_Bool _bDispose) m_xDriverNode.clear(); m_xDriver.clear(); } -//-------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OConnectionPool::getConnectionWithInfo( const OUString& _rURL, const Sequence< PropertyValue >& _rInfo ) throw(SQLException, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -187,7 +187,7 @@ Reference< XConnection > SAL_CALL OConnectionPool::getConnectionWithInfo( const return xConnection; } -//-------------------------------------------------------------------------- + void SAL_CALL OConnectionPool::disposing( const ::com::sun::star::lang::EventObject& Source ) throw (RuntimeException) { Reference<XConnection> xConnection(Source.Source,UNO_QUERY); @@ -208,7 +208,7 @@ void SAL_CALL OConnectionPool::disposing( const ::com::sun::star::lang::EventObj m_xDriverNode.clear(); } } -// ----------------------------------------------------------------------------- + Reference< XConnection> OConnectionPool::createNewConnection(const OUString& _rURL,const Sequence< PropertyValue >& _rInfo) { // create new pooled conenction @@ -241,7 +241,7 @@ Reference< XConnection> OConnectionPool::createNewConnection(const OUString& _rU return xConnection; } -// ----------------------------------------------------------------------------- + void OConnectionPool::invalidatePooledConnections() { MutexGuard aGuard(m_aMutex); @@ -276,7 +276,7 @@ void OConnectionPool::invalidatePooledConnections() if(!m_aPool.empty()) m_xInvalidator->start(); } -// ----------------------------------------------------------------------------- + Reference< XConnection> OConnectionPool::getPooledConnection(TConnectionMap::iterator& _rIter) { Reference<XConnection> xConnection; @@ -299,7 +299,7 @@ Reference< XConnection> OConnectionPool::getPooledConnection(TConnectionMap::ite } return xConnection; } -// ----------------------------------------------------------------------------- + void SAL_CALL OConnectionPool::propertyChange( const PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException) { if(getTimeoutNodeName() == evt.PropertyName) @@ -308,7 +308,7 @@ void SAL_CALL OConnectionPool::propertyChange( const PropertyChangeEvent& evt ) calculateTimeOuts(); } } -// ----------------------------------------------------------------------------- + void OConnectionPool::calculateTimeOuts() { sal_Int32 nTimeOutCorrection = 10; @@ -318,6 +318,6 @@ void OConnectionPool::calculateTimeOuts() m_nTimeOut = m_nALiveCount / nTimeOutCorrection; m_nALiveCount = m_nALiveCount / m_nTimeOut; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/cpool/ZConnectionWrapper.cxx b/connectivity/source/cpool/ZConnectionWrapper.cxx index e9cd16616293..98ec50cc2da3 100644 --- a/connectivity/source/cpool/ZConnectionWrapper.cxx +++ b/connectivity/source/cpool/ZConnectionWrapper.cxx @@ -26,19 +26,19 @@ #include <comphelper/sequence.hxx> using namespace connectivity; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// -------------------------------------------------------------------------------- + OConnectionWeakWrapper::OConnectionWeakWrapper(Reference< XAggregation >& _xConnection) : OConnectionWeakWrapper_BASE(m_aMutex) { setDelegation(_xConnection,m_refCount); OSL_ENSURE(m_xConnection.is(),"OConnectionWeakWrapper: Connection must be valid!"); } -//----------------------------------------------------------------------------- + OConnectionWeakWrapper::~OConnectionWeakWrapper() { if ( !OConnectionWeakWrapper_BASE::rBHelper.bDisposed ) @@ -48,10 +48,10 @@ OConnectionWeakWrapper::~OConnectionWeakWrapper() } } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OConnectionWeakWrapper, "com.sun.star.sdbc.drivers.OConnectionWeakWrapper", "com.sun.star.sdbc.Connection") -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OConnectionWeakWrapper::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -60,7 +60,7 @@ Reference< XStatement > SAL_CALL OConnectionWeakWrapper::createStatement( ) thr return m_xConnection->createStatement(); } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnectionWeakWrapper::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -69,7 +69,7 @@ Reference< XPreparedStatement > SAL_CALL OConnectionWeakWrapper::prepareStatemen return m_xConnection->prepareStatement(sql); } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnectionWeakWrapper::prepareCall( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -78,7 +78,7 @@ Reference< XPreparedStatement > SAL_CALL OConnectionWeakWrapper::prepareCall( co return m_xConnection->prepareCall(sql); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnectionWeakWrapper::nativeSQL( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -87,7 +87,7 @@ OUString SAL_CALL OConnectionWeakWrapper::nativeSQL( const OUString& sql ) throw return m_xConnection->nativeSQL(sql); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnectionWeakWrapper::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -95,7 +95,7 @@ void SAL_CALL OConnectionWeakWrapper::setAutoCommit( sal_Bool autoCommit ) throw m_xConnection->setAutoCommit(autoCommit); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnectionWeakWrapper::getAutoCommit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -104,7 +104,7 @@ sal_Bool SAL_CALL OConnectionWeakWrapper::getAutoCommit( ) throw(SQLException, return m_xConnection->getAutoCommit(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnectionWeakWrapper::commit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -113,7 +113,7 @@ void SAL_CALL OConnectionWeakWrapper::commit( ) throw(SQLException, RuntimeExce m_xConnection->commit(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnectionWeakWrapper::rollback( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -122,14 +122,14 @@ void SAL_CALL OConnectionWeakWrapper::rollback( ) throw(SQLException, RuntimeEx m_xConnection->rollback(); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnectionWeakWrapper::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_xConnection->isClosed(); } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OConnectionWeakWrapper::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -138,7 +138,7 @@ Reference< XDatabaseMetaData > SAL_CALL OConnectionWeakWrapper::getMetaData( ) return m_xConnection->getMetaData(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnectionWeakWrapper::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -147,7 +147,7 @@ void SAL_CALL OConnectionWeakWrapper::setReadOnly( sal_Bool readOnly ) throw(SQL m_xConnection->setReadOnly(readOnly); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnectionWeakWrapper::isReadOnly( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -156,7 +156,7 @@ sal_Bool SAL_CALL OConnectionWeakWrapper::isReadOnly( ) throw(SQLException, Run return m_xConnection->isReadOnly(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnectionWeakWrapper::setCatalog( const OUString& catalog ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -165,7 +165,7 @@ void SAL_CALL OConnectionWeakWrapper::setCatalog( const OUString& catalog ) thro m_xConnection->setCatalog(catalog); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnectionWeakWrapper::getCatalog( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -174,7 +174,7 @@ OUString SAL_CALL OConnectionWeakWrapper::getCatalog( ) throw(SQLException, Run return m_xConnection->getCatalog(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnectionWeakWrapper::setTransactionIsolation( sal_Int32 level ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -183,7 +183,7 @@ void SAL_CALL OConnectionWeakWrapper::setTransactionIsolation( sal_Int32 level ) m_xConnection->setTransactionIsolation(level); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OConnectionWeakWrapper::getTransactionIsolation( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -192,7 +192,7 @@ sal_Int32 SAL_CALL OConnectionWeakWrapper::getTransactionIsolation( ) throw(SQL return m_xConnection->getTransactionIsolation(); } -// -------------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnectionWeakWrapper::getTypeMap( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -201,7 +201,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnectionWeakWr return m_xConnection->getTypeMap(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnectionWeakWrapper::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -210,7 +210,7 @@ void SAL_CALL OConnectionWeakWrapper::setTypeMap( const Reference< ::com::sun::s m_xConnection->setTypeMap(typeMap); } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL OConnectionWeakWrapper::close( ) throw(SQLException, RuntimeException) { @@ -221,7 +221,7 @@ void SAL_CALL OConnectionWeakWrapper::close( ) throw(SQLException, RuntimeExcep } dispose(); } -//------------------------------------------------------------------------------ + void OConnectionWeakWrapper::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -229,7 +229,7 @@ void OConnectionWeakWrapper::disposing() OConnectionWeakWrapper_BASE::disposing(); OConnectionWrapper::disposing(); } -// ----------------------------------------------------------------------------- + // com::sun::star::lang::XUnoTunnel #ifdef N_DEBUG IMPLEMENT_FORWARD_XINTERFACE2(OConnectionWeakWrapper,OConnectionWeakWrapper_BASE,OConnectionWrapper) diff --git a/connectivity/source/cpool/ZDriverWrapper.cxx b/connectivity/source/cpool/ZDriverWrapper.cxx index f039de4934dd..3c3ba05db709 100644 --- a/connectivity/source/cpool/ZDriverWrapper.cxx +++ b/connectivity/source/cpool/ZDriverWrapper.cxx @@ -33,7 +33,7 @@ namespace connectivity //==================================================================== //= ODriverWrapper //==================================================================== - //-------------------------------------------------------------------- + ODriverWrapper::ODriverWrapper( Reference< XAggregation >& _rxAggregateDriver, OConnectionPool* _pPool ) :m_pConnectionPool(_pPool) { @@ -60,7 +60,7 @@ namespace connectivity osl_atomic_decrement( &m_refCount ); } - //-------------------------------------------------------------------- + ODriverWrapper::~ODriverWrapper() { if (m_xDriverAggregate.is()) @@ -71,14 +71,14 @@ namespace connectivity m_pConnectionPool = NULL; } - //-------------------------------------------------------------------- + Any SAL_CALL ODriverWrapper::queryInterface( const Type& _rType ) throw (RuntimeException) { Any aReturn = ODriverWrapper_BASE::queryInterface(_rType); return aReturn.hasValue() ? aReturn : (m_xDriverAggregate.is() ? m_xDriverAggregate->queryAggregation(_rType) : aReturn); } - //-------------------------------------------------------------------- + Reference< XConnection > SAL_CALL ODriverWrapper::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { Reference< XConnection > xConnection; @@ -91,13 +91,13 @@ namespace connectivity return xConnection; } - //-------------------------------------------------------------------- + sal_Bool SAL_CALL ODriverWrapper::acceptsURL( const OUString& url ) throw (SQLException, RuntimeException) { return m_xDriver.is() && m_xDriver->acceptsURL(url); } - //-------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL ODriverWrapper::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { Sequence< DriverPropertyInfo > aInfo; @@ -106,13 +106,13 @@ namespace connectivity return aInfo; } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL ODriverWrapper::getMajorVersion( ) throw (RuntimeException) { return m_xDriver.is() ? m_xDriver->getMajorVersion() : 0; } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL ODriverWrapper::getMinorVersion( ) throw (RuntimeException) { return m_xDriver.is() ? m_xDriver->getMinorVersion() : 0; diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx index 03eb49e15294..30aa321560db 100644 --- a/connectivity/source/cpool/ZPoolCollection.cxx +++ b/connectivity/source/cpool/ZPoolCollection.cxx @@ -42,38 +42,38 @@ using namespace ::com::sun::star::reflection; using namespace ::osl; using namespace connectivity; -//-------------------------------------------------------------------- + static const OUString& getConnectionPoolNodeName() { static OUString s_sNodeName( "org.openoffice.Office.DataAccess/ConnectionPool" ); return s_sNodeName; } -//-------------------------------------------------------------------- + static const OUString& getEnablePoolingNodeName() { static OUString s_sNodeName( "EnablePooling" ); return s_sNodeName; } -//-------------------------------------------------------------------- + static const OUString& getDriverNameNodeName() { static OUString s_sNodeName( "DriverName" ); return s_sNodeName; } -// ----------------------------------------------------------------------------- + static const OUString& getDriverSettingsNodeName() { static OUString s_sNodeName( "DriverSettings" ); return s_sNodeName; } -//-------------------------------------------------------------------------- + static const OUString& getEnableNodeName() { static OUString s_sNodeName( "Enable" ); return s_sNodeName; } -//-------------------------------------------------------------------- + OPoolCollection::OPoolCollection(const Reference< XComponentContext >& _rxContext) :m_xContext(_rxContext) { @@ -95,17 +95,17 @@ OPoolCollection::OPoolCollection(const Reference< XComponentContext >& _rxContex } osl_atomic_decrement( &m_refCount ); } -// ----------------------------------------------------------------------------- + OPoolCollection::~OPoolCollection() { clearConnectionPools(sal_False); } -// ----------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OPoolCollection::getConnection( const OUString& _rURL ) throw(SQLException, RuntimeException) { return getConnectionWithInfo(_rURL,Sequence< PropertyValue >()); } -// ----------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OPoolCollection::getConnectionWithInfo( const OUString& _rURL, const Sequence< PropertyValue >& _rInfo ) throw(SQLException, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -125,19 +125,19 @@ Reference< XConnection > SAL_CALL OPoolCollection::getConnectionWithInfo( const return xConnection; } -// ----------------------------------------------------------------------------- + void SAL_CALL OPoolCollection::setLoginTimeout( sal_Int32 seconds ) throw(RuntimeException) { MutexGuard aGuard(m_aMutex); m_xManager->setLoginTimeout(seconds); } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OPoolCollection::getLoginTimeout( ) throw(RuntimeException) { MutexGuard aGuard(m_aMutex); return m_xManager->getLoginTimeout(); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL OPoolCollection::getImplementationName( ) throw(RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -149,7 +149,7 @@ sal_Bool SAL_CALL OPoolCollection::supportsService( const OUString& _rServiceNam return cppu::supportsService(this, _rServiceName); } -//-------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OPoolCollection::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); @@ -161,20 +161,20 @@ Reference< XInterface > SAL_CALL OPoolCollection::CreateInstance(const Reference return static_cast<XDriverManager*>(new OPoolCollection(comphelper::getComponentContext(_rxFactory))); } -//-------------------------------------------------------------------------- + OUString SAL_CALL OPoolCollection::getImplementationName_Static( ) throw(RuntimeException) { return OUString("com.sun.star.sdbc.OConnectionPool"); } -//-------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OPoolCollection::getSupportedServiceNames_Static( ) throw(RuntimeException) { Sequence< OUString > aSupported(1); aSupported[0] = "com.sun.star.sdbc.ConnectionPool"; return aSupported; } -// ----------------------------------------------------------------------------- + Reference< XDriver > SAL_CALL OPoolCollection::getDriverByURL( const OUString& _rURL ) throw(RuntimeException) { // returns the original driver when no connection pooling is enabled else it returns the proxy @@ -216,7 +216,7 @@ Reference< XDriver > SAL_CALL OPoolCollection::getDriverByURL( const OUString& _ return xDriver; } -// ----------------------------------------------------------------------------- + sal_Bool OPoolCollection::isDriverPoolingEnabled(const OUString& _sDriverImplName, Reference< XInterface >& _rxDriverNode) { @@ -244,7 +244,7 @@ sal_Bool OPoolCollection::isDriverPoolingEnabled(const OUString& _sDriverImplNam } return bEnabled; } -// ----------------------------------------------------------------------------- + sal_Bool OPoolCollection::isPoolingEnabled() { // the config node where all pooling relevant info are stored under @@ -256,14 +256,14 @@ sal_Bool OPoolCollection::isPoolingEnabled() getNodeValue(getEnablePoolingNodeName(),xConnectionPoolRoot) >>= bEnabled; return bEnabled; } -// ----------------------------------------------------------------------------- + Reference<XInterface> OPoolCollection::getConfigPoolRoot() { if(!m_xConfigNode.is()) m_xConfigNode = createWithServiceFactory(getConnectionPoolNodeName()); return m_xConfigNode; } -// ----------------------------------------------------------------------------- + sal_Bool OPoolCollection::isPoolingEnabledByUrl(const OUString& _sUrl, Reference< XDriver >& _rxDriver, OUString& _rsImplName, @@ -285,7 +285,7 @@ sal_Bool OPoolCollection::isPoolingEnabledByUrl(const OUString& _sUrl, } return bEnabled; } -// ----------------------------------------------------------------------------- + void OPoolCollection::clearConnectionPools(sal_Bool _bDispose) { OConnectionPools::const_iterator aIter = m_aPools.begin(); @@ -298,7 +298,7 @@ void OPoolCollection::clearConnectionPools(sal_Bool _bDispose) m_aPools.erase(sKeyValue); } } -// ----------------------------------------------------------------------------- + OConnectionPool* OPoolCollection::getConnectionPool(const OUString& _sImplName, const Reference< XDriver >& _xDriver, const Reference< XInterface >& _xDriverNode) @@ -322,14 +322,14 @@ OConnectionPool* OPoolCollection::getConnectionPool(const OUString& _sImplName, return pRet; } -// ----------------------------------------------------------------------------- + Reference< XInterface > OPoolCollection::createWithServiceFactory(const OUString& _rPath) const { return createWithProvider( com::sun::star::configuration::theDefaultProvider::get(m_xContext), _rPath); } -//------------------------------------------------------------------------ + Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMultiServiceFactory >& _rxConfProvider, const OUString& _rPath) const { @@ -348,7 +348,7 @@ Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMu "::createWithProvider: could not create the node access!"); return xInterface; } -// ----------------------------------------------------------------------------- + Reference<XInterface> OPoolCollection::openNode(const OUString& _rPath,const Reference<XInterface>& _xTreeNode) const throw() { Reference< XHierarchicalNameAccess > xHierarchyAccess(_xTreeNode, UNO_QUERY); @@ -380,7 +380,7 @@ Reference<XInterface> OPoolCollection::openNode(const OUString& _rPath,const Ref } return xNode; } -// ----------------------------------------------------------------------------- + Any OPoolCollection::getNodeValue(const OUString& _rPath,const Reference<XInterface>& _xTreeNode) throw() { Reference< XHierarchicalNameAccess > xHierarchyAccess(_xTreeNode, UNO_QUERY); @@ -405,16 +405,16 @@ Any OPoolCollection::getNodeValue(const OUString& _rPath,const Reference<XInterf } return aReturn; } -// ----------------------------------------------------------------------------- + void SAL_CALL OPoolCollection::queryTermination( const EventObject& /*Event*/ ) throw (::com::sun::star::frame::TerminationVetoException, RuntimeException) { } -// ----------------------------------------------------------------------------- + void SAL_CALL OPoolCollection::notifyTermination( const EventObject& /*Event*/ ) throw (RuntimeException) { clearDesktop(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OPoolCollection::disposing( const EventObject& Source ) throw (RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -442,7 +442,7 @@ void SAL_CALL OPoolCollection::disposing( const EventObject& Source ) throw (Run } } } -// ----------------------------------------------------------------------------- + void SAL_CALL OPoolCollection::propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -495,7 +495,7 @@ void SAL_CALL OPoolCollection::propertyChange( const ::com::sun::star::beans::Pr } } } -// ----------------------------------------------------------------------------- + void OPoolCollection::clearDesktop() { clearConnectionPools(sal_True); @@ -503,7 +503,7 @@ void OPoolCollection::clearDesktop() m_xDesktop->removeTerminateListener(this); m_xDesktop.clear(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/cpool/ZPooledConnection.cxx b/connectivity/source/cpool/ZPooledConnection.cxx index a50d6da70ffc..93469c7a481f 100644 --- a/connectivity/source/cpool/ZPooledConnection.cxx +++ b/connectivity/source/cpool/ZPooledConnection.cxx @@ -42,7 +42,7 @@ OPooledConnection::OPooledConnection(const Reference< XConnection >& _xConnectio { } -// ----------------------------------------------------------------------------- + // OComponentHelper void SAL_CALL OPooledConnection::disposing(void) { @@ -52,13 +52,13 @@ void SAL_CALL OPooledConnection::disposing(void) m_xComponent.clear(); ::comphelper::disposeComponent(m_xRealConnection); } -// ----------------------------------------------------------------------------- + // XEventListener void SAL_CALL OPooledConnection::disposing( const EventObject& /*Source*/ ) throw (RuntimeException) { m_xComponent.clear(); } -// ----------------------------------------------------------------------------- + //XPooledConnection Reference< XConnection > OPooledConnection::getConnection() throw(SQLException, RuntimeException) { @@ -72,6 +72,6 @@ Reference< XConnection > OPooledConnection::getConnection() throw(SQLException, } return Reference< XConnection >(m_xComponent,UNO_QUERY); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/cpool/Zregistration.cxx b/connectivity/source/cpool/Zregistration.cxx index 3d3d657d272a..880190ee9b96 100644 --- a/connectivity/source/cpool/Zregistration.cxx +++ b/connectivity/source/cpool/Zregistration.cxx @@ -33,7 +33,7 @@ using namespace connectivity; extern "C" { -//--------------------------------------------------------------------------------------- + SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbpool2_component_getFactory(const sal_Char* _pImplName, ::com::sun::star::lang::XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/) { void* pRet = NULL; diff --git a/connectivity/source/drivers/ado/ACallableStatement.cxx b/connectivity/source/drivers/ado/ACallableStatement.cxx index 882b1d57bdbd..1823251f88e9 100644 --- a/connectivity/source/drivers/ado/ACallableStatement.cxx +++ b/connectivity/source/drivers/ado/ACallableStatement.cxx @@ -42,108 +42,108 @@ OCallableStatement::OCallableStatement( OConnection* _pConnection,const OTypeInf { m_Command.put_CommandType(adCmdStoredProc); } -// ------------------------------------------------------------------------- + Any SAL_CALL OCallableStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OPreparedStatement::queryInterface(rType); return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< XRow*>(this)); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OCallableStatement::wasNull( ) throw(SQLException, RuntimeException) { return m_aValue.isNull(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OCallableStatement::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL OCallableStatement::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL OCallableStatement::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + double SAL_CALL OCallableStatement::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + float SAL_CALL OCallableStatement::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCallableStatement::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL OCallableStatement::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return (sal_Int64)m_aValue.getCurrency().int64; } -// ------------------------------------------------------------------------- + Any SAL_CALL OCallableStatement::getObject( sal_Int32 /*columnIndex*/, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getObject", *this ); return Any(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL OCallableStatement::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OCallableStatement::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL OCallableStatement::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL OCallableStatement::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { GET_PARAM() return m_aValue; } -// ------------------------------------------------------------------------- + void SAL_CALL OCallableStatement::registerOutParameter( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& /*typeName*/ ) throw(SQLException, RuntimeException) { @@ -155,7 +155,7 @@ void SAL_CALL OCallableStatement::registerOutParameter( sal_Int32 parameterIndex pParam->put_Direction(adParamOutput); } } -// ------------------------------------------------------------------------- + void SAL_CALL OCallableStatement::registerNumericOutParameter( sal_Int32 parameterIndex, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException) { ADOParameter* pParam = NULL; @@ -167,7 +167,7 @@ void SAL_CALL OCallableStatement::registerNumericOutParameter( sal_Int32 paramet pParam->put_NumericScale((sal_Int8)scale); } } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) @@ -175,51 +175,51 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::get ::dbtools::throwFeatureNotImplementedException( "XRow::getBinaryStream", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getCharacterStream", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL OCallableStatement::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getArray", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL OCallableStatement::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getClob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL OCallableStatement::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getBlob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL OCallableStatement::getRef( sal_Int32 /*columnIndex*/) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getRef", *this ); return NULL; } -// ------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + void SAL_CALL OCallableStatement::acquire() throw() { OPreparedStatement::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCallableStatement::release() throw() { OPreparedStatement::release(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx index 01e4aee0640d..0e25ab6d20fa 100644 --- a/connectivity/source/drivers/ado/ACatalog.cxx +++ b/connectivity/source/drivers/ado/ACatalog.cxx @@ -27,23 +27,23 @@ #include <com/sun/star/sdbc/XResultSet.hpp> -// ------------------------------------------------------------------------- + using namespace connectivity; using namespace connectivity::ado; -// ------------------------------------------------------------------------- + OCatalog::OCatalog(_ADOCatalog* _pCatalog,OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon) ,m_aCatalog(_pCatalog) ,m_pConnection(_pCon) { } -// ----------------------------------------------------------------------------- + OCatalog::~OCatalog() { if(m_aCatalog.IsValid()) m_aCatalog.putref_ActiveConnection(NULL); m_aCatalog.clear(); } -// ----------------------------------------------------------------------------- + void OCatalog::refreshTables() { TStringVector aVector; @@ -72,7 +72,7 @@ void OCatalog::refreshTables() else m_pTables = new OTables(this,m_aMutex,aVector,aTables,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } -// ------------------------------------------------------------------------- + void OCatalog::refreshViews() { TStringVector aVector; @@ -85,7 +85,7 @@ void OCatalog::refreshViews() else m_pViews = new OViews(this,m_aMutex,aVector,aViews,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } -// ------------------------------------------------------------------------- + void OCatalog::refreshGroups() { TStringVector aVector; @@ -98,7 +98,7 @@ void OCatalog::refreshGroups() else m_pGroups = new OGroups(this,m_aMutex,aVector,aGroups,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } -// ------------------------------------------------------------------------- + void OCatalog::refreshUsers() { TStringVector aVector; @@ -111,7 +111,7 @@ void OCatalog::refreshUsers() else m_pUsers = new OUsers(this,m_aMutex,aVector,aUsers,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index 1e6ab619f426..96d2e22b19cb 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -53,7 +53,7 @@ void WpADOColumn::Create() pColumn->Release( ); } } -// ------------------------------------------------------------------------- + OAdoColumn::OAdoColumn(sal_Bool _bCase,OConnection* _pConnection,_ADOColumn* _pColumn) : connectivity::sdbcx::OColumn(_bCase) ,m_pConnection(_pConnection) @@ -64,7 +64,7 @@ OAdoColumn::OAdoColumn(sal_Bool _bCase,OConnection* _pConnection,_ADOColumn* _pC // m_aColumn.put_ParentCatalog(_pConnection->getAdoCatalog()->getCatalog()); fillPropertyValues(); } -// ------------------------------------------------------------------------- + OAdoColumn::OAdoColumn(sal_Bool _bCase,OConnection* _pConnection) : connectivity::sdbcx::OColumn(_bCase) ,m_pConnection(_pConnection) @@ -76,7 +76,7 @@ OAdoColumn::OAdoColumn(sal_Bool _bCase,OConnection* _pConnection) m_Type = DataType::OTHER; } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OAdoColumn::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -93,14 +93,14 @@ Sequence< sal_Int8 > OAdoColumn::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OAdoColumn::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : OColumn_ADO::getSomething(rId); } -// ------------------------------------------------------------------------- + void OAdoColumn::construct() { sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY; @@ -108,7 +108,7 @@ void OAdoColumn::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING, nAttrib,&m_IsAscending, ::getBooleanCppuType()); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN), PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(static_cast< OUString*>(0))); } -// ----------------------------------------------------------------------------- + void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception) { if(m_aColumn.IsValid()) @@ -189,7 +189,7 @@ void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r } OColumn_ADO::setFastPropertyValue_NoBroadcast(nHandle,rValue); } -// ----------------------------------------------------------------------------- + void OAdoColumn::fillPropertyValues() { if(m_aColumn.IsValid()) @@ -271,23 +271,23 @@ void OAdoColumn::fillPropertyValues() } } } -// ----------------------------------------------------------------------------- + WpADOColumn OAdoColumn::getColumnImpl() const { return m_aColumn; } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + void SAL_CALL OAdoColumn::acquire() throw() { OColumn_ADO::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoColumn::release() throw() { OColumn_ADO::release(); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx index 68063f1d9e6f..08dda621be35 100644 --- a/connectivity/source/drivers/ado/AColumns.cxx +++ b/connectivity/source/drivers/ado/AColumns.cxx @@ -47,17 +47,17 @@ sdbcx::ObjectType OColumns::createObject(const OUString& _rName) return new OAdoColumn(isCaseSensitive(),m_pConnection,m_aCollection.GetItem(_rName)); } -// ------------------------------------------------------------------------- + void OColumns::impl_refresh() throw(RuntimeException) { m_aCollection.Refresh(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OColumns::createDescriptor() { return new OAdoColumn(isCaseSensitive(),m_pConnection); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) { @@ -125,14 +125,14 @@ sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPro return new OAdoColumn(isCaseSensitive(),m_pConnection,pColumn->getColumnImpl()); } -// ------------------------------------------------------------------------- + // XDrop void OColumns::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { if(!m_aCollection.Delete(_sElementName)) ADOS::ThrowException(*m_pConnection->getConnection(),static_cast<XTypeProvider*>(this)); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 5dc84766b7a7..31768d537141 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -43,9 +43,9 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -//------------------------------------------------------------------------------ + IMPLEMENT_SERVICE_INFO(OConnection,"com.sun.star.sdbcx.AConnection","com.sun.star.sdbc.Connection"); -// -------------------------------------------------------------------------------- + OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeException) : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this), m_xCatalog(NULL), @@ -92,11 +92,11 @@ OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeExcepti osl_atomic_decrement( &m_refCount ); } -//----------------------------------------------------------------------------- + OConnection::~OConnection() { } -//----------------------------------------------------------------------------- + void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& info) { osl_atomic_increment( &m_refCount ); @@ -157,12 +157,12 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& } osl_atomic_decrement( &m_refCount ); } -//----------------------------------------------------------------------------- + void SAL_CALL OConnection::release() throw() { relase_ChildImpl(); } -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -173,7 +173,7 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLExcep m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return pStmt; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -185,7 +185,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return xPStmt; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -197,7 +197,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUStrin m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return xPStmt; } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::nativeSQL( const OUString& _sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -218,7 +218,7 @@ OUString SAL_CALL OConnection::nativeSQL( const OUString& _sql ) throw(SQLExcept return sql; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -231,7 +231,7 @@ void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLExcepti else m_pAdoConnection->RollbackTrans(); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -240,7 +240,7 @@ sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeExce return m_bAutocommit; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -249,7 +249,7 @@ void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException) m_pAdoConnection->CommitTrans(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -258,14 +258,14 @@ void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException) m_pAdoConnection->RollbackTrans(); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return OConnection_BASE::rBHelper.bDisposed && !m_pAdoConnection->get_State(); } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -281,7 +281,7 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx return xMetaData; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -292,7 +292,7 @@ void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, m_pAdoConnection->put_Mode(readOnly ? adModeRead : adModeReadWrite); ADOS::ThrowException(*m_pAdoConnection,*this); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -301,7 +301,7 @@ sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeExcepti return m_pAdoConnection->get_Mode() == adModeRead; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setCatalog( const OUString& catalog ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -310,7 +310,7 @@ void SAL_CALL OConnection::setCatalog( const OUString& catalog ) throw(SQLExcept m_pAdoConnection->PutDefaultDatabase(catalog); ADOS::ThrowException(*m_pAdoConnection,*this); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -318,7 +318,7 @@ OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeExcepti return m_pAdoConnection->GetDefaultDatabase(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -350,7 +350,7 @@ void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLE m_pAdoConnection->put_IsolationLevel(eIso); ADOS::ThrowException(*m_pAdoConnection,*this); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -381,7 +381,7 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, ADOS::ThrowException(*m_pAdoConnection,*this); return nRet; } -// -------------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -390,12 +390,12 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getT return NULL; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setTypeMap", *this ); } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) { @@ -406,17 +406,17 @@ void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL OConnection::getWarnings( ) throw(SQLException, RuntimeException) { return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException) { } -//-------------------------------------------------------------------- + void OConnection::buildTypeInfo() throw( SQLException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -475,7 +475,7 @@ void OConnection::buildTypeInfo() throw( SQLException) pRecordset->Release(); } } -//------------------------------------------------------------------------------ + void OConnection::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -500,7 +500,7 @@ void OConnection::disposing() dispose_ChildImpl(); } -// ----------------------------------------------------------------------------- + sal_Int64 SAL_CALL OConnection::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw (::com::sun::star::uno::RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) @@ -509,7 +509,7 @@ sal_Int64 SAL_CALL OConnection::getSomething( const ::com::sun::star::uno::Seque : OConnection_BASE::getSomething(rId); } -// ----------------------------------------------------------------------------- + Sequence< sal_Int8 > OConnection::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -524,7 +524,7 @@ Sequence< sal_Int8 > OConnection::getUnoTunnelImplementationId() } return pId->getImplementationId(); } -// ----------------------------------------------------------------------------- + const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, DataTypeEnum _nType, const OUString& _sTypeName, @@ -615,7 +615,7 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r // OSL_ENSURE(pTypeInfo, "getTypeInfoFromType: no type info found for this type!"); return pTypeInfo; } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx index cfbe22524fcd..847b1dd1359b 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx @@ -45,7 +45,7 @@ ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) ,m_pConnection(_pCon) { } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::getInt32Property(const OUString& _aProperty) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { connectivity::ado::WpADOProperties aProps(m_pADOConnection->get_Properties()); @@ -58,7 +58,7 @@ sal_Int32 ODatabaseMetaData::getInt32Property(const OUString& _aProperty) throw return nValue; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::getBoolProperty(const OUString& _aProperty) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { connectivity::ado::WpADOProperties aProps(m_pADOConnection->get_Properties()); @@ -67,7 +67,7 @@ sal_Bool ODatabaseMetaData::getBoolProperty(const OUString& _aProperty) throw(: ADO_PROP(_aProperty); return (!aVar.isNull() && !aVar.isEmpty() ? aVar.getBool() : sal_False); } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::getStringProperty(const OUString& _aProperty) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { connectivity::ado::WpADOProperties aProps(m_pADOConnection->get_Properties()); @@ -81,7 +81,7 @@ OUString ODatabaseMetaData::getStringProperty(const OUString& _aProperty) throw return aValue; } -// ------------------------------------------------------------------------- + Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) { ADORecordset *pRecordset = m_pADOConnection->getTypeInfo(); @@ -91,7 +91,7 @@ Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) Reference< XResultSet > xRef = pResult; return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException) { OLEVariant vtEmpty; @@ -109,12 +109,12 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs( ) throw(SQLExc return xRef; } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( ) { return getLiteral(DBLITERAL_CATALOG_SEPARATOR); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException) { OLEVariant vtEmpty; @@ -131,7 +131,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas( ) throw(SQLExce xRef = pResult; return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( const Any& catalog, const OUString& schema, const OUString& table, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -146,7 +146,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( xRef = pResult; return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -162,7 +162,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const Sequence< OUString >& types ) throw(SQLException, RuntimeException) @@ -178,7 +178,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -194,7 +194,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ) throw(SQLException, RuntimeException) @@ -211,67 +211,67 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( return xRef; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_BINARY_LITERAL); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Maximum Row Size")); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_CATALOG_NAME); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_CHAR_LITERAL); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_COLUMN_NAME); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_CURSOR_NAME); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Active Sessions")); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Max Columns in Table")); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_TEXT_COMMAND); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_TABLE_NAME); } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { return getInt32Property(OUString("Maximum Tables in SELECT")); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -285,7 +285,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -300,7 +300,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -315,7 +315,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( const Any& catalog, const OUString& schema, const OUString& table, sal_Bool unique, sal_Bool approximate ) throw(SQLException, RuntimeException) @@ -331,7 +331,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern ) throw(SQLException, RuntimeException) { @@ -384,7 +384,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( const Any& primaryCatalog, const OUString& primarySchema, const OUString& primaryTable, const Any& foreignCatalog, @@ -401,138 +401,138 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( return xRef; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { return getBoolProperty(OUString("Maximum Row Size Includes BLOB")); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_LOWER) == DBPROPVAL_IC_LOWER ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_LOWER) == DBPROPVAL_IC_LOWER ; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_UPPER) == DBPROPVAL_IC_UPPER ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_UPPER) == DBPROPVAL_IC_UPPER ; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Maximum Index Size")); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("NULL Concatenation Behavior")) == DBPROPVAL_CB_NON_NULL; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { return getStringProperty(OUString("Catalog Term")); } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { return getLiteral(DBLITERAL_QUOTE_PREFIX); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { return isCapable(DBLITERAL_CORRELATION_NAME); } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { return getInt32Property(OUString("Catalog Location")) == DBPROPVAL_CL_START; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Transaction DDL")) == DBPROPVAL_TC_DDL_IGNORE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Transaction DDL")) == DBPROPVAL_TC_DDL_COMMIT; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Transaction DDL")) == DBPROPVAL_TC_DML; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Transaction DDL")) == DBPROPVAL_TC_ALL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Prepare Abort Behavior")) == DBPROPVAL_CB_PRESERVE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Prepare Commit Behavior")) == DBPROPVAL_CB_PRESERVE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Isolation Retention")) & DBPROPVAL_TR_COMMIT) == DBPROPVAL_TR_COMMIT; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Isolation Retention")) & DBPROPVAL_TR_ABORT) == DBPROPVAL_TR_ABORT; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException) { sal_Bool bValue(sal_False); @@ -551,323 +551,323 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int3 return bValue; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { return (getInt32Property(OUString("Schema Usage")) & DBPROPVAL_SU_DML_STATEMENTS) == DBPROPVAL_SU_DML_STATEMENTS; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { sal_Int32 nProp = getInt32Property(OUString("SQL Support")); return (nProp == 512) || ((nProp & DBPROPVAL_SQL_ANSI92_FULL) == DBPROPVAL_SQL_ANSI92_FULL); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { sal_Int32 nProp = getInt32Property(OUString("SQL Support")); return (nProp == 512) || ((nProp & DBPROPVAL_SQL_ANSI92_ENTRY) == DBPROPVAL_SQL_ANSI92_ENTRY); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { sal_Int32 nProp = getInt32Property(OUString("SQL Support")); return (nProp == 512) || ((nProp & DBPROPVAL_SQL_ANSI89_IEF) == DBPROPVAL_SQL_ANSI89_IEF); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Schema Usage")) & DBPROPVAL_SU_INDEX_DEFINITION) == DBPROPVAL_SU_INDEX_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { return (getInt32Property(OUString("Schema Usage")) & DBPROPVAL_SU_TABLE_DEFINITION) == DBPROPVAL_SU_TABLE_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { if ( ADOS::isJetEngine(m_pConnection->getEngineType()) ) return sal_True; return getBoolProperty(OUString("Outer Join Capabilities")); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { return new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes); } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( ) { return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_PROCEDURE_NAME); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_SCHEMA_NAME); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Transaction DDL")) == DBPROPVAL_TC_NONE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { return getBoolProperty(OUString("Read-Only Data Source")); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("NULL Concatenation Behavior")) == DBPROPVAL_CB_NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { return isCapable(DBLITERAL_COLUMN_ALIAS); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { return isCapable(DBLITERAL_CORRELATION_NAME); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 /*fromType*/, sal_Int32 /*toType*/ ) throw(SQLException, RuntimeException) { return getBoolProperty(OUString("Rowset Conversions on Command")); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { return getBoolProperty(OUString("ORDER BY Columns in Select List")); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("GROUP BY Support")) != DBPROPVAL_GB_NOT_SUPPORTED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("GROUP BY Support")) != DBPROPVAL_GB_CONTAINS_SELECT; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("GROUP BY Support")) == DBPROPVAL_GB_NO_RELATION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { return isCapable(DBLITERAL_ESCAPE_PERCENT); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { return getBoolProperty(OUString("ORDER BY Columns in Select List")); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("NULL Collation Order")) & DBPROPVAL_NC_END) == DBPROPVAL_NC_END; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("NULL Collation Order")) & DBPROPVAL_NC_START) == DBPROPVAL_NC_START; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("NULL Collation Order")) & DBPROPVAL_NC_HIGH) == DBPROPVAL_NC_HIGH; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("NULL Collation Order")) & DBPROPVAL_NC_LOW) == DBPROPVAL_NC_LOW; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Schema Usage")) & DBPROPVAL_SU_PRIVILEGE_DEFINITION) == DBPROPVAL_SU_PRIVILEGE_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Subquery Support")) & DBPROPVAL_SQ_CORRELATEDSUBQUERIES) == DBPROPVAL_SQ_CORRELATEDSUBQUERIES; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Subquery Support")) & DBPROPVAL_SQ_COMPARISON) == DBPROPVAL_SQ_COMPARISON; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Subquery Support")) & DBPROPVAL_SQ_EXISTS) == DBPROPVAL_SQ_EXISTS; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Subquery Support")) & DBPROPVAL_SQ_IN) == DBPROPVAL_SQ_IN; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { return (getInt32Property(OUString("Subquery Support")) & DBPROPVAL_SQ_QUANTIFIED) == DBPROPVAL_SQ_QUANTIFIED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { sal_Int32 nProp = getInt32Property(OUString("SQL Support")); return (nProp == 512) || ((nProp & DBPROPVAL_SQL_ANSI92_INTERMEDIATE) == DBPROPVAL_SQL_ANSI92_INTERMEDIATE); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { return OUString("sdbc:ado:")+ m_pADOConnection->GetConnectionString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { return getStringProperty(OUString("User Name")); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { return getStringProperty(OUString("Provider Friendly Name")); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverVersion( ) throw(SQLException, RuntimeException) { return getStringProperty(OUString("Provider Version")); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { return getStringProperty(OUString("DBMS Version")); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { return getStringProperty(OUString("DBMS Name")); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { return getStringProperty(OUString("Procedure Term")); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { return getStringProperty(OUString("Schema Term")); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { return 1; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { sal_Int32 nRet = TransactionIsolation::NONE; @@ -890,12 +890,12 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(S } return nRet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { ADORecordset *pRecordset = NULL; @@ -925,151 +925,151 @@ OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, Runt } return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { return getLiteral(DBLITERAL_ESCAPE_PERCENT); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue.copy(0,aValue.lastIndexOf(',')); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue.copy(0,aValue.lastIndexOf(',')); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { sal_Int32 nProp = getInt32Property(OUString("SQL Support")); return (nProp == 512) || ((nProp & DBPROPVAL_SQL_ODBC_EXTENDED) == DBPROPVAL_SQL_ODBC_EXTENDED); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { sal_Int32 nProp = getInt32Property(OUString("SQL Support")); return (nProp == 512) || ((nProp & DBPROPVAL_SQL_ODBC_CORE) == DBPROPVAL_SQL_ODBC_CORE); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { sal_Int32 nProp = getInt32Property(OUString("SQL Support")); return (nProp == 512) || ((nProp & DBPROPVAL_SQL_ODBC_MINIMUM) == DBPROPVAL_SQL_ODBC_MINIMUM); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { if ( ADOS::isJetEngine(m_pConnection->getEngineType()) ) return sal_True; return (getInt32Property(OUString("Outer Join Capabilities")) & 0x00000004L) == 0x00000004L; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { return supportsFullOuterJoins( ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Max Columns in GROUP BY")); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { return getInt32Property(OUString("Max Columns in ORDER BY")); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_USER_NAME); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 /*setType*/, sal_Int32 /*concurrency*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY != setType; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XDatabaseMetaData::getUDTs", *this ); return Reference< XResultSet >(); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx index 1fa5f97f92be..100c1ae27e2e 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::uno; -// ------------------------------------------------------------------------- + void ODatabaseMetaData::fillLiterals() { ADORecordset *pRecordset = NULL; @@ -78,7 +78,7 @@ void ODatabaseMetaData::fillLiterals() aRecordset.Close(); } } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::getMaxSize(sal_uInt32 _nId) { if(!m_aLiteralInfo.size()) @@ -90,7 +90,7 @@ sal_Int32 ODatabaseMetaData::getMaxSize(sal_uInt32 _nId) nSize = (static_cast<sal_Int32>((*aIter).second.cchMaxLen) == (-1)) ? 0 : (*aIter).second.cchMaxLen; return nSize; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::isCapable(sal_uInt32 _nId) { if(!m_aLiteralInfo.size()) @@ -102,7 +102,7 @@ sal_Bool ODatabaseMetaData::isCapable(sal_uInt32 _nId) return bSupported; } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::getLiteral(sal_uInt32 _nId) { if(!m_aLiteralInfo.size()) @@ -113,8 +113,8 @@ OUString ODatabaseMetaData::getLiteral(sal_uInt32 _nId) sStr = (*aIter).second.pwszLiteralValue; return sStr; } -// ----------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + void ODatabaseMetaDataResultSetMetaData::setColumnPrivilegesMap() { m_mColumns[8] = OColumn(OUString(),OUString("IS_GRANTABLE"), @@ -122,7 +122,7 @@ void ODatabaseMetaDataResultSetMetaData::setColumnPrivilegesMap() 3,3,0, DataType::VARCHAR); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setColumnsMap() { m_mColumns[6] = OColumn(OUString(),OUString("TYPE_NAME"), @@ -154,7 +154,7 @@ void ODatabaseMetaDataResultSetMetaData::setColumnsMap() 1,1,0, DataType::INTEGER); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setTablesMap() { m_mColumns[5] = OColumn(OUString(),OUString("REMARKS"), @@ -162,7 +162,7 @@ void ODatabaseMetaDataResultSetMetaData::setTablesMap() 0,0,0, DataType::VARCHAR); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setProcedureColumnsMap() { m_mColumns[12] = OColumn(OUString(),OUString("NULLABLE"), @@ -170,7 +170,7 @@ void ODatabaseMetaDataResultSetMetaData::setProcedureColumnsMap() 1,1,0, DataType::INTEGER); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setPrimaryKeysMap() { m_mColumns[5] = OColumn(OUString(),OUString("KEY_SEQ"), @@ -182,7 +182,7 @@ void ODatabaseMetaDataResultSetMetaData::setPrimaryKeysMap() 0,0,0, DataType::VARCHAR); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setIndexInfoMap() { m_mColumns[4] = OColumn(OUString(),OUString("NON_UNIQUE"), @@ -198,7 +198,7 @@ void ODatabaseMetaDataResultSetMetaData::setIndexInfoMap() 0,0,0, DataType::VARCHAR); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setTablePrivilegesMap() { m_mColumns[6] = OColumn(OUString(),OUString("PRIVILEGE"), @@ -210,7 +210,7 @@ void ODatabaseMetaDataResultSetMetaData::setTablePrivilegesMap() 0,0,0, DataType::VARCHAR); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setCrossReferenceMap() { m_mColumns[9] = OColumn(OUString(),OUString("KEY_SEQ"), @@ -218,7 +218,7 @@ void ODatabaseMetaDataResultSetMetaData::setCrossReferenceMap() 1,1,0, DataType::INTEGER); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setTypeInfoMap() { m_mColumns[3] = OColumn(OUString(),OUString("PRECISION"), @@ -246,7 +246,7 @@ void ODatabaseMetaDataResultSetMetaData::setTypeInfoMap() 1,1,0, DataType::INTEGER); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSetMetaData::setProceduresMap() { m_mColumns[7] = OColumn(OUString(),OUString("REMARKS"), @@ -254,49 +254,49 @@ void ODatabaseMetaDataResultSetMetaData::setProceduresMap() 0,0,0, DataType::VARCHAR); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.isSearchable(); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.isAutoIncrement(); return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getColumnServiceName(); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getTableName(); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getCatalogName(); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getColumnTypeName(); return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -304,7 +304,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32 return (*m_mColumnsIter).second.isCaseSensitive(); return sal_True; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -312,8 +312,8 @@ OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getSchemaName( sal_Int32 c return (*m_mColumnsIter).second.getSchemaName(); return OUString(); } -// ----------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + ObjectTypeEnum OAdoGroup::MapObjectType(sal_Int32 _ObjType) { ObjectTypeEnum eNumType= adPermObjTable; @@ -330,7 +330,7 @@ ObjectTypeEnum OAdoGroup::MapObjectType(sal_Int32 _ObjType) } return eNumType; } -// ------------------------------------------------------------------------- + sal_Int32 OAdoGroup::MapRight(RightsEnum _eNum) { sal_Int32 nRight = 0; @@ -355,7 +355,7 @@ sal_Int32 OAdoGroup::MapRight(RightsEnum _eNum) return nRight; } -// ------------------------------------------------------------------------- + RightsEnum OAdoGroup::Map2Right(sal_Int32 _eNum) { sal_Int32 nRight = adRightNone; @@ -388,7 +388,7 @@ RightsEnum OAdoGroup::Map2Right(sal_Int32 _eNum) return (RightsEnum)nRight; } -// ------------------------------------------------------------------------- + void WpADOIndex::Create() { _ADOIndex* pIndex = NULL; @@ -405,7 +405,7 @@ void WpADOIndex::Create() pIndex->Release(); } } -// ------------------------------------------------------------------------- + void OAdoIndex::fillPropertyValues() { if(m_aIndex.IsValid()) @@ -416,7 +416,7 @@ void OAdoIndex::fillPropertyValues() m_IsClustered = m_aIndex.get_Clustered(); } } -// ----------------------------------------------------------------------------- + void WpADOKey::Create() { _ADOKey* pKey = NULL; @@ -433,7 +433,7 @@ void WpADOKey::Create() pKey->Release(); } } -// ------------------------------------------------------------------------- + void OAdoKey::fillPropertyValues() { if(m_aKey.IsValid()) @@ -445,7 +445,7 @@ void OAdoKey::fillPropertyValues() m_aProps->m_DeleteRule = MapRule(m_aKey.get_DeleteRule()); } } -// ------------------------------------------------------------------------- + sal_Int32 OAdoKey::MapRule(const RuleEnum& _eNum) { sal_Int32 eNum = KeyRule::NO_ACTION; @@ -466,7 +466,7 @@ sal_Int32 OAdoKey::MapRule(const RuleEnum& _eNum) } return eNum; } -// ------------------------------------------------------------------------- + RuleEnum OAdoKey::Map2Rule(const sal_Int32& _eNum) { RuleEnum eNum = adRINone; @@ -487,7 +487,7 @@ RuleEnum OAdoKey::Map2Rule(const sal_Int32& _eNum) } return eNum; } -// ------------------------------------------------------------------------- + sal_Int32 OAdoKey::MapKeyRule(const KeyTypeEnum& _eNum) { sal_Int32 nKeyType = KeyType::PRIMARY; @@ -505,7 +505,7 @@ sal_Int32 OAdoKey::MapKeyRule(const KeyTypeEnum& _eNum) } return nKeyType; } -// ------------------------------------------------------------------------- + KeyTypeEnum OAdoKey::Map2KeyRule(const sal_Int32& _eNum) { KeyTypeEnum eNum( adKeyPrimary ); @@ -525,7 +525,7 @@ KeyTypeEnum OAdoKey::Map2KeyRule(const sal_Int32& _eNum) } return eNum; } -// ----------------------------------------------------------------------------- + void WpADOTable::Create() { _ADOTable* pTable = NULL; @@ -542,7 +542,7 @@ void WpADOTable::Create() pTable->Release(); } } -// ------------------------------------------------------------------------- + OUString WpADOCatalog::GetObjectOwner(const OUString& _rName, ObjectTypeEnum _eNum) { OLEVariant _rVar; @@ -552,7 +552,7 @@ OUString WpADOCatalog::GetObjectOwner(const OUString& _rName, ObjectTypeEnum _eN pInterface->GetObjectOwner(sStr1,_eNum,_rVar,&aBSTR); return aBSTR; } -// ----------------------------------------------------------------------------- + void OAdoTable::fillPropertyValues() { if(m_aTable.IsValid()) @@ -571,7 +571,7 @@ void OAdoTable::fillPropertyValues() } } } -// ----------------------------------------------------------------------------- + void WpADOUser::Create() { _ADOUser* pUser = NULL; @@ -588,7 +588,7 @@ void WpADOUser::Create() pUser->Release(); } } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx index 74ccdee09ec3..36caa9a53f3e 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx @@ -41,14 +41,14 @@ using namespace dbtools; using namespace connectivity::ado; using namespace cppu; using namespace ::comphelper; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::lang; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(ADORecordset* _pRecordSet) :ODatabaseMetaDataResultSet_BASE(m_aMutex) ,OPropertySetHelper(ODatabaseMetaDataResultSet_BASE::rBHelper) @@ -75,13 +75,13 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(ADORecordset* _pRecordSet // allocBuffer(); } -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet() { if(m_pRecordSet) m_pRecordSet->Release(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::disposing(void) { OPropertySetHelper::disposing(); @@ -92,13 +92,13 @@ void ODatabaseMetaDataResultSet::disposing(void) m_aStatement = NULL; m_xMetaData.clear(); } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); return aRet.hasValue() ? aRet : ODatabaseMetaDataResultSet_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), @@ -107,13 +107,13 @@ Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) th return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } -// ----------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::checkRecordSet() throw(SQLException) { if(!m_pRecordSet) throwFunctionSequenceException(*this); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { @@ -136,7 +136,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const OUString& colum return 0; // Never reached } #define BLOCK_SIZE 256 -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -179,14 +179,14 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResult return NULL; return new SequenceInputStream(m_aValue); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getCharacterStream", *this ); return NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -199,7 +199,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex } return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL ODatabaseMetaDataResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -218,31 +218,31 @@ sal_Int8 SAL_CALL ODatabaseMetaDataResultSet::getByte( sal_Int32 columnIndex ) t return m_aValue; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL ODatabaseMetaDataResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + double SAL_CALL ODatabaseMetaDataResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + float SAL_CALL ODatabaseMetaDataResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -262,21 +262,21 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getInt( sal_Int32 columnIndex ) t return m_aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getRow( ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XResultSet::getRow", *this ); return 0; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL ODatabaseMetaDataResultSet::getLong( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getLong", *this ); return sal_Int64(0); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData( ) throw(SQLException, RuntimeException) { @@ -291,34 +291,34 @@ Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData return m_xMetaData; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getRow", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getRow", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getRow", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getRow", *this ); return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { @@ -331,7 +331,7 @@ Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 columnIndex, const columnIndex = mapColumn(columnIndex); return Any(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -350,7 +350,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) return m_aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -368,21 +368,21 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) return m_aValue; } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL ODatabaseMetaDataResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL ODatabaseMetaDataResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { @@ -396,7 +396,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isAfterLast( ) throw(SQLException m_pRecordSet->get_EOF(&bIsAtEOF); return bIsAtEOF == VARIANT_TRUE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -407,7 +407,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, Ru return m_nRowPos == 1; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -418,7 +418,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, Run return sal_True; } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -430,7 +430,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, Ru if(first()) previous(); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::afterLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -443,7 +443,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::afterLast( ) throw(SQLException, Runt next(); m_bEOF = sal_True; } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeException) { @@ -454,7 +454,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeE } dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, RuntimeException) { @@ -470,7 +470,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, Runt m_nRowPos = 1; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, RuntimeException) { @@ -480,7 +480,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, Runti return m_pRecordSet && SUCCEEDED(m_pRecordSet->MoveLast()) ? sal_True : sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -498,7 +498,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 row ) throw(SQ } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -515,7 +515,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 row ) throw(SQ m_nRowPos += row; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -530,12 +530,12 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, R --m_nRowPos; return bRet; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) throw(SQLException, RuntimeException) { return m_aStatement.get(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, RuntimeException) { @@ -549,7 +549,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, m_pRecordSet->get_Status((sal_Int32*)&eRec); return (eRec & adRecDeleted) == adRecDeleted; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed); @@ -561,7 +561,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException m_pRecordSet->get_Status((sal_Int32*)&eRec); return (eRec & adRecNew) == adRecNew; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -574,7 +574,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, m_pRecordSet->get_Status((sal_Int32*)&eRec); return (eRec & adRecModified) == adRecModified; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { @@ -589,7 +589,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst( ) throw(SQLExcepti m_pRecordSet->get_BOF(&bIsAtBOF); return bIsAtBOF == VARIANT_TRUE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, RuntimeException) { @@ -608,7 +608,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, Runti else return SUCCEEDED(m_pRecordSet->MoveNext()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -620,7 +620,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::wasNull( ) throw(SQLException, Ru return m_aValue.isNull(); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::refreshRow( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -631,7 +631,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::refreshRow( ) throw(SQLException, Run m_pRecordSet->Resync(adAffectCurrent,adResyncAllValues); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::cancel( ) throw(RuntimeException) { @@ -643,34 +643,34 @@ void SAL_CALL ODatabaseMetaDataResultSet::cancel( ) throw(RuntimeException) m_pRecordSet->Cancel(); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::getWarnings( ) throw(SQLException, RuntimeException) { return Any(); } -//------------------------------------------------------------------------------ + sal_Int32 ODatabaseMetaDataResultSet::getResultSetConcurrency() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return ResultSetConcurrency::READ_ONLY; } -//------------------------------------------------------------------------------ + sal_Int32 ODatabaseMetaDataResultSet::getResultSetType() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return ResultSetType::FORWARD_ONLY; } -//------------------------------------------------------------------------------ + sal_Int32 ODatabaseMetaDataResultSet::getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return FetchDirection::FORWARD; } -//------------------------------------------------------------------------------ + sal_Int32 ODatabaseMetaDataResultSet::getFetchSize() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -679,27 +679,27 @@ sal_Int32 ODatabaseMetaDataResultSet::getFetchSize() const m_pRecordSet->get_CacheSize(&nValue); return nValue; } -//------------------------------------------------------------------------------ + OUString ODatabaseMetaDataResultSet::getCursorName() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return OUString(); } -//------------------------------------------------------------------------------ + void ODatabaseMetaDataResultSet::setFetchDirection(sal_Int32 /*_par0*/) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "ResultSet::FetchDirection", *this ); } -//------------------------------------------------------------------------------ + void ODatabaseMetaDataResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { if(m_pRecordSet) m_pRecordSet->put_CacheSize(_par0); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* ODatabaseMetaDataResultSet::createArrayHelper( ) const { @@ -714,12 +714,12 @@ void ODatabaseMetaDataResultSet::setFetchSize(sal_Int32 _par0) return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & ODatabaseMetaDataResultSet::getInfoHelper() { return *const_cast<ODatabaseMetaDataResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaDataResultSet::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, @@ -742,7 +742,7 @@ sal_Bool ODatabaseMetaDataResultSet::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& /*rValue*/ @@ -761,7 +761,7 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast( OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!"); } } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle @@ -786,7 +786,7 @@ void ODatabaseMetaDataResultSet::getFastPropertyValue( break; } } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setProceduresMap() { @@ -808,21 +808,21 @@ void ODatabaseMetaDataResultSet::setProceduresMap() pMetaData->setProceduresMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setCatalogsMap() { m_aColMapping.push_back(1); m_xMetaData = new ODatabaseMetaDataResultSetMetaData(m_pRecordSet,this); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setSchemasMap() { m_aColMapping.push_back(2); m_xMetaData = new ODatabaseMetaDataResultSetMetaData(m_pRecordSet,this); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setColumnPrivilegesMap() { @@ -838,7 +838,7 @@ void ODatabaseMetaDataResultSet::setColumnPrivilegesMap() pMetaData->setColumnPrivilegesMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setColumnsMap() { @@ -915,7 +915,7 @@ void ODatabaseMetaDataResultSet::setColumnsMap() pMetaData->setColumnsMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setTablesMap() { @@ -927,7 +927,7 @@ void ODatabaseMetaDataResultSet::setTablesMap() pMetaData->setTablesMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setProcedureColumnsMap() { @@ -994,7 +994,7 @@ void ODatabaseMetaDataResultSet::setProcedureColumnsMap() pMetaData->setProcedureColumnsMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setPrimaryKeysMap() { @@ -1008,7 +1008,7 @@ void ODatabaseMetaDataResultSet::setPrimaryKeysMap() pMetaData->setProcedureColumnsMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setIndexInfoMap() { @@ -1050,7 +1050,7 @@ void ODatabaseMetaDataResultSet::setIndexInfoMap() pMetaData->setIndexInfoMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setTablePrivilegesMap() { @@ -1072,7 +1072,7 @@ void ODatabaseMetaDataResultSet::setTablePrivilegesMap() pMetaData->setTablePrivilegesMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setCrossReferenceMap() { @@ -1103,7 +1103,7 @@ void ODatabaseMetaDataResultSet::setCrossReferenceMap() pMetaData->setCrossReferenceMap(); m_xMetaData = pMetaData; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setTypeInfoMap(sal_Bool _bJetEngine) { sal_Int32 i=1; @@ -1181,22 +1181,22 @@ void ODatabaseMetaDataResultSet::setTypeInfoMap(sal_Bool _bJetEngine) pMetaData->setTypeInfoMap(); m_xMetaData = pMetaData; } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::acquire() throw() { ODatabaseMetaDataResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::release() throw() { ODatabaseMetaDataResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL ODatabaseMetaDataResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + OLEVariant ODatabaseMetaDataResultSet::getValue(sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1208,7 +1208,7 @@ OLEVariant ODatabaseMetaDataResultSet::getValue(sal_Int32 columnIndex ) throw(SQ aField.get_Value(m_aValue); return m_aValue; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx index e0905ed37f02..011e347625d4 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx @@ -29,13 +29,13 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSetMetaData::~ODatabaseMetaDataResultSetMetaData() { if(m_pRecordSet) m_pRecordSet->Release(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException) { sal_Int32 nSize = 0; @@ -49,7 +49,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( sal } return nSize; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -63,7 +63,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnType( sal_Int32 } return nType; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { @@ -81,7 +81,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnCount( ) throw( m_nColCount = aFields.GetItemCount(); return m_nColCount; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -95,14 +95,14 @@ OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnName( sal_Int32 c return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getColumnLabel(); return getColumnName(column); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -117,7 +117,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCurrency( sal_Int32 colu } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException) @@ -133,7 +133,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isSigned( sal_Int32 column } return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) @@ -145,7 +145,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getPrecision( sal_Int32 c return aField.GetPrecision(); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) @@ -159,7 +159,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getScale( sal_Int32 colum return aField.GetNumericScale(); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -176,7 +176,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::isNullable( sal_Int32 col } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -193,7 +193,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isReadOnly( sal_Int32 colu } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -211,14 +211,14 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isDefinitelyWritable( sal_ return sal_False; ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.isWritable(); return isDefinitelyWritable(column); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx index 3daa811fcf14..0f4958bca242 100644 --- a/connectivity/source/drivers/ado/ADriver.cxx +++ b/connectivity/source/drivers/ado/ADriver.cxx @@ -39,8 +39,8 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- + + ODriver::ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB) : ODriver_BASE(m_aMutex) ,m_xORB(_xORB) @@ -53,13 +53,13 @@ ODriver::ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang: ++h; } } -// ------------------------------------------------------------------------- + ODriver::~ODriver() { CoUninitialize(); CoInitialize(NULL); } -//------------------------------------------------------------------------------ + void ODriver::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -76,12 +76,12 @@ void ODriver::disposing() ODriver_BASE::disposing(); } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString("com.sun.star.comp.sdbc.ado.ODriver"); } -//------------------------------------------------------------------------------ + Sequence< OUString > ODriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); @@ -89,13 +89,13 @@ Sequence< OUString > ODriver::getSupportedServiceNames_Static( ) throw (Runtime aSNS[1] = "com.sun.star.sdbcx.Driver"; return aSNS; } -//------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::ado::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { return *(new ODriver(_rxFactory)); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -106,13 +106,13 @@ sal_Bool SAL_CALL ODriver::supportsService( const OUString& _rServiceName ) thro return cppu::supportsService(this, _rServiceName); } -// -------------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL ODriver::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { if ( ! acceptsURL(url) ) @@ -125,13 +125,13 @@ Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const S return xCon; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL ODriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { return url.startsWith("sdbc:ado:"); } -// ----------------------------------------------------------------------------- + void ODriver::impl_checkURL_throw(const OUString& _sUrl) { if ( !acceptsURL(_sUrl) ) @@ -141,7 +141,7 @@ void ODriver::impl_checkURL_throw(const OUString& _sUrl) ::dbtools::throwGenericSQLException(sMessage ,*this); } // if ( !acceptsURL(_sUrl) ) } -// -------------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) { impl_checkURL_throw(url); @@ -178,17 +178,17 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString } return Sequence< DriverPropertyInfo >(); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODriver::getMajorVersion( ) throw(RuntimeException) { return 1; } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODriver::getMinorVersion( ) throw(RuntimeException) { return 0; } -// -------------------------------------------------------------------------------- + // XDataDefinitionSupplier Reference< XTablesSupplier > SAL_CALL ODriver::getDataDefinitionByConnection( const Reference< ::com::sun::star::sdbc::XConnection >& connection ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -229,14 +229,14 @@ Reference< XTablesSupplier > SAL_CALL ODriver::getDataDefinitionByConnection( co } return xTab; } -// -------------------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL ODriver::getDataDefinitionByURL( const OUString& url, const Sequence< PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { impl_checkURL_throw(url); return getDataDefinitionByConnection(connect(url,info)); } -// ----------------------------------------------------------------------------- + void ADOS::ThrowException(ADOConnection* _pAdoCon,const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException) { ADOErrors *pErrors = NULL; diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx index 1ef7304ddaef..473573e0cadc 100644 --- a/connectivity/source/drivers/ado/AGroup.cxx +++ b/connectivity/source/drivers/ado/AGroup.cxx @@ -34,7 +34,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -// ------------------------------------------------------------------------- + void WpADOGroup::Create() { ADOGroup* pGroup = NULL; @@ -51,7 +51,7 @@ void WpADOGroup::Create() pGroup->Release(); } } -// ------------------------------------------------------------------------- + OAdoGroup::OAdoGroup(OCatalog* _pParent,sal_Bool _bCase, ADOGroup* _pGroup) : OGroup_ADO(_bCase),m_pCatalog(_pParent) { construct(); @@ -61,14 +61,14 @@ OAdoGroup::OAdoGroup(OCatalog* _pParent,sal_Bool _bCase, ADOGroup* _pGroup) : m_aGroup.Create(); } -// ------------------------------------------------------------------------- + OAdoGroup::OAdoGroup(OCatalog* _pParent,sal_Bool _bCase, const OUString& _Name) : OGroup_ADO(_Name,_bCase),m_pCatalog(_pParent) { construct(); m_aGroup.Create(); m_aGroup.put_Name(_Name); } -// ------------------------------------------------------------------------- + void OAdoGroup::refreshUsers() { TStringVector aVector; @@ -81,7 +81,7 @@ void OAdoGroup::refreshUsers() else m_pUsers = new OUsers(m_pCatalog,m_aMutex,aVector,aUsers,isCaseSensitive()); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OAdoGroup::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -98,7 +98,7 @@ Sequence< sal_Int8 > OAdoGroup::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OAdoGroup::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) @@ -106,7 +106,7 @@ sal_Int64 OAdoGroup::getSomething( const Sequence< sal_Int8 > & rId ) throw (Run : OGroup_ADO::getSomething(rId); } -// ------------------------------------------------------------------------- + void OAdoGroup::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception) { if(m_aGroup.IsValid()) @@ -124,7 +124,7 @@ void OAdoGroup::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rV } } } -// ------------------------------------------------------------------------- + void OAdoGroup::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const { if(m_aGroup.IsValid()) @@ -137,13 +137,13 @@ void OAdoGroup::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const } } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OAdoGroup::getPrivileges( const OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { return MapRight(m_aGroup.GetPermissions(objName,MapObjectType(objType))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OAdoGroup::getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { RightsEnum eNum = m_aGroup.GetPermissions(objName,MapObjectType(objType)); @@ -151,28 +151,28 @@ sal_Int32 SAL_CALL OAdoGroup::getGrantablePrivileges( const OUString& objName, s return MapRight(eNum); return 0; } -// ------------------------------------------------------------------------- + void SAL_CALL OAdoGroup::grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { m_aGroup.SetPermissions(objName,MapObjectType(objType),adAccessGrant,Map2Right(objPrivileges)); } -// ------------------------------------------------------------------------- + void SAL_CALL OAdoGroup::revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { m_aGroup.SetPermissions(objName,MapObjectType(objType),adAccessDeny,Map2Right(objPrivileges)); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoGroup::acquire() throw() { OGroup_ADO::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoGroup::release() throw() { OGroup_ADO::release(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AGroups.cxx b/connectivity/source/drivers/ado/AGroups.cxx index 33531fc4c2b6..ba19dbeb9a77 100644 --- a/connectivity/source/drivers/ado/AGroups.cxx +++ b/connectivity/source/drivers/ado/AGroups.cxx @@ -38,22 +38,22 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::container; -// ------------------------------------------------------------------------- + sdbcx::ObjectType OGroups::createObject(const OUString& _rName) { return new OAdoGroup(m_pCatalog,isCaseSensitive(),_rName); } -// ------------------------------------------------------------------------- + void OGroups::impl_refresh() throw(RuntimeException) { m_aCollection.Refresh(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OGroups::createDescriptor() { return new OAdoGroup(m_pCatalog,isCaseSensitive()); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OGroups::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -64,13 +64,13 @@ sdbcx::ObjectType OGroups::appendObject( const OUString& _rForName, const Refere m_aCollection.Append( pGroup->getImpl() ); return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OGroups::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { m_aCollection.Delete(_sElementName); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx index 065a7e41a8b5..d0764651c348 100644 --- a/connectivity/source/drivers/ado/AIndex.cxx +++ b/connectivity/source/drivers/ado/AIndex.cxx @@ -35,7 +35,7 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// ------------------------------------------------------------------------- + OAdoIndex::OAdoIndex(sal_Bool _bCase,OConnection* _pConnection,ADOIndex* _pIndex) : OIndex_ADO(OUString(),OUString(),sal_False,sal_False,sal_False,_bCase) ,m_pConnection(_pConnection) @@ -44,7 +44,7 @@ OAdoIndex::OAdoIndex(sal_Bool _bCase,OConnection* _pConnection,ADOIndex* _pIndex m_aIndex = WpADOIndex(_pIndex); fillPropertyValues(); } -// ------------------------------------------------------------------------- + OAdoIndex::OAdoIndex(sal_Bool _bCase,OConnection* _pConnection) : OIndex_ADO(_bCase) ,m_pConnection(_pConnection) @@ -53,7 +53,7 @@ OAdoIndex::OAdoIndex(sal_Bool _bCase,OConnection* _pConnection) m_aIndex.Create(); } -// ------------------------------------------------------------------------- + void OAdoIndex::refreshColumns() { @@ -72,7 +72,7 @@ void OAdoIndex::refreshColumns() m_pColumns = new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pConnection); } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > OAdoIndex::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -89,14 +89,14 @@ Sequence< sal_Int8 > OAdoIndex::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OAdoIndex::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : OIndex_ADO::getSomething(rId); } -// ------------------------------------------------------------------------- + void SAL_CALL OAdoIndex::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception) { if(m_aIndex.IsValid()) @@ -130,17 +130,17 @@ void SAL_CALL OAdoIndex::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons } OIndex_ADO::setFastPropertyValue_NoBroadcast(nHandle,rValue); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoIndex::acquire() throw() { OIndex_ADO::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoIndex::release() throw() { OIndex_ADO::release(); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/ado/AIndexes.cxx b/connectivity/source/drivers/ado/AIndexes.cxx index f5d5c49d5875..e95fd3db114b 100644 --- a/connectivity/source/drivers/ado/AIndexes.cxx +++ b/connectivity/source/drivers/ado/AIndexes.cxx @@ -42,17 +42,17 @@ sdbcx::ObjectType OIndexes::createObject(const OUString& _rName) { return new OAdoIndex(isCaseSensitive(),m_pConnection,m_aCollection.GetItem(_rName)); } -// ------------------------------------------------------------------------- + void OIndexes::impl_refresh() throw(RuntimeException) { m_aCollection.Refresh(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OIndexes::createDescriptor() { return new OAdoIndex(isCaseSensitive(),m_pConnection); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -69,13 +69,13 @@ sdbcx::ObjectType OIndexes::appendObject( const OUString& _rForName, const Refer return new OAdoIndex(isCaseSensitive(),m_pConnection,pIndex->getImpl()); } -// ------------------------------------------------------------------------- + // XDrop void OIndexes::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { m_aCollection.Delete(_sElementName); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx index d92ca58646e1..d76bf93823b8 100644 --- a/connectivity/source/drivers/ado/AKey.cxx +++ b/connectivity/source/drivers/ado/AKey.cxx @@ -32,7 +32,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -// ------------------------------------------------------------------------- + OAdoKey::OAdoKey(sal_Bool _bCase,OConnection* _pConnection, ADOKey* _pKey) : OKey_ADO(_bCase) ,m_pConnection(_pConnection) @@ -41,7 +41,7 @@ OAdoKey::OAdoKey(sal_Bool _bCase,OConnection* _pConnection, ADOKey* _pKey) m_aKey = WpADOKey(_pKey); fillPropertyValues(); } -// ------------------------------------------------------------------------- + OAdoKey::OAdoKey(sal_Bool _bCase,OConnection* _pConnection) : OKey_ADO(_bCase) ,m_pConnection(_pConnection) @@ -49,7 +49,7 @@ OAdoKey::OAdoKey(sal_Bool _bCase,OConnection* _pConnection) construct(); m_aKey.Create(); } -// ------------------------------------------------------------------------- + void OAdoKey::refreshColumns() { TStringVector aVector; @@ -66,7 +66,7 @@ void OAdoKey::refreshColumns() else m_pColumns = new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pConnection); } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > OAdoKey::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -83,14 +83,14 @@ Sequence< sal_Int8 > OAdoKey::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OAdoKey::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : OKey_ADO::getSomething(rId); } -// ------------------------------------------------------------------------- + void OAdoKey::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception) { if(m_aKey.IsValid()) @@ -141,18 +141,18 @@ void OAdoKey::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rVal } OKey_ADO::setFastPropertyValue_NoBroadcast(nHandle,rValue); } -// ------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + void SAL_CALL OAdoKey::acquire() throw() { OKey_ADO::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoKey::release() throw() { OKey_ADO::release(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AKeys.cxx b/connectivity/source/drivers/ado/AKeys.cxx index bda4efcaadeb..735b8c6fc215 100644 --- a/connectivity/source/drivers/ado/AKeys.cxx +++ b/connectivity/source/drivers/ado/AKeys.cxx @@ -48,17 +48,17 @@ sdbcx::ObjectType OKeys::createObject(const OUString& _rName) { return new OAdoKey(isCaseSensitive(),m_pConnection,m_aCollection.GetItem(_rName)); } -// ------------------------------------------------------------------------- + void OKeys::impl_refresh() throw(RuntimeException) { m_aCollection.Refresh(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OKeys::createDescriptor() { return new OAdoKey(isCaseSensitive(),m_pConnection); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) { @@ -95,14 +95,14 @@ sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XProper return new OAdoKey(isCaseSensitive(),m_pConnection,pKey->getImpl()); } -// ------------------------------------------------------------------------- + // XDrop void OKeys::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { if(!m_aCollection.Delete(OLEVariant(_sElementName))) ADOS::ThrowException(*m_pConnection->getConnection(),static_cast<XTypeProvider*>(this)); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx index 951f8888aee2..44967fbd136b 100644 --- a/connectivity/source/drivers/ado/AResultSet.cxx +++ b/connectivity/source/drivers/ado/AResultSet.cxx @@ -51,13 +51,13 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -//------------------------------------------------------------------------------ + // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.AResultSet","com.sun.star.sdbc.ResultSet"); OUString SAL_CALL OResultSet::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) \ { return OUString("com.sun.star.sdbcx.ado.ResultSet"); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(2); @@ -70,7 +70,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) t { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OResultSet::OResultSet(ADORecordset* _pRecordSet,OStatement_Base* pStmt) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_pRecordSet(_pRecordSet) @@ -83,7 +83,7 @@ OResultSet::OResultSet(ADORecordset* _pRecordSet,OStatement_Base* pStmt) : ORes ,m_bOnFirstAfterOpen(sal_False) { } -// ------------------------------------------------------------------------- + OResultSet::OResultSet(ADORecordset* _pRecordSet) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_pRecordSet(_pRecordSet) @@ -96,7 +96,7 @@ OResultSet::OResultSet(ADORecordset* _pRecordSet) : OResultSet_BASE(m_aMutex) ,m_bOnFirstAfterOpen(sal_False) { } -// ----------------------------------------------------------------------------- + void OResultSet::construct() { osl_atomic_increment( &m_refCount ); @@ -113,13 +113,13 @@ void OResultSet::construct() m_bOnFirstAfterOpen = bIsAtBOF != VARIANT_TRUE; osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + OResultSet::~OResultSet() { if(m_pRecordSet) m_pRecordSet->Release(); } -// ------------------------------------------------------------------------- + void OResultSet::disposing(void) { OPropertySetHelper::disposing(); @@ -130,13 +130,13 @@ void OResultSet::disposing(void) m_xStatement.clear(); m_xMetaData.clear(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); return aRet.hasValue() ? aRet : OResultSet_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), @@ -146,7 +146,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { @@ -169,7 +169,7 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQ return 0; // Never reached } #define BLOCK_SIZE 256 -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -209,13 +209,13 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getBinarySt return m_aValue.isNull() ? NULL : new ::comphelper::SequenceInputStream(m_aValue); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getCharacterStream", *this ); return NULL; } -// ----------------------------------------------------------------------------- + OLEVariant OResultSet::getValue(sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -225,48 +225,48 @@ OLEVariant OResultSet::getValue(sal_Int32 columnIndex ) throw(SQLException, Runt aField.get_Value(m_aValue); return m_aValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) { @@ -279,14 +279,14 @@ sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) return (aPos > 0) ? static_cast<sal_Int32>(aPos) : m_nRowPos; // return the rowcount from driver if the driver doesn't support this return our count } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getLong", *this ); return sal_Int64(0); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException) { @@ -298,67 +298,67 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx m_xMetaData = new OResultSetMetaData(m_pRecordSet); return m_xMetaData; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getArray", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getClob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getBlob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRow::getRef", *this ); return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { return getValue(columnIndex).makeAny(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { @@ -370,7 +370,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeExcepti CHECK_RETURN(m_pRecordSet->get_EOF(&bIsAtEOF)) return bIsAtEOF == VARIANT_TRUE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -379,7 +379,7 @@ sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) return m_nRowPos == 1; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -388,7 +388,7 @@ sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) return sal_True; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -398,7 +398,7 @@ void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) if(first()) m_bOnFirstAfterOpen = !previous(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -409,7 +409,7 @@ void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) next(); m_bEOF = sal_True; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException) { @@ -420,7 +420,7 @@ void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException) } dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException) { @@ -436,7 +436,7 @@ sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException) } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException) { @@ -452,7 +452,7 @@ sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException) } return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -485,7 +485,7 @@ sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, Runt m_bOnFirstAfterOpen = sal_False; return bCheck; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -505,7 +505,7 @@ sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, Runt } return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -519,14 +519,14 @@ sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException) } return bRet; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); return m_xStatement; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeException) { @@ -541,7 +541,7 @@ sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeExceptio --m_nRowPos; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); @@ -554,7 +554,7 @@ sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeExcepti ++m_nRowPos; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -565,7 +565,7 @@ sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeExceptio m_pRecordSet->get_Status((sal_Int32*)&eRec); return (eRec & adRecModified) == adRecModified; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { @@ -582,7 +582,7 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeExcep } return bIsAtBOF == VARIANT_TRUE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException) { @@ -613,7 +613,7 @@ sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException) return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -623,7 +623,7 @@ sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) return m_aValue.isNull(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) { @@ -633,16 +633,16 @@ void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) m_pRecordSet->Cancel(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException) { return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -653,7 +653,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) aEmpty.setNoArg(); m_pRecordSet->AddNew(aEmpty,aEmpty); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -664,7 +664,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException) aEmpty.setNoArg(); m_pRecordSet->Update(aEmpty,aEmpty); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::deleteRow( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -674,7 +674,7 @@ void SAL_CALL OResultSet::deleteRow( ) throw(SQLException, RuntimeException) m_pRecordSet->Delete(adAffectCurrent); m_pRecordSet->UpdateBatch(adAffectCurrent); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException) { @@ -684,7 +684,7 @@ void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeExcept m_pRecordSet->CancelUpdate(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException) { @@ -693,12 +693,12 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeExcepti // if ( getResultSetConcurrency() == ResultSetConcurrency::READ_ONLY ) // throw SQLException(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeException) { } -// ----------------------------------------------------------------------------- + void OResultSet::updateValue(sal_Int32 columnIndex,const OLEVariant& x) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -707,79 +707,79 @@ void OResultSet::updateValue(sal_Int32 columnIndex,const OLEVariant& x) WpADOField aField = ADOS::getField(m_pRecordSet,columnIndex); aField.PutValue(x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { OLEVariant x; x.setNull(); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,bool(x)); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ----------------------------------------------------------------------- + void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { @@ -790,7 +790,7 @@ void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Refer x->readBytes(aSeq,length); updateBytes(columnIndex,aSeq); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { if(!x.is()) @@ -800,7 +800,7 @@ void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Re x->readBytes(aSeq,length); updateBytes(columnIndex,aSeq); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -809,20 +809,20 @@ void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) m_pRecordSet->Resync(adAffectCurrent,adResyncAllValues); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException) { if (!::dbtools::implUpdateObject(this, columnIndex, x)) throw SQLException(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { if (!::dbtools::implUpdateObject(this, columnIndex, x)) throw SQLException(); } -//------------------------------------------------------------------------------ + // XRowLocate Any SAL_CALL OResultSet::getBookmark( ) throw(SQLException, RuntimeException) { @@ -838,7 +838,7 @@ Any SAL_CALL OResultSet::getBookmark( ) throw(SQLException, RuntimeException) return makeAny((sal_Int32)(m_aBookmarks.size()-1)); } -//------------------------------------------------------------------------------ + sal_Bool SAL_CALL OResultSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -853,7 +853,7 @@ sal_Bool SAL_CALL OResultSet::moveToBookmark( const Any& bookmark ) throw(SQLExc return SUCCEEDED(m_pRecordSet->Move(0,m_aBookmarks[nPos])); } -//------------------------------------------------------------------------------ + sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -868,7 +868,7 @@ sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark( const Any& bookmark, sal_I ::dbtools::throwFunctionSequenceException(*this); return SUCCEEDED(m_pRecordSet->Move(rows,m_aBookmarks[nPos])); } -//------------------------------------------------------------------------------ + sal_Int32 SAL_CALL OResultSet::compareBookmarks( const Any& bookmark1, const Any& bookmark2 ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -887,7 +887,7 @@ sal_Int32 SAL_CALL OResultSet::compareBookmarks( const Any& bookmark1, const Any m_pRecordSet->CompareBookmarks(m_aBookmarks[nPos1],m_aBookmarks[nPos2],&eNum); return ((sal_Int32)eNum) +1; } -//------------------------------------------------------------------------------ + sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -913,7 +913,7 @@ sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks( ) throw(SQLException, Runtim bValue = aVar; return bValue; } -//------------------------------------------------------------------------------ + sal_Int32 SAL_CALL OResultSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -924,7 +924,7 @@ sal_Int32 SAL_CALL OResultSet::hashBookmark( const Any& bookmark ) throw(SQLExce bookmark >>= nPos; return nPos; } -//------------------------------------------------------------------------------ + // XDeleteRows Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >& rows ) throw(SQLException, RuntimeException) { @@ -973,7 +973,7 @@ Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >& ro } return aSeq; } -//------------------------------------------------------------------------------ + sal_Int32 OResultSet::getResultSetConcurrency() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -993,7 +993,7 @@ sal_Int32 OResultSet::getResultSetConcurrency() const } return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OResultSet::getResultSetType() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -1018,13 +1018,13 @@ sal_Int32 OResultSet::getResultSetType() const } return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OResultSet::getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return FetchDirection::FORWARD; } -//------------------------------------------------------------------------------ + sal_Int32 OResultSet::getFetchSize() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -1032,26 +1032,26 @@ sal_Int32 OResultSet::getFetchSize() const m_pRecordSet->get_CacheSize(&nValue); return nValue; } -//------------------------------------------------------------------------------ + OUString OResultSet::getCursorName() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return OUString(); } -//------------------------------------------------------------------------------ + void OResultSet::setFetchDirection(sal_Int32 /*_par0*/) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "ResultSet::FetchDirection", *this ); } -//------------------------------------------------------------------------------ + void OResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { m_pRecordSet->put_CacheSize(_par0); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OResultSet::createArrayHelper( ) const { Sequence< com::sun::star::beans::Property > aProps(5); @@ -1067,12 +1067,12 @@ void OResultSet::setFetchSize(sal_Int32 _par0) return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OResultSet::getInfoHelper() { return *const_cast<OResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, @@ -1097,7 +1097,7 @@ sal_Bool OResultSet::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception) { switch(nHandle) @@ -1118,7 +1118,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r ; } } -// ------------------------------------------------------------------------- + void OResultSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const { switch(nHandle) @@ -1148,22 +1148,22 @@ void OResultSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const break; } } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::acquire() throw() { OResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::release() throw() { OResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/ado/AResultSetMetaData.cxx b/connectivity/source/drivers/ado/AResultSetMetaData.cxx index 22461245b5bb..9c4912350f11 100644 --- a/connectivity/source/drivers/ado/AResultSetMetaData.cxx +++ b/connectivity/source/drivers/ado/AResultSetMetaData.cxx @@ -37,13 +37,13 @@ OResultSetMetaData::OResultSetMetaData( ADORecordset* _pRecordSet) if ( m_pRecordSet ) m_pRecordSet->AddRef(); } -// ------------------------------------------------------------------------- + OResultSetMetaData::~OResultSetMetaData() { if ( m_pRecordSet ) m_pRecordSet->Release(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException) { WpADOField aField = ADOS::getField(m_pRecordSet,column); @@ -51,14 +51,14 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) return aField.GetActualSize(); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException) { WpADOField aField = ADOS::getField(m_pRecordSet,column); return ADOS::MapADOType2Jdbc(aField.GetADOType()); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { @@ -74,7 +74,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, Ru m_nColCount = aFields.GetItemCount(); return m_nColCount; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -88,13 +88,13 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw( } return bRet; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -104,7 +104,7 @@ OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQ return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException) { OUString sTableName; @@ -118,27 +118,27 @@ OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQL } return sTableName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { return getColumnName(column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -149,7 +149,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLEx } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -174,7 +174,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw( } return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException) @@ -187,7 +187,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLExce } return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) { WpADOField aField = ADOS::getField(m_pRecordSet,column); @@ -195,7 +195,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQ return aField.GetPrecision(); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { WpADOField aField = ADOS::getField(m_pRecordSet,column); @@ -203,7 +203,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com: return aField.GetNumericScale(); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -214,13 +214,13 @@ sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLE } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -231,7 +231,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLEx } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -243,11 +243,11 @@ sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) t return sal_False; ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { return isDefinitelyWritable(column); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx index 404101ebe57c..a232ad183177 100644 --- a/connectivity/source/drivers/ado/AStatement.cxx +++ b/connectivity/source/drivers/ado/AStatement.cxx @@ -45,13 +45,13 @@ using namespace ::comphelper; using namespace connectivity::ado; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace ::std; -//------------------------------------------------------------------------------ + OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(m_aMutex) ,OPropertySetHelper(OStatement_BASE::rBHelper) ,OSubComponent<OStatement_Base, OStatement_BASE>((::cppu::OWeakObject*)_pConnection, this) @@ -76,7 +76,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE( osl_atomic_decrement( &m_refCount ); } -//------------------------------------------------------------------------------ + void OStatement_Base::disposeResultSet() { // free the cursor if alive @@ -86,7 +86,7 @@ void OStatement_Base::disposeResultSet() m_xResultSet.clear(); } -//------------------------------------------------------------------------------ + void OStatement_Base::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -108,18 +108,18 @@ void OStatement_Base::disposing() dispose_ChildImpl(); OStatement_BASE::disposing(); } -//----------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::release() throw() { relase_ChildImpl(); } -//----------------------------------------------------------------------------- + Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OStatement_BASE::queryInterface(rType); return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OStatement_Base::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), @@ -129,7 +129,7 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException) { @@ -139,7 +139,7 @@ void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException) CHECK_RETURN(m_Command.Cancel()) } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException) { @@ -150,13 +150,13 @@ void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException) } dispose(); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement::clearBatch( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + void OStatement_Base::reset() throw (SQLException) { @@ -169,10 +169,10 @@ void OStatement_Base::reset() throw (SQLException) if (m_xResultSet.get().is()) clearMyResultSet(); } -//-------------------------------------------------------------------- + // clearMyResultSet // If a ResultSet was created for this Statement, close it -//-------------------------------------------------------------------- + void OStatement_Base::clearMyResultSet () throw (SQLException) { @@ -189,7 +189,7 @@ void OStatement_Base::clearMyResultSet () throw (SQLException) m_xResultSet.clear(); } -//-------------------------------------------------------------------- + sal_Int32 OStatement_Base::getRowCount () throw( SQLException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -198,11 +198,11 @@ sal_Int32 OStatement_Base::getRowCount () throw( SQLException) return m_RecordsAffected; } -//-------------------------------------------------------------------- + // getPrecision // Given a SQL type, return the maximum precision for the column. // Returns -1 if not known -//-------------------------------------------------------------------- + sal_Int32 OStatement_Base::getPrecision ( sal_Int32 sqlType) { @@ -224,10 +224,10 @@ sal_Int32 OStatement_Base::getPrecision ( sal_Int32 sqlType) return prec; } -//-------------------------------------------------------------------- + // setWarning // Sets the warning -//-------------------------------------------------------------------- + void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) { @@ -237,7 +237,7 @@ void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) m_aLastWarning = ex; } -// ------------------------------------------------------------------------- + void OStatement_Base::assignRecordSet( ADORecordset* _pRS ) { WpADORecordset aOldRS( m_RecordSet ); @@ -249,7 +249,7 @@ void OStatement_Base::assignRecordSet( ADORecordset* _pRS ) if ( m_RecordSet.IsValid() ) m_RecordSet.PutRefDataSource( (IDispatch*)m_Command ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -279,7 +279,7 @@ sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql ) throw(SQLExcep return m_RecordSet.IsValid(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -315,7 +315,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const OUString& return xRs; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OStatement_Base::getConnection( ) throw(SQLException, RuntimeException) { @@ -325,14 +325,14 @@ Reference< XConnection > SAL_CALL OStatement_Base::getConnection( ) throw(SQLEx return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ::cppu::queryInterface(rType,static_cast< XBatchExecution*> (this)); return aRet.hasValue() ? aRet : OStatement_Base::queryInterface(rType); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement::addBatch( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -342,7 +342,7 @@ void SAL_CALL OStatement::addBatch( const OUString& sql ) throw(SQLException, Ru m_aBatchList.push_back(sql); } -// ------------------------------------------------------------------------- + Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -386,7 +386,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException, } return aRet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const OUString& sql ) throw(SQLException, RuntimeException) @@ -414,7 +414,7 @@ sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const OUString& sql ) throw(S return 0; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OStatement_Base::getResultSet( ) throw(SQLException, RuntimeException) { @@ -424,7 +424,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::getResultSet( ) throw(SQLExce return m_xResultSet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OStatement_Base::getUpdateCount( ) throw(SQLException, RuntimeException) { @@ -437,7 +437,7 @@ sal_Int32 SAL_CALL OStatement_Base::getUpdateCount( ) throw(SQLException, Runti return nRet; return -1; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, RuntimeException) { @@ -470,9 +470,9 @@ sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, Runtim } return m_RecordSet.IsValid(); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -481,9 +481,9 @@ Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeExcepti return makeAny(m_aLastWarning); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -492,13 +492,13 @@ void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeExce m_aLastWarning = SQLWarning(); } -// ------------------------------------------------------------------------- -//------------------------------------------------------------------------------ + + sal_Int32 OStatement_Base::getQueryTimeOut() const throw(SQLException, RuntimeException) { return m_Command.get_CommandTimeout(); } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getMaxRows() const throw(SQLException, RuntimeException) { ADO_LONGPTR nRet=-1; @@ -506,7 +506,7 @@ sal_Int32 OStatement_Base::getMaxRows() const throw(SQLException, RuntimeExcepti ::dbtools::throwFunctionSequenceException(NULL); return nRet; } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getResultSetConcurrency() const throw(SQLException, RuntimeException) { sal_Int32 nValue; @@ -523,7 +523,7 @@ sal_Int32 OStatement_Base::getResultSetConcurrency() const throw(SQLException, R return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getResultSetType() const throw(SQLException, RuntimeException) { sal_Int32 nValue=0; @@ -543,27 +543,27 @@ sal_Int32 OStatement_Base::getResultSetType() const throw(SQLException, RuntimeE } return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getFetchDirection() const throw(SQLException, RuntimeException) { return FetchDirection::FORWARD; } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getFetchSize() const throw(SQLException, RuntimeException) { return m_nFetchSize; } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getMaxFieldSize() const throw(SQLException, RuntimeException) { return 0; } -//------------------------------------------------------------------------------ + OUString OStatement_Base::getCursorName() const throw(SQLException, RuntimeException) { return m_Command.GetName(); } -//------------------------------------------------------------------------------ + void OStatement_Base::setQueryTimeOut(sal_Int32 seconds) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -572,7 +572,7 @@ void OStatement_Base::setQueryTimeOut(sal_Int32 seconds) throw(SQLException, Run m_Command.put_CommandTimeout(seconds); } -//------------------------------------------------------------------------------ + void OStatement_Base::setMaxRows(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -580,7 +580,7 @@ void OStatement_Base::setMaxRows(sal_Int32 _par0) throw(SQLException, RuntimeExc m_nMaxRows = _par0; } -//------------------------------------------------------------------------------ + void OStatement_Base::setResultSetConcurrency(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -596,7 +596,7 @@ void OStatement_Base::setResultSetConcurrency(sal_Int32 _par0) throw(SQLExceptio break; } } -//------------------------------------------------------------------------------ + void OStatement_Base::setResultSetType(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -616,14 +616,14 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) throw(SQLException, Runt break; } } -//------------------------------------------------------------------------------ + void OStatement_Base::setFetchDirection(sal_Int32 /*_par0*/) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); ::dbtools::throwFeatureNotImplementedException( "Statement::FetchDirection", *this ); } -//------------------------------------------------------------------------------ + void OStatement_Base::setFetchSize(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -632,14 +632,14 @@ void OStatement_Base::setFetchSize(sal_Int32 _par0) throw(SQLException, RuntimeE m_nFetchSize = _par0; } -//------------------------------------------------------------------------------ + void OStatement_Base::setMaxFieldSize(sal_Int32 /*_par0*/) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); ::dbtools::throwFeatureNotImplementedException( "Statement::MaxFieldSize", *this ); } -//------------------------------------------------------------------------------ + void OStatement_Base::setCursorName(const OUString &_par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -648,7 +648,7 @@ void OStatement_Base::setCursorName(const OUString &_par0) throw(SQLException, R m_Command.put_Name(_par0); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OStatement_Base::createArrayHelper( ) const { Sequence< com::sun::star::beans::Property > aProps(10); @@ -669,12 +669,12 @@ void OStatement_Base::setCursorName(const OUString &_par0) throw(SQLException, R return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OStatement_Base::getInfoHelper() { return *const_cast<OStatement_Base*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OStatement_Base::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, @@ -728,7 +728,7 @@ sal_Bool OStatement_Base::convertFastPropertyValue( } return bModified; } -// ------------------------------------------------------------------------- + void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { switch(nHandle) @@ -765,7 +765,7 @@ void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A ; } } -// ------------------------------------------------------------------------- + void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const { switch(nHandle) @@ -802,27 +802,27 @@ void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const ; } } -// ------------------------------------------------------------------------- + OStatement::~OStatement() { } IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.AStatement","com.sun.star.sdbc.Statement"); -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::acquire() throw() { OStatement_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::acquire() throw() { OStatement_Base::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::release() throw() { OStatement_Base::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OStatement_Base::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx index 680140525188..d41d462ec7ab 100644 --- a/connectivity/source/drivers/ado/ATable.cxx +++ b/connectivity/source/drivers/ado/ATable.cxx @@ -45,7 +45,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::container; -// ------------------------------------------------------------------------- + OAdoTable::OAdoTable(sdbcx::OCollection* _pTables,sal_Bool _bCase,OCatalog* _pCatalog,_ADOTable* _pTable) : OTable_TYPEDEF(_pTables,_bCase) ,m_pCatalog(_pCatalog) @@ -56,7 +56,7 @@ OAdoTable::OAdoTable(sdbcx::OCollection* _pTables,sal_Bool _bCase,OCatalog* _pCa fillPropertyValues(); } -// ----------------------------------------------------------------------------- + OAdoTable::OAdoTable(sdbcx::OCollection* _pTables,sal_Bool _bCase,OCatalog* _pCatalog) : OTable_TYPEDEF(_pTables,_bCase) ,m_pCatalog(_pCatalog) @@ -66,13 +66,13 @@ OAdoTable::OAdoTable(sdbcx::OCollection* _pTables,sal_Bool _bCase,OCatalog* _pCa m_aTable.putref_ParentCatalog(_pCatalog->getCatalog()); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoTable::disposing(void) { OTable_TYPEDEF::disposing(); m_aTable.clear(); } -// ------------------------------------------------------------------------- + void OAdoTable::refreshColumns() { TStringVector aVector; @@ -89,7 +89,7 @@ void OAdoTable::refreshColumns() else m_pColumns = new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pCatalog->getConnection()); } -// ------------------------------------------------------------------------- + void OAdoTable::refreshKeys() { TStringVector aVector; @@ -106,7 +106,7 @@ void OAdoTable::refreshKeys() else m_pKeys = new OKeys(*this,m_aMutex,aVector,aKeys,isCaseSensitive(),m_pCatalog->getConnection()); } -// ------------------------------------------------------------------------- + void OAdoTable::refreshIndexes() { TStringVector aVector; @@ -123,7 +123,7 @@ void OAdoTable::refreshIndexes() else m_pIndexes = new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection()); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OAdoTable::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -140,14 +140,14 @@ Sequence< sal_Int8 > OAdoTable::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OAdoTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : OTable_TYPEDEF::getSomething(rId); } -// ------------------------------------------------------------------------- + // XRename void SAL_CALL OAdoTable::rename( const OUString& newName ) throw(SQLException, ElementExistException, RuntimeException) { @@ -159,12 +159,12 @@ void SAL_CALL OAdoTable::rename( const OUString& newName ) throw(SQLException, E OTable_TYPEDEF::rename(newName); } -// ----------------------------------------------------------------------------- + Reference< XDatabaseMetaData> OAdoTable::getMetaData() const { return m_pCatalog->getConnection()->getMetaData(); } -// ------------------------------------------------------------------------- + // XAlterTable void SAL_CALL OAdoTable::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException) { @@ -185,7 +185,7 @@ void SAL_CALL OAdoTable::alterColumnByName( const OUString& colName, const Refer m_pColumns->refresh(); refreshColumns(); } -// ------------------------------------------------------------------------- + void SAL_CALL OAdoTable::alterColumnByIndex( sal_Int32 index, const Reference< XPropertySet >& descriptor ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -196,7 +196,7 @@ void SAL_CALL OAdoTable::alterColumnByIndex( sal_Int32 index, const Reference< X if(xOld.is()) alterColumnByName(getString(xOld->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),descriptor); } -// ------------------------------------------------------------------------- + void OAdoTable::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception) { if(m_aTable.IsValid()) @@ -228,17 +228,17 @@ void OAdoTable::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rV } OTable_TYPEDEF::setFastPropertyValue_NoBroadcast(nHandle,rValue); } -// ------------------------------------------------------------------------- + void SAL_CALL OAdoTable::acquire() throw() { OTable_TYPEDEF::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoTable::release() throw() { OTable_TYPEDEF::release(); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL OAdoTable::getName() throw(::com::sun::star::uno::RuntimeException) { return m_aTable.get_Name(); diff --git a/connectivity/source/drivers/ado/ATables.cxx b/connectivity/source/drivers/ado/ATables.cxx index ff8d6f292189..d506ef2a7c27 100644 --- a/connectivity/source/drivers/ado/ATables.cxx +++ b/connectivity/source/drivers/ado/ATables.cxx @@ -48,19 +48,19 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) OSL_ENSURE(m_aCollection.IsValid(),"Collection isn't valid"); return new OAdoTable(this,isCaseSensitive(),m_pCatalog,m_aCollection.GetItem(_rName)); } -// ------------------------------------------------------------------------- + void OTables::impl_refresh( ) throw(RuntimeException) { OSL_ENSURE(m_aCollection.IsValid(),"Collection isn't valid"); m_aCollection.Refresh(); m_pCatalog->refreshTables(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OTables::createDescriptor() { return new OAdoTable(this,isCaseSensitive(),m_pCatalog); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OTables::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) { @@ -75,7 +75,7 @@ sdbcx::ObjectType OTables::appendObject( const OUString&, const Reference< XProp return new OAdoTable(this,isCaseSensitive(),m_pCatalog,pTable->getImpl()); } -// ------------------------------------------------------------------------- + // XDrop void OTables::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { @@ -83,7 +83,7 @@ void OTables::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) if ( !m_aCollection.Delete(_sElementName) ) ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),static_cast<XTypeProvider*>(this)); } -// ----------------------------------------------------------------------------- + void OTables::appendNew(const OUString& _rsNewTable) { OSL_ENSURE(m_aCollection.IsValid(),"Collection isn't valid"); @@ -97,7 +97,7 @@ void OTables::appendNew(const OUString& _rsNewTable) while (aListenerLoop.hasMoreElements()) static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AUser.cxx b/connectivity/source/drivers/ado/AUser.cxx index 6fc7c92f22cd..dc3ce53f8ac5 100644 --- a/connectivity/source/drivers/ado/AUser.cxx +++ b/connectivity/source/drivers/ado/AUser.cxx @@ -33,7 +33,7 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// ------------------------------------------------------------------------- + OAdoUser::OAdoUser(OCatalog* _pParent,sal_Bool _bCase, ADOUser* _pUser) : OUser_TYPEDEF(_bCase) ,m_pCatalog(_pParent) @@ -45,7 +45,7 @@ OAdoUser::OAdoUser(OCatalog* _pParent,sal_Bool _bCase, ADOUser* _pUser) else m_aUser.Create(); } -// ------------------------------------------------------------------------- + OAdoUser::OAdoUser(OCatalog* _pParent,sal_Bool _bCase, const OUString& _Name) : OUser_TYPEDEF(_Name,_bCase) , m_pCatalog(_pParent) @@ -54,7 +54,7 @@ OAdoUser::OAdoUser(OCatalog* _pParent,sal_Bool _bCase, const OUString& _Name) m_aUser.Create(); m_aUser.put_Name(_Name); } -// ------------------------------------------------------------------------- + void OAdoUser::refreshGroups() { TStringVector aVector; @@ -65,7 +65,7 @@ void OAdoUser::refreshGroups() else m_pGroups = new OGroups(m_pCatalog,m_aMutex,aVector,aGroups,isCaseSensitive()); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OAdoUser::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -82,7 +82,7 @@ Sequence< sal_Int8 > OAdoUser::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OAdoUser::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) @@ -90,7 +90,7 @@ sal_Int64 OAdoUser::getSomething( const Sequence< sal_Int8 > & rId ) throw (Runt : OUser_TYPEDEF::getSomething(rId); } -// ------------------------------------------------------------------------- + void OAdoUser::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception) { if(m_aUser.IsValid()) @@ -108,7 +108,7 @@ void OAdoUser::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rVa } } } -// ------------------------------------------------------------------------- + void OAdoUser::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const { if(m_aUser.IsValid()) @@ -121,47 +121,47 @@ void OAdoUser::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const } } } -// ------------------------------------------------------------------------- + OUserExtend::OUserExtend(OCatalog* _pParent,sal_Bool _bCase, ADOUser* _pUser) : OAdoUser(_pParent,_bCase,_pUser) { } -// ------------------------------------------------------------------------- + OUserExtend::OUserExtend(OCatalog* _pParent,sal_Bool _bCase, const OUString& _Name) : OAdoUser(_pParent,_bCase,_Name) { } -// ------------------------------------------------------------------------- + void OUserExtend::construct() { OUser_TYPEDEF::construct(); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(static_cast< OUString*>(0))); } -// ----------------------------------------------------------------------------- + cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const { Sequence< com::sun::star::beans::Property > aProps; describeProperties(aProps); return new cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + cppu::IPropertyArrayHelper & OUserExtend::getInfoHelper() { return *OUserExtend_PROP::getArrayHelper(); } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + void SAL_CALL OAdoUser::acquire() throw() { OUser_TYPEDEF::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoUser::release() throw() { OUser_TYPEDEF::release(); } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OAdoUser::getPrivileges( const OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -169,7 +169,7 @@ sal_Int32 SAL_CALL OAdoUser::getPrivileges( const OUString& objName, sal_Int32 o return ADOS::mapAdoRights2Sdbc(m_aUser.GetPermissions(objName, ADOS::mapObjectType2Ado(objType))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OAdoUser::getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -182,7 +182,7 @@ sal_Int32 SAL_CALL OAdoUser::getGrantablePrivileges( const OUString& objName, sa ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this); return nRights; } -// ------------------------------------------------------------------------- + void SAL_CALL OAdoUser::grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -190,7 +190,7 @@ void SAL_CALL OAdoUser::grantPrivileges( const OUString& objName, sal_Int32 objT m_aUser.SetPermissions(objName,ADOS::mapObjectType2Ado(objType),adAccessGrant,RightsEnum(ADOS::mapRights2Ado(objPrivileges))); ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this); } -// ------------------------------------------------------------------------- + void SAL_CALL OAdoUser::revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -198,7 +198,7 @@ void SAL_CALL OAdoUser::revokePrivileges( const OUString& objName, sal_Int32 obj m_aUser.SetPermissions(objName,ADOS::mapObjectType2Ado(objType),adAccessRevoke,RightsEnum(ADOS::mapRights2Ado(objPrivileges))); ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this); } -// ----------------------------------------------------------------------------- + // XUser void SAL_CALL OAdoUser::changePassword( const OUString& objPassword, const OUString& newPassword ) throw(SQLException, RuntimeException) { @@ -207,7 +207,7 @@ void SAL_CALL OAdoUser::changePassword( const OUString& objPassword, const OUStr m_aUser.ChangePassword(objPassword,newPassword); ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),*this); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/ado/AUsers.cxx b/connectivity/source/drivers/ado/AUsers.cxx index 285a4551bf28..6c4643247464 100644 --- a/connectivity/source/drivers/ado/AUsers.cxx +++ b/connectivity/source/drivers/ado/AUsers.cxx @@ -41,17 +41,17 @@ sdbcx::ObjectType OUsers::createObject(const OUString& _rName) { return new OAdoUser(m_pCatalog,isCaseSensitive(),_rName); } -// ------------------------------------------------------------------------- + void OUsers::impl_refresh() throw(RuntimeException) { m_aCollection.Refresh(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OUsers::createDescriptor() { return new OUserExtend(m_pCatalog,isCaseSensitive()); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -64,13 +64,13 @@ sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Referen return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OUsers::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { m_aCollection.Delete(_sElementName); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AView.cxx b/connectivity/source/drivers/ado/AView.cxx index fcc156e073a9..dba3c8e894e2 100644 --- a/connectivity/source/drivers/ado/AView.cxx +++ b/connectivity/source/drivers/ado/AView.cxx @@ -26,7 +26,7 @@ #include <comphelper/types.hxx> #include "TConnection.hxx" -// ------------------------------------------------------------------------- + using namespace comphelper; using namespace connectivity::ado; using namespace com::sun::star::uno; @@ -35,12 +35,12 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; // IMPLEMENT_SERVICE_INFO(OAdoView,"com.sun.star.sdbcx.AView","com.sun.star.sdbcx.View"); -// ------------------------------------------------------------------------- + OAdoView::OAdoView(sal_Bool _bCase,ADOView* _pView) : OView_ADO(_bCase,NULL) ,m_aView(_pView) { } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OAdoView::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -57,7 +57,7 @@ Sequence< sal_Int8 > OAdoView::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OAdoView::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) @@ -65,7 +65,7 @@ sal_Int64 OAdoView::getSomething( const Sequence< sal_Int8 > & rId ) throw (Runt : OView_ADO::getSomething(rId); } -// ------------------------------------------------------------------------- + void OAdoView::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const { if(m_aView.IsValid()) @@ -98,17 +98,17 @@ void OAdoView::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const else OView_ADO::getFastPropertyValue(rValue,nHandle); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoView::acquire() throw() { OView_ADO::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OAdoView::release() throw() { OView_ADO::release(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AViews.cxx b/connectivity/source/drivers/ado/AViews.cxx index cea3507a47fd..1401d17b5a4b 100644 --- a/connectivity/source/drivers/ado/AViews.cxx +++ b/connectivity/source/drivers/ado/AViews.cxx @@ -44,18 +44,18 @@ sdbcx::ObjectType OViews::createObject(const OUString& _rName) pView->setNew(sal_False); return pView; } -// ------------------------------------------------------------------------- + void OViews::impl_refresh( ) throw(RuntimeException) { m_aCollection.Refresh(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OViews::createDescriptor() { return new OAdoView(isCaseSensitive()); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -81,14 +81,14 @@ sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Referen return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OViews::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { if(!m_aCollection.Delete(_sElementName)) ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),static_cast<XTypeProvider*>(this)); } -// ------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx index 54452bd7ce6c..cebb4a38cc5a 100644 --- a/connectivity/source/drivers/ado/Aolevariant.cxx +++ b/connectivity/source/drivers/ado/Aolevariant.cxx @@ -412,7 +412,7 @@ OLEVariant::operator OUString() const return reinterpret_cast<const sal_Unicode*>(LPCOLESTR(V_BSTR(&varDest))); } -// ----------------------------------------------------------------------------- + void OLEVariant::ChangeType(VARTYPE vartype, const OLEVariant* pSrc) { // @@ -443,7 +443,7 @@ void OLEVariant::ChangeType(VARTYPE vartype, const OLEVariant* pSrc) } } -// ----------------------------------------------------------------------------- + OLEVariant::operator ::com::sun::star::uno::Sequence< sal_Int8 >() const { ::com::sun::star::uno::Sequence< sal_Int8 > aRet; @@ -484,7 +484,7 @@ OLEVariant::operator ::com::sun::star::uno::Sequence< sal_Int8 >() const return aRet; } -// ----------------------------------------------------------------------------- + OUString OLEVariant::getString() const { if(isNull()) @@ -492,7 +492,7 @@ OUString OLEVariant::getString() const else return *this; } -// ----------------------------------------------------------------------------- + sal_Bool OLEVariant::getBool() const { if (V_VT(this) == VT_BOOL) @@ -506,7 +506,7 @@ sal_Bool OLEVariant::getBool() const return V_BOOL(&varDest) == VARIANT_TRUE ? sal_True : sal_False; } -// ----------------------------------------------------------------------------- + IUnknown* OLEVariant::getIUnknown() const { if (V_VT(this) == VT_UNKNOWN) @@ -523,7 +523,7 @@ IUnknown* OLEVariant::getIUnknown() const V_UNKNOWN(&varDest)->AddRef(); return V_UNKNOWN(&varDest); } -// ----------------------------------------------------------------------------- + IDispatch* OLEVariant::getIDispatch() const { if (V_VT(this) == VT_DISPATCH) @@ -541,7 +541,7 @@ IDispatch* OLEVariant::getIDispatch() const V_DISPATCH(&varDest)->AddRef(); return V_DISPATCH(&varDest); } -// ----------------------------------------------------------------------------- + sal_uInt8 OLEVariant::getByte() const { if (V_VT(this) == VT_UI1) @@ -555,7 +555,7 @@ sal_uInt8 OLEVariant::getByte() const return V_UI1(&varDest); } -// ----------------------------------------------------------------------------- + sal_Int16 OLEVariant::getInt16() const { if (V_VT(this) == VT_I2) @@ -569,7 +569,7 @@ sal_Int16 OLEVariant::getInt16() const return V_I2(&varDest); } -// ----------------------------------------------------------------------------- + sal_Int8 OLEVariant::getInt8() const { if (V_VT(this) == VT_I1) @@ -584,7 +584,7 @@ sal_Int8 OLEVariant::getInt8() const return V_I1(&varDest); } -// ----------------------------------------------------------------------------- + sal_Int32 OLEVariant::getInt32() const { if (V_VT(this) == VT_I4) @@ -599,7 +599,7 @@ sal_Int32 OLEVariant::getInt32() const return V_I4(&varDest); } -// ----------------------------------------------------------------------------- + sal_uInt32 OLEVariant::getUInt32() const { if (V_VT(this) == VT_UI4) @@ -614,7 +614,7 @@ sal_uInt32 OLEVariant::getUInt32() const return V_UI4(&varDest); } -// ----------------------------------------------------------------------------- + float OLEVariant::getFloat() const { if (V_VT(this) == VT_R4) @@ -628,7 +628,7 @@ float OLEVariant::getFloat() const return V_R4(&varDest); } -// ----------------------------------------------------------------------------- + double OLEVariant::getDouble() const { if (V_VT(this) == VT_R8) @@ -642,7 +642,7 @@ double OLEVariant::getDouble() const return V_R8(&varDest); } -// ----------------------------------------------------------------------------- + double OLEVariant::getDate() const { if (V_VT(this) == VT_DATE) @@ -656,7 +656,7 @@ double OLEVariant::getDate() const return V_DATE(&varDest); } -// ----------------------------------------------------------------------------- + CY OLEVariant::getCurrency() const { if (V_VT(this) == VT_CY) @@ -674,7 +674,7 @@ CY OLEVariant::getCurrency() const return V_CY(&varDest); } -// ----------------------------------------------------------------------------- + SAFEARRAY* OLEVariant::getUI1SAFEARRAYPtr() const { if (V_VT(this) == (VT_ARRAY|VT_UI1)) @@ -688,7 +688,7 @@ SAFEARRAY* OLEVariant::getUI1SAFEARRAYPtr() const return V_ARRAY(&varDest); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Any OLEVariant::makeAny() const { ::com::sun::star::uno::Any aValue; @@ -771,8 +771,8 @@ SAFEARRAY* OLEVariant::getUI1SAFEARRAYPtr() const } return aValue; } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx index bd1320128f11..ac5773348b81 100644 --- a/connectivity/source/drivers/ado/Aservices.cxx +++ b/connectivity/source/drivers/ado/Aservices.cxx @@ -35,7 +35,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -73,7 +73,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL ado_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx index 660c7dd6b5df..026390aa307b 100644 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx @@ -1659,7 +1659,7 @@ ADORecordset* WpADOConnection::getExportedKeys( const ::com::sun::star::uno::Any OpenSchema(adSchemaForeignKeys,vsa,vtEmpty,&pRecordset); return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getImportedKeys( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table ) { // Create elements used in the array @@ -1701,7 +1701,7 @@ ADORecordset* WpADOConnection::getImportedKeys( const ::com::sun::star::uno::Any return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getPrimaryKeys( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table ) { // Create elements used in the array @@ -1739,7 +1739,7 @@ ADORecordset* WpADOConnection::getPrimaryKeys( const ::com::sun::star::uno::Any& return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getIndexInfo( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table, sal_Bool /*unique*/, sal_Bool /*approximate*/ ) @@ -1782,7 +1782,7 @@ ADORecordset* WpADOConnection::getIndexInfo( return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getTablePrivileges( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern ) @@ -1824,7 +1824,7 @@ ADORecordset* WpADOConnection::getTablePrivileges( const ::com::sun::star::uno:: return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getCrossReference( const ::com::sun::star::uno::Any& primaryCatalog, const OUString& primarySchema, const OUString& primaryTable, @@ -1877,7 +1877,7 @@ ADORecordset* WpADOConnection::getCrossReference( const ::com::sun::star::uno::A return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getProcedures( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ) @@ -1916,7 +1916,7 @@ ADORecordset* WpADOConnection::getProcedures( const ::com::sun::star::uno::Any& return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getProcedureColumns( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, @@ -1961,7 +1961,7 @@ ADORecordset* WpADOConnection::getProcedureColumns( const ::com::sun::star::uno: return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getTables( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, @@ -2025,7 +2025,7 @@ ADORecordset* WpADOConnection::getTables( const ::com::sun::star::uno::Any& cata return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getColumns( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, @@ -2069,7 +2069,7 @@ ADORecordset* WpADOConnection::getColumns( const ::com::sun::star::uno::Any& cat return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getColumnPrivileges( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table, @@ -2112,7 +2112,7 @@ ADORecordset* WpADOConnection::getColumnPrivileges( const ::com::sun::star::uno: return pRecordset; } -// ----------------------------------------------------------------------------- + ADORecordset* WpADOConnection::getTypeInfo(DataTypeEnum /*_eType*/) { // Create elements used in the array @@ -2140,7 +2140,7 @@ ADORecordset* WpADOConnection::getTypeInfo(DataTypeEnum /*_eType*/) return pRec; } -// ----------------------------------------------------------------------------- + void WpADOColumn::put_ParentCatalog(/* [in] */ _ADOCatalog __RPC_FAR *ppvObject) { OSL_ENSURE(pInterface,"Interface is null!"); @@ -2148,7 +2148,7 @@ void WpADOColumn::put_ParentCatalog(/* [in] */ _ADOCatalog __RPC_FAR *ppvObject) OSL_ENSURE(bRet,"Could not set ParentCatalog!"); OSL_UNUSED(bRet); } -// ----------------------------------------------------------------------------- + void WpADOTable::putref_ParentCatalog(/* [in] */ _ADOCatalog __RPC_FAR *ppvObject) { OSL_ENSURE(pInterface,"Interface is null!"); @@ -2156,12 +2156,12 @@ void WpADOTable::putref_ParentCatalog(/* [in] */ _ADOCatalog __RPC_FAR *ppvObjec OSL_ENSURE(bRet,"Could not set ParentCatalog!"); OSL_UNUSED(bRet); } -// ----------------------------------------------------------------------------- + void WpBase::setIDispatch(IDispatch* _pIUnknown) { pIUnknown = _pIUnknown; } -// ----------------------------------------------------------------------------- + void OTools::putValue(const WpADOProperties& _rProps,const OLEVariant &_aPosition,const OLEVariant &_aValVar) { OSL_ENSURE(_rProps.IsValid(),"Properties are not valid!"); @@ -2173,7 +2173,7 @@ void OTools::putValue(const WpADOProperties& _rProps,const OLEVariant &_aPositio OSL_UNUSED(bRet); } } -// ----------------------------------------------------------------------------- + OLEVariant OTools::getValue(const WpADOProperties& _rProps,const OLEVariant &_aPosition) { WpADOProperty aProp(_rProps.GetItem(_aPosition)); diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx index 9ca1a0223393..7e5647b44430 100644 --- a/connectivity/source/drivers/ado/adoimp.cxx +++ b/connectivity/source/drivers/ado/adoimp.cxx @@ -73,7 +73,7 @@ OLEString& ADOS::GetKeyStr() return sKeyStr; } -// ------------------------------------------------------------------------- + sal_Int32 ADOS::MapADOType2Jdbc(DataTypeEnum eType) { sal_Int32 nType = DataType::VARCHAR; @@ -126,7 +126,7 @@ sal_Int32 ADOS::MapADOType2Jdbc(DataTypeEnum eType) } return nType; } -// ------------------------------------------------------------------------- + DataTypeEnum ADOS::MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine) { switch (_nType) @@ -159,7 +159,7 @@ DataTypeEnum ADOS::MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine) } return adEmpty; } -// ----------------------------------------------------------------------------- + const int JET_ENGINETYPE_UNKNOWN = 0; const int JET_ENGINETYPE_JET10 = 1; const int JET_ENGINETYPE_JET11 = 2; @@ -219,7 +219,7 @@ sal_Bool ADOS::isJetEngine(sal_Int32 _nEngineType) } return bRet; } -// ----------------------------------------------------------------------------- + ObjectTypeEnum ADOS::mapObjectType2Ado(sal_Int32 objType) { ObjectTypeEnum eType = adPermObjTable; @@ -237,7 +237,7 @@ ObjectTypeEnum ADOS::mapObjectType2Ado(sal_Int32 objType) } return eType; } -// ----------------------------------------------------------------------------- + sal_Int32 ADOS::mapAdoType2Object(ObjectTypeEnum objType) { sal_Int32 nType = PrivilegeObject::TABLE; @@ -261,7 +261,7 @@ sal_Int32 ADOS::mapAdoType2Object(ObjectTypeEnum objType) #ifdef DELETE #undef DELETE #endif -// ----------------------------------------------------------------------------- + sal_Int32 ADOS::mapAdoRights2Sdbc(RightsEnum eRights) { sal_Int32 nRights = 0; @@ -282,7 +282,7 @@ sal_Int32 ADOS::mapAdoRights2Sdbc(RightsEnum eRights) return nRights; } -// ----------------------------------------------------------------------------- + sal_Int32 ADOS::mapRights2Ado(sal_Int32 nRights) { sal_Int32 eRights = adRightNone; @@ -304,7 +304,7 @@ sal_Int32 ADOS::mapRights2Ado(sal_Int32 nRights) return eRights; } -// ----------------------------------------------------------------------------- + WpADOField ADOS::getField(ADORecordset* _pRecordSet,sal_Int32 _nColumnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { if ( !_pRecordSet ) @@ -320,7 +320,7 @@ WpADOField ADOS::getField(ADORecordset* _pRecordSet,sal_Int32 _nColumnIndex) thr ::dbtools::throwInvalidIndexException(NULL); return aField; } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index aa2f18b0c5ff..da63d9d443a8 100644 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx @@ -29,14 +29,14 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; -// ------------------------------------------------------------------------- + using namespace connectivity::calc; -// ------------------------------------------------------------------------- + OCalcCatalog::OCalcCatalog(OCalcConnection* _pCon) : file::OFileCatalog(_pCon) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcCatalog::OCalcCatalog" ); } -// ------------------------------------------------------------------------- + void OCalcCatalog::refreshTables() { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcCatalog::refreshTables" ); @@ -61,7 +61,7 @@ void OCalcCatalog::refreshTables() //if ( m_pTables && m_pTables->hasElements() ) // m_pTables->getByIndex(0); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/calc/CColumns.cxx b/connectivity/source/drivers/calc/CColumns.cxx index f5542d74c83d..9fb1ca6a9201 100644 --- a/connectivity/source/drivers/calc/CColumns.cxx +++ b/connectivity/source/drivers/calc/CColumns.cxx @@ -41,6 +41,6 @@ sdbcx::ObjectType OCalcColumns::createObject(const OUString& _rName) xRet = sdbcx::ObjectType(*aIter,UNO_QUERY); return xRet; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index dc2f25b7fdea..2889096177b8 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -40,7 +40,7 @@ using namespace connectivity::file; typedef connectivity::file::OConnection OConnection_BASE; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -50,7 +50,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::sheet; -// -------------------------------------------------------------------------------- + OCalcConnection::OCalcConnection(ODriver* _pDriver) : OConnection(_pDriver),m_nDocCount(0) { @@ -103,7 +103,7 @@ void OCalcConnection::construct(const OUString& url,const Sequence< PropertyValu ODocHolder aDocHodler(this); // just to test that the doc can be loaded acquireDoc(); } -// ----------------------------------------------------------------------------- + Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcConnection::acquireDoc" ); @@ -170,14 +170,14 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() osl_atomic_increment(&m_nDocCount); return m_xDoc; } -// ----------------------------------------------------------------------------- + void OCalcConnection::releaseDoc() { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcConnection::releaseDoc" ); if ( osl_atomic_decrement(&m_nDocCount) == 0 ) ::comphelper::disposeComponent( m_xDoc ); } -// ----------------------------------------------------------------------------- + void OCalcConnection::disposing() { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcConnection::disposing" ); @@ -190,11 +190,11 @@ void OCalcConnection::disposing() } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OCalcConnection, "com.sun.star.sdbc.drivers.calc.Connection", "com.sun.star.sdbc.Connection") -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OCalcConnection::getMetaData( ) throw(SQLException, RuntimeException) { @@ -213,7 +213,7 @@ Reference< XDatabaseMetaData > SAL_CALL OCalcConnection::getMetaData( ) throw(S return xMetaData; } -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Reference< XTablesSupplier > OCalcConnection::createCatalog() { @@ -229,7 +229,7 @@ Reference< XDatabaseMetaData > SAL_CALL OCalcConnection::getMetaData( ) throw(S return xTab; } -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OCalcConnection::createStatement( ) throw(SQLException, RuntimeException) { @@ -243,7 +243,7 @@ Reference< XStatement > SAL_CALL OCalcConnection::createStatement( ) throw(SQLE return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OCalcConnection::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) @@ -260,7 +260,7 @@ Reference< XPreparedStatement > SAL_CALL OCalcConnection::prepareStatement( cons return pStmt; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OCalcConnection::prepareCall( const OUString& /*sql*/ ) throw(SQLException, RuntimeException) @@ -272,6 +272,6 @@ Reference< XPreparedStatement > SAL_CALL OCalcConnection::prepareCall( const OUS ::dbtools::throwFeatureNotImplementedException( "XConnection::prepareCall", *this ); return NULL; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index 00a6d1dad062..6cade720740a 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -46,20 +46,20 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::table; using namespace ::com::sun::star::sheet; -// ------------------------------------------------------------------------- + OCalcDatabaseMetaData::OCalcDatabaseMetaData(OConnection* _pCon) :ODatabaseMetaData(_pCon) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcDatabaseMetaData::OCalcDatabaseMetaData" ); } -// ------------------------------------------------------------------------- + OCalcDatabaseMetaData::~OCalcDatabaseMetaData() { } -// ------------------------------------------------------------------------- + Reference< XResultSet > OCalcDatabaseMetaData::impl_getTypeInfo_throw( ) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcDatabaseMetaData::impl_getTypeInfo_throw" ); @@ -139,7 +139,7 @@ Reference< XResultSet > OCalcDatabaseMetaData::impl_getTypeInfo_throw( ) return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getColumns( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern, @@ -237,7 +237,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getColumns( return xRef; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OCalcDatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { @@ -247,7 +247,7 @@ OUString SAL_CALL OCalcDatabaseMetaData::getURL( ) throw(SQLException, RuntimeE return OUString("sdbc:calc:") + m_pConnection->getURL(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { @@ -255,33 +255,33 @@ sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQ return SAL_MAX_INT32; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcDatabaseMetaData::getMaxCharLiteralLength" ); return SAL_MAX_INT32; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcDatabaseMetaData::getMaxColumnNameLength" ); return SAL_MAX_INT32; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcDatabaseMetaData::getMaxColumnsInIndex" ); return 1; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcDatabaseMetaData::getMaxColumnsInTable" ); return 256; } -// ------------------------------------------------------------------------- + static sal_Bool lcl_IsEmptyOrHidden( const Reference<XSpreadsheets>& xSheets, const OUString& rName ) { @@ -353,7 +353,7 @@ static sal_Bool lcl_IsUnnamed( const Reference<XDatabaseRanges>& xRanges, const return bUnnamed; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( const Any& /*catalog*/, const OUString& /*schemaPattern*/, @@ -449,7 +449,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( return xRef; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx index 40dcf3af9061..5d117678087a 100644 --- a/connectivity/source/drivers/calc/CDriver.cxx +++ b/connectivity/source/drivers/calc/CDriver.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; -//------------------------------------------------------------------------------ + // static ServiceInfo OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) @@ -49,7 +49,7 @@ OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException) // service names from file::OFileDriver -//------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::calc::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< @@ -92,6 +92,6 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString } return Sequence< DriverPropertyInfo >(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CPreparedStatement.cxx b/connectivity/source/drivers/calc/CPreparedStatement.cxx index 93636fd98b91..96eb9a2672a8 100644 --- a/connectivity/source/drivers/calc/CPreparedStatement.cxx +++ b/connectivity/source/drivers/calc/CPreparedStatement.cxx @@ -23,12 +23,12 @@ using namespace connectivity::calc; using namespace connectivity::file; using namespace com::sun::star::uno; -// ------------------------------------------------------------------------- + OResultSet* OCalcPreparedStatement::createResultSet() { return new OCalcResultSet(this,m_aSQLIterator); } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OCalcPreparedStatement,"com.sun.star.sdbc.driver.calc.PreparedStatement","com.sun.star.sdbc.PreparedStatement"); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CResultSet.cxx b/connectivity/source/drivers/calc/CResultSet.cxx index f6f977c0c8e5..7038cb3532a8 100644 --- a/connectivity/source/drivers/calc/CResultSet.cxx +++ b/connectivity/source/drivers/calc/CResultSet.cxx @@ -35,19 +35,19 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -//------------------------------------------------------------------------------ + OCalcResultSet::OCalcResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) ,m_bBookmarkable(sal_True) { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE), PROPERTY_ID_ISBOOKMARKABLE, PropertyAttribute::READONLY,&m_bBookmarkable, ::getBooleanCppuType()); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OCalcResultSet::getImplementationName( ) throw ( RuntimeException) { return OUString("com.sun.star.sdbcx.calc.ResultSet"); } -// ------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(2); @@ -60,19 +60,19 @@ sal_Bool SAL_CALL OCalcResultSet::supportsService( const OUString& _rServiceName { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + Any SAL_CALL OCalcResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OResultSet::queryInterface(rType); return aRet.hasValue() ? aRet : OCalcResultSet_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OCalcResultSet::getTypes( ) throw( RuntimeException) { return ::comphelper::concatSequences(OResultSet::getTypes(),OCalcResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + // XRowLocate Any SAL_CALL OCalcResultSet::getBookmark( ) throw( SQLException, RuntimeException) { @@ -82,7 +82,7 @@ Any SAL_CALL OCalcResultSet::getBookmark( ) throw( SQLException, RuntimeExcept return makeAny((sal_Int32)(m_aRow->get())[0]->getValue()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OCalcResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -93,7 +93,7 @@ sal_Bool SAL_CALL OCalcResultSet::moveToBookmark( const Any& bookmark ) throw( return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_True); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -107,17 +107,17 @@ sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const Any& bookmark, return relative(rows); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCalcResultSet::compareBookmarks( const Any& lhs, const Any& rhs ) throw( SQLException, RuntimeException) { return (lhs == rhs) ? 0 : 2; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OCalcResultSet::hasOrderedBookmarks( ) throw( SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCalcResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -126,7 +126,7 @@ sal_Int32 SAL_CALL OCalcResultSet::hashBookmark( const Any& bookmark ) throw( S return comphelper::getINT32(bookmark); } -// ------------------------------------------------------------------------- + // XDeleteRows Sequence< sal_Int32 > SAL_CALL OCalcResultSet::deleteRows( const Sequence< Any >& /*rows*/ ) throw( SQLException, RuntimeException) { @@ -136,41 +136,41 @@ Sequence< sal_Int32 > SAL_CALL OCalcResultSet::deleteRows( const Sequence< Any ::dbtools::throwFeatureNotImplementedException( "XDeleteRows::deleteRows", *this ); return Sequence< sal_Int32 >(); } -// ------------------------------------------------------------------------- + sal_Bool OCalcResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/) { // Calc table has no index return sal_False; } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OCalcResultSet::getInfoHelper() { return *OCalcResultSet_BASE3::getArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OCalcResultSet::createArrayHelper() const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + void SAL_CALL OCalcResultSet::acquire() throw() { OCalcResultSet_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCalcResultSet::release() throw() { OCalcResultSet_BASE2::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OCalcResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CStatement.cxx b/connectivity/source/drivers/calc/CStatement.cxx index 3f0199ca2baa..15d4e45a04b8 100644 --- a/connectivity/source/drivers/calc/CStatement.cxx +++ b/connectivity/source/drivers/calc/CStatement.cxx @@ -23,12 +23,12 @@ using namespace connectivity::calc; using namespace connectivity::file; using namespace com::sun::star::uno; -// ------------------------------------------------------------------------- + OResultSet* OCalcStatement::createResultSet() { return new OCalcResultSet(this,m_aSQLIterator); } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OCalcStatement,"com.sun.star.sdbc.driver.calc.Statement","com.sun.star.sdbc.Statement"); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 5b8630d63718..ec38222882ce 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -311,7 +311,7 @@ static void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Refe } } -// ------------------------------------------------------------------------- + static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, sal_Int32 nStartCol, sal_Int32 nStartRow, sal_Bool bHasHeaders, @@ -428,7 +428,7 @@ static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& x // rValue.setTypeKind(nType); } -// ------------------------------------------------------------------------- + static OUString lcl_GetColumnStr( sal_Int32 nColumn ) { @@ -521,7 +521,7 @@ void OCalcTable::fillColumns() } } -// ------------------------------------------------------------------------- + OCalcTable::OCalcTable(sdbcx::OCollection* _pTables,OCalcConnection* _pConnection, const OUString& _Name, const OUString& _Type, @@ -543,7 +543,7 @@ OCalcTable::OCalcTable(sdbcx::OCollection* _pTables,OCalcConnection* _pConnectio { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::OCalcTable" ); } -// ----------------------------------------------------------------------------- + void OCalcTable::construct() { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::construct" ); @@ -626,7 +626,7 @@ void OCalcTable::construct() refreshColumns(); } -// ------------------------------------------------------------------------- + void OCalcTable::refreshColumns() { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::refreshColumns" ); @@ -643,14 +643,14 @@ void OCalcTable::refreshColumns() else m_pColumns = new OCalcColumns(this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void OCalcTable::refreshIndexes() { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::refreshIndexes" ); // Calc table has no index } -// ------------------------------------------------------------------------- + void SAL_CALL OCalcTable::disposing(void) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::disposing" ); @@ -662,7 +662,7 @@ void SAL_CALL OCalcTable::disposing(void) m_pConnection = NULL; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OCalcTable::getTypes( ) throw(RuntimeException) { //SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::getTypes" ); @@ -687,7 +687,7 @@ Sequence< Type > SAL_CALL OCalcTable::getTypes( ) throw(RuntimeException) return Sequence< Type >(pAttrs, aOwnTypes.size()); } -// ------------------------------------------------------------------------- + Any SAL_CALL OCalcTable::queryInterface( const Type & rType ) throw(RuntimeException) { if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || @@ -701,7 +701,7 @@ Any SAL_CALL OCalcTable::queryInterface( const Type & rType ) throw(RuntimeExcep return aRet.hasValue() ? aRet : OTable_TYPEDEF::queryInterface(rType); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OCalcTable::getUnoTunnelImplementationId() { //SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::getUnoTunnelImplementationId" ); @@ -719,7 +719,7 @@ Sequence< sal_Int8 > OCalcTable::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OCalcTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { //SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::getSomething" ); @@ -727,17 +727,17 @@ sal_Int64 OCalcTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (Ru ? reinterpret_cast< sal_Int64 >( this ) : OCalcTable_BASE::getSomething(rId); } -//------------------------------------------------------------------ + sal_Int32 OCalcTable::getCurrentLastPos() const { //SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::getCurrentLastPos" ); return m_nDataRows; } -//------------------------------------------------------------------ + sal_Bool OCalcTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::seekRow" ); - // ---------------------------------------------------------- + // prepare positioning: sal_uInt32 nNumberOfRecords = m_nDataRows; @@ -806,7 +806,7 @@ End: nCurPos = m_nFilePos; return sal_True; } -//------------------------------------------------------------------ + sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, sal_Bool _bUseTableDefs, sal_Bool bRetrieveData ) { @@ -843,7 +843,7 @@ sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, } return sal_True; } -// ------------------------------------------------------------------------- + void OCalcTable::FileClose() { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::FileClose" ); @@ -851,6 +851,6 @@ void OCalcTable::FileClose() OCalcTable_BASE::FileClose(); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/CTables.cxx b/connectivity/source/drivers/calc/CTables.cxx index 407f2b3950f1..7b084a16b7d2 100644 --- a/connectivity/source/drivers/calc/CTables.cxx +++ b/connectivity/source/drivers/calc/CTables.cxx @@ -44,6 +44,6 @@ sdbcx::ObjectType OCalcTables::createObject(const OUString& _rName) pTable->construct(); return xRet; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx index 7b95af660383..335be8ab969a 100644 --- a/connectivity/source/drivers/calc/Cservices.cxx +++ b/connectivity/source/drivers/calc/Cservices.cxx @@ -35,7 +35,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -75,7 +75,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL connectivity_calc_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index 6c67969ed46f..4ff0d83c65c2 100644 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx @@ -29,13 +29,13 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; -// ------------------------------------------------------------------------- + using namespace connectivity::dbase; -// ------------------------------------------------------------------------- + ODbaseCatalog::ODbaseCatalog(ODbaseConnection* _pCon) : file::OFileCatalog(_pCon) { } -// ------------------------------------------------------------------------- + void ODbaseCatalog::refreshTables() { TStringVector aVector; diff --git a/connectivity/source/drivers/dbase/DCode.cxx b/connectivity/source/drivers/dbase/DCode.cxx index 9d9b0827eab9..80e9aed2c9a5 100644 --- a/connectivity/source/drivers/dbase/DCode.cxx +++ b/connectivity/source/drivers/dbase/DCode.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; TYPEINIT1(OFILEOperandAttr, OOperandAttr); -// ----------------------------------------------------------------------------- + OOperandAttr* OFILEAnalyzer::createOperandAttr(sal_Int32 _nPos, const Reference< XPropertySet>& _xCol, const Reference< XNameAccess>& _xIndexes) @@ -40,7 +40,7 @@ OOperandAttr* OFILEAnalyzer::createOperandAttr(sal_Int32 _nPos, return new OFILEOperandAttr((sal_uInt16)_nPos,_xCol,_xIndexes); } -//------------------------------------------------------------------ + OFILEOperandAttr::OFILEOperandAttr(sal_uInt16 _nPos, const Reference< XPropertySet>& _xColumn, const Reference< XNameAccess>& _xIndexes) @@ -82,12 +82,12 @@ OFILEOperandAttr::OFILEOperandAttr(sal_uInt16 _nPos, } } -// ------------------------------------------------------------------------- + sal_Bool OFILEOperandAttr::isIndexed() const { return m_xIndex.is(); } -//------------------------------------------------------------------ + OEvaluateSet* OFILEOperandAttr::preProcess(OBoolOperator* pOp, OOperand* pRight) { OEvaluateSet* pEvaluateSet = NULL; diff --git a/connectivity/source/drivers/dbase/DColumns.cxx b/connectivity/source/drivers/dbase/DColumns.cxx index eaa6d1a605e1..00888a0c4e77 100644 --- a/connectivity/source/drivers/dbase/DColumns.cxx +++ b/connectivity/source/drivers/dbase/DColumns.cxx @@ -46,18 +46,18 @@ sdbcx::ObjectType ODbaseColumns::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void ODbaseColumns::impl_refresh() throw(RuntimeException) { m_pTable->refreshColumns(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > ODbaseColumns::createDescriptor() { return new sdbcx::OColumn(isCaseSensitive()); } -// ----------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + // XAppend sdbcx::ObjectType ODbaseColumns::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -67,14 +67,14 @@ sdbcx::ObjectType ODbaseColumns::appendObject( const OUString& _rForName, const m_pTable->addColumn( descriptor ); return createObject( _rForName ); } -// ----------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + // XDrop void ODbaseColumns::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/) { if(!m_pTable->isNew()) m_pTable->dropColumn(_nPos); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx index 0ef1c4229b38..2fd71ab384ba 100644 --- a/connectivity/source/drivers/dbase/DConnection.cxx +++ b/connectivity/source/drivers/dbase/DConnection.cxx @@ -33,7 +33,7 @@ using namespace connectivity::file; typedef connectivity::file::OConnection OConnection_BASE; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbcx; @@ -41,23 +41,23 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; DBG_NAME(ODbaseConnection) -// -------------------------------------------------------------------------------- + ODbaseConnection::ODbaseConnection(ODriver* _pDriver) : OConnection(_pDriver) { DBG_CTOR(ODbaseConnection,NULL); m_aFilenameExtension = "dbf"; } -//----------------------------------------------------------------------------- + ODbaseConnection::~ODbaseConnection() { DBG_DTOR(ODbaseConnection,NULL); } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(ODbaseConnection, "com.sun.star.sdbc.drivers.dbase.Connection", "com.sun.star.sdbc.Connection") -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL ODbaseConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -73,7 +73,7 @@ Reference< XDatabaseMetaData > SAL_CALL ODbaseConnection::getMetaData( ) throw( return xMetaData; } -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Reference< XTablesSupplier > ODbaseConnection::createCatalog() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -86,7 +86,7 @@ Reference< XDatabaseMetaData > SAL_CALL ODbaseConnection::getMetaData( ) throw( } return xTab; } -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL ODbaseConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -97,7 +97,7 @@ Reference< XStatement > SAL_CALL ODbaseConnection::createStatement( ) throw(SQL m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -110,12 +110,12 @@ Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( con m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return pStmt; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareCall( const OUString& /*sql*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::prepareCall", *this ); return NULL; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 13c25f5e7bef..3047b5b77aec 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -49,11 +49,11 @@ ODbaseDatabaseMetaData::ODbaseDatabaseMetaData(::connectivity::file::OConnection { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::ODbaseDatabaseMetaData" ); } -// ------------------------------------------------------------------------- + ODbaseDatabaseMetaData::~ODbaseDatabaseMetaData() { } -// ------------------------------------------------------------------------- + Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::impl_getTypeInfo_throw" ); @@ -153,7 +153,7 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -244,7 +244,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( const Any& /*catalog*/, const OUString& /*schema*/, const OUString& table, sal_Bool unique, sal_Bool /*approximate*/ ) throw(SQLException, RuntimeException) @@ -321,56 +321,56 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODbaseDatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::getURL" ); ::osl::MutexGuard aGuard( m_aMutex ); return OUString("sdbc:dbase:") + m_pConnection->getURL(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::getMaxBinaryLiteralLength" ); return SAL_MAX_INT32; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::getMaxCharLiteralLength" ); return 254; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::getMaxColumnNameLength" ); return 10; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::getMaxColumnsInIndex" ); return 1; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::getMaxColumnsInTable" ); return 128; } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODbaseDatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::supportsAlterTableWithAddColumn" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODbaseDatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::supportsAlterTableWithDropColumn" ); return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::isReadOnly" ); @@ -383,19 +383,19 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run return bReadOnly; } -// ----------------------------------------------------------------------------- + sal_Bool ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw" ); return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw" ); return sal_True; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index 67748a843ae8..993b7abf7fd3 100644 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx @@ -34,24 +34,24 @@ using namespace ::com::sun::star::lang; // static ServiceInfo -//------------------------------------------------------------------------------ + OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString("com.sun.star.comp.sdbc.dbase.ODriver"); } -//------------------------------------------------------------------ + OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::dbase::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { return *(new ODriver( comphelper::getComponentContext(_rxFactory) )); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -68,12 +68,12 @@ Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const S return xCon; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL ODriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { return url.startsWith("sdbc:dbase:"); } -// ----------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) { if ( acceptsURL(url) ) @@ -113,7 +113,7 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString ::dbtools::throwGenericSQLException(sMessage ,*this); return Sequence< DriverPropertyInfo >(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 73bf4f45a9be..5286072b7665 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -41,7 +41,7 @@ #include <unotools/sharedunocomponent.hxx> using namespace ::comphelper; -// ------------------------------------------------------------------------- + using namespace connectivity; using namespace utl; using namespace ::cppu; @@ -55,7 +55,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::lang; IMPLEMENT_SERVICE_INFO(ODbaseIndex,"com.sun.star.sdbcx.driver.dbase.Index","com.sun.star.sdbcx.Index"); -// ------------------------------------------------------------------------- + ODbaseIndex::ODbaseIndex(ODbaseTable* _pTable) : OIndex(sal_True/*_pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()*/) , m_pFileStream(NULL) @@ -68,7 +68,7 @@ ODbaseIndex::ODbaseIndex(ODbaseTable* _pTable) memset(&m_aHeader, 0, sizeof(m_aHeader)); construct(); } -// ------------------------------------------------------------------------- + ODbaseIndex::ODbaseIndex( ODbaseTable* _pTable, const NDXHeader& _rHeader, const OUString& _rName) @@ -83,12 +83,12 @@ ODbaseIndex::ODbaseIndex( ODbaseTable* _pTable, { construct(); } -// ----------------------------------------------------------------------------- + ODbaseIndex::~ODbaseIndex() { closeImpl(); } -// ------------------------------------------------------------------------- + void ODbaseIndex::refreshColumns() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -106,7 +106,7 @@ void ODbaseIndex::refreshColumns() else m_pColumns = new ODbaseIndexColumns(this,m_aMutex,aVector); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -123,14 +123,14 @@ Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelImplementationId() } // XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 ODbaseIndex::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : ODbaseIndex_BASE::getSomething(rId); } -//------------------------------------------------------------------ + ONDXPagePtr ODbaseIndex::getRoot() { openIndexFile(); @@ -142,7 +142,7 @@ ONDXPagePtr ODbaseIndex::getRoot() } return m_aRoot; } -//------------------------------------------------------------------ + sal_Bool ODbaseIndex::openIndexFile() { if(!m_pFileStream) @@ -172,14 +172,14 @@ sal_Bool ODbaseIndex::openIndexFile() return m_pFileStream != NULL; } -//------------------------------------------------------------------ + OIndexIterator* ODbaseIndex::createIterator(OBoolOperator* pOp, const OOperand* pOperand) { openIndexFile(); return new OIndexIterator(this, pOp, pOperand); } -//------------------------------------------------------------------ + sal_Bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -207,7 +207,7 @@ sal_Bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSet return sal_True; } -//------------------------------------------------------------------ + sal_Bool ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); @@ -218,7 +218,7 @@ sal_Bool ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) return ConvertToKey(&aKey, nRec, rValue) && getRoot()->Find(aKey); } -//------------------------------------------------------------------ + sal_Bool ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); @@ -242,7 +242,7 @@ sal_Bool ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) return bResult; } -//------------------------------------------------------------------ + sal_Bool ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue, const ORowSetValue& rNewValue) { @@ -255,7 +255,7 @@ sal_Bool ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue, return Delete(nRec, rOldValue) && Insert(nRec,rNewValue); } -//------------------------------------------------------------------ + sal_Bool ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); @@ -277,13 +277,13 @@ sal_Bool ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) return m_aCurLeaf->Delete(m_nCurNode); } -//------------------------------------------------------------------ + void ODbaseIndex::Collect(ONDXPage* pPage) { if (pPage) m_aCollector.push_back(pPage); } -//------------------------------------------------------------------ + void ODbaseIndex::Release(sal_Bool bSave) { // Release the Index-recources @@ -320,7 +320,7 @@ void ODbaseIndex::Release(sal_Bool bSave) closeImpl(); } -// ----------------------------------------------------------------------------- + void ODbaseIndex::closeImpl() { if(m_pFileStream) @@ -329,7 +329,7 @@ void ODbaseIndex::closeImpl() m_pFileStream = NULL; } } -//------------------------------------------------------------------ + ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, sal_Bool bLoad) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -351,7 +351,7 @@ ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, sal_Bo return pPage; } -//------------------------------------------------------------------ + SvStream& connectivity::dbase::operator >> (SvStream &rStream, ODbaseIndex& rIndex) { rStream.Seek(0); @@ -361,14 +361,14 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ODbaseIndex& rInd rIndex.m_nPageCount = rIndex.m_aHeader.db_pagecount; return rStream; } -//------------------------------------------------------------------ + SvStream& connectivity::dbase::WriteODbaseIndex(SvStream &rStream, ODbaseIndex& rIndex) { rStream.Seek(0); OSL_VERIFY_EQUALS( rStream.Write(&rIndex.m_aHeader,DINDEX_PAGE_SIZE), DINDEX_PAGE_SIZE, "Write not successful: Wrong header size for dbase index!"); return rStream; } -// ------------------------------------------------------------------------- + OUString ODbaseIndex::getCompletePath() { OUString sDir = m_pTable->getConnection()->getURL() + @@ -376,7 +376,7 @@ OUString ODbaseIndex::getCompletePath() m_Name + ".ndx"; return sDir; } -//------------------------------------------------------------------ + void ODbaseIndex::createINFEntry() { // synchronize inf-file @@ -412,7 +412,7 @@ void ODbaseIndex::createINFEntry() } aInfFile.WriteKey(aNewEntry, OUStringToOString(sEntry, m_pTable->getConnection()->getTextEncoding())); } -// ------------------------------------------------------------------------- + sal_Bool ODbaseIndex::DropImpl() { closeImpl(); @@ -455,7 +455,7 @@ sal_Bool ODbaseIndex::DropImpl() } return sal_True; } -// ------------------------------------------------------------------------- + void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const OUString& _sFile) { closeImpl(); @@ -463,7 +463,7 @@ void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const OU UCBContentHelper::Kill(_sFile); m_pTable->getConnection()->throwGenericSQLException(_nErrorId,*this); } -//------------------------------------------------------------------ + sal_Bool ODbaseIndex::CreateImpl() { // Create the Index @@ -603,18 +603,18 @@ sal_Bool ODbaseIndex::CreateImpl() createINFEntry(); return sal_True; } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + void SAL_CALL ODbaseIndex::acquire() throw() { ODbaseIndex_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODbaseIndex::release() throw() { ODbaseIndex_BASE::release(); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx index 9a2da6e39659..16ab90e6ac88 100644 --- a/connectivity/source/drivers/dbase/DIndexColumns.cxx +++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx @@ -67,22 +67,22 @@ sdbcx::ObjectType ODbaseIndexColumns::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void ODbaseIndexColumns::impl_refresh() throw(RuntimeException) { m_pIndex->refreshColumns(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > ODbaseIndexColumns::createDescriptor() { return new sdbcx::OIndexColumn(m_pIndex->getTable()->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } -// ------------------------------------------------------------------------- + sdbcx::ObjectType ODbaseIndexColumns::appendObject( const OUString& /*_rForName*/, const Reference< XPropertySet >& descriptor ) { return cloneDescriptor( descriptor ); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx index 2a5892aa84c6..00ca2e78095d 100644 --- a/connectivity/source/drivers/dbase/DIndexIter.cxx +++ b/connectivity/source/drivers/dbase/DIndexIter.cxx @@ -27,24 +27,24 @@ using namespace connectivity::file; //================================================================== // OIndexIterator //================================================================== -//------------------------------------------------------------------ + OIndexIterator::~OIndexIterator() { m_pIndex->release(); } -//------------------------------------------------------------------ + sal_uIntPtr OIndexIterator::First() { return Find(sal_True); } -//------------------------------------------------------------------ + sal_uIntPtr OIndexIterator::Next() { return Find(sal_False); } -//------------------------------------------------------------------ + sal_uIntPtr OIndexIterator::Find(sal_Bool bFirst) { sal_uIntPtr nRes = NODE_NOTFOUND; @@ -82,7 +82,7 @@ sal_uIntPtr OIndexIterator::Find(sal_Bool bFirst) return nRes; } -//------------------------------------------------------------------ + ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) { // searches a given key @@ -128,7 +128,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) return pFoundKey; } -//------------------------------------------------------------------ + sal_uIntPtr OIndexIterator::GetCompare(sal_Bool bFirst) { ONDXKey* pKey = NULL; @@ -198,7 +198,7 @@ sal_uIntPtr OIndexIterator::GetCompare(sal_Bool bFirst) return pKey ? pKey->GetRecord() : NODE_NOTFOUND; } -//------------------------------------------------------------------ + sal_uIntPtr OIndexIterator::GetLike(sal_Bool bFirst) { if (bFirst) @@ -218,7 +218,7 @@ sal_uIntPtr OIndexIterator::GetLike(sal_Bool bFirst) return pKey ? pKey->GetRecord() : NODE_NOTFOUND; } -//------------------------------------------------------------------ + sal_uIntPtr OIndexIterator::GetNull(sal_Bool bFirst) { if (bFirst) @@ -240,7 +240,7 @@ sal_uIntPtr OIndexIterator::GetNull(sal_Bool bFirst) return pKey ? pKey->GetRecord() : NODE_NOTFOUND; } -//------------------------------------------------------------------ + sal_uIntPtr OIndexIterator::GetNotNull(sal_Bool bFirst) { ONDXKey* pKey; @@ -259,7 +259,7 @@ sal_uIntPtr OIndexIterator::GetNotNull(sal_Bool bFirst) return pKey ? pKey->GetRecord() : NODE_NOTFOUND; } -//------------------------------------------------------------------ + ONDXKey* OIndexIterator::GetNextKey() { if (m_aCurLeaf.Is() && ((++m_nCurNode) >= m_aCurLeaf->Count())) diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx index ef31f7e73e62..56dd8a750c97 100644 --- a/connectivity/source/drivers/dbase/DIndexes.cxx +++ b/connectivity/source/drivers/dbase/DIndexes.cxx @@ -77,18 +77,18 @@ sdbcx::ObjectType ODbaseIndexes::createObject(const OUString& _rName) } return xRet; } -// ------------------------------------------------------------------------- + void ODbaseIndexes::impl_refresh( ) throw(RuntimeException) { if(m_pTable) m_pTable->refreshIndexes(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > ODbaseIndexes::createDescriptor() { return new ODbaseIndex(m_pTable); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -102,7 +102,7 @@ sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void ODbaseIndexes::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/) { @@ -115,7 +115,7 @@ void ODbaseIndexes::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/) } } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DPreparedStatement.cxx b/connectivity/source/drivers/dbase/DPreparedStatement.cxx index 48ccb2042114..8aff710eaee8 100644 --- a/connectivity/source/drivers/dbase/DPreparedStatement.cxx +++ b/connectivity/source/drivers/dbase/DPreparedStatement.cxx @@ -23,12 +23,12 @@ using namespace connectivity::dbase; using namespace connectivity::file; using namespace com::sun::star::uno; -// ------------------------------------------------------------------------- + OResultSet* ODbasePreparedStatement::createResultSet() { return new ODbaseResultSet(this,m_aSQLIterator); } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(ODbasePreparedStatement,"com.sun.star.sdbc.driver.dbase.PreparedStatement","com.sun.star.sdbc.PreparedStatement"); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index 4df238369842..768f210e9120 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -39,19 +39,19 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -//------------------------------------------------------------------------------ + ODbaseResultSet::ODbaseResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) ,m_bBookmarkable(sal_True) { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE), PROPERTY_ID_ISBOOKMARKABLE, PropertyAttribute::READONLY,&m_bBookmarkable, ::getBooleanCppuType()); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODbaseResultSet::getImplementationName( ) throw ( RuntimeException) { return OUString("com.sun.star.sdbcx.dbase.ResultSet"); } -// ------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL ODbaseResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(2); @@ -64,19 +64,19 @@ sal_Bool SAL_CALL ODbaseResultSet::supportsService( const OUString& _rServiceNam { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + Any SAL_CALL ODbaseResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ODbaseResultSet_BASE::queryInterface(rType); return aRet.hasValue() ? aRet : OResultSet::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL ODbaseResultSet::getTypes( ) throw( RuntimeException) { return ::comphelper::concatSequences(OResultSet::getTypes(),ODbaseResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + // XRowLocate Any SAL_CALL ODbaseResultSet::getBookmark( ) throw( SQLException, RuntimeException) { @@ -86,7 +86,7 @@ Any SAL_CALL ODbaseResultSet::getBookmark( ) throw( SQLException, RuntimeExcep return makeAny((sal_Int32)(m_aRow->get())[0]->getValue()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -97,7 +97,7 @@ sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark ) throw( return m_pTable ? Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_True) : sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -111,7 +111,7 @@ sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark, return relative(rows); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODbaseResultSet::compareBookmarks( const Any& lhs, const Any& rhs ) throw( SQLException, RuntimeException) { sal_Int32 nFirst(0),nSecond(0),nResult(0); @@ -133,12 +133,12 @@ sal_Int32 SAL_CALL ODbaseResultSet::compareBookmarks( const Any& lhs, const Any& return nResult; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODbaseResultSet::hasOrderedBookmarks( ) throw( SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODbaseResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -147,7 +147,7 @@ sal_Int32 SAL_CALL ODbaseResultSet::hashBookmark( const Any& bookmark ) throw( return comphelper::getINT32(bookmark); } -// ------------------------------------------------------------------------- + // XDeleteRows Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< Any >& /*rows*/ ) throw( SQLException, RuntimeException) { @@ -157,7 +157,7 @@ Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< An ::dbtools::throwFeatureNotImplementedException( "XDeleteRows::deleteRows", *this ); return Sequence< sal_Int32 >(); } -// ------------------------------------------------------------------------- + sal_Bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xIndex) { Reference<XUnoTunnel> xTunnel(_xIndex,UNO_QUERY); @@ -187,44 +187,44 @@ sal_Bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_x } return sal_False; } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & ODbaseResultSet::getInfoHelper() { return *ODbaseResultSet_BASE3::getArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* ODbaseResultSet::createArrayHelper() const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODbaseResultSet::acquire() throw() { ODbaseResultSet_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODbaseResultSet::release() throw() { ODbaseResultSet_BASE2::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL ODbaseResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + OSQLAnalyzer* ODbaseResultSet::createAnalyzer() { return new OFILEAnalyzer(m_pTable->getConnection()); } -// ----------------------------------------------------------------------------- + sal_Int32 ODbaseResultSet::getCurrentFilePos() const { return m_pTable->getFilePos(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DStatement.cxx b/connectivity/source/drivers/dbase/DStatement.cxx index 3477e015e933..e0eea49f36eb 100644 --- a/connectivity/source/drivers/dbase/DStatement.cxx +++ b/connectivity/source/drivers/dbase/DStatement.cxx @@ -24,12 +24,12 @@ using namespace connectivity::dbase; using namespace connectivity::file; using namespace com::sun::star::uno; -// ------------------------------------------------------------------------- + OResultSet* ODbaseStatement::createResultSet() { return new ODbaseResultSet(this,m_aSQLIterator); } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(ODbaseStatement,"com.sun.star.sdbc.driver.dbase.Statement","com.sun.star.sdbc.Statement"); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index c07f80108e68..b23085cf3f1c 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -189,7 +189,7 @@ void lcl_CalDate(sal_Int32 _nJulianDate,sal_Int32 _nJulianTime,com::sun::star::u } -// ------------------------------------------------------------------------- + void ODbaseTable::readHeader() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::readHeader" ); @@ -292,7 +292,7 @@ void ODbaseTable::readHeader() } } } -// ------------------------------------------------------------------------- + void ODbaseTable::fillColumns() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::fillColumns" ); @@ -439,7 +439,7 @@ void ODbaseTable::fillColumns() } // for (; i < nFieldCount; i++) OSL_ENSURE(i,"No columns in table!"); } -// ------------------------------------------------------------------------- + ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables, ODbaseConnection* _pConnection) : ODbaseTable_BASE(_pTables,_pConnection) , m_pMemoStream(NULL) @@ -451,7 +451,7 @@ ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables, ODbaseConnection* _pConne m_aHeader.db_typ = dBaseIII; m_eEncoding = getConnection()->getTextEncoding(); } -// ------------------------------------------------------------------------- + ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables, ODbaseConnection* _pConnection, const OUString& _Name, const OUString& _Type, @@ -471,7 +471,7 @@ ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables, ODbaseConnection* _pConne m_eEncoding = getConnection()->getTextEncoding(); } -// ----------------------------------------------------------------------------- + void ODbaseTable::construct() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::construct" ); @@ -554,7 +554,7 @@ void ODbaseTable::construct() AllocBuffer(); } } -//------------------------------------------------------------------ + sal_Bool ODbaseTable::ReadMemoHeader() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::ReadMemoHeader" ); @@ -604,7 +604,7 @@ sal_Bool ODbaseTable::ReadMemoHeader() } return sal_True; } -// ------------------------------------------------------------------------- + OUString ODbaseTable::getEntry(OConnection* _pConnection,const OUString& _sName ) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::getEntry" ); @@ -648,7 +648,7 @@ OUString ODbaseTable::getEntry(OConnection* _pConnection,const OUString& _sName } return sURL; } -// ------------------------------------------------------------------------- + void ODbaseTable::refreshColumns() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::refreshColumns" ); @@ -665,7 +665,7 @@ void ODbaseTable::refreshColumns() else m_pColumns = new ODbaseColumns(this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void ODbaseTable::refreshIndexes() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::refreshIndexes" ); @@ -710,7 +710,7 @@ void ODbaseTable::refreshIndexes() m_pIndexes = new ODbaseIndexes(this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void SAL_CALL ODbaseTable::disposing(void) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::disposing" ); @@ -718,7 +718,7 @@ void SAL_CALL ODbaseTable::disposing(void) ::osl::MutexGuard aGuard(m_aMutex); m_aColumns = NULL; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::getTypes" ); @@ -741,7 +741,7 @@ Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) throw(RuntimeException) return Sequence< Type >(pTypes, aOwnTypes.size()); } -// ------------------------------------------------------------------------- + Any SAL_CALL ODbaseTable::queryInterface( const Type & rType ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::queryInterface" ); @@ -753,7 +753,7 @@ Any SAL_CALL ODbaseTable::queryInterface( const Type & rType ) throw(RuntimeExce return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< ::com::sun::star::lang::XUnoTunnel*> (this)); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > ODbaseTable::getUnoTunnelImplementationId() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::getUnoTunnelImplementationId" ); @@ -771,7 +771,7 @@ Sequence< sal_Int8 > ODbaseTable::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::getSomething" ); @@ -779,7 +779,7 @@ sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (R ? reinterpret_cast< sal_Int64 >( this ) : ODbaseTable_BASE::getSomething(rId); } -//------------------------------------------------------------------ + sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::fetchRow" ); @@ -1001,8 +1001,8 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s } return sal_True; } -//------------------------------------------------------------------ -// ------------------------------------------------------------------------- + + void ODbaseTable::FileClose() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::FileClose" ); @@ -1016,7 +1016,7 @@ void ODbaseTable::FileClose() ODbaseTable_BASE::FileClose(); } -// ------------------------------------------------------------------------- + sal_Bool ODbaseTable::CreateImpl() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::CreateImpl" ); @@ -1131,7 +1131,7 @@ sal_Bool ODbaseTable::CreateImpl() return sal_True; } -// ----------------------------------------------------------------------------- + void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const OUString& _sColumnName) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::throwInvalidColumnType" ); @@ -1150,7 +1150,7 @@ void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const OUStri ) ); ::dbtools::throwGenericSQLException( sError, *this ); } -//------------------------------------------------------------------ + // creates in principle dBase IV file format sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo) { @@ -1399,7 +1399,7 @@ sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMe return sal_True; } -//------------------------------------------------------------------ + // creates in principle dBase III file format sal_Bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) { @@ -1420,7 +1420,7 @@ sal_Bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) m_pMemoStream = NULL; return sal_True; } -//------------------------------------------------------------------ + sal_Bool ODbaseTable::Drop_Static(const OUString& _sUrl,sal_Bool _bHasMemoFields,OCollection* _pIndexes ) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::Drop_Static" ); @@ -1469,7 +1469,7 @@ sal_Bool ODbaseTable::Drop_Static(const OUString& _sUrl,sal_Bool _bHasMemoFields } return bDropped; } -// ----------------------------------------------------------------------------- + sal_Bool ODbaseTable::DropImpl() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::DropImpl" ); @@ -1488,7 +1488,7 @@ sal_Bool ODbaseTable::DropImpl() return bDropped; } -//------------------------------------------------------------------ + sal_Bool ODbaseTable::InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const Reference<XIndexAccess>& _xCols) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::InsertRow" ); @@ -1546,7 +1546,7 @@ sal_Bool ODbaseTable::InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const Ref return bInsertRow; } -//------------------------------------------------------------------ + sal_Bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference<XIndexAccess>& _xCols) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::UpdateRow" ); @@ -1576,7 +1576,7 @@ sal_Bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,con return sal_True; } -//------------------------------------------------------------------ + sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::DeleteRow" ); @@ -1629,7 +1629,7 @@ sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) m_pFileStream->Flush(); return sal_True; } -// ------------------------------------------------------------------------- + Reference<XPropertySet> ODbaseTable::isUniqueByColumnName(sal_Int32 _nColumnPos) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::isUniqueByColumnName" ); @@ -1658,13 +1658,13 @@ Reference<XPropertySet> ODbaseTable::isUniqueByColumnName(sal_Int32 _nColumnPos) } return Reference<XPropertySet>(); } -//------------------------------------------------------------------ + static double toDouble(const OString& rString) { return ::rtl::math::stringToDouble( rString, '.', ',', NULL, NULL ); } -//------------------------------------------------------------------ + sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, const Reference<XIndexAccess>& _xCols, const bool bForceAllFields) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::UpdateBuffer" ); @@ -2001,7 +2001,7 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_uIntPtr& rBlockNr) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::WriteMemo" ); @@ -2136,7 +2136,7 @@ sal_Bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_uIntPtr& rBlo return sal_True; } -// ----------------------------------------------------------------------------- + // XAlterTable void SAL_CALL ODbaseTable::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException) { @@ -2150,7 +2150,7 @@ void SAL_CALL ODbaseTable::alterColumnByName( const OUString& colName, const Ref alterColumn(m_pColumns->findColumn(colName)-1,descriptor,xOldColumn); } -// ------------------------------------------------------------------------- + void SAL_CALL ODbaseTable::alterColumnByIndex( sal_Int32 index, const Reference< XPropertySet >& descriptor ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::alterColumnByIndex" ); @@ -2164,7 +2164,7 @@ void SAL_CALL ODbaseTable::alterColumnByIndex( sal_Int32 index, const Reference< m_pColumns->getByIndex(index) >>= xOldColumn; alterColumn(index,descriptor,xOldColumn); } -// ----------------------------------------------------------------------------- + void ODbaseTable::alterColumn(sal_Int32 index, const Reference< XPropertySet >& descriptor , const Reference< XDataDescriptorFactory >& xOldColumn ) @@ -2272,13 +2272,13 @@ void ODbaseTable::alterColumn(sal_Int32 index, throw; } } -// ----------------------------------------------------------------------------- + Reference< XDatabaseMetaData> ODbaseTable::getMetaData() const { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::getMetaData" ); return getConnection()->getMetaData(); } -// ------------------------------------------------------------------------- + void SAL_CALL ODbaseTable::rename( const OUString& newName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::rename" ); @@ -2335,7 +2335,7 @@ namespace } } } -// ------------------------------------------------------------------------- + void SAL_CALL ODbaseTable::renameImpl( const OUString& newName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::getEntry" ); @@ -2351,7 +2351,7 @@ void SAL_CALL ODbaseTable::renameImpl( const OUString& newName ) throw(::com::su renameFile(m_pConnection,m_Name,newName,sExt); } } -// ----------------------------------------------------------------------------- + void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::addColumn" ); @@ -2424,7 +2424,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) throw; } } -// ----------------------------------------------------------------------------- + void ODbaseTable::dropColumn(sal_Int32 _nPos) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::dropColumn" ); @@ -2480,7 +2480,7 @@ void ODbaseTable::dropColumn(sal_Int32 _nPos) FileClose(); construct(); } -// ----------------------------------------------------------------------------- + OUString ODbaseTable::createTempFile() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::createTempFile" ); @@ -2503,7 +2503,7 @@ OUString ODbaseTable::createTempFile() return sNewName; } -// ----------------------------------------------------------------------------- + void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::copyData" ); @@ -2561,7 +2561,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) } } // for(sal_uInt32 nRowPos = 0; nRowPos < m_aHeader.db_anz;++nRowPos) } -// ----------------------------------------------------------------------------- + void ODbaseTable::throwInvalidDbaseFormat() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::throwInvalidDbaseFormat" ); @@ -2574,18 +2574,18 @@ void ODbaseTable::throwInvalidDbaseFormat() ) ); ::dbtools::throwGenericSQLException( sError, *this ); } -// ----------------------------------------------------------------------------- + void ODbaseTable::refreshHeader() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::refreshHeader" ); if ( m_aHeader.db_anz == 0 ) readHeader(); } -//------------------------------------------------------------------ + sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::seekRow" ); - // ---------------------------------------------------------- + // prepare positioning: OSL_ENSURE(m_pFileStream,"ODbaseTable::seekRow: FileStream is NULL!"); @@ -2665,7 +2665,7 @@ End: nCurPos = m_nFilePos; return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::ReadMemo" ); @@ -2742,7 +2742,7 @@ sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable) } return sal_True; } -// ----------------------------------------------------------------------------- + void ODbaseTable::AllocBuffer() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::AllocBuffer" ); @@ -2762,7 +2762,7 @@ void ODbaseTable::AllocBuffer() m_pBuffer = new sal_uInt8[m_nBufferSize+1]; } } -// ----------------------------------------------------------------------------- + sal_Bool ODbaseTable::WriteBuffer() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::WriteBuffer" ); @@ -2773,7 +2773,7 @@ sal_Bool ODbaseTable::WriteBuffer() m_pFileStream->Seek(nPos); return m_pFileStream->Write((char*) m_pBuffer, m_aHeader.db_slng) > 0; } -// ----------------------------------------------------------------------------- + sal_Int32 ODbaseTable::getCurrentLastPos() const { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::getCurrentLastPos" ); diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 79cd308cd438..3d8ed8232564 100644 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx @@ -52,17 +52,17 @@ sdbcx::ObjectType ODbaseTables::createObject(const OUString& _rName) pRet->construct(); return xRet; } -// ------------------------------------------------------------------------- + void ODbaseTables::impl_refresh( ) throw(RuntimeException) { static_cast<ODbaseCatalog*>(&m_rParent)->refreshTables(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > ODbaseTables::createDescriptor() { return new ODbaseTable(this,(ODbaseConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection()); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -90,7 +90,7 @@ sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const R } return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void ODbaseTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) { @@ -120,13 +120,13 @@ void ODbaseTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) ::dbtools::throwGenericSQLException( sError, NULL ); } } -// ------------------------------------------------------------------------- + Any SAL_CALL ODbaseTables::queryInterface( const Type & rType ) throw(RuntimeException) { typedef sdbcx::OCollection OTables_BASE; return OTables_BASE::queryInterface(rType); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx index 5565df23d169..10815e70b2d6 100644 --- a/connectivity/source/drivers/dbase/Dservices.cxx +++ b/connectivity/source/drivers/dbase/Dservices.cxx @@ -35,7 +35,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -75,7 +75,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbase_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 7e519fc27837..25da53c2daee 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -32,19 +32,19 @@ using namespace connectivity; using namespace connectivity::dbase; using namespace connectivity::file; using namespace com::sun::star::sdbc; -// ----------------------------------------------------------------------------- + ONDXKey::ONDXKey(sal_uInt32 nRec) :nRecord(nRec) { } -// ----------------------------------------------------------------------------- + ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec) : ONDXKey_BASE(eType) , nRecord(nRec) , xValue(rVal) { } -// ----------------------------------------------------------------------------- + ONDXKey::ONDXKey(const OUString& aStr, sal_uInt32 nRec) : ONDXKey_BASE(::com::sun::star::sdbc::DataType::VARCHAR) ,nRecord(nRec) @@ -55,7 +55,7 @@ ONDXKey::ONDXKey(const OUString& aStr, sal_uInt32 nRec) xValue.setBound(true); } } -// ----------------------------------------------------------------------------- + ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec) : ONDXKey_BASE(::com::sun::star::sdbc::DataType::DOUBLE) @@ -63,7 +63,7 @@ ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec) ,xValue(aVal) { } -// ----------------------------------------------------------------------------- + //================================================================== // index page @@ -80,12 +80,12 @@ ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent) ppNodes = new ONDXNode[nT]; } -//------------------------------------------------------------------ + ONDXPage::~ONDXPage() { delete[] ppNodes; } -//------------------------------------------------------------------ + void ONDXPage::QueryDelete() { // Store in GarbageCollector @@ -114,7 +114,7 @@ void ONDXPage::QueryDelete() else SvRefBase::QueryDelete(); } -//------------------------------------------------------------------ + ONDXPagePtr& ONDXPage::GetChild(ODbaseIndex* pIndex) { if (!aChild.Is() && pIndex) @@ -124,7 +124,7 @@ ONDXPagePtr& ONDXPage::GetChild(ODbaseIndex* pIndex) return aChild; } -//------------------------------------------------------------------ + sal_uInt16 ONDXPage::FindPos(const ONDXKey& rKey) const { // searches the position for the given key in a page @@ -135,7 +135,7 @@ sal_uInt16 ONDXPage::FindPos(const ONDXKey& rKey) const return i; } -//------------------------------------------------------------------ + sal_Bool ONDXPage::Find(const ONDXKey& rKey) { // searches the given key @@ -169,7 +169,7 @@ sal_Bool ONDXPage::Find(const ONDXKey& rKey) return bResult; } -//------------------------------------------------------------------ + sal_Bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) { // When creating an index there can be multiple nodes added, @@ -289,7 +289,7 @@ sal_Bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } } -//------------------------------------------------------------------ + sal_Bool ONDXPage::Insert(sal_uInt16 nPos, ONDXNode& rNode) { sal_uInt16 nMaxCount = rIndex.getHeader().db_maxkeys; @@ -321,13 +321,13 @@ sal_Bool ONDXPage::Insert(sal_uInt16 nPos, ONDXNode& rNode) return sal_True; } -//------------------------------------------------------------------ + sal_Bool ONDXPage::Append(ONDXNode& rNode) { DBG_ASSERT(!IsFull(), "kein Append moeglich"); return Insert(nCount, rNode); } -//------------------------------------------------------------------ + void ONDXPage::Release(sal_Bool bSave) { // free pages @@ -346,7 +346,7 @@ void ONDXPage::Release(sal_Bool bSave) } aParent = NULL; } -//------------------------------------------------------------------ + void ONDXPage::ReleaseFull(sal_Bool bSave) { ONDXPagePtr aTempParent = aParent; @@ -363,7 +363,7 @@ void ONDXPage::ReleaseFull(sal_Bool bSave) aTempParent->GetChild().Clear(); } } -//------------------------------------------------------------------ + sal_Bool ONDXPage::Delete(sal_uInt16 nNodePos) { if (IsLeaf()) @@ -414,7 +414,7 @@ sal_Bool ONDXPage::Delete(sal_uInt16 nNodePos) } -//------------------------------------------------------------------ + ONDXNode ONDXPage::Split(ONDXPage& rPage) { DBG_ASSERT(IsFull(), "Falsches Splitting"); @@ -464,7 +464,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) return aResultNode; } -//------------------------------------------------------------------ + void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) { DBG_ASSERT(HasParent(), "kein Vater vorhanden"); @@ -651,7 +651,7 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) // ONDXNode //================================================================== -//------------------------------------------------------------------ + void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex) { rStream.ReadUInt32( aKey.nRecord ); // key @@ -675,7 +675,7 @@ void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex) rStream >> aChild; } -//------------------------------------------------------------------ + void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const { const ODbaseIndex& rIndex = rPage.GetIndex(); @@ -717,7 +717,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const } -//------------------------------------------------------------------ + ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent) { if (!aChild.Is() && pIndex) @@ -730,13 +730,13 @@ ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent) //================================================================== // ONDXKey //================================================================== -//------------------------------------------------------------------ + sal_Bool ONDXKey::IsText(sal_Int32 eType) { return eType == DataType::VARCHAR || eType == DataType::CHAR; } -//------------------------------------------------------------------ + int ONDXKey::Compare(const ONDXKey& rKey) const { sal_Int32 nRes; @@ -774,40 +774,40 @@ int ONDXKey::Compare(const ONDXKey& rKey) const } return nRes; } -// ----------------------------------------------------------------------------- + void ONDXKey::setValue(const ORowSetValue& _rVal) { xValue = _rVal; } -// ----------------------------------------------------------------------------- + const ORowSetValue& ONDXKey::getValue() const { return xValue; } -// ----------------------------------------------------------------------------- + SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPagePtr& rPage) { rStream.ReadUInt32( rPage.nPagePos ); return rStream; } -// ----------------------------------------------------------------------------- + SvStream& connectivity::dbase::WriteONDXPagePtr(SvStream &rStream, const ONDXPagePtr& rPage) { rStream.WriteUInt32( rPage.nPagePos ); return rStream; } -// ----------------------------------------------------------------------------- + //================================================================== // ONDXPagePtr //================================================================== -//------------------------------------------------------------------ + ONDXPagePtr::ONDXPagePtr(const ONDXPagePtr& rRef) :ONDXPageRef(rRef) ,nPagePos(rRef.nPagePos) { } -//------------------------------------------------------------------ + ONDXPagePtr::ONDXPagePtr(ONDXPage* pRefPage) :ONDXPageRef(pRefPage) ,nPagePos(0) @@ -815,7 +815,7 @@ ONDXPagePtr::ONDXPagePtr(ONDXPage* pRefPage) if (pRefPage) nPagePos = pRefPage->GetPagePos(); } -//------------------------------------------------------------------ + ONDXPagePtr& ONDXPagePtr::operator=(const ONDXPagePtr& rRef) { ONDXPageRef::operator=(rRef); @@ -823,16 +823,16 @@ ONDXPagePtr& ONDXPagePtr::operator=(const ONDXPagePtr& rRef) return *this; } -//------------------------------------------------------------------ + ONDXPagePtr& ONDXPagePtr::operator= (ONDXPage* pRef) { ONDXPageRef::operator=(pRef); nPagePos = (pRef) ? pRef->GetPagePos() : 0; return *this; } -// ----------------------------------------------------------------------------- + static sal_uInt32 nValue; -//------------------------------------------------------------------ + SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) { rStream.Seek(rPage.GetPagePos() * DINDEX_PAGE_SIZE); @@ -844,7 +844,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) return rStream; } -//------------------------------------------------------------------ + SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage& rPage) { // Page doesn't exist yet @@ -887,9 +887,9 @@ SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage& } return rStream; } -// ----------------------------------------------------------------------------- + #if OSL_DEBUG_LEVEL > 1 -//------------------------------------------------------------------ + void ONDXPage::PrintPage() { OSL_TRACE("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----", @@ -930,13 +930,13 @@ void ONDXPage::PrintPage() OSL_TRACE("SDB: ==============================================="); } #endif -// ----------------------------------------------------------------------------- + sal_Bool ONDXPage::IsFull() const { return Count() == rIndex.getHeader().db_maxkeys; } -// ----------------------------------------------------------------------------- -//------------------------------------------------------------------ + + sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch) { // binary search later @@ -948,7 +948,7 @@ sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch) return (i < Count()) ? i : NODE_NOTFOUND; } -//------------------------------------------------------------------ + sal_uInt16 ONDXPage::Search(const ONDXPage* pPage) { sal_uInt16 i = NODE_NOTFOUND; @@ -959,7 +959,7 @@ sal_uInt16 ONDXPage::Search(const ONDXPage* pPage) // if not found, then we assume, that the page itself points to the page return (i < Count()) ? i : NODE_NOTFOUND; } -// ----------------------------------------------------------------------------- + // runs recursively void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, ONDXKey& rReplace) @@ -980,20 +980,20 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, } } } -// ----------------------------------------------------------------------------- + ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } -//------------------------------------------------------------------ + const ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) const { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } -// ----------------------------------------------------------------------------- + void ONDXPage::Remove(sal_uInt16 nPos) { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); @@ -1004,6 +1004,6 @@ void ONDXPage::Remove(sal_uInt16 nPos) nCount--; bModified = sal_True; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx index 95ce61830f5a..6fdd864871df 100644 --- a/connectivity/source/drivers/evoab2/NCatalog.cxx +++ b/connectivity/source/drivers/evoab2/NCatalog.cxx @@ -24,7 +24,7 @@ #include <com/sun/star/sdbc/XResultSet.hpp> -// ------------------------------------------------------------------------- + using namespace connectivity::evoab; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -32,7 +32,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OEvoabCatalog::OEvoabCatalog(OEvoabConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon) ,m_pConnection(_pCon) diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx index 9f05ea22a80b..bb9a23c08e07 100644 --- a/connectivity/source/drivers/evoab2/NColumns.cxx +++ b/connectivity/source/drivers/evoab2/NColumns.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace connectivity::evoab; -// ------------------------------------------------------------------------- + sdbcx::ObjectType OEvoabColumns::createObject(const OUString& _rName) { const Any aCatalog; @@ -80,7 +80,7 @@ sdbcx::ObjectType OEvoabColumns::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OEvoabColumns::impl_refresh() throw(RuntimeException) { m_pTable->refreshColumns(); diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx index d06613304489..3846fca5d041 100644 --- a/connectivity/source/drivers/evoab2/NConnection.cxx +++ b/connectivity/source/drivers/evoab2/NConnection.cxx @@ -33,7 +33,7 @@ using namespace connectivity::evoab; using namespace dbtools; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbcx; @@ -64,14 +64,14 @@ OUString implGetExceptionMsg( Exception& e ) return aMsg; } -// -------------------------------------------------------------------------------- + OEvoabConnection::OEvoabConnection( OEvoabDriver& _rDriver ) :OSubComponent<OEvoabConnection, OConnection_BASE>( (::cppu::OWeakObject*)(&_rDriver), this ) ,m_rDriver(_rDriver) ,m_xCatalog(NULL) { } -//----------------------------------------------------------------------------- + OEvoabConnection::~OEvoabConnection() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -82,17 +82,17 @@ OEvoabConnection::~OEvoabConnection() } } -//----------------------------------------------------------------------------- + void SAL_CALL OEvoabConnection::release() throw() { relase_ChildImpl(); } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OEvoabConnection, "com.sun.star.sdbc.drivers.evoab.Connection", "com.sun.star.sdbc.Connection") -//----------------------------------------------------------------------------- + void OEvoabConnection::construct(const OUString& url, const Sequence< PropertyValue >& info) throw(SQLException) { osl_atomic_increment( &m_refCount ); @@ -123,13 +123,13 @@ void OEvoabConnection::construct(const OUString& url, const Sequence< PropertyVa osl_atomic_decrement( &m_refCount ); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OEvoabConnection::nativeSQL( const OUString& _sSql ) throw(SQLException, RuntimeException) { // when you need to transform SQL92 to you driver specific you can do it here return _sSql; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OEvoabConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -144,7 +144,7 @@ Reference< XDatabaseMetaData > SAL_CALL OEvoabConnection::getMetaData( ) throw( return xMetaData; } -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Reference< XTablesSupplier > OEvoabConnection::createCatalog() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -157,7 +157,7 @@ Reference< XDatabaseMetaData > SAL_CALL OEvoabConnection::getMetaData( ) throw( } return xTab; } -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OEvoabConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -169,7 +169,7 @@ Reference< XStatement > SAL_CALL OEvoabConnection::createStatement( ) throw(SQL m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return xStmt; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OEvoabConnection::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -194,7 +194,7 @@ sal_Bool SAL_CALL OEvoabConnection::isClosed( ) throw(SQLException, RuntimeExce return OConnection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL OEvoabConnection::close( ) throw(SQLException, RuntimeException) { @@ -205,7 +205,7 @@ void SAL_CALL OEvoabConnection::close( ) throw(SQLException, RuntimeException) dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL OEvoabConnection::getWarnings( ) throw(SQLException, RuntimeException) { @@ -215,7 +215,7 @@ void SAL_CALL OEvoabConnection::clearWarnings( ) throw(SQLException, RuntimeExc { m_aWarnings.clearWarnings(); } -//------------------------------------------------------------------------------ + void OEvoabConnection::disposing() { diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index 2ae114fbccde..76039c62c77a 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -256,7 +256,7 @@ OEvoabDatabaseMetaData::~OEvoabDatabaseMetaData() { } -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::ORows& OEvoabDatabaseMetaData::getColumnRows( const OUString& columnNamePattern ) { static ODatabaseMetaDataResultSet::ORows aRows; @@ -317,682 +317,682 @@ ODatabaseMetaDataResultSet::ORows& OEvoabDatabaseMetaData::getColumnRows( const return aRows ; } -// ------------------------------------------------------------------------- + OUString OEvoabDatabaseMetaData::impl_getCatalogSeparator_throw( ) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 OEvoabDatabaseMetaData::impl_getMaxStatements_throw( ) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 OEvoabDatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { // We only support a single table return 1; } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + sal_Bool SAL_CALL OEvoabDatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + OUString OEvoabDatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { // normally this is " OUString aVal("\""); return aVal; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_isCatalogAtStart_throw( ) { sal_Bool bValue = sal_False; return bValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 /*level*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { return sal_True; // should be supported at least } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { // We allow you to select from any table. return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { // For now definitely read-only, no support for update/delete return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { // todo add Support for this. return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsConvert( sal_Int32 /*fromType*/, sal_Int32 /*toType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool OEvoabDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { // Any case may be used return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_pConnection->getURL(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { return OUString( "1" ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { return OUString( "0" ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { return 1; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { return TransactionIsolation::NONE; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabDatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsResultSetType( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsResultSetConcurrency( sal_Int32 /*setType*/, sal_Int32 /*concurrency*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::ownUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::ownDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::ownInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::othersUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::othersDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::othersInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::updatesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::deletesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::insertsAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + // here follow all methods which return a resultset // the first methods is an example implementation how to use this resultset // of course you could implement it on your and you should do this because // the general way is more memory expensive -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { /* Dont need to change as evoab driver supports only table */ @@ -1022,7 +1022,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes( ) throw pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) { /* @@ -1069,7 +1069,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) pResultSet->setRows(aRows); return xResultSet; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*tableNamePattern*/, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -1082,7 +1082,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns( return xResultSet; } -// ------------------------------------------------------------------------- + bool isSourceBackend(ESource *pSource, const char *backendname) { if (!pSource || !e_source_has_extension (pSource, E_SOURCE_EXTENSION_ADDRESS_BOOK)) @@ -1225,12 +1225,12 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XDatabaseMetaDaza::getUDTs", *this ); return NULL; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx index af4d24d6a3fc..b0f629f0cd19 100644 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx @@ -41,16 +41,16 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::ucb; -// -------------------------------------------------------------------------------- + OEvoabDriver::OEvoabDriver(const Reference< XMultiServiceFactory >& _rxFactory) : ODriver_BASE( m_aMutex ), m_xFactory( _rxFactory ) { } -// ----------------------------------------------------------------------------- + OEvoabDriver::~OEvoabDriver() { } -// ----------------------------------------------------------------------------- + void OEvoabDriver::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -78,7 +78,7 @@ void OEvoabDriver::disposing() } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString OEvoabDriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString(EVOAB_DRIVER_IMPL_NAME); @@ -86,7 +86,7 @@ OUString OEvoabDriver::getImplementationName_Static( ) throw(RuntimeException) // Please take care when changing it. } -//------------------------------------------------------------------ + Sequence< OUString > OEvoabDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { // which service is supported @@ -95,7 +95,7 @@ Sequence< OUString > OEvoabDriver::getSupportedServiceNames_Static( ) throw (Ru aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } -//------------------------------------------------------------------ + OUString SAL_CALL OEvoabDriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -105,18 +105,18 @@ sal_Bool SAL_CALL OEvoabDriver::supportsService( const OUString& _rServiceName ) { return cppu::supportsService(this, _rServiceName); } -//------------------------------------------------------------------ + Sequence< OUString > SAL_CALL OEvoabDriver::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } -//------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::evoab::OEvoabDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { return *(new OEvoabDriver(_rxFactory)); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OEvoabDriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -133,14 +133,14 @@ Reference< XConnection > SAL_CALL OEvoabDriver::connect( const OUString& url, co return xCon; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabDriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { return acceptsURL_Stat(url); } -// -------------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL OEvoabDriver::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) { if ( ! acceptsURL(url) ) @@ -154,21 +154,21 @@ Sequence< DriverPropertyInfo > SAL_CALL OEvoabDriver::getPropertyInfo( const OUS return Sequence< DriverPropertyInfo >(); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDriver::getMajorVersion( ) throw(RuntimeException) { return 1; } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabDriver::getMinorVersion( ) throw(RuntimeException) { return 0; } -// -------------------------------------------------------------------------------- + sal_Bool OEvoabDriver::acceptsURL_Stat( const OUString& url ) { return ( url == "sdbc:address:evolution:local" || url == "sdbc:address:evolution:groupwise" || url == "sdbc:address:evolution:ldap" ) && EApiInit(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx index 6118a161eadc..d73229b9202b 100644 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx @@ -50,7 +50,7 @@ OEvoabPreparedStatement::OEvoabPreparedStatement( OEvoabConnection* _pConnection { } -// ----------------------------------------------------------------------------- + void OEvoabPreparedStatement::construct( const OUString& _sql ) { m_sSqlStatement = _sql; @@ -65,24 +65,24 @@ void OEvoabPreparedStatement::construct( const OUString& _sql ) pMeta->setEvoabFields( m_aQueryData.xSelectColumns ); } -// ----------------------------------------------------------------------------- + OEvoabPreparedStatement::~OEvoabPreparedStatement() { } -// ----------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::acquire() throw() { OCommonStatement::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::release() throw() { OCommonStatement::release(); } -// ----------------------------------------------------------------------------- + Any SAL_CALL OEvoabPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OCommonStatement::queryInterface(rType); @@ -90,12 +90,12 @@ Any SAL_CALL OEvoabPreparedStatement::queryInterface( const Type & rType ) throw aRet = OPreparedStatement_BASE::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OEvoabPreparedStatement::getTypes( ) throw(RuntimeException) { return ::comphelper::concatSequences(OPreparedStatement_BASE::getTypes(),OCommonStatement::getTypes()); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OEvoabPreparedStatement::getMetaData( ) throw(SQLException, RuntimeException) { @@ -106,7 +106,7 @@ Reference< XResultSetMetaData > SAL_CALL OEvoabPreparedStatement::getMetaData( ENSURE_OR_THROW( m_xMetaData.is(), "internal error: no meta data" ); return m_xMetaData; } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::close( ) throw(SQLException, RuntimeException) { @@ -124,7 +124,7 @@ void SAL_CALL OEvoabPreparedStatement::close( ) throw(SQLException, RuntimeExce } } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabPreparedStatement::execute( ) throw(SQLException, RuntimeException) { @@ -134,7 +134,7 @@ sal_Bool SAL_CALL OEvoabPreparedStatement::execute( ) throw(SQLException, Runti Reference< XResultSet> xRS = impl_executeQuery_throw( m_aQueryData ); return xRS.is(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabPreparedStatement::executeUpdate( ) throw(SQLException, RuntimeException) { @@ -143,13 +143,13 @@ sal_Int32 SAL_CALL OEvoabPreparedStatement::executeUpdate( ) throw(SQLException ::dbtools::throwFeatureNotImplementedException( "XStatement::executeUpdate", *this ); return 0; } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setString( sal_Int32 /*parameterIndex*/, const OUString& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setString", *this ); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OEvoabPreparedStatement::getConnection( ) throw(SQLException, RuntimeException) { @@ -158,7 +158,7 @@ Reference< XConnection > SAL_CALL OEvoabPreparedStatement::getConnection( ) thr return impl_getConnection(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OEvoabPreparedStatement::executeQuery( ) throw(SQLException, RuntimeException) { @@ -167,104 +167,104 @@ Reference< XResultSet > SAL_CALL OEvoabPreparedStatement::executeQuery( ) throw return impl_executeQuery_throw( m_aQueryData ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setBoolean( sal_Int32 /*parameterIndex*/, sal_Bool /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setBoolean", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setByte( sal_Int32 /*parameterIndex*/, sal_Int8 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setByte", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const Date& /*aData*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setDate", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setTime", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setTimestamp( sal_Int32 /*parameterIndex*/, const DateTime& /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setTimestamp", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setDouble( sal_Int32 /*parameterIndex*/, double /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setDouble", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setFloat( sal_Int32 /*parameterIndex*/, float /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setFloat", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setInt( sal_Int32 /*parameterIndex*/, sal_Int32 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setInt", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setLong( sal_Int32 /*parameterIndex*/, sal_Int64 /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setLong", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setNull( sal_Int32 /*parameterIndex*/, sal_Int32 /*sqlType*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setNull", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setClob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setBlob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setArray", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setRef", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setObjectWithInfo( sal_Int32 /*parameterIndex*/, const Any& /*x*/, sal_Int32 /*sqlType*/, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setObjectWithInfo", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setObjectNull( sal_Int32 /*parameterIndex*/, sal_Int32 /*sqlType*/, const OUString& /*typeName*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setObjectNull", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException) { @@ -277,51 +277,51 @@ void SAL_CALL OEvoabPreparedStatement::setObject( sal_Int32 parameterIndex, cons ::dbtools::throwGenericSQLException(sError,*this); } } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setShort( sal_Int32 /*parameterIndex*/, sal_Int16 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setShort", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setBytes( sal_Int32 /*parameterIndex*/, const Sequence< sal_Int8 >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setBytes", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setCharacterStream( sal_Int32 /*parameterIndex*/, const Reference< XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setCharacterStream", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::setBinaryStream( sal_Int32 /*parameterIndex*/, const Reference< XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setBinaryStream", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException) { } -// ----------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OEvoabPreparedStatement::getResultSet( ) throw(SQLException, RuntimeException) { return NULL; } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabPreparedStatement::getUpdateCount( ) throw(SQLException, RuntimeException) { return 0; } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabPreparedStatement::getMoreResults( ) throw(SQLException, RuntimeException) { return sal_False; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index 2cc664bcfb0d..4ad700b1308c 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -63,12 +63,12 @@ using namespace com::sun::star::container; using namespace com::sun::star::io; namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition; -//------------------------------------------------------------------------------ + OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeException) \ { return OUString("com.sun.star.sdbcx.evoab.ResultSet"); } -// ------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OEvoabResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(1); @@ -645,12 +645,12 @@ OEvoabResultSet::OEvoabResultSet( OCommonStatement* pStmt, OEvoabConnection *pCo REGISTER_PROP( PROPERTY_ID_RESULTSETCONCURRENCY, m_nResultSetConcurrency ); } -// ------------------------------------------------------------------------- + OEvoabResultSet::~OEvoabResultSet() { } -// ------------------------------------------------------------------------- + void OEvoabResultSet::construct( const QueryData& _rData ) { ENSURE_OR_THROW( _rData.getQuery(), "internal error: no EBookQuery" ); @@ -708,7 +708,7 @@ void OEvoabResultSet::construct( const QueryData& _rData ) pMeta->setEvoabFields( _rData.xSelectColumns ); } -// ------------------------------------------------------------------------- + void OEvoabResultSet::disposing(void) { ::comphelper::OPropertyContainer::disposing(); @@ -719,7 +719,7 @@ void OEvoabResultSet::disposing(void) m_pStatement = NULL; m_xMetaData.clear(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OEvoabResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ::comphelper::OPropertyContainer::queryInterface(rType); @@ -727,7 +727,7 @@ Any SAL_CALL OEvoabResultSet::queryInterface( const Type & rType ) throw(Runtime aRet = OResultSet_BASE::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OEvoabResultSet::getTypes( ) throw( RuntimeException) { return ::comphelper::concatSequences( @@ -736,7 +736,7 @@ Sequence< Type > SAL_CALL OEvoabResultSet::getTypes( ) throw( RuntimeException) ); } -// ------------------------------------------------------------------------- + // XRow Interface /** @@ -761,7 +761,7 @@ OUString SAL_CALL OEvoabResultSet::getString( sal_Int32 nColumnNum ) throw(SQLEx } return aResult; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::getBoolean( sal_Int32 nColumnNum ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -778,110 +778,110 @@ sal_Bool SAL_CALL OEvoabResultSet::getBoolean( sal_Int32 nColumnNum ) throw(SQLE } return bResult ? sal_True : sal_False; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL OEvoabResultSet::getLong( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getLong", *this ); return sal_Int64(); } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL OEvoabResultSet::getArray( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getArray", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL OEvoabResultSet::getClob( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getClob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL OEvoabResultSet::getBlob( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getBlob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL OEvoabResultSet::getRef( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getRef", *this ); return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL OEvoabResultSet::getObject( sal_Int32 /*nColumnNum*/, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getObject", *this ); return Any(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL OEvoabResultSet::getShort( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getShort", *this ); return 0; } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL OEvoabResultSet::getTime( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getTime", *this ); return ::com::sun::star::util::Time(); } -// ------------------------------------------------------------------------- + util::DateTime SAL_CALL OEvoabResultSet::getTimestamp( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getTimestamp", *this ); return ::com::sun::star::util::DateTime(); } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL OEvoabResultSet::getBinaryStream( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getBinaryStream", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL OEvoabResultSet::getCharacterStream( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getCharacterStream", *this ); return NULL; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL OEvoabResultSet::getByte( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getByte", *this ); return 0; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL OEvoabResultSet::getBytes( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getBytes", *this ); return Sequence< sal_Int8 >(); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL OEvoabResultSet::getDate( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getDate", *this ); return ::com::sun::star::util::Date(); } -// ------------------------------------------------------------------------- + double SAL_CALL OEvoabResultSet::getDouble( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getDouble", *this ); return 0; } -// ------------------------------------------------------------------------- + float SAL_CALL OEvoabResultSet::getFloat( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getFloat", *this ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabResultSet::getInt( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getInt", *this ); return 0; } // XRow Interface Ends -// ------------------------------------------------------------------------- + // XResultSetMetaDataSupplier Interface Reference< XResultSetMetaData > SAL_CALL OEvoabResultSet::getMetaData( ) throw(SQLException, RuntimeException) @@ -894,7 +894,7 @@ Reference< XResultSetMetaData > SAL_CALL OEvoabResultSet::getMetaData( ) throw( return m_xMetaData; } // XResultSetMetaDataSupplier Interface Ends -// ------------------------------------------------------------------------- + // XResultSet Interface sal_Bool SAL_CALL OEvoabResultSet::next( ) throw(SQLException, RuntimeException) @@ -908,7 +908,7 @@ sal_Bool SAL_CALL OEvoabResultSet::next( ) throw(SQLException, RuntimeException else return false; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::wasNull( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -916,7 +916,7 @@ sal_Bool SAL_CALL OEvoabResultSet::wasNull( ) throw(SQLException, RuntimeExcept return m_bWasNull; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -924,7 +924,7 @@ sal_Bool SAL_CALL OEvoabResultSet::isBeforeFirst( ) throw(SQLException, Runtime return m_nIndex < 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabResultSet::getRow( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -932,7 +932,7 @@ sal_Int32 SAL_CALL OEvoabResultSet::getRow( ) throw(SQLException, RuntimeExcept return m_nIndex; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -940,7 +940,7 @@ sal_Bool SAL_CALL OEvoabResultSet::isAfterLast( ) throw(SQLException, RuntimeEx return m_nIndex >= m_nLength; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::isFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -948,7 +948,7 @@ sal_Bool SAL_CALL OEvoabResultSet::isFirst( ) throw(SQLException, RuntimeExcept return m_nIndex == 0; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::isLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -956,7 +956,7 @@ sal_Bool SAL_CALL OEvoabResultSet::isLast( ) throw(SQLException, RuntimeExcepti return m_nIndex == m_nLength - 1; } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -964,7 +964,7 @@ void SAL_CALL OEvoabResultSet::beforeFirst( ) throw(SQLException, RuntimeExcept m_nIndex = -1; } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabResultSet::afterLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -972,7 +972,7 @@ void SAL_CALL OEvoabResultSet::afterLast( ) throw(SQLException, RuntimeExceptio m_nIndex = m_nLength; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::first( ) throw(SQLException, RuntimeException) { @@ -982,7 +982,7 @@ sal_Bool SAL_CALL OEvoabResultSet::first( ) throw(SQLException, RuntimeExceptio m_nIndex = 0; return true; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::last( ) throw(SQLException, RuntimeException) { @@ -992,7 +992,7 @@ sal_Bool SAL_CALL OEvoabResultSet::last( ) throw(SQLException, RuntimeException m_nIndex = m_nLength - 1; return true; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1004,7 +1004,7 @@ sal_Bool SAL_CALL OEvoabResultSet::absolute( sal_Int32 row ) throw(SQLException, else return false; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1017,7 +1017,7 @@ sal_Bool SAL_CALL OEvoabResultSet::relative( sal_Int32 row ) throw(SQLException, else return false; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::previous( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1030,7 +1030,7 @@ sal_Bool SAL_CALL OEvoabResultSet::previous( ) throw(SQLException, RuntimeExcep else return false; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OEvoabResultSet::getStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1038,7 +1038,7 @@ Reference< XInterface > SAL_CALL OEvoabResultSet::getStatement( ) throw(SQLExce ::com::sun::star::uno::WeakReferenceHelper aStatement((OWeakObject*)m_pStatement); return aStatement.get(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::rowDeleted( ) throw(SQLException, RuntimeException) { @@ -1047,7 +1047,7 @@ sal_Bool SAL_CALL OEvoabResultSet::rowDeleted( ) throw(SQLException, RuntimeExc return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::rowInserted( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1055,7 +1055,7 @@ sal_Bool SAL_CALL OEvoabResultSet::rowInserted( ) throw(SQLException, RuntimeEx return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1063,14 +1063,14 @@ sal_Bool SAL_CALL OEvoabResultSet::rowUpdated( ) throw(SQLException, RuntimeExc return sal_False; } -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabResultSet::refreshRow( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); } //XResult Interface ends -// ------------------------------------------------------------------------- + // XCancellable void SAL_CALL OEvoabResultSet::cancel( ) throw(RuntimeException) @@ -1093,19 +1093,19 @@ void SAL_CALL OEvoabResultSet::close( ) throw(SQLException, RuntimeException) } // XWarningsSupplier -// ------------------------------------------------------------------------- + void SAL_CALL OEvoabResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OEvoabResultSet::clearWarnings" ); m_aWarnings.clearWarnings(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OEvoabResultSet::getWarnings( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OEvoabResultSet::getWarnings" ); return m_aWarnings.getWarnings(); } -// ------------------------------------------------------------------------- + //XColumnLocate Interface sal_Int32 SAL_CALL OEvoabResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { @@ -1127,38 +1127,38 @@ sal_Int32 SAL_CALL OEvoabResultSet::findColumn( const OUString& columnName ) thr assert(false); return 0; // Never reached } -// ------------------------------------------------------------------------- + //XColumnLocate interface ends -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OEvoabResultSet::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties( aProps ); return new ::cppu::OPropertyArrayHelper( aProps ); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OEvoabResultSet::getInfoHelper() { return *const_cast<OEvoabResultSet*>(this)->getArrayHelper(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OEvoabResultSet::acquire() throw() { OResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OEvoabResultSet::release() throw() { OResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OEvoabResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + } } // connectivity::evoab diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx index 889c9269eccc..535b2c4f6f53 100644 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx @@ -34,11 +34,11 @@ OEvoabResultSetMetaData::OEvoabResultSetMetaData(const OUString& _aTableName) { } -// ------------------------------------------------------------------------- + OEvoabResultSetMetaData::~OEvoabResultSetMetaData() { } -// ------------------------------------------------------------------------- + void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException) { OSQLColumns::Vector::const_iterator aIter; @@ -63,45 +63,45 @@ void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabResultSetMetaData::getColumnDisplaySize( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return 50; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabResultSetMetaData::getColumnType( sal_Int32 nColumnNum ) throw(SQLException, RuntimeException) { sal_uInt32 nField = m_aEvoabFields[nColumnNum - 1]; return evoab::getFieldType (nField); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { return m_aEvoabFields.size(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSetMetaData::isCaseSensitive( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabResultSetMetaData::getSchemaName( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabResultSetMetaData::getColumnName( sal_Int32 nColumnNum ) throw(SQLException, RuntimeException) { sal_uInt32 nField = m_aEvoabFields[nColumnNum - 1]; return evoab::getFieldName( nField ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabResultSetMetaData::getColumnTypeName( sal_Int32 nColumnNum ) throw(SQLException, RuntimeException) { sal_uInt32 nField = m_aEvoabFields[nColumnNum - 1]; return evoab::getFieldTypeName( nField ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabResultSetMetaData::getColumnLabel( sal_Int32 nColumnNum ) throw(SQLException, RuntimeException) { sal_uInt32 nField = m_aEvoabFields[nColumnNum - 1]; @@ -114,72 +114,72 @@ OUString SAL_CALL OEvoabResultSetMetaData::getColumnLabel( sal_Int32 nColumnNum RTL_TEXTENCODING_UTF8 ); return aLabel; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabResultSetMetaData::getColumnServiceName( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabResultSetMetaData::getTableName( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return m_aTableName;//OUString("TABLE"); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OEvoabResultSetMetaData::getCatalogName( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSetMetaData::isCurrency( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSetMetaData::isAutoIncrement( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSetMetaData::isSigned( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabResultSetMetaData::getPrecision( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return 0; } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabResultSetMetaData::getScale( sal_Int32 /*nColumnNum*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OEvoabResultSetMetaData::isNullable( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSetMetaData::isSearchable( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSetMetaData::isReadOnly( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSetMetaData::isDefinitelyWritable( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OEvoabResultSetMetaData::isWritable( sal_Int32 /*nColumnNum*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx index c5e7082dbcc2..f66e9166fc4f 100644 --- a/connectivity/source/drivers/evoab2/NServices.cxx +++ b/connectivity/source/drivers/evoab2/NServices.cxx @@ -36,7 +36,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -77,7 +77,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL evoab2_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index 31612ce5674f..15332b510912 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -38,7 +38,7 @@ namespace connectivity { namespace evoab { -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; @@ -47,7 +47,7 @@ using namespace com::sun::star::sdbcx; using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -//------------------------------------------------------------------------------ + OCommonStatement::OCommonStatement(OEvoabConnection* _pConnection) : OCommonStatement_IBase(m_aMutex) , ::comphelper::OPropertyContainer(OCommonStatement_IBase::rBHelper) @@ -87,11 +87,11 @@ OCommonStatement::OCommonStatement(OEvoabConnection* _pConnection) REGISTER_PROP( PROPERTY_ID_ESCAPEPROCESSING, m_bEscapeProcessing ); REGISTER_PROP( PROPERTY_ID_RESULTSETCONCURRENCY, m_nResultSetConcurrency ); } -// ----------------------------------------------------------------------------- + OCommonStatement::~OCommonStatement() { } -//------------------------------------------------------------------------------ + void OCommonStatement::disposeResultSet() { // free the cursor if alive @@ -100,7 +100,7 @@ void OCommonStatement::disposeResultSet() xComp->dispose(); m_xResultSet.clear(); } -//------------------------------------------------------------------------------ + void OCommonStatement::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -114,7 +114,7 @@ void OCommonStatement::disposing() dispose_ChildImpl(); OCommonStatement_IBase::disposing(); } -//----------------------------------------------------------------------------- + Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OCommonStatement_IBase::queryInterface(rType); @@ -122,7 +122,7 @@ Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(Runtim aRet = ::comphelper::OPropertyContainer::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), @@ -131,7 +131,7 @@ Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) return ::comphelper::concatSequences(aTypes.getTypes(),OCommonStatement_IBase::getTypes()); } -// ------------------------------------------------------------------------- + //void SAL_CALL OCommonStatement::cancel( ) throw(RuntimeException) //{ @@ -140,7 +140,7 @@ Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) //// cancel the current sql statement //} -// ------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::close( ) throw(SQLException, RuntimeException) { { @@ -150,7 +150,7 @@ void SAL_CALL OCommonStatement::close( ) throw(SQLException, RuntimeException) } dispose(); } -// ------------------------------------------------------------------------- + EBookQuery * OCommonStatement::createTrue() @@ -170,7 +170,7 @@ OCommonStatement::createTest( const OUString &aColumnName, eTest, sMatch.getStr() ); } -// ------------------------------------------------------------------------- + OUString OCommonStatement::impl_getColumnRefColumnName_throw( const OSQLParseNode& _rColumnRef ) { @@ -205,7 +205,7 @@ OUString OCommonStatement::impl_getColumnRefColumnName_throw( const OSQLParseNod return sColumnName; } -// ------------------------------------------------------------------------- + void OCommonStatement::orderByAnalysis( const OSQLParseNode* _pOrderByClause, SortDescriptor& _out_rSort ) { ENSURE_OR_THROW( _pOrderByClause, "NULL node" ); @@ -246,7 +246,7 @@ void OCommonStatement::orderByAnalysis( const OSQLParseNode* _pOrderByClause, So } } -// ------------------------------------------------------------------------- + EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree ) { EBookQuery *pResult = NULL; @@ -491,7 +491,7 @@ void OCommonStatement::parseSql( const OUString& sql, QueryData& _out_rQueryData } } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OStatement::getConnection( ) throw(SQLException, RuntimeException) { @@ -502,7 +502,7 @@ Reference< XConnection > SAL_CALL OStatement::getConnection( ) throw(SQLExcepti return impl_getConnection(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OCommonStatement::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -512,38 +512,38 @@ Any SAL_CALL OCommonStatement::getWarnings( ) throw(SQLException, RuntimeExcept return makeAny(SQLWarning()); } -// ------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OCommonStatement_IBase::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OCommonStatement::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties( aProps ); return new ::cppu::OPropertyArrayHelper( aProps ); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OCommonStatement::getInfoHelper() { return *const_cast< OCommonStatement* >( this )->getArrayHelper(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::acquire() throw() { OCommonStatement_IBase::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::release() throw() { relase_ChildImpl(); } -// ------------------------------------------------------------------------- + QueryData OCommonStatement::impl_getEBookQuery_throw( const OUString& _rSql ) { QueryData aData; @@ -566,7 +566,7 @@ QueryData OCommonStatement::impl_getEBookQuery_throw( const OUString& _rSql ) return aData; } -// ------------------------------------------------------------------------- + Reference< XResultSet > OCommonStatement::impl_executeQuery_throw( const QueryData& _rQueryData ) { // create result set @@ -579,7 +579,7 @@ Reference< XResultSet > OCommonStatement::impl_executeQuery_throw( const QueryDa return xRS; } -// ------------------------------------------------------------------------- + Reference< XResultSet > OCommonStatement::impl_executeQuery_throw( const OUString& _rSql ) { SAL_INFO( "connectivity.evoab2", "OCommonStatement::impl_executeQuery_throw(" << _rSql << "%s)\n" ); @@ -592,7 +592,7 @@ Reference< XResultSet > OCommonStatement::impl_executeQuery_throw( const OUStrin return impl_executeQuery_throw( impl_getEBookQuery_throw( _rSql ) ); } -// ----------------------------------------------------------------------------- + Reference< XPropertySetInfo > SAL_CALL OCommonStatement::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() ); @@ -601,16 +601,16 @@ Reference< XPropertySetInfo > SAL_CALL OCommonStatement::getPropertySetInfo( ) // ============================================================================= // = OStatement // ============================================================================= -// ----------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO( OStatement, "com.sun.star.comp.sdbcx.evoab.OStatement", "com.sun.star.sdbc.Statement" ); -// ----------------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( OStatement, OCommonStatement, OStatement_IBase ) -// ----------------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2( OStatement, OCommonStatement, OStatement_IBase ) -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OStatement::execute( const OUString& _sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -620,7 +620,7 @@ sal_Bool SAL_CALL OStatement::execute( const OUString& _sql ) throw(SQLException return xRS.is(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OStatement::executeQuery( const OUString& _sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -629,7 +629,7 @@ Reference< XResultSet > SAL_CALL OStatement::executeQuery( const OUString& _sql return impl_executeQuery_throw( _sql ); } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OStatement::executeUpdate( const OUString& /*sql*/ ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/connectivity/source/drivers/evoab2/NTable.cxx b/connectivity/source/drivers/evoab2/NTable.cxx index 4b13fa3f8539..15510ac8c366 100644 --- a/connectivity/source/drivers/evoab2/NTable.cxx +++ b/connectivity/source/drivers/evoab2/NTable.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace connectivity::evoab; -// ------------------------------------------------------------------------- + OEvoabTable::OEvoabTable( sdbcx::OCollection* _pTables, OEvoabConnection* _pConnection, const OUString& _Name, @@ -50,7 +50,7 @@ OEvoabTable::OEvoabTable( sdbcx::OCollection* _pTables, { construct(); } -// ------------------------------------------------------------------------- + void OEvoabTable::refreshColumns() { TStringVector aVector; diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index 208cb6b83c0d..26f424ef48dc 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -76,17 +76,17 @@ ObjectType OEvoabTables::createObject(const OUString& aName) return xRet; } -// ------------------------------------------------------------------------- + void OEvoabTables::impl_refresh( ) throw(RuntimeException) { static_cast<OEvoabCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void OEvoabTables::disposing(void) { m_xMetaData.clear(); OCollection::disposing(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index fff9d4b56c1c..6687ebd3572f 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -29,15 +29,15 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; -// ------------------------------------------------------------------------- + using namespace connectivity::file; -// ------------------------------------------------------------------------- + OFileCatalog::OFileCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon) ,m_pConnection(_pCon) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileCatalog::OFileCatalog" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OFileCatalog::disposing() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileCatalog::disposing" ); @@ -47,13 +47,13 @@ void SAL_CALL OFileCatalog::disposing() m_xMetaData.clear(); OFileCatalog_BASE::disposing(); } -// ----------------------------------------------------------------------------- + OUString OFileCatalog::buildName(const Reference< XRow >& _xRow) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileCatalog::buildName" ); return _xRow->getString(3); } -// ------------------------------------------------------------------------- + void OFileCatalog::refreshTables() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileCatalog::refreshTables" ); @@ -69,7 +69,7 @@ void OFileCatalog::refreshTables() m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + Any SAL_CALL OFileCatalog::queryInterface( const Type & rType ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileCatalog::queryInterface" ); @@ -82,7 +82,7 @@ Any SAL_CALL OFileCatalog::queryInterface( const Type & rType ) throw(RuntimeExc typedef sdbcx::OCatalog OFileCatalog_BASE; return OFileCatalog_BASE::queryInterface(rType); } -// ----------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OFileCatalog::getTypes( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileCatalog::getTypes" ); @@ -105,7 +105,7 @@ Sequence< Type > SAL_CALL OFileCatalog::getTypes( ) throw(RuntimeException) const Type *pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0]; return Sequence< Type >(pTypes, aOwnTypes.size()); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FColumns.cxx b/connectivity/source/drivers/file/FColumns.cxx index 1633812df86a..1f894a1e016c 100644 --- a/connectivity/source/drivers/file/FColumns.cxx +++ b/connectivity/source/drivers/file/FColumns.cxx @@ -74,12 +74,12 @@ sdbcx::ObjectType OColumns::createObject(const OUString& _rName) return xRet; } -// ----------------------------------------------------------------------------- + void OColumns::impl_refresh() throw(RuntimeException) { m_pTable->refreshColumns(); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 848873a43de7..9cb00a8dea2a 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -44,7 +44,7 @@ using namespace connectivity::file; using namespace dbtools; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; @@ -54,7 +54,7 @@ using namespace com::sun::star::container; using namespace com::sun::star::ucb; using namespace ::ucbhelper; typedef connectivity::OMetaConnection OConnection_BASE; -// -------------------------------------------------------------------------------- + OConnection::OConnection(OFileDriver* _pDriver) : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this) , m_pDriver(_pDriver) @@ -68,19 +68,19 @@ OConnection::OConnection(OFileDriver* _pDriver) { m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW; } -//----------------------------------------------------------------------------- + OConnection::~OConnection() { if(!isClosed( )) close(); } -//----------------------------------------------------------------------------- + void SAL_CALL OConnection::release() throw() { relase_ChildImpl(); } -//----------------------------------------------------------------------------- + sal_Bool OConnection::matchesExtension( const OUString& _rExt ) const { if ( isCaseSensitveExtension() ) @@ -92,7 +92,7 @@ sal_Bool OConnection::matchesExtension( const OUString& _rExt ) const return sMyExtension == sExt; } -//----------------------------------------------------------------------------- + void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& info) throw(SQLException) { osl_atomic_increment( &m_refCount ); @@ -212,10 +212,10 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& osl_atomic_decrement( &m_refCount ); } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OConnection, "com.sun.star.sdbc.drivers.file.Connection", "com.sun.star.sdbc.Connection") -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -226,7 +226,7 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLExcep m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -239,18 +239,18 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return pStmt; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& /*sql*/ ) throw(SQLException, RuntimeException) { throwFeatureNotImplementedException( "XConnection::prepareCall", *this ); return NULL; } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::nativeSQL( const OUString& sql ) throw(SQLException, RuntimeException) { return sql; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -258,7 +258,7 @@ void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLExcepti m_bAutoCommit = autoCommit; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -266,22 +266,22 @@ sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeExce return m_bAutoCommit; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException) { } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException) { } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return OConnection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -297,7 +297,7 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx return xMetaData; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -306,7 +306,7 @@ void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, m_bReadOnly = readOnly; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -315,36 +315,36 @@ sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeExcepti return m_bReadOnly; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setCatalog( const OUString& /*catalog*/ ) throw(SQLException, RuntimeException) { throwFeatureNotImplementedException( "XConnection::setCatalog", *this ); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeException) { return OUString(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 /*level*/ ) throw(SQLException, RuntimeException) { throwFeatureNotImplementedException( "XConnection::setTransactionIsolation", *this ); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { return 0; } -// -------------------------------------------------------------------------------- + Reference< XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException) { return NULL; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTypeMap( const Reference< XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) { @@ -355,17 +355,17 @@ void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL OConnection::getWarnings( ) throw(SQLException, RuntimeException) { return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException) { } -//------------------------------------------------------------------------------ + void OConnection::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -378,7 +378,7 @@ m_xContent.clear(); dispose_ChildImpl(); } -//------------------------------------------------------------------------------ + Reference< XTablesSupplier > OConnection::createCatalog() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -390,7 +390,7 @@ Reference< XTablesSupplier > OConnection::createCatalog() } return xTab; } -// ----------------------------------------------------------------------------- + Reference< XDynamicResultSet > OConnection::getDir() const { Reference<XDynamicResultSet> xContent; @@ -408,14 +408,14 @@ Reference< XDynamicResultSet > OConnection::getDir() const } return xContent; } -// ----------------------------------------------------------------------------- + sal_Int64 SAL_CALL OConnection::getSomething( const Sequence< sal_Int8 >& rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : (sal_Int64)0; } -// ----------------------------------------------------------------------------- + Sequence< sal_Int8 > OConnection::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -430,7 +430,7 @@ Sequence< sal_Int8 > OConnection::getUnoTunnelImplementationId() } return pId->getImplementationId(); } -// ----------------------------------------------------------------------------- + void OConnection::throwUrlNotValid(const OUString & _rsUrl,const OUString & _rsMessage) { SQLException aError; @@ -447,7 +447,7 @@ void OConnection::throwUrlNotValid(const OUString & _rsUrl,const OUString & _rsM throw aError; } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 058d5089ea0d..5b123cb3f23e 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -52,24 +52,24 @@ ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) : ::connectivity::OData SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::ODatabaseMetaData" ); DBG_CTOR( file_ODatabaseMetaData, NULL ); } -// ------------------------------------------------------------------------- + ODatabaseMetaData::~ODatabaseMetaData() { DBG_DTOR( file_ODatabaseMetaData, NULL ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_getTypeInfo_throw" ); return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTypeInfo ); } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_getCatalogSeparator_throw" ); return OUString(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*tableNamePattern*/, const OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException) @@ -79,7 +79,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumns ); } -// ------------------------------------------------------------------------- + namespace { sal_Int16 isCaseSensitiveParentFolder( const OUString& _rFolderOrDoc, const OUString& _rDocName ) @@ -162,7 +162,7 @@ namespace } } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern, const Sequence< OUString >& types ) throw(SQLException, RuntimeException) @@ -317,79 +317,79 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( return xRef; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxBinaryLiteralLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxRowSize" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxCatalogNameLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxCharLiteralLength" ); return SAL_MAX_INT32; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxColumnNameLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxColumnsInIndex" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxCursorNameLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxConnections" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxColumnsInTable" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_getMaxStatements_throw" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxTableNameLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_getMaxTablesInSelect_throw" ); return 1; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern ) throw(SQLException, RuntimeException) { @@ -459,230 +459,230 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::doesMaxRowSizeIncludeBlobs" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::storesLowerCaseQuotedIdentifiers" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::storesLowerCaseIdentifiers" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::storesMixedCaseIdentifiers" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::storesUpperCaseQuotedIdentifiers" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::storesUpperCaseIdentifiers" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxIndexLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsNonNullableColumns" ); return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getCatalogTerm" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_getIdentifierQuoteString_throw" ); static const OUString sQuote("\""); return sQuote; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getExtraNameCharacters" ); return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsDifferentTableCorrelationNames" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_isCatalogAtStart_throw" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::dataDefinitionIgnoredInTransactions" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::dataDefinitionCausesTransactionCommit" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsDataManipulationTransactionsOnly" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsPositionedDelete" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsPositionedUpdate" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsOpenStatementsAcrossRollback" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsOpenStatementsAcrossCommit" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsOpenCursorsAcrossCommit" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsOpenCursorsAcrossRollback" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 /*level*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsTransactionIsolationLevel" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsANSI92FullSQL" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsANSI92EntryLevelSQL" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsIntegrityEnhancementFacility" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsSchemasInIndexDefinitions" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsCatalogsInIndexDefinitions" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsOuterJoins" ); return sal_False; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getTableTypes" ); @@ -701,416 +701,416 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLE pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxStatementLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxProcedureNameLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxSchemaNameLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsTransactions" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::allProceduresAreCallable" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsStoredProcedures" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsSelectForUpdate" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::allTablesAreSelectable" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::isReadOnly" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::usesLocalFiles" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::usesLocalFilePerTable" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsTypeConversion" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::nullPlusNonNullIsNull" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsColumnAliasing" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsTableCorrelationNames" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 /*fromType*/, sal_Int32 /*toType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsConvert" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsExpressionsInOrderBy" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsGroupBy" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsGroupByBeyondSelect" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsGroupByUnrelated" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsMultipleTransactions" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsMultipleResultSets" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsLikeEscapeClause" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsOrderByUnrelated" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsUnion" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsUnionAll" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsMixedCaseIdentifiers" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::nullsAreSortedAtEnd" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::nullsAreSortedAtStart" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::nullsAreSortedHigh" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::nullsAreSortedLow" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsSchemasInProcedureCalls" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsCatalogsInProcedureCalls" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsCorrelatedSubqueries" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsSubqueriesInComparisons" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsSubqueriesInExists" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsSubqueriesInIns" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsSubqueriesInQuantifieds" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsANSI92IntermediateSQL" ); return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getURL" ); static const OUString aValue( "sdbc:file:" ); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getUserName" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDriverName" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverVersion( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDriverVersion" ); return OUString::number(1); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDatabaseProductVersion" ); return OUString::number(0); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDatabaseProductName" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getProcedureTerm" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getSchemaTerm" ); return OUString(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDriverMajorVersion" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDefaultTransactionIsolation" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getDriverMinorVersion" ); return 0; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getSQLKeywords" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getSearchStringEscape" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getStringFunctions" ); return OUString("UCASE,LCASE,ASCII,LENGTH,OCTET_LENGTH,CHAR_LENGTH,CHARACTER_LENGTH,CHAR,CONCAT,LOCATE,SUBSTRING,LTRIM,RTRIM,SPACE,REPLACE,REPEAT,INSERT,LEFT,RIGHT"); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getTimeDateFunctions" ); return OUString("DAYOFWEEK,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,CURDATE,CURTIME,NOW"); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getSystemFunctions" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getNumericFunctions" ); return OUString("ABS,SIGN,MOD,FLOOR,CEILING,ROUND,EXP,LN,LOG,LOG10,POWER,SQRT,PI,COS,SIN,TAN,ACOS,ASIN,ATAN,ATAN2,DEGREES,RADIANS"); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsExtendedSQLGrammar" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsCoreSQLGrammar" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsMinimumSQLGrammar" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsFullOuterJoins" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsLimitedOuterJoins" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxColumnsInGroupBy" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxColumnsInOrderBy" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxColumnsInSelect" ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getMaxUserNameLength" ); return 0; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsResultSetType" ); @@ -1124,7 +1124,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 /*concurrency*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsResultSetConcurrency" ); @@ -1138,67 +1138,67 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 set } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::ownUpdatesAreVisible" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::ownDeletesAreVisible" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::ownInsertsAreVisible" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::othersUpdatesAreVisible" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::othersDeletesAreVisible" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::othersInsertsAreVisible" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::updatesAreDetected" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::deletesAreDetected" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::insertsAreDetected" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::supportsBatchUpdates" ); return sal_False; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::getUDTs" ); diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx index 447037f8fa2a..f6bfca8af207 100644 --- a/connectivity/source/drivers/file/FDateFunctions.cxx +++ b/connectivity/source/drivers/file/FDateFunctions.cxx @@ -25,7 +25,7 @@ using namespace connectivity; using namespace connectivity::file; -//------------------------------------------------------------------ + ORowSetValue OOp_DayOfWeek::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -63,7 +63,7 @@ ORowSetValue OOp_DayOfWeek::operate(const ORowSetValue& lhs) const } return nRet; } -//------------------------------------------------------------------ + ORowSetValue OOp_DayOfMonth::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -72,7 +72,7 @@ ORowSetValue OOp_DayOfMonth::operate(const ORowSetValue& lhs) const ::com::sun::star::util::Date aD = lhs; return static_cast<sal_Int16>(aD.Day); } -//------------------------------------------------------------------ + ORowSetValue OOp_DayOfYear::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -82,7 +82,7 @@ ORowSetValue OOp_DayOfYear::operate(const ORowSetValue& lhs) const Date aDate(aD.Day,aD.Month,aD.Year); return static_cast<sal_Int16>(aDate.GetDayOfYear()); } -//------------------------------------------------------------------ + ORowSetValue OOp_Month::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -91,7 +91,7 @@ ORowSetValue OOp_Month::operate(const ORowSetValue& lhs) const ::com::sun::star::util::Date aD = lhs; return static_cast<sal_Int16>(aD.Month); } -//------------------------------------------------------------------ + ORowSetValue OOp_DayName::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -129,7 +129,7 @@ ORowSetValue OOp_DayName::operate(const ORowSetValue& lhs) const } return sRet; } -//------------------------------------------------------------------ + ORowSetValue OOp_MonthName::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -178,7 +178,7 @@ ORowSetValue OOp_MonthName::operate(const ORowSetValue& lhs) const } return sRet; } -//------------------------------------------------------------------ + ORowSetValue OOp_Quarter::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -194,7 +194,7 @@ ORowSetValue OOp_Quarter::operate(const ORowSetValue& lhs) const nRet = 4; return nRet; } -//------------------------------------------------------------------ + ORowSetValue OOp_Week::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( lhs.empty() || lhs.size() > 2 ) @@ -211,7 +211,7 @@ ORowSetValue OOp_Week::operate(const ::std::vector<ORowSetValue>& lhs) const return static_cast<sal_Int16>(aDate.GetWeekOfYear(static_cast<DayOfWeek>(nStartDay))); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Year::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -220,7 +220,7 @@ ORowSetValue OOp_Year::operate(const ORowSetValue& lhs) const ::com::sun::star::util::Date aD = lhs; return static_cast<sal_Int16>(aD.Year); } -//------------------------------------------------------------------ + ORowSetValue OOp_Hour::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -229,7 +229,7 @@ ORowSetValue OOp_Hour::operate(const ORowSetValue& lhs) const ::com::sun::star::util::Time aT = lhs; return static_cast<sal_Int16>(aT.Hours); } -//------------------------------------------------------------------ + ORowSetValue OOp_Minute::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -238,7 +238,7 @@ ORowSetValue OOp_Minute::operate(const ORowSetValue& lhs) const ::com::sun::star::util::Time aT = lhs; return static_cast<sal_Int16>(aT.Minutes); } -//------------------------------------------------------------------ + ORowSetValue OOp_Second::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -247,7 +247,7 @@ ORowSetValue OOp_Second::operate(const ORowSetValue& lhs) const ::com::sun::star::util::Time aT = lhs; return static_cast<sal_Int16>(aT.Seconds); } -//------------------------------------------------------------------ + ORowSetValue OOp_CurDate::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( !lhs.empty() ) @@ -256,7 +256,7 @@ ORowSetValue OOp_CurDate::operate(const ::std::vector<ORowSetValue>& lhs) const Date aCurDate( Date::SYSTEM ); return ::com::sun::star::util::Date(aCurDate.GetDay(),aCurDate.GetMonth(),aCurDate.GetYear()); } -//------------------------------------------------------------------ + ORowSetValue OOp_CurTime::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( !lhs.empty() ) @@ -267,7 +267,7 @@ ORowSetValue OOp_CurTime::operate(const ::std::vector<ORowSetValue>& lhs) const aCurTime.GetSec(), aCurTime.GetMin(), aCurTime.GetHour(), false); } -//------------------------------------------------------------------ + ORowSetValue OOp_Now::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( !lhs.empty() ) @@ -279,6 +279,6 @@ ORowSetValue OOp_Now::operate(const ::std::vector<ORowSetValue>& lhs) const aCurTime.GetDay(), aCurTime.GetMonth(), aCurTime.GetYear(), false); } -//------------------------------------------------------------------ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index 6bb859620124..2d8ef7cb2298 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -35,14 +35,14 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; using namespace com::sun::star::container; -// -------------------------------------------------------------------------------- + OFileDriver::OFileDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext) : ODriver_BASE(m_aMutex) ,m_xContext(_rxContext) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileDriver::OFileDriver" ); } -// -------------------------------------------------------------------------------- + void OFileDriver::disposing() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileDriver::disposing" ); @@ -61,12 +61,12 @@ void OFileDriver::disposing() } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString OFileDriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString("com.sun.star.sdbc.driver.file.Driver"); } -//------------------------------------------------------------------------------ + Sequence< OUString > OFileDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); @@ -75,7 +75,7 @@ Sequence< OUString > OFileDriver::getSupportedServiceNames_Static( ) throw (Run return aSNS; } -//------------------------------------------------------------------ + OUString SAL_CALL OFileDriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -86,13 +86,13 @@ sal_Bool SAL_CALL OFileDriver::supportsService( const OUString& _rServiceName ) return cppu::supportsService(this, _rServiceName); } -//------------------------------------------------------------------ + Sequence< OUString > SAL_CALL OFileDriver::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OFileDriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileDriver::connect" ); @@ -106,14 +106,14 @@ Reference< XConnection > SAL_CALL OFileDriver::connect( const OUString& url, con return xCon; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OFileDriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileDriver::acceptsURL" ); return url.startsWith("sdbc:file:"); } -// -------------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileDriver::getPropertyInfo" ); @@ -176,20 +176,20 @@ Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const OUSt } // if ( ! acceptsURL(url) ) return Sequence< DriverPropertyInfo >(); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OFileDriver::getMajorVersion( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileDriver::getMajorVersion" ); return 1; } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OFileDriver::getMinorVersion( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileDriver::getMinorVersion" ); return 0; } -// -------------------------------------------------------------------------------- -// -------------------------------------------------------------------------------- + + // XDataDefinitionSupplier Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByConnection( const Reference< ::com::sun::star::sdbc::XConnection >& connection ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -218,7 +218,7 @@ Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByConnection return xTab; } -// -------------------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByURL( const OUString& url, const Sequence< PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileDriver::getDataDefinitionByURL" ); @@ -231,13 +231,13 @@ Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByURL( const return getDataDefinitionByConnection(connect(url,info)); } -// ----------------------------------------------------------------------------- + OOperandAttr::OOperandAttr(sal_uInt16 _nPos,const Reference< XPropertySet>& _xColumn) : OOperandRow(_nPos,::comphelper::getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)))) , m_xColumn(_xColumn) { } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx index d91a5dddffbc..d456654d480c 100644 --- a/connectivity/source/drivers/file/FNoException.cxx +++ b/connectivity/source/drivers/file/FNoException.cxx @@ -28,7 +28,7 @@ using namespace connectivity; using namespace connectivity::file; -// ----------------------------------------------------------------------------- + void OFileCatalog::refreshViews() {} void OFileCatalog::refreshGroups() @@ -36,7 +36,7 @@ void OFileCatalog::refreshGroups() void OFileCatalog::refreshUsers() { } -// ----------------------------------------------------------------------------- + OPredicateInterpreter::~OPredicateInterpreter() { while(!m_aStack.empty()) @@ -46,7 +46,7 @@ OPredicateInterpreter::~OPredicateInterpreter() } // m_aStack.clear(); } -// ----------------------------------------------------------------------------- + void OPredicateCompiler::Clean() { for(OCodeList::reverse_iterator aIter = m_aCodeList.rbegin(); aIter != m_aCodeList.rend();++aIter) @@ -55,7 +55,7 @@ void OPredicateCompiler::Clean() } m_aCodeList.clear(); } -// ----------------------------------------------------------------------------- + void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow) { OCodeList& rCodeList = m_aCompiler->m_aCodeList; @@ -66,7 +66,7 @@ void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow) pParam->bindValue(_pRow); } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::scanParameter" ); @@ -87,7 +87,7 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< for (sal_uInt32 i = 0; i < pParseNode->count(); i++) scanParameter(pParseNode->getChild(i),_rParaNodes); } -// ----------------------------------------------------------------------------- + OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::GetOrderbyKeyValue" ); @@ -104,6 +104,6 @@ OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow) return pKeyValue; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FNumericFunctions.cxx b/connectivity/source/drivers/file/FNumericFunctions.cxx index e4871a31ee72..99710645fc51 100644 --- a/connectivity/source/drivers/file/FNumericFunctions.cxx +++ b/connectivity/source/drivers/file/FNumericFunctions.cxx @@ -24,7 +24,7 @@ using namespace connectivity; using namespace connectivity::file; -//------------------------------------------------------------------ + ORowSetValue OOp_Abs::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -35,7 +35,7 @@ ORowSetValue OOp_Abs::operate(const ORowSetValue& lhs) const nVal *= -1.0; return fabs(nVal); } -//------------------------------------------------------------------ + ORowSetValue OOp_Sign::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -50,7 +50,7 @@ ORowSetValue OOp_Sign::operate(const ORowSetValue& lhs) const return nRet; } -//------------------------------------------------------------------ + ORowSetValue OOp_Mod::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) const { if ( lhs.isNull() || rhs.isNull() ) @@ -58,7 +58,7 @@ ORowSetValue OOp_Mod::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) c return fmod((double)lhs,(double)rhs); } -//------------------------------------------------------------------ + ORowSetValue OOp_Floor::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -66,7 +66,7 @@ ORowSetValue OOp_Floor::operate(const ORowSetValue& lhs) const return floor((double)lhs); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Ceiling::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -75,7 +75,7 @@ ORowSetValue OOp_Ceiling::operate(const ORowSetValue& lhs) const double nVal(lhs); return ceil(nVal); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Round::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( lhs.empty() || lhs.size() > 2 ) @@ -89,7 +89,7 @@ ORowSetValue OOp_Round::operate(const ::std::vector<ORowSetValue>& lhs) const nDec = lhs[0]; return ::rtl::math::round(nVal,nDec); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Exp::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -98,7 +98,7 @@ ORowSetValue OOp_Exp::operate(const ORowSetValue& lhs) const double nVal(lhs); return exp(nVal); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Ln::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() || static_cast<double>(lhs) < 0.0 ) @@ -110,7 +110,7 @@ ORowSetValue OOp_Ln::operate(const ORowSetValue& lhs) const return ORowSetValue(); return nVal; } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Log::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( lhs.empty() || lhs.size() > 2 ) @@ -126,7 +126,7 @@ ORowSetValue OOp_Log::operate(const ::std::vector<ORowSetValue>& lhs) const return ORowSetValue(); return nVal; } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Log10::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() || static_cast<double>(lhs) < 0.0 ) @@ -138,7 +138,7 @@ ORowSetValue OOp_Log10::operate(const ORowSetValue& lhs) const nVal /= log(10.0); return nVal; } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Pow::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) const { if ( lhs.isNull() || rhs.isNull() ) @@ -146,7 +146,7 @@ ORowSetValue OOp_Pow::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) c return pow((double)lhs,(double)rhs); } -//------------------------------------------------------------------ + ORowSetValue OOp_Sqrt::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -157,12 +157,12 @@ ORowSetValue OOp_Sqrt::operate(const ORowSetValue& lhs) const return ORowSetValue(); return nVal; } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Pi::operate(const ::std::vector<ORowSetValue>& /*lhs*/) const { return 3.141592653589793116; } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Cos::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -170,7 +170,7 @@ ORowSetValue OOp_Cos::operate(const ORowSetValue& lhs) const return cos((double)lhs); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Sin::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -178,7 +178,7 @@ ORowSetValue OOp_Sin::operate(const ORowSetValue& lhs) const return sin((double)lhs); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Tan::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -186,7 +186,7 @@ ORowSetValue OOp_Tan::operate(const ORowSetValue& lhs) const return tan((double)lhs); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_ACos::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -194,7 +194,7 @@ ORowSetValue OOp_ACos::operate(const ORowSetValue& lhs) const return acos((double)lhs); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_ASin::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -202,7 +202,7 @@ ORowSetValue OOp_ASin::operate(const ORowSetValue& lhs) const return asin((double)lhs); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_ATan::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -210,7 +210,7 @@ ORowSetValue OOp_ATan::operate(const ORowSetValue& lhs) const return atan((double)lhs); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_ATan2::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) const { if ( lhs.isNull() || rhs.isNull() ) @@ -218,7 +218,7 @@ ORowSetValue OOp_ATan2::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) return atan2((double)lhs,(double)rhs); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Degrees::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -227,7 +227,7 @@ ORowSetValue OOp_Degrees::operate(const ORowSetValue& lhs) const double nLhs = lhs; return nLhs*180*(1.0/3.141592653589793116); } -// ----------------------------------------------------------------------------- + ORowSetValue OOp_Radians::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -236,6 +236,6 @@ ORowSetValue OOp_Radians::operate(const ORowSetValue& lhs) const double nLhs = lhs; return nLhs*3.141592653589793116*(1.0/180.0); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index f24748369d42..2fa3a21e2a4a 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -52,7 +52,7 @@ using namespace com::sun::star; IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbc.driver.file.PreparedStatement","com.sun.star.sdbc.PreparedStatement"); DBG_NAME( file_OPreparedStatement ) -// ------------------------------------------------------------------------- + OPreparedStatement::OPreparedStatement( OConnection* _pConnection) : OStatement_BASE2( _pConnection ) { @@ -60,14 +60,14 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection) DBG_CTOR( file_OPreparedStatement, NULL ); } -// ------------------------------------------------------------------------- + OPreparedStatement::~OPreparedStatement() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::~OPreparedStatement" ); DBG_DTOR( file_OPreparedStatement, NULL ); } -// ------------------------------------------------------------------------- + void OPreparedStatement::disposing() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::disposing" ); @@ -83,7 +83,7 @@ void OPreparedStatement::disposing() m_aParameterRow = NULL; } } -// ------------------------------------------------------------------------- + void OPreparedStatement::construct(const OUString& sql) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::construct" ); @@ -116,7 +116,7 @@ Reference<XResultSet> OPreparedStatement::makeResultSet() return xRS; } -// ------------------------------------------------------------------------- + Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException) { @@ -126,7 +126,7 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt static_cast< XParameters*>(this), static_cast< XResultSetMetaDataSupplier*>(this)); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), @@ -135,7 +135,7 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE2::getTypes()); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) throw(SQLException, RuntimeException) { @@ -148,7 +148,7 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr m_xMetaData = new OResultSetMetaData(m_aSQLIterator.getSelectColumns(),m_aSQLIterator.getTables().begin()->first,m_pTable); return m_xMetaData; } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException) { @@ -156,7 +156,7 @@ void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeException) { @@ -173,7 +173,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc return m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, RuntimeException) { @@ -196,14 +196,14 @@ sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, Run else return 0; } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const OUString& x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setString" ); setParameter(parameterIndex,x); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQLException, RuntimeException) { @@ -213,7 +213,7 @@ Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQ return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLException, RuntimeException) { @@ -223,40 +223,40 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE return makeResultSet(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setBoolean" ); setParameter(parameterIndex,static_cast<bool>(x)); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setByte" ); setParameter(parameterIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const util::Date& aData ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setDate" ); setParameter(parameterIndex,DBTypeConversion::toDouble(aData)); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const util::Time& aVal ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setTime" ); setParameter(parameterIndex,DBTypeConversion::toDouble(aVal)); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const util::DateTime& aVal ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setTimestamp" ); setParameter(parameterIndex,DBTypeConversion::toDouble(aVal)); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException) { @@ -264,28 +264,28 @@ void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x setParameter(parameterIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setFloat" ); setParameter(parameterIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setInt" ); setParameter(parameterIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setLong( sal_Int32 /*parameterIndex*/, sal_Int64 /*aVal*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setLong" ); throwFeatureNotImplementedException( "XParameters::setLong", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/ ) throw(SQLException, RuntimeException) { @@ -298,35 +298,35 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 / else (m_aParameterRow->get())[parameterIndex]->setNull(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setClob" ); throwFeatureNotImplementedException( "XParameters::setClob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setBlob" ); throwFeatureNotImplementedException( "XParameters::setBlob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setArray" ); throwFeatureNotImplementedException( "XParameters::setArray", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setRef" ); throwFeatureNotImplementedException( "XParameters::setRef", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException) { @@ -342,14 +342,14 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c break; } } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& /*typeName*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setObjectNull" ); setNull(parameterIndex,sqlType); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException) { @@ -364,21 +364,21 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any } // setObject (parameterIndex, x, sqlType, 0); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setShort" ); setParameter(parameterIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setBytes" ); setParameter(parameterIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) @@ -386,7 +386,7 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setCharacterStream" ); setBinaryStream(parameterIndex,x,length ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { @@ -398,7 +398,7 @@ void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, con x->readBytes(aSeq,length); setParameter(parameterIndex,aSeq); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException) { @@ -409,13 +409,13 @@ void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, Runtim m_aParameterRow->get().clear(); m_aParameterRow->get().push_back(new ORowSetValueDecorator(sal_Int32(0)) ); } -// ------------------------------------------------------------------------- + OResultSet* OPreparedStatement::createResultSet() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::createResultSet" ); return new OResultSet(this,m_aSQLIterator); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::initResultSet(OResultSet *pResultSet) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::initResultSet" ); @@ -428,17 +428,17 @@ void OPreparedStatement::initResultSet(OResultSet *pResultSet) pResultSet->OpenImpl(); pResultSet->setMetaData(getMetaData()); } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::acquire() throw() { OStatement_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::release() throw() { OStatement_BASE2::release(); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::checkAndResizeParameters" ); @@ -456,7 +456,7 @@ void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex) } } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetValue& x) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::setParameter" ); @@ -468,7 +468,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetVal else *((m_aParameterRow->get())[parameterIndex]) = x; } -// ----------------------------------------------------------------------------- + sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::AddParameter" ); @@ -516,7 +516,7 @@ sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Re m_xParamColumns->get().push_back(xParaColumn); return m_xParamColumns->get().size(); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::describeColumn(OSQLParseNode* _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::describeColumn" ); @@ -536,7 +536,7 @@ void OPreparedStatement::describeColumn(OSQLParseNode* _pParameter,OSQLParseNode // else // AddParameter(_pParameter,xProp); } -// ------------------------------------------------------------------------- + void OPreparedStatement::describeParameter() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::describeParameter" ); @@ -557,7 +557,7 @@ void OPreparedStatement::describeParameter() } } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::initializeResultSet(OResultSet* pRS) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::initializeResultSet" ); @@ -598,7 +598,7 @@ void OPreparedStatement::initializeResultSet(OResultSet* pRS) m_pSQLAnalyzer->bindParameterRow(m_aParameterRow); } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::parseParamterElem(const OUString& _sColumnName, OSQLParseNode* pRow_Value_Constructor_Elem) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OPreparedStatement::parseParamterElem" ); @@ -616,7 +616,7 @@ void OPreparedStatement::parseParamterElem(const OUString& _sColumnName, OSQLPar // Save number of parameter in the variable: SetAssignValue(_sColumnName, OUString(), sal_True, nParameter); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index add766d87e25..9d7f9dc93f7b 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -71,10 +71,10 @@ namespace ::dbtools::throwGenericSQLException(sMessage ,_xContext); } } -//------------------------------------------------------------------------------ + IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.drivers.file.ResultSet","com.sun.star.sdbc.ResultSet"); DBG_NAME( file_OResultSet ) -// ------------------------------------------------------------------------- + OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIterator) : OResultSet_BASE(m_aMutex) ,::comphelper::OPropertyContainer(OResultSet_BASE::rBHelper) ,m_aAssignValues(NULL) @@ -126,7 +126,7 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIte osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + OResultSet::~OResultSet() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::~OResultSet" ); @@ -134,7 +134,7 @@ OResultSet::~OResultSet() disposing(); DBG_DTOR( file_OResultSet, NULL ); } -// ------------------------------------------------------------------------- + void OResultSet::construct() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::construct" ); @@ -143,7 +143,7 @@ void OResultSet::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, 0,&m_nFetchDirection, ::getCppuType(static_cast<sal_Int32*>(0))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY,PropertyAttribute::READONLY,&m_nResultSetConcurrency, ::getCppuType(static_cast<sal_Int32*>(0))); } -// ------------------------------------------------------------------------- + void OResultSet::disposing(void) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::disposing" ); @@ -175,14 +175,14 @@ void OResultSet::disposing(void) m_aSkipDeletedSet.clear(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::queryInterface" ); Any aRet = OPropertySetHelper::queryInterface(rType); return aRet.hasValue() ? aRet : OResultSet_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw(RuntimeException) { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getTypes" ); @@ -194,7 +194,7 @@ Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw(RuntimeException) return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { @@ -217,7 +217,7 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQ assert(false); return 0; // Never reached } -// ----------------------------------------------------------------------------- + const ORowSetValue& OResultSet::getValue(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getValue" ); @@ -230,7 +230,7 @@ const ORowSetValue& OResultSet::getValue(sal_Int32 columnIndex ) throw(::com::su m_bWasNull = (m_aSelectRow->get())[columnIndex]->getValue().isNull(); return *(m_aSelectRow->get())[columnIndex]; } -// ----------------------------------------------------------------------------- + void OResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException) { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::checkIndex" ); @@ -238,68 +238,68 @@ void OResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc || columnIndex >= m_nColumnCount ) ::dbtools::throwInvalidIndexException(*this); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getBinaryStream" ); return NULL; } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getCharacterStream" ); return NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getBoolean" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getByte" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getBytes" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getDate" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getDouble" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getFloat" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getInt" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) { @@ -311,14 +311,14 @@ sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) return m_aSkipDeletedSet.getMappedPosition((m_aRow->get())[0]->getValue()); } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getLong" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException) { @@ -331,66 +331,66 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx m_xMetaData = new OResultSetMetaData(m_xColumns,m_aSQLIterator.getTables().begin()->first,m_pTable); return m_xMetaData; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getArray" ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getClob" ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getBlob" ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getRef" ); return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getObject" ); return getValue(columnIndex).makeAny(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getShort" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getString" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getTime" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getTimestamp" ); return getValue(columnIndex); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { @@ -401,7 +401,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeExcepti return m_nRowPos == sal_Int32(m_pFileSet->get().size()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::isFirst" ); @@ -411,7 +411,7 @@ sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) return m_nRowPos == 0; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::isLast" ); @@ -421,7 +421,7 @@ sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) return m_nRowPos == sal_Int32(m_pFileSet->get().size() - 1); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::beforeFirst" ); @@ -432,7 +432,7 @@ void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) if(first()) previous(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::afterLast" ); @@ -444,14 +444,14 @@ void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) next(); m_bEOF = sal_True; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::close" ); dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException) { @@ -460,7 +460,7 @@ sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException) checkDisposed(OResultSet_BASE::rBHelper.bDisposed); return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::FIRST,1,sal_True) : sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException) { @@ -470,7 +470,7 @@ sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException) checkDisposed(OResultSet_BASE::rBHelper.bDisposed); return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,sal_True) : sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::absolute" ); @@ -478,7 +478,7 @@ sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, Runt checkDisposed(OResultSet_BASE::rBHelper.bDisposed); return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::ABSOLUTE,row,sal_True) : sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::relative" ); @@ -486,7 +486,7 @@ sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, Runt checkDisposed(OResultSet_BASE::rBHelper.bDisposed); return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::RELATIVE,row,sal_True) : sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::previous" ); @@ -494,7 +494,7 @@ sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException) checkDisposed(OResultSet_BASE::rBHelper.bDisposed); return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::PRIOR,0,sal_True) : sal_False; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getStatement" ); @@ -504,7 +504,7 @@ Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException return m_xStatement; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeException) { @@ -515,7 +515,7 @@ sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeExceptio return m_bRowDeleted; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); @@ -523,7 +523,7 @@ sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeExcepti return m_bRowInserted; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::rowInserted" ); @@ -533,7 +533,7 @@ sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeExceptio return m_bRowUpdated; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { @@ -544,7 +544,7 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeExcep return m_nRowPos == -1; } -// ------------------------------------------------------------------------- + // sal_Bool OResultSet::evaluate() // { // SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::evaluate" ); @@ -576,7 +576,7 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeExcep // return bRet; // } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException) { @@ -586,7 +586,7 @@ sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException) return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::NEXT,1,sal_True) : sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -596,24 +596,24 @@ sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) return m_bWasNull; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::cancel" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::clearWarnings" ); } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getWarnings" ); return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::insertRow" ); @@ -638,7 +638,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) m_aSkipDeletedSet.insertNewPosition((m_aRow->get())[0]->getValue()); } } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateRow" ); @@ -653,7 +653,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException) clearInsertRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::deleteRow() throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::deleteRow" ); @@ -677,7 +677,7 @@ void SAL_CALL OResultSet::deleteRow() throw(SQLException, RuntimeException) m_aSkipDeletedSet.deletePosition(nPos); } } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::cancelRowUpdates" ); @@ -700,7 +700,7 @@ void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeExcept } } } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException) { @@ -720,13 +720,13 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeExcepti (*aIter)->setNull(); } } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::moveToCurrentRow" ); } -// ------------------------------------------------------------------------- + void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateValue" ); @@ -739,7 +739,7 @@ void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x) throw (m_aInsertRow->get())[columnIndex]->setBound(true); *(m_aInsertRow->get())[columnIndex] = x; } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -747,84 +747,84 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException ORowSetValue aEmpty; updateValue(columnIndex,aEmpty); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateBoolean" ); updateValue(columnIndex, static_cast<bool>(x)); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateByte" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateShort" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateInt" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateLong( sal_Int32 /*columnIndex*/, sal_Int64 /*x*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateLong" ); ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateLong", *this ); } -// ----------------------------------------------------------------------- + void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateFloat" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateDouble" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateString" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateBytes" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateDate" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateTime" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateTimestamp" ); updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { @@ -839,27 +839,27 @@ void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Refer x->readBytes(aSeq,length); updateValue(columnIndex,aSeq); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateCharacterStream" ); updateBinaryStream(columnIndex,x,length); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::refreshRow" ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::updateObject" ); if (!::dbtools::implUpdateObject(this, columnIndex, x)) throw SQLException(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { @@ -867,7 +867,7 @@ void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& if (!::dbtools::implUpdateObject(this, columnIndex, x)) throw SQLException(); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper* OResultSet::createArrayHelper( ) const { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::createArrayHelper" ); @@ -875,14 +875,14 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper & OResultSet::getInfoHelper() { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getInfoHelper" ); return *const_cast<OResultSet*>(this)->getArrayHelper(); } -//------------------------------------------------------------------ + sal_Bool OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, sal_Int32 nFirstOffset, sal_Bool bEvaluate, @@ -1020,7 +1020,7 @@ again: return sal_True; } -//------------------------------------------------------------------- + sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::Move" ); @@ -1229,7 +1229,7 @@ Error: } return sal_False; } -// ------------------------------------------------------------------------- + void OResultSet::sortRows() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::sortRows" ); @@ -1336,7 +1336,7 @@ void OResultSet::sortRows() } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::OpenImpl() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::OpenImpl" ); @@ -1598,7 +1598,7 @@ sal_Bool OResultSet::OpenImpl() return sal_True; } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OResultSet::getUnoTunnelImplementationId() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getUnoTunnelImplementationId" ); @@ -1616,7 +1616,7 @@ Sequence< sal_Int8 > OResultSet::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OResultSet::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getSomething" ); @@ -1624,7 +1624,7 @@ sal_Int64 OResultSet::getSomething( const Sequence< sal_Int8 > & rId ) throw (Ru ? reinterpret_cast< sal_Int64 >( this ) : 0; } -// ----------------------------------------------------------------------------- + void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, const OValueRefRow& _rSelectRow, const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns, @@ -1743,23 +1743,23 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, } } } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::acquire() throw() { OResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::release() throw() { OResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo( ) throw(RuntimeException) { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getPropertySetInfo" ); return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + void OResultSet::doTableSpecials(const OSQLTable& _xTable) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::doTableSpecials" ); @@ -1771,7 +1771,7 @@ void OResultSet::doTableSpecials(const OSQLTable& _xTable) m_pTable->acquire(); } } -// ----------------------------------------------------------------------------- + void OResultSet::clearInsertRow() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::clearInsertRow" ); @@ -1790,7 +1790,7 @@ void OResultSet::clearInsertRow() rValue->setNull(); } } -// ----------------------------------------------------------------------------- + void OResultSet::initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::initializeRow" ); @@ -1801,37 +1801,37 @@ void OResultSet::initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount) ::std::for_each(_rRow->get().begin()+1,_rRow->get().end(),TSetRefBound(false)); } } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::fillIndexValues" ); return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::move" ); return Move(_eCursorPosition,_nOffset,_bRetrieveData); } -// ----------------------------------------------------------------------------- + sal_Int32 OResultSet::getDriverPos() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::getDriverPos" ); return (m_aRow->get())[0]->getValue(); } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::deletedVisible() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::deletedVisible" ); return m_bShowDeleted; } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::isRowDeleted() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::isRowDeleted" ); return m_aRow->isDeleted(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::disposing( const EventObject& Source ) throw (RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::disposing" ); @@ -1842,6 +1842,6 @@ void SAL_CALL OResultSet::disposing( const EventObject& Source ) throw (RuntimeE m_pTable = NULL; } } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx index 3e33222b6b05..4f0d493f3b01 100644 --- a/connectivity/source/drivers/file/FResultSetMetaData.cxx +++ b/connectivity/source/drivers/file/FResultSetMetaData.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OResultSetMetaData::OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const OUString& _aTableName,OFileTable* _pTable) :m_aTableName(_aTableName) ,m_xColumns(_rxColumns) @@ -44,25 +44,25 @@ OResultSetMetaData::OResultSetMetaData(const ::rtl::Reference<connectivity::OSQL SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::OResultSetMetaData" ); } -// ------------------------------------------------------------------------- + OResultSetMetaData::~OResultSetMetaData() { m_xColumns = NULL; } -// ----------------------------------------------------------------------------- + void OResultSetMetaData::checkColumnIndex(sal_Int32 column) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::checkColumnIndex" ); if(column <= 0 || column > (sal_Int32)(sal_Int32)m_xColumns->get().size()) throwInvalidIndexException(*this); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getColumnDisplaySize" ); return getPrecision(column); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -70,28 +70,28 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(S checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getColumnCount" ); return (m_xColumns->get()).size(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::isCaseSensitive" ); return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getSchemaName" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -101,38 +101,38 @@ OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQ Any aName((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))); return aName.hasValue() ? getString(aName) : getString((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getTableName" ); return m_aTableName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getCatalogName" ); return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getColumnTypeName" ); checkColumnIndex(column); return getString((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getColumnLabel" ); return getColumnName(column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getColumnServiceName" ); return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -140,34 +140,34 @@ sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLEx checkColumnIndex(column); return getBOOL((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY))); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 /*setCatalogcolumn*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::isAutoIncrement" ); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::isSigned" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getPrecision" ); checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::getScale" ); checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -175,14 +175,14 @@ sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLE checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::isSearchable" ); return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -192,19 +192,19 @@ sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLEx (m_xColumns->get())[column-1]->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)) && ::cppu::any2bool((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)))); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::isDefinitelyWritable" ); return !isReadOnly(column); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSetMetaData::isWritable" ); return !isReadOnly(column); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 984a806c6636..8fb975f65d3f 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -42,7 +42,7 @@ namespace connectivity namespace file { -//------------------------------------------------------------------------------ + using namespace dbtools; using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -52,7 +52,7 @@ using namespace com::sun::star::sdbcx; using namespace com::sun::star::container; DBG_NAME( file_OStatement_Base ) -//------------------------------------------------------------------------------ + OStatement_Base::OStatement_Base(OConnection* _pConnection ) :OStatement_BASE(m_aMutex) ,::comphelper::OPropertyContainer(OStatement_BASE::rBHelper) @@ -92,7 +92,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY, nAttrib,&m_nResultSetConcurrency, ::getCppuType(static_cast<sal_Int32*>(0))); } -// ----------------------------------------------------------------------------- + OStatement_Base::~OStatement_Base() { osl_atomic_increment( &m_refCount ); @@ -101,7 +101,7 @@ OStatement_Base::~OStatement_Base() DBG_DTOR( file_OStatement_Base, NULL ); } -//------------------------------------------------------------------------------ + void OStatement_BASE2::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -139,24 +139,24 @@ void OStatement_BASE2::disposing() OStatement_Base::disposing(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::acquire() throw() { OStatement_BASE::acquire(); } -//----------------------------------------------------------------------------- + void SAL_CALL OStatement_BASE2::release() throw() { relase_ChildImpl(); } -//----------------------------------------------------------------------------- + Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(RuntimeException) { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::queryInterface" ); const Any aRet = OStatement_BASE::queryInterface(rType); return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::getTypes" ); @@ -166,13 +166,13 @@ Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException) return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::cancel" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException) { @@ -183,7 +183,7 @@ void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException) } dispose(); } -// ------------------------------------------------------------------------- + void OStatement_Base::reset() throw (SQLException) { @@ -195,7 +195,7 @@ void OStatement_Base::reset() throw (SQLException) } -// ------------------------------------------------------------------------- + Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::getWarnings" ); @@ -204,7 +204,7 @@ Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeExcepti return makeAny(m_aLastWarning); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::clearWarnings" ); @@ -213,7 +213,7 @@ void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeExce m_aLastWarning = SQLWarning(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OStatement_Base::createArrayHelper( ) const { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::createArrayHelper" ); @@ -222,31 +222,31 @@ void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeExce return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OStatement_Base::getInfoHelper() { //SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::getInfoHelper" ); return *const_cast<OStatement_Base*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + OResultSet* OStatement::createResultSet() { return new OResultSet(this,m_aSQLIterator); } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbc.driver.file.Statement","com.sun.star.sdbc.Statement"); -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::acquire() throw() { OStatement_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::release() throw() { OStatement_BASE2::release(); } -// ----------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + sal_Bool SAL_CALL OStatement::execute( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -256,7 +256,7 @@ sal_Bool SAL_CALL OStatement::execute( const OUString& sql ) throw(SQLException, return m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OStatement::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -273,12 +273,12 @@ Reference< XResultSet > SAL_CALL OStatement::executeQuery( const OUString& sql ) return xRS; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OStatement::getConnection( ) throw(SQLException, RuntimeException) { return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OStatement::executeUpdate( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -294,7 +294,7 @@ sal_Int32 SAL_CALL OStatement::executeUpdate( const OUString& sql ) throw(SQLExc return pResult->getRowCountResult(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::disposing(void) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::disposing" ); @@ -306,25 +306,25 @@ void SAL_CALL OStatement_Base::disposing(void) delete m_pEvaluationKeySet; OStatement_BASE::disposing(); } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OStatement_Base::getPropertySetInfo( ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::getPropertySetInfo" ); return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OStatement_XStatement::queryInterface( rType); return aRet.hasValue() ? aRet : OStatement_BASE2::queryInterface( rType); } -// ----------------------------------------------------------------------------- + OSQLAnalyzer* OStatement_Base::createAnalyzer() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::createAnalyzer" ); return new OSQLAnalyzer(m_pConnection); } -// ----------------------------------------------------------------------------- + void OStatement_Base::anylizeSQL() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::anylizeSQL" ); @@ -355,7 +355,7 @@ void OStatement_Base::anylizeSQL() } } } -//------------------------------------------------------------------ + void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, OSQLParseNode* pAscendingDescending) { @@ -388,7 +388,7 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? SQL_DESC : SQL_ASC); } -// ----------------------------------------------------------------------------- + void OStatement_Base::construct(const OUString& sql) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::construct" ); @@ -467,7 +467,7 @@ void OStatement_Base::construct(const OUString& sql) throw(SQLException, Runtim else throw SQLException(aErr,*this,OUString(),0,Any()); } -// ----------------------------------------------------------------------------- + void OStatement_Base::createColumnMapping() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::createColumnMapping" ); @@ -481,7 +481,7 @@ void OStatement_Base::createColumnMapping() // now check which columns are bound OResultSet::setBoundedColumns(m_aRow,m_aSelectRow,xColumns,xNames,sal_True,m_xDBMetaData,m_aColMapping); } -// ----------------------------------------------------------------------------- + void OStatement_Base::initializeResultSet(OResultSet* _pResult) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::initializeResultSet" ); @@ -500,7 +500,7 @@ void OStatement_Base::initializeResultSet(OResultSet* _pResult) m_pEvaluationKeySet = m_pSQLAnalyzer->bindEvaluationRow(m_aEvaluateRow); // Set values in the code of the Compiler _pResult->setEvaluationKeySet(m_pEvaluationKeySet); } -// ----------------------------------------------------------------------------- + void OStatement_Base::GetAssignValues() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::GetAssignValues" ); @@ -648,7 +648,7 @@ void OStatement_Base::GetAssignValues() } } -// ------------------------------------------------------------------------- + void OStatement_Base::ParseAssignValues(const ::std::vector< OUString>& aColumnNameList,OSQLParseNode* pRow_Value_Constructor_Elem, sal_Int32 nIndex) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::ParseAssignValues" ); @@ -676,7 +676,7 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< OUString>& aColumnN throwFunctionSequenceException(*this); } } -//------------------------------------------------------------------ + void OStatement_Base::SetAssignValue(const OUString& aColumnName, const OUString& aValue, sal_Bool bSetNull, @@ -742,7 +742,7 @@ void OStatement_Base::SetAssignValue(const OUString& aColumnName, if(nParameter != SQL_NO_PARAMETER) m_aParameterIndexes[nParameter] = nId; } -// ----------------------------------------------------------------------------- + void OStatement_Base::parseParamterElem(const OUString& /*_sColumnName*/,OSQLParseNode* /*pRow_Value_Constructor_Elem*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::parseParamterElem" ); @@ -752,6 +752,6 @@ void OStatement_Base::parseParamterElem(const OUString& /*_sColumnName*/,OSQLPar } // namespace file // ============================================================================= }// namespace connectivity -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FStringFunctions.cxx b/connectivity/source/drivers/file/FStringFunctions.cxx index a5cf7ce486ce..9459545669ab 100644 --- a/connectivity/source/drivers/file/FStringFunctions.cxx +++ b/connectivity/source/drivers/file/FStringFunctions.cxx @@ -23,7 +23,7 @@ using namespace connectivity; using namespace connectivity::file; -//------------------------------------------------------------------ + ORowSetValue OOp_Upper::operate(const ORowSetValue& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Upper::operate" ); @@ -32,7 +32,7 @@ ORowSetValue OOp_Upper::operate(const ORowSetValue& lhs) const return lhs.getString().toAsciiUpperCase(); } -//------------------------------------------------------------------ + ORowSetValue OOp_Lower::operate(const ORowSetValue& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Lower::operate" ); @@ -41,7 +41,7 @@ ORowSetValue OOp_Lower::operate(const ORowSetValue& lhs) const return lhs.getString().toAsciiLowerCase(); } -//------------------------------------------------------------------ + ORowSetValue OOp_Ascii::operate(const ORowSetValue& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Ascii::operate" ); @@ -51,7 +51,7 @@ ORowSetValue OOp_Ascii::operate(const ORowSetValue& lhs) const sal_Int32 nAscii = sStr.toChar(); return nAscii; } -//------------------------------------------------------------------ + ORowSetValue OOp_CharLength::operate(const ORowSetValue& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_CharLength::operate" ); @@ -60,7 +60,7 @@ ORowSetValue OOp_CharLength::operate(const ORowSetValue& lhs) const return lhs.getString().getLength(); } -//------------------------------------------------------------------ + ORowSetValue OOp_Char::operate(const ::std::vector<ORowSetValue>& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Char::operate" ); @@ -82,7 +82,7 @@ ORowSetValue OOp_Char::operate(const ::std::vector<ORowSetValue>& lhs) const return sRet; } -//------------------------------------------------------------------ + ORowSetValue OOp_Concat::operate(const ::std::vector<ORowSetValue>& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Concat::operate" ); @@ -102,7 +102,7 @@ ORowSetValue OOp_Concat::operate(const ::std::vector<ORowSetValue>& lhs) const return sRet.makeStringAndClear(); } -//------------------------------------------------------------------ + ORowSetValue OOp_Locate::operate(const ::std::vector<ORowSetValue>& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Locate::operate" ); @@ -121,7 +121,7 @@ ORowSetValue OOp_Locate::operate(const ::std::vector<ORowSetValue>& lhs) const return lhs[1].getString().indexOf(lhs[2].getString(),lhs[0]) + 1; } -//------------------------------------------------------------------ + ORowSetValue OOp_SubString::operate(const ::std::vector<ORowSetValue>& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_SubString::operate" ); @@ -140,7 +140,7 @@ ORowSetValue OOp_SubString::operate(const ::std::vector<ORowSetValue>& lhs) cons return lhs[2].getString().copy(static_cast<sal_Int32>(lhs[1])-1,lhs[0]); } -//------------------------------------------------------------------ + ORowSetValue OOp_LTrim::operate(const ORowSetValue& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_LTrim::operate" ); @@ -151,7 +151,7 @@ ORowSetValue OOp_LTrim::operate(const ORowSetValue& lhs) const OUString sNew = sRet.trim(); return sRet.copy(sRet.indexOf(sNew)); } -//------------------------------------------------------------------ + ORowSetValue OOp_RTrim::operate(const ORowSetValue& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_RTrim::operate" ); @@ -162,7 +162,7 @@ ORowSetValue OOp_RTrim::operate(const ORowSetValue& lhs) const OUString sNew = sRet.trim(); return sRet.copy(0,sRet.lastIndexOf(sNew[sNew.getLength()-1])+1); } -//------------------------------------------------------------------ + ORowSetValue OOp_Space::operate(const ORowSetValue& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Space::operate" ); @@ -178,7 +178,7 @@ ORowSetValue OOp_Space::operate(const ORowSetValue& lhs) const } return sRet.makeStringAndClear(); } -//------------------------------------------------------------------ + ORowSetValue OOp_Replace::operate(const ::std::vector<ORowSetValue>& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Replace::operate" ); @@ -197,7 +197,7 @@ ORowSetValue OOp_Replace::operate(const ::std::vector<ORowSetValue>& lhs) const return sStr; } -//------------------------------------------------------------------ + ORowSetValue OOp_Repeat::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Repeat::operate" ); @@ -212,7 +212,7 @@ ORowSetValue OOp_Repeat::operate(const ORowSetValue& lhs,const ORowSetValue& rhs } return sRet; } -//------------------------------------------------------------------ + ORowSetValue OOp_Insert::operate(const ::std::vector<ORowSetValue>& lhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Insert::operate" ); @@ -226,7 +226,7 @@ ORowSetValue OOp_Insert::operate(const ::std::vector<ORowSetValue>& lhs) const nStart = 1; return sStr.replaceAt(nStart-1,static_cast<sal_Int32>(lhs[1]),lhs[0]); } -//------------------------------------------------------------------ + ORowSetValue OOp_Left::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Left::operate" ); @@ -239,7 +239,7 @@ ORowSetValue OOp_Left::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) return ORowSetValue(); return sRet.copy(0,nCount); } -//------------------------------------------------------------------ + ORowSetValue OOp_Right::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_Right::operate" ); diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 7996bb678133..f687fd4ea625 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -52,7 +52,7 @@ OFileTable::OFileTable(sdbcx::OCollection* _pTables,OConnection* _pConnection) construct(); m_aColumns = new OSQLColumns(); } -// ------------------------------------------------------------------------- + OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, const OUString& _Name, const OUString& _Type, @@ -78,12 +78,12 @@ OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, construct(); // refreshColumns(); } -// ------------------------------------------------------------------------- + OFileTable::~OFileTable( ) { DBG_DTOR( file_OFileTable, NULL ); } -// ------------------------------------------------------------------------- + void OFileTable::refreshColumns() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::refreshColumns" ); @@ -103,17 +103,17 @@ void OFileTable::refreshColumns() else m_pColumns = new OColumns(this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void OFileTable::refreshKeys() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::refreshKeys" ); } -// ------------------------------------------------------------------------- + void OFileTable::refreshIndexes() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::refreshIndexes" ); } -// ------------------------------------------------------------------------- + Any SAL_CALL OFileTable::queryInterface( const Type & rType ) throw(RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::queryInterface" ); @@ -126,7 +126,7 @@ Any SAL_CALL OFileTable::queryInterface( const Type & rType ) throw(RuntimeExcep return OTable_TYPEDEF::queryInterface(rType); } -// ------------------------------------------------------------------------- + void SAL_CALL OFileTable::disposing(void) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::disposing" ); @@ -136,7 +136,7 @@ void SAL_CALL OFileTable::disposing(void) FileClose(); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OFileTable::getUnoTunnelImplementationId() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::getUnoTunnelImplementationId" ); @@ -154,7 +154,7 @@ Sequence< sal_Int8 > OFileTable::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OFileTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::getSomething" ); @@ -162,7 +162,7 @@ sal_Int64 OFileTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (Ru ? reinterpret_cast< sal_Int64 >( this ) : OTable_TYPEDEF::getSomething(rId); } -// ----------------------------------------------------------------------------- + void OFileTable::FileClose() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::FileClose" ); @@ -180,48 +180,48 @@ void OFileTable::FileClose() m_pBuffer = NULL; } } -// ----------------------------------------------------------------------------- + void SAL_CALL OFileTable::acquire() throw() { OTable_TYPEDEF::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OFileTable::release() throw() { OTable_TYPEDEF::release(); } -// ----------------------------------------------------------------------------- + sal_Bool OFileTable::InsertRow(OValueRefVector& /*rRow*/, sal_Bool /*bFlush*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::InsertRow" ); return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::DeleteRow" ); return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::UpdateRow" ); return sal_False; } -// ----------------------------------------------------------------------------- + void OFileTable::addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& /*descriptor*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::addColumn" ); OSL_FAIL( "OFileTable::addColumn: not implemented!" ); } -// ----------------------------------------------------------------------------- + void OFileTable::dropColumn(sal_Int32 /*_nPos*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::dropColumn" ); OSL_FAIL( "OFileTable::addColumn: not implemented!" ); } -// ----------------------------------------------------------------------------- + SvStream* OFileTable::createStream_simpleError( const OUString& _rFileName, StreamMode _eOpenMode) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::createStream_simpleError" ); @@ -235,11 +235,11 @@ SvStream* OFileTable::createStream_simpleError( const OUString& _rFileName, Stre return pReturn; } -// ----------------------------------------------------------------------------- + void OFileTable::refreshHeader() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::refreshHeader" ); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/FTables.cxx b/connectivity/source/drivers/file/FTables.cxx index cba822e2bb0f..6b3f78251a3b 100644 --- a/connectivity/source/drivers/file/FTables.cxx +++ b/connectivity/source/drivers/file/FTables.cxx @@ -39,18 +39,18 @@ sdbcx::ObjectType OTables::createObject(const OUString& /*_rName*/) { return sdbcx::ObjectType(); } -// ------------------------------------------------------------------------- + void OTables::impl_refresh( ) throw(RuntimeException) { static_cast<OFileCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void OTables::disposing(void) { m_xMetaData.clear(); OCollection::disposing(); } -//------------------------------------------------------------------ + Any SAL_CALL OTables::queryInterface( const Type & rType ) throw(RuntimeException) { if( rType == ::getCppuType((const Reference<XColumnLocate>*)0) || @@ -62,6 +62,6 @@ Any SAL_CALL OTables::queryInterface( const Type & rType ) throw(RuntimeExceptio typedef sdbcx::OCollection OTables_BASE; return OTables_BASE::queryInterface(rType); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index d125c1eb5c9b..5c82068a0642 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; DBG_NAME( file_OSQLAnalyzer ) -//------------------------------------------------------------------ + OSQLAnalyzer::OSQLAnalyzer(OConnection* _pConnection) :m_pConnection(_pConnection) ,m_bHasSelectionCode(sal_False) @@ -46,18 +46,18 @@ OSQLAnalyzer::OSQLAnalyzer(OConnection* _pConnection) m_aInterpreter = new OPredicateInterpreter(m_aCompiler); } -// ----------------------------------------------------------------------------- + OSQLAnalyzer::~OSQLAnalyzer() { DBG_DTOR( file_OSQLAnalyzer, NULL ); } -// ----------------------------------------------------------------------------- + void OSQLAnalyzer::setIndexes(const Reference< XNameAccess>& _xIndexes) { m_aCompiler->m_xIndexes = _xIndexes; } -//------------------------------------------------------------------ + void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) { if (SQL_ISRULE(pSQLParseNode,select_statement)) @@ -120,7 +120,7 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) m_aCompiler->start(pSQLParseNode); } -//------------------------------------------------------------------ + void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvaluateSetList& _rEvaluateSetList) { // count criteria @@ -153,7 +153,7 @@ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvalu } } } -//------------------------------------------------------------------ + void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) { // first the select part @@ -164,7 +164,7 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) bindRow( aIter->first->m_aCodeList,_pRow,aEvaluateSetList); } } -//------------------------------------------------------------------ + ::std::vector<sal_Int32>* OSQLAnalyzer::bindEvaluationRow(OValueRefRow& _pRow) { OEvaluateSetList aEvaluateSetList; @@ -203,19 +203,19 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) return pKeySet; } -// ----------------------------------------------------------------------------- + OOperandAttr* OSQLAnalyzer::createOperandAttr(sal_Int32 _nPos, const Reference< XPropertySet>& _xCol, const Reference< XNameAccess>& /*_xIndexes*/) { return new OOperandAttr(static_cast<sal_uInt16>(_nPos),_xCol); } -// ----------------------------------------------------------------------------- + sal_Bool OSQLAnalyzer::hasRestriction() const { return m_aCompiler->hasCode(); } -// ----------------------------------------------------------------------------- + sal_Bool OSQLAnalyzer::hasFunctions() const { if ( m_bSelectionFirstTime ) @@ -229,7 +229,7 @@ sal_Bool OSQLAnalyzer::hasFunctions() const } return m_bHasSelectionCode; } -// ----------------------------------------------------------------------------- + void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std::vector<sal_Int32>& _rColumnMapping) { sal_Int32 nPos = 1; @@ -246,7 +246,7 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std: } } } -// ----------------------------------------------------------------------------- + void OSQLAnalyzer::dispose() { m_aCompiler->dispose(); @@ -256,7 +256,7 @@ void OSQLAnalyzer::dispose() aIter->first->dispose(); } } -// ----------------------------------------------------------------------------- + void OSQLAnalyzer::setOrigColumns(const OFileColumns& rCols) { m_aCompiler->setOrigColumns(rCols); @@ -266,6 +266,6 @@ void OSQLAnalyzer::setOrigColumns(const OFileColumns& rCols) aIter->first->setOrigColumns(rCols); } } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index ba787a7cc8e4..9ce2d509a166 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -57,29 +57,29 @@ TYPEINIT1(ONthOperator, OOperator); TYPEINIT1(OBinaryOperator, OOperator); TYPEINIT1(OUnaryOperator, OOperator); -//------------------------------------------------------------------ + DBG_NAME(OCode ) OCode::OCode() { DBG_CTOR(OCode ,NULL); } -// ----------------------------------------------------------------------------- + OCode::~OCode() { DBG_DTOR(OCode,NULL); } -//------------------------------------------------------------------ + OEvaluateSet* OOperand::preProcess(OBoolOperator* /*pOp*/, OOperand* /*pRight*/) { return NULL; } -// ----------------------------------------------------------------------------- + OOperandRow::OOperandRow(sal_uInt16 _nPos, sal_Int32 _rType) : OOperand(_rType) , m_nRowPos(_nPos) {} -//------------------------------------------------------------------ + void OOperandRow::bindValue(const OValueRefRow& _pRow) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOperandRow::OOperandRow" ); @@ -88,14 +88,14 @@ void OOperandRow::bindValue(const OValueRefRow& _pRow) OSL_ENSURE(m_pRow.is() && m_nRowPos < m_pRow->get().size(),"Invalid RowPos is >= vector.size()"); (m_pRow->get())[m_nRowPos]->setBound(true); } -// ----------------------------------------------------------------------------- + void OOperandRow::setValue(const ORowSetValue& _rVal) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOperandRow::setValue" ); OSL_ENSURE(m_pRow.is() && m_nRowPos < m_pRow->get().size(),"Invalid RowPos is >= vector.size()"); (*(m_pRow->get())[m_nRowPos]) = _rVal; } -//------------------------------------------------------------------ + const ORowSetValue& OOperandRow::getValue() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOperandRow::getValue" ); @@ -103,18 +103,18 @@ const ORowSetValue& OOperandRow::getValue() const return (m_pRow->get())[m_nRowPos]->getValue(); } -// ----------------------------------------------------------------------------- + void OOperandValue::setValue(const ORowSetValue& _rVal) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOperandValue::setValue" ); m_aValue = _rVal; } -// ------------------------------------------------------------------------- + sal_Bool OOperandAttr::isIndexed() const { return sal_False; } -//------------------------------------------------------------------ + OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos) : OOperandRow(static_cast<sal_uInt16>(_nPos), DataType::VARCHAR) // Standard-Type { @@ -144,14 +144,14 @@ OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos) } -//------------------------------------------------------------------ + const ORowSetValue& OOperandValue::getValue() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOperandValue::getValue" ); return m_aValue; } -//------------------------------------------------------------------ + OOperandConst::OOperandConst(const OSQLParseNode& rColumnRef, const OUString& aStrValue) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOperandConst::OOperandConst" ); @@ -192,10 +192,10 @@ OOperandConst::OOperandConst(const OSQLParseNode& rColumnRef, const OUString& aS ///////////////////////////////////////////////////////////////////////////////////////// // Implementation of the operators -//------------------------------------------------------------------ + sal_uInt16 OOperator::getRequestedOperands() const {return 2;} -//------------------------------------------------------------------ + sal_Bool OBoolOperator::operate(const OOperand*, const OOperand*) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OBoolOperator::operate" ); @@ -203,7 +203,7 @@ sal_Bool OBoolOperator::operate(const OOperand*, const OOperand*) const } -//------------------------------------------------------------------ + void OBoolOperator::Exec(OCodeStack& rCodeStack) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OBoolOperator::Exec" ); @@ -218,13 +218,13 @@ void OBoolOperator::Exec(OCodeStack& rCodeStack) if (IS_TYPE(OOperandResult,pRight)) delete pRight; } -//------------------------------------------------------------------ + sal_Bool OOp_NOT::operate(const OOperand* pLeft, const OOperand* ) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_AND::operate" ); return !pLeft->isValid(); } -//------------------------------------------------------------------ + void OOp_NOT::Exec(OCodeStack& rCodeStack) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_ISNULL::Exec" ); @@ -235,35 +235,35 @@ void OOp_NOT::Exec(OCodeStack& rCodeStack) if (IS_TYPE(OOperandResult,pOperand)) delete pOperand; } -//------------------------------------------------------------------ + sal_uInt16 OOp_NOT::getRequestedOperands() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_NOT::getRequestedOperands" ); return 1; } -//------------------------------------------------------------------ + sal_Bool OOp_AND::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_AND::operate" ); return pLeft->isValid() && pRight->isValid(); } -//------------------------------------------------------------------ + sal_Bool OOp_OR::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_OR::operate" ); return pLeft->isValid() || pRight->isValid(); } -//------------------------------------------------------------------ + sal_uInt16 OOp_ISNULL::getRequestedOperands() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_ISNULL::getRequestedOperands" ); return 1; } -//------------------------------------------------------------------ + void OOp_ISNULL::Exec(OCodeStack& rCodeStack) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_ISNULL::Exec" ); @@ -275,20 +275,20 @@ void OOp_ISNULL::Exec(OCodeStack& rCodeStack) delete pOperand; } -//------------------------------------------------------------------ + sal_Bool OOp_ISNULL::operate(const OOperand* pOperand, const OOperand*) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_ISNULL::operate" ); return pOperand->getValue().isNull(); } -//------------------------------------------------------------------ + sal_Bool OOp_ISNOTNULL::operate(const OOperand* pOperand, const OOperand*) const { return !OOp_ISNULL::operate(pOperand); } -//------------------------------------------------------------------ + sal_Bool OOp_LIKE::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_ISNULL::operate" ); @@ -305,14 +305,14 @@ sal_Bool OOp_LIKE::operate(const OOperand* pLeft, const OOperand* pRight) const return bMatch; } -//------------------------------------------------------------------ + sal_Bool OOp_NOTLIKE::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_NOTLIKE::operate" ); return !OOp_LIKE::operate(pLeft, pRight); } -//------------------------------------------------------------------ + sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_COMPARE::operate" ); @@ -383,7 +383,7 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con return bResult; } -//------------------------------------------------------------------ + void ONumOperator::Exec(OCodeStack& rCodeStack) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ONumOperator::Exec" ); @@ -399,40 +399,40 @@ void ONumOperator::Exec(OCodeStack& rCodeStack) if (IS_TYPE(OOperandResult,pRight)) delete pRight; } -//------------------------------------------------------------------ + double OOp_ADD::operate(const double& fLeft,const double& fRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_ADD::operate" ); return fLeft + fRight; } -//------------------------------------------------------------------ + double OOp_SUB::operate(const double& fLeft,const double& fRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_SUB::operate" ); return fLeft - fRight; } -//------------------------------------------------------------------ + double OOp_MUL::operate(const double& fLeft,const double& fRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_MUL::operate" ); return fLeft * fRight; } -//------------------------------------------------------------------ + double OOp_DIV::operate(const double& fLeft,const double& fRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_DIV::operate" ); return fLeft / fRight; } -// ----------------------------------------------------------------------------- + OEvaluateSet* OOperandAttr::preProcess(OBoolOperator* /*pOp*/, OOperand* /*pRight*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOperandAttr::preProcess" ); return NULL; } -//------------------------------------------------------------------ + void ONthOperator::Exec(OCodeStack& rCodeStack) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ONthOperator::Exec" ); @@ -460,7 +460,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack) delete *aIter; } } -//------------------------------------------------------------------ + void OBinaryOperator::Exec(OCodeStack& rCodeStack) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OBinaryOperator::Exec" ); @@ -478,7 +478,7 @@ void OBinaryOperator::Exec(OCodeStack& rCodeStack) if (IS_TYPE(OOperandResult,pLeft)) delete pLeft; } -//------------------------------------------------------------------ + void OUnaryOperator::Exec(OCodeStack& rCodeStack) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OUnaryOperator::Exec" ); @@ -490,7 +490,7 @@ void OUnaryOperator::Exec(OCodeStack& rCodeStack) if (IS_TYPE(OOperandResult,pOperand)) delete pOperand; } -// ----------------------------------------------------------------------------- + sal_uInt16 OUnaryOperator::getRequestedOperands() const {return 1;} diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 5b395aebcbe2..d48adc806dbb 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star::container; using namespace com::sun::star; DBG_NAME(OPredicateCompiler) -//------------------------------------------------------------------ + OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs) : m_pAnalyzer(pAnalyzer) , m_nParamCounter(0) @@ -53,13 +53,13 @@ OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs DBG_CTOR(OPredicateCompiler,NULL); } -//------------------------------------------------------------------ + OPredicateCompiler::~OPredicateCompiler() { Clean(); DBG_DTOR(OPredicateCompiler,NULL); } -// ----------------------------------------------------------------------------- + void OPredicateCompiler::dispose() { Clean(); @@ -137,7 +137,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode) } } -//------------------------------------------------------------------ + OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) { OOperand* pOperand = NULL; @@ -223,7 +223,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) return pOperand; } -//------------------------------------------------------------------ + OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 3,"OFILECursor: Fehler im Parse Tree"); @@ -271,7 +271,7 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th return NULL; } -//------------------------------------------------------------------ + OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); @@ -321,7 +321,7 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( return NULL; } -//------------------------------------------------------------------ + OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); @@ -401,7 +401,7 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr return NULL; } -//------------------------------------------------------------------ + OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); @@ -421,7 +421,7 @@ OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) thro return NULL; } -//------------------------------------------------------------------ + OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { OOperand* pOperand = NULL; @@ -575,7 +575,7 @@ sal_Bool OPredicateInterpreter::evaluate(OCodeList& rCodeList) delete pOperand; return bResult; } -// ----------------------------------------------------------------------------- + void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueDecoratorRef& _rVal) { OCodeList::iterator aIter = rCodeList.begin(); @@ -601,7 +601,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD if (IS_TYPE(OOperandResult,pOperand)) delete pOperand; } -// ----------------------------------------------------------------------------- + OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() >= 4,"OFILECursor: Fehler im Parse Tree"); @@ -618,7 +618,7 @@ OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) thro m_aCodeList.push_back(pOperator); return NULL; } -// ----------------------------------------------------------------------------- + OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { OOperator* pOperator = NULL; @@ -906,7 +906,7 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) m_aCodeList.push_back(pOperator); return NULL; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx index 5cbe815f9e76..84b4f9fbe8c3 100644 --- a/connectivity/source/drivers/file/quotedstring.cxx +++ b/connectivity/source/drivers/file/quotedstring.cxx @@ -25,7 +25,7 @@ namespace connectivity //================================================================== //= QuotedTokenizedString //================================================================== - //------------------------------------------------------------------ + sal_Int32 QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com QuotedTokenizedString::GetTokenCount" ); @@ -84,7 +84,7 @@ namespace connectivity return nTokCount; } - //------------------------------------------------------------------ + OUString QuotedTokenizedString::GetTokenSpecial(sal_Int32& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com QuotedTokenizedString::GetTokenCount" ); diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx index ce5ef145cddf..41680747f0be 100644 --- a/connectivity/source/drivers/firebird/Connection.cxx +++ b/connectivity/source/drivers/firebird/Connection.cxx @@ -548,7 +548,7 @@ sal_Bool SAL_CALL Connection::isClosed( ) throw(SQLException, RuntimeException) // just simple -> we are close when we are disposed taht means someone called dispose(); (XComponent) return Connection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL Connection::getMetaData( ) throw(SQLException, RuntimeException) { MutexGuard aGuard( m_aMutex ); @@ -640,19 +640,19 @@ void SAL_CALL Connection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL Connection::getWarnings( ) throw(SQLException, RuntimeException) { // when you collected some warnings -> return it return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL Connection::clearWarnings( ) throw(SQLException, RuntimeException) { // you should clear your collected warnings here } -// -------------------------------------------------------------------------------- + // XDocumentEventListener void SAL_CALL Connection::documentEventOccured( const DocumentEvent& _Event ) throw(RuntimeException) @@ -690,7 +690,7 @@ void SAL_CALL Connection::disposing(const EventObject& /*rSource*/) throw (RuntimeException) { } -//-------------------------------------------------------------------- + void Connection::buildTypeInfo() throw( SQLException) { SAL_INFO("connectivity.firebird", "buildTypeInfo()."); diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index fbc82ba3d7fb..ef7af338e849 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -211,14 +211,14 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength() throw(SQLException { return 31; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { return sal_False; @@ -367,24 +367,24 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames() { return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; @@ -467,34 +467,34 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation() return TransactionIsolation::REPEATABLE_READ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { return sal_True; // should be supported at least } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 31; // TODO: confirm return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { return sal_False; @@ -504,7 +504,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLExcep { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { return m_pConnection->isReadOnly(); @@ -519,12 +519,12 @@ sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLExceptio { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { return sal_False; @@ -547,17 +547,17 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLExcep return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; @@ -572,52 +572,52 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, Ru { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { return sal_False; @@ -627,118 +627,118 @@ OUString SAL_CALL ODatabaseMetaData::getURL() throw(SQLException, RuntimeExcepti { return m_pConnection->getConnectionURL(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { return 1; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { return 31; @@ -767,55 +767,55 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( else return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { (void) setType; @@ -834,12 +834,12 @@ uno::Reference< XConnection > SAL_CALL ODatabaseMetaData::getConnection() { return (uno::Reference< XConnection >) m_pConnection; } -// ------------------------------------------------------------------------- + // here follow all methods which return a resultset // the first methods is an example implementation how to use this resultset // of course you could implement it on your and you should do this because // the general way is more memory expensive -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { OSL_FAIL("Not implemented yet!"); @@ -1409,7 +1409,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( return xResultSet; } -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -1423,7 +1423,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( // TODO implement return new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eProcedureColumns); } -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ) throw(SQLException, RuntimeException) @@ -1436,7 +1436,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( // TODO implement return new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eProcedures); } -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -1448,7 +1448,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( // TODO implement return new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eVersionColumns); } -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -1463,7 +1463,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( // TODO implement return new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eExportedKeys); } -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -1633,7 +1633,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( return xResultSet; } -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( const Any& catalog, const OUString& schema, const OUString& table, sal_Int32 scope, sal_Bool nullable ) throw(SQLException, RuntimeException) @@ -1715,7 +1715,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( return xResultSet; } -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( const Any& primaryCatalog, const OUString& primarySchema, const OUString& primaryTable, const Any& foreignCatalog, @@ -1731,7 +1731,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( // TODO implement return new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eCrossReference); } -// ------------------------------------------------------------------------- + uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& catalog, const OUString& schemaPattern, const OUString& typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException) { (void) catalog; @@ -1742,7 +1742,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& cat // TODO implement return new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eUDTs); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index cd53fcb2f6f5..1379f8242bd4 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -431,7 +431,7 @@ void SAL_CALL OPreparedStatement::setTimestamp(sal_Int32 nIndex, const DateTime& setValue< ISC_TIMESTAMP >(nIndex, aISCTimestamp, SQL_TIMESTAMP); } -// ------------------------------------------------------------------------- + // void OPreaparedStatement::set void OPreparedStatement::openBlobForWriting(isc_blob_handle& rBlobHandle, ISC_QUAD& rBlobId) @@ -526,7 +526,7 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex, setValue< ISC_QUAD >(nParameterIndex, aBlobId, SQL_BLOB); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException) { @@ -536,7 +536,7 @@ void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Refe checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException) { @@ -546,7 +546,7 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Refere checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException) { @@ -558,7 +558,7 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c ::osl::MutexGuard aGuard( m_aMutex ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException) { @@ -569,7 +569,7 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException) { @@ -623,7 +623,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex, setValue< ISC_QUAD >(nParameterIndex, aBlobId, SQL_BLOB); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) @@ -635,7 +635,7 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { @@ -646,7 +646,7 @@ void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, con checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException) { @@ -671,7 +671,7 @@ Sequence< sal_Int32 > SAL_CALL OPreparedStatement::executeBatch() // Unsupported by firebird return Sequence< sal_Int32 >(); } -// ------------------------------------------------------------------------- + void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { switch(nHandle) diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index a89e4609edd4..7e73cd8748b5 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -342,7 +342,7 @@ sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& rColumnName) assert(false); return 0; // Never reached } -// ------------------------------------------------------------------------- + uno::Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { (void) columnIndex; @@ -351,7 +351,7 @@ uno::Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 c return NULL; } -// ------------------------------------------------------------------------- + uno::Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { (void) columnIndex; @@ -630,7 +630,7 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 nIndex) return safelyRetrieveValue< DateTime >(nIndex, SQL_TIMESTAMP); } -// ------------------------------------------------------------------------- + uno::Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException) { MutexGuard aGuard(m_rMutex); @@ -640,7 +640,7 @@ uno::Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw( m_xMetaData = new OResultSetMetaData(m_pConnection, m_pSqlda); return m_xMetaData; } -// ------------------------------------------------------------------------- + uno::Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { (void) columnIndex; @@ -650,7 +650,7 @@ uno::Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex ) return NULL; } -// ------------------------------------------------------------------------- + uno::Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -674,7 +674,7 @@ uno::Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 columnIndex) return 0; return m_pConnection->createBlob(pBlobID); } -// ------------------------------------------------------------------------- + uno::Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -684,7 +684,7 @@ uno::Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 columnIndex ) thro return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException) { @@ -698,7 +698,7 @@ Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const uno::Reference< -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::close() throw(SQLException, RuntimeException) { @@ -746,7 +746,7 @@ void SAL_CALL OResultSet::refreshRow() throw(SQLException, RuntimeException) ::dbtools::throwFunctionNotSupportedException("refreshRow not supported in firebird", *this); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) { @@ -781,17 +781,17 @@ IPropertyArrayHelper & OResultSet::getInfoHelper() { return *const_cast<OResultSet*>(this)->getArrayHelper(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::acquire() throw() { OResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::release() throw() { OResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); diff --git a/connectivity/source/drivers/firebird/Services.cxx b/connectivity/source/drivers/firebird/Services.cxx index f5a183026740..65bacd7439b9 100644 --- a/connectivity/source/drivers/firebird/Services.cxx +++ b/connectivity/source/drivers/firebird/Services.cxx @@ -46,7 +46,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) // It contains of 3 special functions that have to be exported. // -//--------------------------------------------------------------------------------------- + void REGISTER_PROVIDER( const OUString& aServiceImplName, const Sequence< OUString>& Services, @@ -62,7 +62,7 @@ void REGISTER_PROVIDER( } -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -102,7 +102,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL firebird_sdbc_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx index dfff5d7e499c..190730f8029c 100644 --- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx +++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx @@ -80,7 +80,7 @@ void OStatementCommonBase::freeStatementHandle() } } -//----------------------------------------------------------------------------- + Any SAL_CALL OStatementCommonBase::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OStatementCommonBase_Base::queryInterface(rType); @@ -88,7 +88,7 @@ Any SAL_CALL OStatementCommonBase::queryInterface( const Type & rType ) throw(Ru aRet = OPropertySetHelper::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OStatementCommonBase::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( @@ -98,7 +98,7 @@ Sequence< Type > SAL_CALL OStatementCommonBase::getTypes( ) throw(RuntimeExcept return concatSequences(aTypes.getTypes(),OStatementCommonBase_Base::getTypes()); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatementCommonBase::cancel( ) throw(RuntimeException) { @@ -271,7 +271,7 @@ void SAL_CALL OStatementCommonBase::clearWarnings() throw(SQLException, RuntimeE { return *const_cast<OStatementCommonBase*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OStatementCommonBase::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, @@ -287,7 +287,7 @@ sal_Bool OStatementCommonBase::convertFastPropertyValue( // here we have to try to convert return bConverted; } -// ------------------------------------------------------------------------- + void OStatementCommonBase::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { (void) rValue; @@ -308,7 +308,7 @@ void OStatementCommonBase::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,co ; } } -// ------------------------------------------------------------------------- + void OStatementCommonBase::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const { (void) rValue; diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index 397bf78d5dbb..b686c40458e8 100644 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx @@ -30,13 +30,13 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; -// ------------------------------------------------------------------------- + using namespace connectivity::flat; -// ------------------------------------------------------------------------- + OFlatCatalog::OFlatCatalog(OFlatConnection* _pCon) : file::OFileCatalog(_pCon) { } -// ------------------------------------------------------------------------- + void OFlatCatalog::refreshTables() { TStringVector aVector; @@ -55,7 +55,7 @@ void OFlatCatalog::refreshTables() else m_pTables = new OFlatTables(m_xMetaData,*this,m_aMutex,aVector); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/flat/EColumns.cxx b/connectivity/source/drivers/flat/EColumns.cxx index 0772f65bb342..f472c564b829 100644 --- a/connectivity/source/drivers/flat/EColumns.cxx +++ b/connectivity/source/drivers/flat/EColumns.cxx @@ -41,7 +41,7 @@ sdbcx::ObjectType OFlatColumns::createObject(const OUString& _rName) xRet = sdbcx::ObjectType(*aIter,UNO_QUERY); return xRet; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx index 3ed139065eca..56e16e4fc770 100644 --- a/connectivity/source/drivers/flat/EConnection.cxx +++ b/connectivity/source/drivers/flat/EConnection.cxx @@ -32,14 +32,14 @@ using namespace connectivity::file; typedef connectivity::file::OConnection OConnection_B; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; -// -------------------------------------------------------------------------------- + OFlatConnection::OFlatConnection(ODriver* _pDriver) : OConnection(_pDriver) ,m_nMaxRowsToScan(50) ,m_bHeaderLine(sal_True) @@ -49,16 +49,16 @@ OFlatConnection::OFlatConnection(ODriver* _pDriver) : OConnection(_pDriver) ,m_cThousandDelimiter('.') { } -//----------------------------------------------------------------------------- + OFlatConnection::~OFlatConnection() { } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OFlatConnection, "com.sun.star.sdbc.drivers.flat.Connection", "com.sun.star.sdbc.Connection") -//----------------------------------------------------------------------------- + void OFlatConnection::construct(const OUString& url,const Sequence< PropertyValue >& info) throw(SQLException) { osl_atomic_increment( &m_refCount ); @@ -103,7 +103,7 @@ void OFlatConnection::construct(const OUString& url,const Sequence< PropertyValu OConnection::construct(url,info); m_bShowDeleted = sal_True; // we do not supported rows for this type } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OFlatConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -119,7 +119,7 @@ Reference< XDatabaseMetaData > SAL_CALL OFlatConnection::getMetaData( ) throw(S return xMetaData; } -//------------------------------------------------------------------------------ + ::com::sun::star::uno::Reference< XTablesSupplier > OFlatConnection::createCatalog() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -132,7 +132,7 @@ Reference< XDatabaseMetaData > SAL_CALL OFlatConnection::getMetaData( ) throw(S } return xTab; } -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OFlatConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -144,7 +144,7 @@ Reference< XStatement > SAL_CALL OFlatConnection::createStatement( ) throw(SQLE m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return xStmt; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -158,7 +158,7 @@ Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareStatement( cons m_aStatements.push_back(WeakReferenceHelper(*pStmt)); return xStmt; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareCall( const OUString& /*sql*/ ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx index 69c8fbcb7017..7a9733323307 100644 --- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx +++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx @@ -46,12 +46,12 @@ OFlatDatabaseMetaData::OFlatDatabaseMetaData(::connectivity::file::OConnection* { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatDatabaseMetaData::OFlatDatabaseMetaData" ); } -// ------------------------------------------------------------------------- + OFlatDatabaseMetaData::~OFlatDatabaseMetaData() { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatDatabaseMetaData::~OFlatDatabaseMetaData" ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatDatabaseMetaData::impl_getTypeInfo_throw" ); @@ -150,7 +150,7 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -240,14 +240,14 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns( return xRef; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OFlatDatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatDatabaseMetaData::getURL" ); ::osl::MutexGuard aGuard( m_aMutex ); return OUString("sdbc:flat:") + m_pConnection->getURL(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index b5c8235acc7b..418431d0e730 100644 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx @@ -37,24 +37,24 @@ using namespace ::com::sun::star::lang; // static ServiceInfo -//------------------------------------------------------------------------------ + OUString ODriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString("com.sun.star.comp.sdbc.flat.ODriver"); } -//------------------------------------------------------------------ + OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::flat::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { return *(new ODriver( comphelper::getComponentContext(_rxFactory) )); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -71,13 +71,13 @@ Reference< XConnection > SAL_CALL ODriver::connect( const OUString& url, const S return xCon; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL ODriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { return url.startsWith("sdbc:flat:"); } -// ----------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { if ( acceptsURL(url) ) @@ -131,7 +131,7 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString ::dbtools::throwGenericSQLException(sMessage ,*this); return Sequence< DriverPropertyInfo >(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/EPreparedStatement.cxx b/connectivity/source/drivers/flat/EPreparedStatement.cxx index 322c23da7d76..2a51abb390d8 100644 --- a/connectivity/source/drivers/flat/EPreparedStatement.cxx +++ b/connectivity/source/drivers/flat/EPreparedStatement.cxx @@ -24,12 +24,12 @@ using namespace connectivity::flat; using namespace connectivity::file; using namespace ::com::sun::star::uno; -// ------------------------------------------------------------------------- + OResultSet* OFlatPreparedStatement::createResultSet() { return new OFlatResultSet(this,m_aSQLIterator); } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OFlatPreparedStatement,"com.sun.star.sdbc.driver.flat.PreparedStatement","com.sun.star.sdbc.PreparedStatement"); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index f766ce704277..b9ce8bacc9e5 100644 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx @@ -36,19 +36,19 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -//------------------------------------------------------------------------------ + OFlatResultSet::OFlatResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) ,m_bBookmarkable(sal_True) { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE), PROPERTY_ID_ISBOOKMARKABLE, PropertyAttribute::READONLY,&m_bBookmarkable, ::getBooleanCppuType()); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OFlatResultSet::getImplementationName( ) throw ( RuntimeException) { return OUString("com.sun.star.sdbcx.flat.ResultSet"); } -// ------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OFlatResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(2); @@ -61,7 +61,7 @@ sal_Bool SAL_CALL OFlatResultSet::supportsService( const OUString& _rServiceName { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + Any SAL_CALL OFlatResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { if(rType == ::getCppuType((const Reference<XDeleteRows>*)0) || rType == ::getCppuType((const Reference<XResultSetUpdate>*)0) @@ -71,7 +71,7 @@ Any SAL_CALL OFlatResultSet::queryInterface( const Type & rType ) throw(RuntimeE const Any aRet = OResultSet::queryInterface(rType); return aRet.hasValue() ? aRet : OFlatResultSet_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OFlatResultSet::getTypes( ) throw( RuntimeException) { Sequence< Type > aTypes = OResultSet::getTypes(); @@ -93,7 +93,7 @@ Sequence< Type > SAL_CALL OFlatResultSet::getTypes( ) throw( RuntimeException) return ::comphelper::concatSequences(aRet,OFlatResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + // XRowLocate Any SAL_CALL OFlatResultSet::getBookmark( ) throw( SQLException, RuntimeException) { @@ -102,7 +102,7 @@ Any SAL_CALL OFlatResultSet::getBookmark( ) throw( SQLException, RuntimeExcept return makeAny((sal_Int32)(m_aRow->get())[0]->getValue()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OFlatResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -113,7 +113,7 @@ sal_Bool SAL_CALL OFlatResultSet::moveToBookmark( const Any& bookmark ) throw( return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_True); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OFlatResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -127,48 +127,48 @@ sal_Bool SAL_CALL OFlatResultSet::moveRelativeToBookmark( const Any& bookmark, return relative(rows); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OFlatResultSet::compareBookmarks( const Any& lhs, const Any& rhs ) throw( SQLException, RuntimeException) { return (lhs == rhs) ? 0 : 2; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OFlatResultSet::hasOrderedBookmarks( ) throw( SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OFlatResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException) { return comphelper::getINT32(bookmark); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper* OFlatResultSet::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper & OFlatResultSet::getInfoHelper() { return *OFlatResultSet_BASE3::getArrayHelper(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OFlatResultSet::acquire() throw() { OFlatResultSet_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OFlatResultSet::release() throw() { OFlatResultSet_BASE2::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OFlatResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/EStatement.cxx b/connectivity/source/drivers/flat/EStatement.cxx index 4701cf74a6d1..d7fb9a281d00 100644 --- a/connectivity/source/drivers/flat/EStatement.cxx +++ b/connectivity/source/drivers/flat/EStatement.cxx @@ -23,12 +23,12 @@ using namespace connectivity::flat; using namespace connectivity::file; using namespace com::sun::star::uno; -// ------------------------------------------------------------------------- + OResultSet* OFlatStatement::createResultSet() { return new OFlatResultSet(this,m_aSQLIterator); } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OFlatStatement,"com.sun.star.sdbc.driver.flat.Statement","com.sun.star.sdbc.Statement"); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index e7c2e23abc3a..c11b23ff898d 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -62,7 +62,7 @@ using namespace ::com::sun::star::util; using std::vector; using std::lower_bound; -// ------------------------------------------------------------------------- + void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::fillColumns" ); @@ -406,7 +406,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, } } } -// ------------------------------------------------------------------------- + OFlatTable::OFlatTable(sdbcx::OCollection* _pTables,OFlatConnection* _pConnection, const OUString& _Name, const OUString& _Type, @@ -427,7 +427,7 @@ OFlatTable::OFlatTable(sdbcx::OCollection* _pTables,OFlatConnection* _pConnectio SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::OFlatTable" ); } -// ----------------------------------------------------------------------------- + void OFlatTable::construct() { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::construct" ); @@ -469,7 +469,7 @@ void OFlatTable::construct() refreshColumns(); } } -// ------------------------------------------------------------------------- + OUString OFlatTable::getEntry() { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::getEntry" ); @@ -515,7 +515,7 @@ OUString OFlatTable::getEntry() } return sURL; } -// ------------------------------------------------------------------------- + void OFlatTable::refreshColumns() { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::refreshColumns" ); @@ -533,7 +533,7 @@ void OFlatTable::refreshColumns() m_pColumns = new OFlatColumns(this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void SAL_CALL OFlatTable::disposing(void) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::disposing" ); @@ -541,7 +541,7 @@ void SAL_CALL OFlatTable::disposing(void) ::osl::MutexGuard aGuard(m_aMutex); m_aColumns = NULL; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OFlatTable::getTypes( ) throw(RuntimeException) { Sequence< Type > aTypes = OTable_TYPEDEF::getTypes(); @@ -564,7 +564,7 @@ Sequence< Type > SAL_CALL OFlatTable::getTypes( ) throw(RuntimeException) return Sequence< Type >(pTypes, aOwnTypes.size()); } -// ------------------------------------------------------------------------- + Any SAL_CALL OFlatTable::queryInterface( const Type & rType ) throw(RuntimeException) { if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || @@ -578,7 +578,7 @@ Any SAL_CALL OFlatTable::queryInterface( const Type & rType ) throw(RuntimeExcep return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< ::com::sun::star::lang::XUnoTunnel*> (this)); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OFlatTable::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -595,7 +595,7 @@ Sequence< sal_Int8 > OFlatTable::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::getSomething" ); @@ -603,7 +603,7 @@ sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (Ru ? reinterpret_cast< sal_Int64 >( this ) : OFlatTable_BASE::getSomething(rId); } -//------------------------------------------------------------------ + sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, sal_Bool bIsTable, sal_Bool bRetrieveData) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::fetchRow" ); @@ -747,13 +747,13 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, s return result; } -// ----------------------------------------------------------------------------- + void OFlatTable::refreshHeader() { SAL_INFO( "connectivity.drivers", "flat lionel@mamane.lu OFlatTable::refreshHeader" ); } -// ----------------------------------------------------------------------------- + namespace { template< typename Tp, typename Te> struct RangeBefore @@ -765,12 +765,12 @@ namespace } }; } -// ----------------------------------------------------------------------------- + sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::seekRow" ); OSL_ENSURE(m_pFileStream,"OFlatTable::seekRow: FileStream is NULL!"); - // ---------------------------------------------------------- + switch(eCursorPosition) { @@ -918,7 +918,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int return sal_True; } -// ----------------------------------------------------------------------------- + bool OFlatTable::readLine(sal_Int32 * const pEndPos, sal_Int32 * const pStartPos, const bool nonEmpty) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::readLine" ); @@ -953,7 +953,7 @@ bool OFlatTable::readLine(sal_Int32 * const pEndPos, sal_Int32 * const pStartPos return true; } -// ----------------------------------------------------------------------------- + void OFlatTable::setRowPos(const vector<TRowPositionInFile>::size_type rowNum, const TRowPositionInFile &rowPos) { assert(m_aRowPosToFilePos.size() >= rowNum); diff --git a/connectivity/source/drivers/flat/ETables.cxx b/connectivity/source/drivers/flat/ETables.cxx index aee4095cb9ab..9abaf9b34740 100644 --- a/connectivity/source/drivers/flat/ETables.cxx +++ b/connectivity/source/drivers/flat/ETables.cxx @@ -47,6 +47,6 @@ sdbcx::ObjectType OFlatTables::createObject(const OUString& _rName) pRet->construct(); return xRet; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx index 3ebf8f4c2c40..29465c6cb3d2 100644 --- a/connectivity/source/drivers/flat/Eservices.cxx +++ b/connectivity/source/drivers/flat/Eservices.cxx @@ -35,7 +35,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -75,7 +75,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL flat_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index 2bbdbe859970..f2e5fae3cb0a 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -26,7 +26,7 @@ #include <comphelper/types.hxx> -// ------------------------------------------------------------------------- + using namespace connectivity; using namespace connectivity::hsqldb; using namespace ::com::sun::star::uno; @@ -35,12 +35,12 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OHCatalog::OHCatalog(const Reference< XConnection >& _xConnection) : sdbcx::OCatalog(_xConnection) ,m_xConnection(_xConnection) { } -// ----------------------------------------------------------------------------- + void OHCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStringVector& _rNames) { Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), @@ -49,7 +49,7 @@ void OHCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStrin _sKindOfObject); fillNames(xResult,_rNames); } -// ------------------------------------------------------------------------- + void OHCatalog::refreshTables() { TStringVector aVector; @@ -67,7 +67,7 @@ void OHCatalog::refreshTables() else m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void OHCatalog::refreshViews() { Sequence< OUString > aTypes(1); @@ -99,11 +99,11 @@ void OHCatalog::refreshViews() else m_pViews = new HViews( m_xConnection, *this, m_aMutex, aVector ); } -// ------------------------------------------------------------------------- + void OHCatalog::refreshGroups() { } -// ------------------------------------------------------------------------- + void OHCatalog::refreshUsers() { TStringVector aVector; @@ -124,7 +124,7 @@ void OHCatalog::refreshUsers() else m_pUsers = new OUsers(*this,m_aMutex,aVector,m_xConnection,this); } -// ----------------------------------------------------------------------------- + Any SAL_CALL OHCatalog::queryInterface( const Type & rType ) throw(RuntimeException) { if ( rType == ::getCppuType((const Reference<XGroupsSupplier>*)0) ) @@ -132,7 +132,7 @@ Any SAL_CALL OHCatalog::queryInterface( const Type & rType ) throw(RuntimeExcept return OCatalog::queryInterface(rType); } -// ----------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OHCatalog::getTypes( ) throw(RuntimeException) { Sequence< Type > aTypes = OCatalog::getTypes(); @@ -150,7 +150,7 @@ Sequence< Type > SAL_CALL OHCatalog::getTypes( ) throw(RuntimeException) const Type* pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0]; return Sequence< Type >(pTypes, aOwnTypes.size()); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index 78f2eac9352d..16657cf227fb 100644 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx @@ -40,35 +40,35 @@ OHSQLColumns::OHSQLColumns( ::cppu::OWeakObject& _rParent ) : OColumnsHelper(_rParent,_bCase,_rMutex,_rVector,_bUseHardRef) { } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OHSQLColumns::createDescriptor() { return new OHSQLColumn(sal_True); } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + OHSQLColumn::OHSQLColumn( sal_Bool _bCase) : connectivity::sdbcx::OColumn( _bCase ) { construct(); } -// ------------------------------------------------------------------------- + void OHSQLColumn::construct() { m_sAutoIncrement = "IDENTITY"; registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OHSQLColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & SAL_CALL OHSQLColumn::getInfoHelper() { return *OHSQLColumn_PROP::getArrayHelper(isNew() ? 1 : 0); } -// ----------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< OUString > aSupported(1); @@ -76,6 +76,6 @@ Sequence< OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( ) throw(Ru return aSupported; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index f227e8124a82..f9499d63f143 100644 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx @@ -99,7 +99,7 @@ namespace connectivity { namespace hsqldb ) SAL_THROW( ( Exception ) ); }; - // ----------------------------------------------------------------------------- + bool FlushListeners::implTypedNotify( const Reference< XFlushListener >& _rxListener, const EventObject& _rEvent ) SAL_THROW( ( Exception ) ) { _rxListener->flushed( _rEvent ); @@ -109,14 +109,14 @@ namespace connectivity { namespace hsqldb // ============================================================================= // = OHsqlConnection // ============================================================================= - // ----------------------------------------------------------------------------- + void SAL_CALL OHsqlConnection::disposing(void) { m_aFlushListeners.disposeAndClear( EventObject( *this ) ); OHsqlConnection_BASE::disposing(); OConnectionWrapper::disposing(); } - // ----------------------------------------------------------------------------- + OHsqlConnection::OHsqlConnection( const Reference< XDriver > _rxDriver, const Reference< XConnection >& _xConnection ,const Reference< XComponentContext >& _rxContext ) :OHsqlConnection_BASE( m_aMutex ) @@ -128,7 +128,7 @@ namespace connectivity { namespace hsqldb { setDelegation(_xConnection,_rxContext,m_refCount); } - // ----------------------------------------------------------------------------- + OHsqlConnection::~OHsqlConnection() { if ( !OHsqlConnection_BASE::rBHelper.bDisposed ) @@ -137,25 +137,25 @@ namespace connectivity { namespace hsqldb dispose(); } } - // ----------------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2(OHsqlConnection,OHsqlConnection_BASE,OConnectionWrapper) IMPLEMENT_SERVICE_INFO(OHsqlConnection, "com.sun.star.sdbc.drivers.hsqldb.OHsqlConnection", "com.sun.star.sdbc.Connection") IMPLEMENT_FORWARD_XTYPEPROVIDER2(OHsqlConnection,OHsqlConnection_BASE,OConnectionWrapper) - //-------------------------------------------------------------------- + ::osl::Mutex& OHsqlConnection::getMutex() const { return m_aMutex; } - //-------------------------------------------------------------------- + void OHsqlConnection::checkDisposed() const { ::connectivity::checkDisposed( rBHelper.bDisposed ); } // XFlushable - //-------------------------------------------------------------------- + void SAL_CALL OHsqlConnection::flush( ) throw (RuntimeException) { MethodGuard aGuard( *this ); @@ -193,21 +193,21 @@ namespace connectivity { namespace hsqldb } } - //-------------------------------------------------------------------- + void SAL_CALL OHsqlConnection::addFlushListener( const Reference< XFlushListener >& l ) throw (RuntimeException) { MethodGuard aGuard( *this ); m_aFlushListeners.addInterface( l ); } - //-------------------------------------------------------------------- + void SAL_CALL OHsqlConnection::removeFlushListener( const Reference< XFlushListener >& l ) throw (RuntimeException) { MethodGuard aGuard( *this ); m_aFlushListeners.removeInterface( l ); } - // ------------------------------------------------------------------- + Reference< XGraphic > SAL_CALL OHsqlConnection::getTableIcon( const OUString& _TableName, ::sal_Int32 /*_ColorMode*/ ) throw (RuntimeException) { MethodGuard aGuard( *this ); @@ -219,7 +219,7 @@ namespace connectivity { namespace hsqldb return impl_getTextTableIcon_nothrow(); } - // ------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OHsqlConnection::getTableEditor( const Reference< XDatabaseDocumentUI >& _DocumentUI, const OUString& _TableName ) throw (IllegalArgumentException, WrappedTargetException, RuntimeException) { MethodGuard aGuard( *this ); @@ -246,7 +246,7 @@ namespace connectivity { namespace hsqldb // editor not yet implemented in this CWS } - // ------------------------------------------------------------------- + Reference< XNameAccess > OHsqlConnection::impl_getTableContainer_throw() { Reference< XNameAccess > xTables; @@ -270,7 +270,7 @@ namespace connectivity { namespace hsqldb } //TODO: resource - // ------------------------------------------------------------------- + void OHsqlConnection::impl_checkExistingTable_throw( const OUString& _rTableName ) { bool bDoesExist = false; @@ -298,7 +298,7 @@ namespace connectivity { namespace hsqldb } // if ( !bDoesExist ) } - // ------------------------------------------------------------------- + bool OHsqlConnection::impl_isTextTable_nothrow( const OUString& _rTableName ) { bool bIsTextTable = false; @@ -335,7 +335,7 @@ namespace connectivity { namespace hsqldb return bIsTextTable; } - // ------------------------------------------------------------------- + Reference< XGraphic > OHsqlConnection::impl_getTextTableIcon_nothrow() { Reference< XGraphic > xGraphic; diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index f11ca6154bc4..5bec011330bb 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -89,7 +89,7 @@ namespace connectivity //==================================================================== //= ODriverDelegator //==================================================================== - //-------------------------------------------------------------------- + ODriverDelegator::ODriverDelegator(const Reference< XComponentContext >& _rxContext) : ODriverDelegator_BASE(m_aMutex) ,m_xContext(_rxContext) @@ -97,7 +97,7 @@ namespace connectivity { } - //-------------------------------------------------------------------- + ODriverDelegator::~ODriverDelegator() { try @@ -109,7 +109,7 @@ namespace connectivity } } - // -------------------------------------------------------------------------------- + void SAL_CALL ODriverDelegator::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -131,7 +131,7 @@ namespace connectivity cppu::WeakComponentImplHelperBase::disposing(); } - //-------------------------------------------------------------------- + Reference< XDriver > ODriverDelegator::loadDriver( ) { if ( !m_xDriver.is() ) @@ -144,7 +144,7 @@ namespace connectivity return m_xDriver; } - //-------------------------------------------------------------------- + namespace { OUString lcl_getPermittedJavaMethods_nothrow( const Reference< XComponentContext >& _rxContext ) @@ -175,7 +175,7 @@ namespace connectivity } } - //-------------------------------------------------------------------- + Reference< XConnection > SAL_CALL ODriverDelegator::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { Reference< XConnection > xConnection; @@ -394,7 +394,7 @@ namespace connectivity return xConnection; } - //-------------------------------------------------------------------- + sal_Bool SAL_CALL ODriverDelegator::acceptsURL( const OUString& url ) throw (SQLException, RuntimeException) { sal_Bool bEnabled = sal_False; @@ -416,7 +416,7 @@ namespace connectivity return bEnabled && url.equals("sdbc:embedded:hsqldb"); } - //-------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL ODriverDelegator::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw (SQLException, RuntimeException) { if ( !acceptsURL(url) ) @@ -446,19 +446,19 @@ namespace connectivity return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL ODriverDelegator::getMajorVersion( ) throw (RuntimeException) { return 1; } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL ODriverDelegator::getMinorVersion( ) throw (RuntimeException) { return 0; } - //-------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL ODriverDelegator::getDataDefinitionByConnection( const Reference< XConnection >& connection ) throw (SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -484,7 +484,7 @@ namespace connectivity return xTab; } - //-------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL ODriverDelegator::getDataDefinitionByURL( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { if ( ! acceptsURL(url) ) @@ -498,13 +498,13 @@ namespace connectivity } // XServiceInfo - // -------------------------------------------------------------------------------- - //------------------------------------------------------------------------------ + + OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { return OUString("com.sun.star.sdbcx.comp.hsqldb.Driver"); } - //------------------------------------------------------------------------------ + Sequence< OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); @@ -512,7 +512,7 @@ namespace connectivity aSNS[1] = "com.sun.star.sdbcx.Driver"; return aSNS; } - //------------------------------------------------------------------ + OUString SAL_CALL ODriverDelegator::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -522,17 +522,17 @@ namespace connectivity { return cppu::supportsService(this, _rServiceName); } - //------------------------------------------------------------------ + Sequence< OUString > SAL_CALL ODriverDelegator::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } - //------------------------------------------------------------------ + void SAL_CALL ODriverDelegator::createCatalog( const Sequence< PropertyValue >& /*info*/ ) throw (SQLException, ::com::sun::star::container::ElementExistException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XCreateCatalog::createCatalog", *this ); } - //------------------------------------------------------------------ + void ODriverDelegator::shutdownConnection(const TWeakPairVector::iterator& _aIter ) { OSL_ENSURE(m_aConnections.end() != _aIter,"Iterator equals .end()"); @@ -567,7 +567,7 @@ namespace connectivity if ( !m_bInShutDownConnections ) m_aConnections.erase(_aIter); } - //------------------------------------------------------------------ + void SAL_CALL ODriverDelegator::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -598,7 +598,7 @@ namespace connectivity } } } - //------------------------------------------------------------------ + void ODriverDelegator::shutdownConnections() { m_bInShutDownConnections = sal_True; @@ -617,7 +617,7 @@ namespace connectivity m_aConnections.clear(); m_bInShutDownConnections = sal_True; } - //------------------------------------------------------------------ + void ODriverDelegator::flushConnections() { TWeakPairVector::iterator aEnd = m_aConnections.end(); @@ -633,7 +633,7 @@ namespace connectivity } } } - //------------------------------------------------------------------ + void SAL_CALL ODriverDelegator::preCommit( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -674,19 +674,19 @@ namespace connectivity } } } - //------------------------------------------------------------------ + void SAL_CALL ODriverDelegator::commited( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) throw (::com::sun::star::uno::RuntimeException) { } - //------------------------------------------------------------------ + void SAL_CALL ODriverDelegator::preRevert( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { } - //------------------------------------------------------------------ + void SAL_CALL ODriverDelegator::reverted( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) throw (::com::sun::star::uno::RuntimeException) { } - //------------------------------------------------------------------ + namespace { //.............................................................. @@ -875,7 +875,7 @@ namespace connectivity return sLocaleString; } } - //------------------------------------------------------------------ + void ODriverDelegator::onConnectedNewDatabase( const Reference< XConnection >& _rxConnection ) { try @@ -898,8 +898,8 @@ namespace connectivity } } - //------------------------------------------------------------------ - //------------------------------------------------------------------ + + //........................................................................ } // namespace connectivity //........................................................................ diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx index 91dd98ee21fd..8416f41abaa2 100644 --- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx @@ -56,7 +56,7 @@ SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAcc StorageContainer::registerStream(env,name,key,mode); } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess * Method: close @@ -95,7 +95,7 @@ SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAcc StorageContainer::revokeStream(env,name,key); } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess * Method: getFilePointer @@ -118,7 +118,7 @@ SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAc #endif return nReturn; } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess @@ -143,7 +143,7 @@ SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAc return nReturn; } -// ----------------------------------------------------------------------------- + jint read_from_storage_stream( JNIEnv * env, jobject /*obj_this*/, jstring name, jstring key, DataLogFile* logger ) { @@ -185,7 +185,7 @@ jint read_from_storage_stream( JNIEnv * env, jobject /*obj_this*/, jstring name, return -1; } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess @@ -206,7 +206,7 @@ SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAcc #endif } -// ----------------------------------------------------------------------------- + jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,jstring name, jstring key, jbyteArray buffer, jint off, jint len, DataLogFile* logger ) { @@ -258,7 +258,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,js "Stream is not valid"); return -1; } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess @@ -279,7 +279,7 @@ SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAcc #endif } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess @@ -347,7 +347,7 @@ SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAcc "No InputStream"); return -1; } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess @@ -414,7 +414,7 @@ SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAcc #endif } } -// ----------------------------------------------------------------------------- + void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jstring name, jstring key, jbyteArray buffer, jint off, jint len, DataLogFile* logger ) { @@ -459,7 +459,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst } } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess @@ -479,7 +479,7 @@ SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAcc write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, off, len ); #endif } -// ----------------------------------------------------------------------------- + void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, jstring key, jint v, DataLogFile* logger ) { @@ -518,7 +518,7 @@ void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, j } } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 899ad14cec74..d992a35f2bb8 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -44,7 +44,7 @@ namespace connectivity : m_xStream(_xStream) { } - // ----------------------------------------------------------------------------- + StreamHelper::~StreamHelper() { try @@ -79,45 +79,45 @@ namespace connectivity OSL_FAIL("Exception caught!"); } } - // ----------------------------------------------------------------------------- + Reference< XInputStream> StreamHelper::getInputStream() { if ( !m_xInputStream.is() ) m_xInputStream = m_xStream->getInputStream(); return m_xInputStream; } - // ----------------------------------------------------------------------------- + Reference< XOutputStream> StreamHelper::getOutputStream() { if ( !m_xOutputStream.is() ) m_xOutputStream = m_xStream->getOutputStream(); return m_xOutputStream; } - // ----------------------------------------------------------------------------- + Reference< XSeekable> StreamHelper::getSeek() { if ( !m_xSeek.is() ) m_xSeek.set(m_xStream,UNO_QUERY); return m_xSeek; } - // ----------------------------------------------------------------------------- + TStorages& lcl_getStorageMap() { static TStorages s_aMap; return s_aMap; } - // ----------------------------------------------------------------------------- + OUString lcl_getNextCount() { static sal_Int32 s_nCount = 0; return OUString::number(s_nCount++); } - // ----------------------------------------------------------------------------- + OUString StorageContainer::removeURLPrefix(const OUString& _sURL,const OUString& _sFileURL) { return _sURL.copy(_sFileURL.getLength()+1); } - // ----------------------------------------------------------------------------- + OUString StorageContainer::removeOldURLPrefix(const OUString& _sURL) { OUString sRet = _sURL; @@ -163,7 +163,7 @@ namespace connectivity return aStr; } - // ----------------------------------------------------------------------------- + OUString StorageContainer::registerStorage(const Reference< XStorage>& _xStorage,const OUString& _sURL) { OSL_ENSURE(_xStorage.is(),"Storage is NULL!"); @@ -181,7 +181,7 @@ namespace connectivity return aFind->first; } - // ----------------------------------------------------------------------------- + TStorages::mapped_type StorageContainer::getRegisteredStorage(const OUString& _sKey) { TStorages::mapped_type aRet; @@ -193,7 +193,7 @@ namespace connectivity return aRet; } - // ----------------------------------------------------------------------------- + OUString StorageContainer::getRegisteredKey(const Reference< XStorage>& _xStorage) { OUString sKey; @@ -209,7 +209,7 @@ namespace connectivity sKey = aFind->first; return sKey; } - // ----------------------------------------------------------------------------- + void StorageContainer::revokeStorage(const OUString& _sKey,const Reference<XTransactionListener>& _xListener) { TStorages& rMap = lcl_getStorageMap(); @@ -234,7 +234,7 @@ namespace connectivity rMap.erase(aFind); } } - // ----------------------------------------------------------------------------- + TStreamMap::mapped_type StorageContainer::registerStream(JNIEnv * env,jstring name, jstring key,sal_Int32 _nMode) { TStreamMap::mapped_type pHelper; @@ -305,7 +305,7 @@ namespace connectivity } return pHelper; } - // ----------------------------------------------------------------------------- + void StorageContainer::revokeStream( JNIEnv * env,jstring name, jstring key) { TStorages& rMap = lcl_getStorageMap(); @@ -314,7 +314,7 @@ namespace connectivity if ( aFind != rMap.end() ) aFind->second.second.erase(removeURLPrefix(jstring2ustring(env,name),aFind->second.first.second)); } - // ----------------------------------------------------------------------------- + TStreamMap::mapped_type StorageContainer::getRegisteredStream( JNIEnv * env,jstring name, jstring key) { TStreamMap::mapped_type pRet; @@ -330,7 +330,7 @@ namespace connectivity return pRet; } - // ----------------------------------------------------------------------------- + void StorageContainer::throwJavaException(const Exception& _aException,JNIEnv * env) { if (JNI_FALSE != env->ExceptionCheck()) diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 247bbeed0c37..7a0515a2ecec 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -70,7 +70,7 @@ OHSQLTable::OHSQLTable( sdbcx::OCollection* _pTables, Privilege::SELECT; construct(); } -// ------------------------------------------------------------------------- + OHSQLTable::OHSQLTable( sdbcx::OCollection* _pTables, const Reference< XConnection >& _xConnection, const OUString& _Name, @@ -91,41 +91,41 @@ OHSQLTable::OHSQLTable( sdbcx::OCollection* _pTables, { construct(); } -// ------------------------------------------------------------------------- + void OHSQLTable::construct() { OTableHelper::construct(); if ( !isNew() ) registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRIVILEGES), PROPERTY_ID_PRIVILEGES,PropertyAttribute::READONLY,&m_nPrivileges, ::getCppuType(&m_nPrivileges)); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OHSQLTable::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OHSQLTable::getInfoHelper() { return *static_cast<OHSQLTable_PROP*>(const_cast<OHSQLTable*>(this))->getArrayHelper(isNew() ? 1 : 0); } -// ----------------------------------------------------------------------------- + sdbcx::OCollection* OHSQLTable::createColumns(const TStringVector& _rNames) { OHSQLColumns* pColumns = new OHSQLColumns(*this,sal_True,m_aMutex,_rNames); pColumns->setParent(this); return pColumns; } -// ----------------------------------------------------------------------------- + sdbcx::OCollection* OHSQLTable::createKeys(const TStringVector& _rNames) { return new OKeysHelper(this,m_aMutex,_rNames); } -// ----------------------------------------------------------------------------- + sdbcx::OCollection* OHSQLTable::createIndexes(const TStringVector& _rNames) { return new OIndexesHelper(this,m_aMutex,_rNames); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OHSQLTable::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -142,14 +142,14 @@ Sequence< sal_Int8 > OHSQLTable::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OHSQLTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : OTable_TYPEDEF::getSomething(rId); } -// ------------------------------------------------------------------------- + // XAlterTable void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException) { @@ -257,7 +257,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe } } -// ----------------------------------------------------------------------------- + void OHSQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, const Reference<XPropertySet>& _xDescriptor) { OUString sSql = getAlterTableColumnPart(); @@ -288,7 +288,7 @@ void OHSQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, c sSql += ::dbtools::createStandardColumnPart(xProp,getConnection()); executeStatement(sSql); } -// ----------------------------------------------------------------------------- + void OHSQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName) { const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); @@ -299,7 +299,7 @@ void OHSQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& executeStatement(sSql); } -// ----------------------------------------------------------------------------- + void OHSQLTable::dropDefaultValue(const OUString& _rColName) { const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); @@ -310,7 +310,7 @@ void OHSQLTable::dropDefaultValue(const OUString& _rColName) executeStatement(sSql); } -// ----------------------------------------------------------------------------- + OUString OHSQLTable::getAlterTableColumnPart() { OUString sSql( "ALTER TABLE " ); @@ -320,7 +320,7 @@ OUString OHSQLTable::getAlterTableColumnPart() return sSql; } -// ----------------------------------------------------------------------------- + void OHSQLTable::executeStatement(const OUString& _rStatement ) { OUString sSQL = _rStatement; @@ -339,7 +339,7 @@ void OHSQLTable::executeStatement(const OUString& _rStatement ) ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OHSQLTable::getTypes( ) throw(RuntimeException) { if ( m_Type.equalsAscii("VIEW") ) @@ -361,7 +361,7 @@ Sequence< Type > SAL_CALL OHSQLTable::getTypes( ) throw(RuntimeException) } return OTableHelper::getTypes(); } -// ------------------------------------------------------------------------- + // XRename void SAL_CALL OHSQLTable::rename( const OUString& newName ) throw(SQLException, ElementExistException, RuntimeException) { @@ -398,7 +398,7 @@ void SAL_CALL OHSQLTable::rename( const OUString& newName ) throw(SQLException, ::dbtools::qualifiedNameComponents(getMetaData(),newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::eInTableDefinitions); } -// ------------------------------------------------------------------------- + Any SAL_CALL OHSQLTable::queryInterface( const Type & rType ) throw(RuntimeException) { if( m_Type.equalsAscii("VIEW") && rType == ::getCppuType((const Reference<XRename>*)0) ) @@ -406,6 +406,6 @@ Any SAL_CALL OHSQLTable::queryInterface( const Type & rType ) throw(RuntimeExcep return OTableHelper::queryInterface(rType); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 1d75b8667e6a..055445f0f6aa 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -91,30 +91,30 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OTables::impl_refresh( ) throw(RuntimeException) { static_cast<OHCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void OTables::disposing(void) { m_xMetaData.clear(); OCollection::disposing(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OTables::createDescriptor() { return new OHSQLTable(this,static_cast<OHCatalog&>(m_rParent).getConnection()); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { createTable(descriptor); return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) { @@ -155,7 +155,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) } } } -// ------------------------------------------------------------------------- + void OTables::createTable( const Reference< XPropertySet >& descriptor ) { Reference< XConnection > xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); @@ -168,7 +168,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + void OTables::appendNew(const OUString& _rsNewTable) { insertElement(_rsNewTable,NULL); @@ -179,12 +179,12 @@ void OTables::appendNew(const OUString& _rsNewTable) while (aListenerLoop.hasMoreElements()) static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); } -// ----------------------------------------------------------------------------- + OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) { OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!"); return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false ); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HTools.cxx b/connectivity/source/drivers/hsqldb/HTools.cxx index 0a24620a25b2..2ea7be02e2ea 100644 --- a/connectivity/source/drivers/hsqldb/HTools.cxx +++ b/connectivity/source/drivers/hsqldb/HTools.cxx @@ -25,7 +25,7 @@ namespace connectivity { namespace hsqldb //==================================================================== //= HTools //==================================================================== - //-------------------------------------------------------------------- + void HTools::appendTableFilterCrit( OUStringBuffer& _inout_rBuffer, const OUString& _rCatalog, const OUString _rSchema, const OUString _rName, bool _bShortForm ) { diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index e1c2a757d64a..3770eff149c6 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -35,13 +35,13 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OHSQLUser::OHSQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : connectivity::sdbcx::OUser(sal_True) ,m_xConnection(_xConnection) { construct(); } -// ------------------------------------------------------------------------- + OHSQLUser::OHSQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, const OUString& _Name ) : connectivity::sdbcx::OUser(_Name,sal_True) @@ -49,34 +49,34 @@ OHSQLUser::OHSQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star { construct(); } -// ------------------------------------------------------------------------- + void OHSQLUser::refreshGroups() { } -// ------------------------------------------------------------------------- + OUserExtend::OUserExtend( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : OHSQLUser(_xConnection) { construct(); } -// ------------------------------------------------------------------------- + void OUserExtend::construct() { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(static_cast< OUString*>(0))); } -// ----------------------------------------------------------------------------- + cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const { Sequence< Property > aProps; describeProperties(aProps); return new cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + cppu::IPropertyArrayHelper & OUserExtend::getInfoHelper() { return *OUserExtend_PROP::getArrayHelper(); } typedef connectivity::sdbcx::OUser_BASE OUser_BASE_RBHELPER; -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OHSQLUser::getPrivileges( const OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -86,7 +86,7 @@ sal_Int32 SAL_CALL OHSQLUser::getPrivileges( const OUString& objName, sal_Int32 findPrivilegesAndGrantPrivileges(objName,objType,nRights,nRightsWithGrant); return nRights; } -// ----------------------------------------------------------------------------- + void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_Int32 objType,sal_Int32& nRights,sal_Int32& nRightsWithGrant) throw(SQLException, RuntimeException) { nRightsWithGrant = nRights = 0; @@ -200,7 +200,7 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_In ::comphelper::disposeComponent(xRes); } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OHSQLUser::getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -210,7 +210,7 @@ sal_Int32 SAL_CALL OHSQLUser::getGrantablePrivileges( const OUString& objName, s findPrivilegesAndGrantPrivileges(objName,objType,nRights,nRightsWithGrant); return nRightsWithGrant; } -// ------------------------------------------------------------------------- + void SAL_CALL OHSQLUser::grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) @@ -237,7 +237,7 @@ void SAL_CALL OHSQLUser::grantPrivileges( const OUString& objName, sal_Int32 obj ::comphelper::disposeComponent(xStmt); } } -// ------------------------------------------------------------------------- + void SAL_CALL OHSQLUser::revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) @@ -263,7 +263,7 @@ void SAL_CALL OHSQLUser::revokePrivileges( const OUString& objName, sal_Int32 ob ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + // XUser void SAL_CALL OHSQLUser::changePassword( const OUString& /*oldPassword*/, const OUString& newPassword ) throw(SQLException, RuntimeException) { @@ -287,7 +287,7 @@ void SAL_CALL OHSQLUser::changePassword( const OUString& /*oldPassword*/, const ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + OUString OHSQLUser::getPrivilegeString(sal_Int32 nRights) const { OUString sPrivs; @@ -331,6 +331,6 @@ OUString OHSQLUser::getPrivilegeString(sal_Int32 nRights) const return sPrivs; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index abf698d86333..ffb34e7b00d8 100644 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx @@ -47,24 +47,24 @@ OUsers::OUsers( ::cppu::OWeakObject& _rParent, ,m_pParent(_pParent) { } -// ----------------------------------------------------------------------------- + sdbcx::ObjectType OUsers::createObject(const OUString& _rName) { return new OHSQLUser(m_xConnection,_rName); } -// ------------------------------------------------------------------------- + void OUsers::impl_refresh() throw(RuntimeException) { m_pParent->refreshUsers(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OUsers::createDescriptor() { OUserExtend* pNew = new OUserExtend(m_xConnection); return pNew; } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -85,7 +85,7 @@ sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Referen return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OUsers::dropObject(sal_Int32 /*nPos*/,const OUString _sElementName) { @@ -101,6 +101,6 @@ void OUsers::dropObject(sal_Int32 /*nPos*/,const OUString _sElementName) } } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx index dc640e16c588..45fc642fdf65 100644 --- a/connectivity/source/drivers/hsqldb/HView.cxx +++ b/connectivity/source/drivers/hsqldb/HView.cxx @@ -58,7 +58,7 @@ namespace connectivity { namespace hsqldb //==================================================================== //= HView //==================================================================== - //-------------------------------------------------------------------- + HView::HView( const Reference< XConnection >& _rxConnection, sal_Bool _bCaseSensitive, const OUString& _rSchemaName, const OUString& _rName ) :HView_Base( _bCaseSensitive, _rName, _rxConnection->getMetaData(), 0, OUString(), _rSchemaName, OUString() ) @@ -66,16 +66,16 @@ namespace connectivity { namespace hsqldb { } - //-------------------------------------------------------------------- + HView::~HView() { } - //-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XINTERFACE2( HView, HView_Base, HView_IBASE ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( HView, HView_Base, HView_IBASE ) - //-------------------------------------------------------------------- + void SAL_CALL HView::alterCommand( const OUString& _rNewCommand ) throw (SQLException, RuntimeException) { // not really atomic ... as long as we do not have something like @@ -143,7 +143,7 @@ namespace connectivity { namespace hsqldb } } - //-------------------------------------------------------------------- + void SAL_CALL HView::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const { if ( _nHandle == PROPERTY_ID_COMMAND ) @@ -157,7 +157,7 @@ namespace connectivity { namespace hsqldb HView_Base::getFastPropertyValue( _rValue, _nHandle ); } - //-------------------------------------------------------------------- + OUString HView::impl_getCommand_throw( bool _bAllowSQLException ) const { OUString sCommand; diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index 3a91dd8b7289..ef3922e9cdaf 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -49,7 +49,7 @@ using namespace ::com::sun::star::lang; using namespace dbtools; typedef connectivity::sdbcx::OCollection OCollection_TYPE; -// ------------------------------------------------------------------------- + HViews::HViews( const Reference< XConnection >& _rxConnection, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const TStringVector &_rVector ) :sdbcx::OCollection( _rParent, sal_True, _rMutex, _rVector ) @@ -59,7 +59,7 @@ HViews::HViews( const Reference< XConnection >& _rxConnection, ::cppu::OWeakObje { } -// ------------------------------------------------------------------------- + sdbcx::ObjectType HViews::createObject(const OUString& _rName) { OUString sCatalog,sSchema,sTable; @@ -72,32 +72,32 @@ sdbcx::ObjectType HViews::createObject(const OUString& _rName) return new HView( m_xConnection, isCaseSensitive(), sSchema, sTable ); } -// ------------------------------------------------------------------------- + void HViews::impl_refresh( ) throw(RuntimeException) { static_cast<OHCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void HViews::disposing(void) { m_xMetaData.clear(); OCollection::disposing(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > HViews::createDescriptor() { Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); connectivity::sdbcx::OView* pNew = new connectivity::sdbcx::OView(sal_True,xConnection->getMetaData()); return pNew; } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType HViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { createView(descriptor); return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void HViews::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/) { @@ -119,14 +119,14 @@ void HViews::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/) ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + void HViews::dropByNameImpl(const OUString& elementName) { m_bInDrop = sal_True; OCollection_TYPE::dropByName(elementName); m_bInDrop = sal_False; } -// ----------------------------------------------------------------------------- + void HViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); @@ -153,6 +153,6 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) pTables->appendNew(sName); } } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx index c96e3da55559..ccc8f28ebbc8 100644 --- a/connectivity/source/drivers/hsqldb/Hservices.cxx +++ b/connectivity/source/drivers/hsqldb/Hservices.cxx @@ -36,7 +36,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -76,7 +76,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL hsqldb_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx index e5bbab94aab4..a39f617e416f 100644 --- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx +++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx @@ -85,7 +85,7 @@ SAL_JNI_EXPORT jboolean JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileA } return JNI_FALSE; } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess @@ -120,7 +120,7 @@ SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAcces } } } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess @@ -163,6 +163,6 @@ SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAcces } } } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx index 099a6176e952..1f127c95f38e 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx @@ -67,7 +67,7 @@ SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInp #endif StorageContainer::registerStream(env,name,key,mode); } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream @@ -86,7 +86,7 @@ SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInp return read_from_storage_stream( env, obj_this, name, key ); #endif } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream @@ -105,7 +105,7 @@ SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInp return read_from_storage_stream_into_buffer(env,obj_this,name,key,buffer,off,len); #endif } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream @@ -125,7 +125,7 @@ SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInp #endif StorageContainer::revokeStream(env,name,key); } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream @@ -191,7 +191,7 @@ SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeIn } return 0; } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream @@ -233,7 +233,7 @@ SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInp } return 0; } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream @@ -291,6 +291,6 @@ SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInp #endif return nBytesRead; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx index 9b677a0fd7f9..7a6765f724b5 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx @@ -50,7 +50,7 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::lang; using namespace ::connectivity::hsqldb; -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream * Method: openStream @@ -84,7 +84,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, off, len ); #endif } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream * Method: write @@ -102,7 +102,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora write_to_storage_stream_from_buffer( env, obj_this, name, key, buffer, 0, env->GetArrayLength( buffer ) ); #endif } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream * Method: close @@ -134,7 +134,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora #endif StorageContainer::revokeStream(env,name,key); } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream * Method: write @@ -152,7 +152,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora write_to_storage_stream( env, obj_this, name, key, b ); #endif } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream * Method: flush @@ -171,7 +171,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora OUString sName = StorageContainer::jstring2ustring(env,name); #endif } -// ----------------------------------------------------------------------------- + /* * Class: com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream * Method: sync @@ -198,6 +198,6 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora } } } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/accesslog.cxx b/connectivity/source/drivers/hsqldb/accesslog.cxx index 18b7d05d749f..880600a71d5a 100644 --- a/connectivity/source/drivers/hsqldb/accesslog.cxx +++ b/connectivity/source/drivers/hsqldb/accesslog.cxx @@ -37,14 +37,14 @@ namespace connectivity { namespace hsqldb return streams; } - //--------------------------------------------------------------------- + LogFile::LogFile( JNIEnv* env, jstring streamName, const sal_Char* _pAsciiSuffix ) { m_sFileName = StorageContainer::jstring2ustring(env,streamName) + "." + OUString::createFromAscii( _pAsciiSuffix ); } - //--------------------------------------------------------------------- + FILE*& LogFile::getLogFile() { FILE*& pLogFile = getStreams()[m_sFileName]; @@ -56,7 +56,7 @@ namespace connectivity { namespace hsqldb return pLogFile; } - //--------------------------------------------------------------------- + void LogFile::writeString( const sal_Char* _pString, bool _bEndLine ) { FILE* pLogFile = getLogFile(); @@ -66,7 +66,7 @@ namespace connectivity { namespace hsqldb fflush( pLogFile ); } - //--------------------------------------------------------------------- + void LogFile::close() { fclose( getLogFile() ); diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx index 50cce64578f8..83ab8985f93b 100644 --- a/connectivity/source/drivers/jdbc/CallableStatement.cxx +++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx @@ -47,18 +47,18 @@ java_sql_CallableStatement::java_sql_CallableStatement( JNIEnv * pEnv, java_sql_ : java_sql_PreparedStatement( pEnv, _rCon, sql ) { } -// ----------------------------------------------------------------------------- + java_sql_CallableStatement::~java_sql_CallableStatement() { } -// ----------------------------------------------------------------------------- + Any SAL_CALL java_sql_CallableStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = java_sql_PreparedStatement::queryInterface(rType); return aRet.hasValue() ? aRet : ::cppu::queryInterface(rType,static_cast< starsdbc::XRow*>(this),static_cast< starsdbc::XOutParameters*>(this)); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_CallableStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< starsdbc::XRow > *)0 ), @@ -66,7 +66,7 @@ Any SAL_CALL java_sql_CallableStatement::queryInterface( const Type & rType ) th return ::comphelper::concatSequences(aTypes.getTypes(),java_sql_PreparedStatement::getTypes()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_CallableStatement::wasNull( ) throw(starsdbc::SQLException, RuntimeException) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); @@ -300,17 +300,17 @@ Reference< starsdbc::XRef > SAL_CALL java_sql_CallableStatement::getRef( sal_Int // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Ref( t.pEnv, out ); } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_CallableStatement::acquire() throw() { java_sql_PreparedStatement::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_CallableStatement::release() throw() { java_sql_PreparedStatement::release(); } -// ----------------------------------------------------------------------------- + void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -347,7 +347,7 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/) object = t.pEnv->NewGlobalRef( out ); } //t.pEnv } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/ConnectionLog.cxx b/connectivity/source/drivers/jdbc/ConnectionLog.cxx index 0216ad23186a..c8574f2e87e7 100644 --- a/connectivity/source/drivers/jdbc/ConnectionLog.cxx +++ b/connectivity/source/drivers/jdbc/ConnectionLog.cxx @@ -33,7 +33,7 @@ namespace connectivity { namespace java { namespace sql { using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XComponentContext; - //-------------------------------------------------------------------- + namespace { sal_Int32 lcl_getFreeID( ConnectionLog::ObjectType _eType ) @@ -46,21 +46,21 @@ namespace connectivity { namespace java { namespace sql { //==================================================================== //= ConnectionLog //==================================================================== - //-------------------------------------------------------------------- + ConnectionLog::ConnectionLog( const ::comphelper::ResourceBasedEventLogger& _rDriverLog ) :ConnectionLog_Base( _rDriverLog ) ,m_nObjectID( lcl_getFreeID( CONNECTION ) ) { } - //-------------------------------------------------------------------- + ConnectionLog::ConnectionLog( const ConnectionLog& _rSourceLog ) :ConnectionLog_Base( _rSourceLog ) ,m_nObjectID( _rSourceLog.m_nObjectID ) { } - //-------------------------------------------------------------------- + ConnectionLog::ConnectionLog( const ConnectionLog& _rSourceLog, ConnectionLog::ObjectType _eType ) :ConnectionLog_Base( _rSourceLog ) ,m_nObjectID( lcl_getFreeID( _eType ) ) @@ -82,7 +82,7 @@ namespace comphelper { namespace log { namespace convert using ::com::sun::star::util::Time; using ::com::sun::star::util::DateTime; - //-------------------------------------------------------------------- + OUString convertLogArgToString( const Date& _rDate ) { char buffer[ 30 ]; @@ -92,7 +92,7 @@ namespace comphelper { namespace log { namespace convert return OUString::createFromAscii( buffer ); } - //-------------------------------------------------------------------- + OUString convertLogArgToString( const Time& _rTime ) { char buffer[ 30 ]; @@ -102,7 +102,7 @@ namespace comphelper { namespace log { namespace convert return OUString::createFromAscii( buffer ); } - //-------------------------------------------------------------------- + OUString convertLogArgToString( const DateTime& _rDateTime ) { char buffer[ 30 ]; diff --git a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx index 544fdbc5ae7f..f92c541b67fe 100644 --- a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx +++ b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx @@ -33,7 +33,7 @@ namespace connectivity { namespace jdbc //==================================================================== //= ContextClassLoaderScope //==================================================================== - //-------------------------------------------------------------------- + ContextClassLoaderScope::ContextClassLoaderScope( JNIEnv& environment, const GlobalRef< jobject >& newClassLoader, const ::comphelper::ResourceBasedEventLogger& _rLoggerForErrors, const Reference< XInterface >& _rxErrorContext ) :m_environment( environment ) @@ -95,7 +95,7 @@ namespace connectivity { namespace jdbc } } - //-------------------------------------------------------------------- + void ContextClassLoaderScope::pop( bool clearExceptions ) { if ( isActive() ) diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index f563c51b0ad4..f567486d1796 100644 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx @@ -57,7 +57,7 @@ jclass java_sql_DatabaseMetaData::getMyClass() const theClass = findMyClass("java/sql/DatabaseMetaData"); return theClass; } -// ----------------------------------------------------------------------------- + java_sql_DatabaseMetaData::java_sql_DatabaseMetaData( JNIEnv * pEnv, jobject myObj, java_sql_Connection& _rConnection ) :ODatabaseMetaDataBase( &_rConnection,_rConnection.getConnectionInfo() ) ,java_lang_Object( pEnv, myObj ) @@ -67,38 +67,38 @@ java_sql_DatabaseMetaData::java_sql_DatabaseMetaData( JNIEnv * pEnv, jobject myO SDBThreadAttach::addRef(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > java_sql_DatabaseMetaData::impl_getTypeInfo_throw( ) { static jmethodID mID(NULL); return impl_callResultSetMethod( "getTypeInfo", mID ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethod( "getCatalogs", mID ); } -// ------------------------------------------------------------------------- + OUString java_sql_DatabaseMetaData::impl_getCatalogSeparator_throw( ) { static jmethodID mID(NULL); return impl_callStringMethod( "getCatalogSeparator", mID ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethod( "getSchemas", mID ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getColumnPrivileges( const Any& catalog, const OUString& schema, const OUString& table, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethodWithStrings( "getColumnPrivileges", mID, catalog, schema, table, &columnNamePattern ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getColumns( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) { @@ -106,7 +106,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getColumns( return impl_callResultSetMethodWithStrings( "getColumns", mID, catalog, schemaPattern, tableNamePattern, &columnNamePattern ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const Sequence< OUString >& _types ) throw(SQLException, RuntimeException) { @@ -220,121 +220,121 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName ); return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getProcedureColumns( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethodWithStrings( "getProcedureColumns", mID, catalog, schemaPattern, procedureNamePattern, &columnNamePattern ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getProcedures( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethodWithStrings( "getProcedures", mID, catalog, schemaPattern, procedureNamePattern ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getVersionColumns( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethodWithStrings( "getVersionColumns", mID, catalog, schema, table ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxBinaryLiteralLength", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxRowSize", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxCatalogNameLength", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxCharLiteralLength", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxColumnNameLength", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxColumnsInIndex", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxCursorNameLength", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxConnections", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxColumnsInTable", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxStatementLength", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxTableNameLength", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 java_sql_DatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxTablesInSelect", mID ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getExportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethodWithStrings( "getExportedKeys", mID, catalog, schema, table ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getImportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethodWithStrings( "getImportedKeys", mID, catalog, schema, table ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getPrimaryKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethodWithStrings( "getPrimaryKeys", mID, catalog, schema, table ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo( const Any& catalog, const OUString& schema, const OUString& table, sal_Bool unique, sal_Bool approximate ) throw(SQLException, RuntimeException) @@ -375,7 +375,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo( m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName ); return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier( const Any& catalog, const OUString& schema, const OUString& table, sal_Int32 scope, sal_Bool nullable ) throw(SQLException, RuntimeException) @@ -415,7 +415,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_SUCCESS, cMethodName ); return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern ) throw(SQLException, RuntimeException) { @@ -491,7 +491,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges( } return xReturn; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference( const Any& primaryCatalog, const OUString& primarySchema, const OUString& primaryTable, const Any& foreignCatalog, @@ -541,7 +541,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference( return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) { m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, _pMethodName ); @@ -550,7 +550,7 @@ sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethod( const char* _pMethod return out; } -// ------------------------------------------------------------------------- + OUString java_sql_DatabaseMetaData::impl_callStringMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) { m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, _pMethodName ); @@ -567,7 +567,7 @@ OUString java_sql_DatabaseMetaData::impl_callStringMethod( const char* _pMethodN return sReturn; } -// ------------------------------------------------------------------------- + sal_Int32 java_sql_DatabaseMetaData::impl_callIntMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) { m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, _pMethodName ); @@ -576,7 +576,7 @@ sal_Int32 java_sql_DatabaseMetaData::impl_callIntMethod( const char* _pMethodNam return out; } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) { m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD_ARG1, _pMethodName, _nArgument ); @@ -587,7 +587,7 @@ sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg( const char return out; } -// ------------------------------------------------------------------------- + Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) { SDBThreadAttach t; @@ -597,7 +597,7 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethod( con return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); } -// ------------------------------------------------------------------------- + Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings( const char* _pMethodName, jmethodID& _inout_MethodID, const Any& _rCatalog, const OUString& _rSchemaPattern, const OUString& _rLeastPattern, const OUString* _pOptionalAdditionalString ) @@ -668,326 +668,326 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS return new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "doesMaxRowSizeIncludeBlobs", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "storesLowerCaseQuotedIdentifiers", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "storesLowerCaseIdentifiers", mID ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "storesMixedCaseQuotedIdentifiers", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "storesMixedCaseIdentifiers", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "storesUpperCaseQuotedIdentifiers", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "storesUpperCaseIdentifiers", mID ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsAlterTableWithAddColumn", mID ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsAlterTableWithDropColumn", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxIndexLength", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsNonNullableColumns", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getCatalogTerm", mID ); } -// ------------------------------------------------------------------------- + OUString java_sql_DatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { static jmethodID mID(NULL); return impl_callStringMethod( "getIdentifierQuoteString", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getExtraNameCharacters", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsDifferentTableCorrelationNames", mID ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_isCatalogAtStart_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "isCatalogAtStart", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "dataDefinitionIgnoredInTransactions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "dataDefinitionCausesTransactionCommit", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsDataManipulationTransactionsOnly", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsDataDefinitionAndDataManipulationTransactions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsPositionedDelete", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsPositionedUpdate", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsOpenStatementsAcrossRollback", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsOpenStatementsAcrossCommit", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsOpenCursorsAcrossCommit", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsOpenCursorsAcrossRollback", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "supportsTransactionIsolationLevel", mID, level ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSchemasInDataManipulation", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsANSI92FullSQL", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsANSI92EntryLevelSQL", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsIntegrityEnhancementFacility", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSchemasInIndexDefinitions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSchemasInTableDefinitions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCatalogsInTableDefinitions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCatalogsInIndexDefinitions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCatalogsInDataManipulation", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsOuterJoins", mID ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callResultSetMethod( "getTableTypes", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 java_sql_DatabaseMetaData::impl_getMaxStatements_throw( ) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxStatements", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxProcedureNameLength", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxSchemaNameLength", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsTransactions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "allProceduresAreCallable", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsStoredProcedures", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSelectForUpdate", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "allTablesAreSelectable", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "isReadOnly", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "usesLocalFiles", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "usesLocalFilePerTable", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsTypeConversion", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "nullPlusNonNullIsNull", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsColumnAliasing", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsTableCorrelationNames", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_Int32 toType ) throw(SQLException, RuntimeException) { static const char* pMethodName = "supportsConvert"; @@ -1006,163 +1006,163 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType m_aLogger.log< const sal_Char*, sal_Int16 >( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, pMethodName, out ); return out; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsExpressionsInOrderBy", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsGroupBy", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsGroupByBeyondSelect", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsGroupByUnrelated", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsMultipleTransactions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsMultipleResultSets", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsLikeEscapeClause", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsOrderByUnrelated", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsUnion", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsUnionAll", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsMixedCaseIdentifiers", mID ); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_DatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsMixedCaseQuotedIdentifiers", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "nullsAreSortedAtEnd", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "nullsAreSortedAtStart", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "nullsAreSortedHigh", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "nullsAreSortedLow", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSchemasInProcedureCalls", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSchemasInPrivilegeDefinitions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCatalogsInProcedureCalls", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCatalogsInPrivilegeDefinitions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCorrelatedSubqueries", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSubqueriesInComparisons", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSubqueriesInExists", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSubqueriesInIns", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSubqueriesInQuantifieds", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsANSI92IntermediateSQL", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { OUString sURL = m_pConnection->getURL(); @@ -1173,163 +1173,163 @@ OUString SAL_CALL java_sql_DatabaseMetaData::getURL( ) throw(SQLException, Runt } return sURL; } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getUserName", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getDriverName", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getDriverVersion( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getDriverVersion", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getDatabaseProductVersion", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getDatabaseProductName", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getProcedureTerm", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getSchemaTerm", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getDriverMajorVersion", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getDefaultTransactionIsolation", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getDriverMinorVersion", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getSQLKeywords", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getSearchStringEscape", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getStringFunctions", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getTimeDateFunctions", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getSystemFunctions", mID ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_DatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callStringMethod( "getNumericFunctions", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsExtendedSQLGrammar", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCoreSQLGrammar", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsMinimumSQLGrammar", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsFullOuterJoins", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsLimitedOuterJoins", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxColumnsInGroupBy", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxColumnsInOrderBy", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxColumnsInSelect", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxUserNameLength", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "supportsResultSetType", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw(SQLException, RuntimeException) { static const char* pMethodName = "supportsResultSetConcurrency"; @@ -1348,67 +1348,67 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_I m_aLogger.log< const sal_Char*, sal_Int16 >( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, pMethodName, out ); return out; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "ownUpdatesAreVisible", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "ownDeletesAreVisible", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "ownInsertsAreVisible", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "othersUpdatesAreVisible", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "othersDeletesAreVisible", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "othersInsertsAreVisible", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "updatesAreDetected", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "deletesAreDetected", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethodWithIntArg( "insertsAreDetected", mID, setType ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsBatchUpdates", mID ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs( const Any& catalog, const OUString& schemaPattern, const OUString& typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException) @@ -1449,6 +1449,6 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs( return out ? new java_sql_ResultSet( t.pEnv, out, m_aLogger,*m_pConnection ) : 0; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx index c124450cdf8c..ec3f45fc6344 100644 --- a/connectivity/source/drivers/jdbc/Date.cxx +++ b/connectivity/source/drivers/jdbc/Date.cxx @@ -38,7 +38,7 @@ jclass java_util_Date::getMyClass() const return theClass; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx index f510d8cc93d9..956cad32fb82 100644 --- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx +++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx @@ -35,10 +35,10 @@ using namespace ::com::sun::star::lang; //************************************************************** jclass java_sql_DriverPropertyInfo::theClass = 0; -// -------------------------------------------------------------------------------- + java_sql_DriverPropertyInfo::~java_sql_DriverPropertyInfo() {} -// -------------------------------------------------------------------------------- + jclass java_sql_DriverPropertyInfo::getMyClass() const { // the class must be fetched only once, therefore static @@ -47,7 +47,7 @@ jclass java_sql_DriverPropertyInfo::getMyClass() const return theClass; } -// -------------------------------------------------------------------------------- + java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo() { starsdbc::DriverPropertyInfo aInfo; @@ -59,7 +59,7 @@ java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo() return aInfo; } -// -------------------------------------------------------------------------------- + OUString java_sql_DriverPropertyInfo::name() { OUString aStr; @@ -72,7 +72,7 @@ OUString java_sql_DriverPropertyInfo::name() } //t.pEnv return aStr; } -// -------------------------------------------------------------------------------- + OUString java_sql_DriverPropertyInfo::description() { OUString aStr; @@ -85,7 +85,7 @@ OUString java_sql_DriverPropertyInfo::description() } //t.pEnv return aStr; } -// -------------------------------------------------------------------------------- + OUString java_sql_DriverPropertyInfo::value() { OUString aStr; @@ -98,7 +98,7 @@ OUString java_sql_DriverPropertyInfo::value() } //t.pEnv return aStr; } -// -------------------------------------------------------------------------------- + sal_Bool java_sql_DriverPropertyInfo::required() { jboolean out(0); @@ -111,7 +111,7 @@ sal_Bool java_sql_DriverPropertyInfo::required() } //t.pEnv return out; } -// -------------------------------------------------------------------------------- + Sequence< OUString> java_sql_DriverPropertyInfo::choices() { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); @@ -127,6 +127,6 @@ Sequence< OUString> java_sql_DriverPropertyInfo::choices() } //t.pEnv return Sequence< OUString>(); } -// -------------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx index 810a1aee9896..3ed09d08f1c5 100644 --- a/connectivity/source/drivers/jdbc/InputStream.cxx +++ b/connectivity/source/drivers/jdbc/InputStream.cxx @@ -75,7 +75,7 @@ void SAL_CALL java_io_InputStream::closeInput( ) throw(::com::sun::star::io::No static jmethodID mID(NULL); callVoidMethod("close",mID); } -// ----------------------------------------------------- + sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { if (nBytesToRead < 0) diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 4c7a3a9ab0ae..7de8a6b3814a 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -249,9 +249,9 @@ bool loadClass( } -//------------------------------------------------------------------------------ + IMPLEMENT_SERVICE_INFO(java_sql_Connection,"com.sun.star.sdbcx.JConnection","com.sun.star.sdbc.Connection"); -//------------------------------------------------------------------------------ + //************************************************************** //************ Class: java.sql.Connection //************************************************************** @@ -271,7 +271,7 @@ java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver ) ,m_bIgnoreCurrency(sal_False) { } -// ----------------------------------------------------------------------------- + java_sql_Connection::~java_sql_Connection() { ::rtl::Reference< jvmaccess::VirtualMachine > xTest = java_lang_Object::getVM(); @@ -291,12 +291,12 @@ java_sql_Connection::~java_sql_Connection() t.releaseRef(); } } -//----------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::release() throw() { relase_ChildImpl(); } -//------------------------------------------------------------------------------ + void java_sql_Connection::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -312,7 +312,7 @@ void java_sql_Connection::disposing() callVoidMethod("close",mID); } } -// ------------------------------------------------------------------------- + jclass java_sql_Connection::getMyClass() const { // the class must be fetched only once, therefore static @@ -321,7 +321,7 @@ jclass java_sql_Connection::getMyClass() const return theClass; } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_Connection::getCatalog( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -330,7 +330,7 @@ OUString SAL_CALL java_sql_Connection::getCatalog( ) throw(SQLException, Runtim static jmethodID mID(NULL); return callStringMethod("getCatalog",mID); } -// ------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL java_sql_Connection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -352,18 +352,18 @@ Reference< XDatabaseMetaData > SAL_CALL java_sql_Connection::getMetaData( ) thr return xMetaData; } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::close( ) throw(SQLException, RuntimeException) { dispose(); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::commit( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); callVoidMethod("commit",mID); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_Connection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -371,7 +371,7 @@ sal_Bool SAL_CALL java_sql_Connection::isClosed( ) throw(SQLException, RuntimeE static jmethodID mID(NULL); return callBooleanMethod( "isClosed", mID ) && java_sql_Connection_BASE::rBHelper.bDisposed; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_Connection::isReadOnly( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -379,37 +379,37 @@ sal_Bool SAL_CALL java_sql_Connection::isReadOnly( ) throw(SQLException, Runtim static jmethodID mID(NULL); return callBooleanMethod( "isReadOnly", mID ); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::setCatalog( const OUString& catalog ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); callVoidMethodWithStringArg("setCatalog",mID,catalog); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::rollback( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); callVoidMethod("rollback",mID); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_Connection::getAutoCommit( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return callBooleanMethod( "getAutoCommit", mID ); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); callVoidMethodWithBoolArg("setReadOnly",mID,readOnly); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); callVoidMethodWithBoolArg("setAutoCommit",mID,autoCommit); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL java_sql_Connection::getTypeMap( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -421,7 +421,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL java_sql_Connecti // WARNING: the caller becomes the owner of the returned pointer return 0; } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -430,7 +430,7 @@ void SAL_CALL java_sql_Connection::setTypeMap( const Reference< ::com::sun::star ::dbtools::throwFeatureNotImplementedException( "XConnection::setTypeMap", *this ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_Connection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -439,7 +439,7 @@ sal_Int32 SAL_CALL java_sql_Connection::getTransactionIsolation( ) throw(SQLExc static jmethodID mID(NULL); return callIntMethod("getTransactionIsolation",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::setTransactionIsolation( sal_Int32 level ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -448,7 +448,7 @@ void SAL_CALL java_sql_Connection::setTransactionIsolation( sal_Int32 level ) th static jmethodID mID(NULL); callVoidMethodWithIntArg("setTransactionIsolation",mID,level); } -// ------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL java_sql_Connection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -463,7 +463,7 @@ Reference< XStatement > SAL_CALL java_sql_Connection::createStatement( ) throw( m_aLogger.log( LogLevel::FINE, STR_LOG_CREATED_STATEMENT_ID, pStatement->getStatementObjectID() ); return xStmt; } -// ----------------------------------------------------------------------------- + OUString java_sql_Connection::transFormPreparedStatement(const OUString& _sSQL) { OUString sSqlStatement = _sSQL; @@ -489,7 +489,7 @@ OUString java_sql_Connection::transFormPreparedStatement(const OUString& _sSQL) } return sSqlStatement; } -// ------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL java_sql_Connection::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -507,7 +507,7 @@ Reference< XPreparedStatement > SAL_CALL java_sql_Connection::prepareStatement( m_aLogger.log( LogLevel::FINE, STR_LOG_PREPARED_STATEMENT_ID, pStatement->getStatementObjectID() ); return xReturn; } -// ------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL java_sql_Connection::prepareCall( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -525,7 +525,7 @@ Reference< XPreparedStatement > SAL_CALL java_sql_Connection::prepareCall( const m_aLogger.log( LogLevel::FINE, STR_LOG_PREPARED_CALL_ID, pStatement->getStatementObjectID() ); return xStmt; } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_Connection::nativeSQL( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -553,13 +553,13 @@ OUString SAL_CALL java_sql_Connection::nativeSQL( const OUString& sql ) throw(SQ return aStr; } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Connection::clearWarnings( ) throw(SQLException, RuntimeException) { static jmethodID mID(NULL); callVoidMethod("clearWarnings",mID); } -// ------------------------------------------------------------------------- + Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -588,7 +588,7 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc return Any(); } -// ----------------------------------------------------------------------------- + namespace { OUString lcl_getDriverLoadErrorMessage( const ::connectivity::SharedResources& _aResource,const OUString& _rDriverClass, const OUString& _rDriverClassPath ) @@ -609,7 +609,7 @@ namespace } } -// ----------------------------------------------------------------------------- + namespace { bool lcl_setSystemProperties_nothrow( const java::sql::ConnectionLog& _rLogger, @@ -655,7 +655,7 @@ namespace } } -// ----------------------------------------------------------------------------- + void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClass, const OUString& _sDriverClassPath, const Sequence< NamedValue >& _rSystemProperties ) { @@ -755,7 +755,7 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas enableAutoRetrievingEnabled( bAutoRetrievingEnabled ); setAutoRetrievingStatement( sGeneratedValueStatement ); } -// ----------------------------------------------------------------------------- + OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString& _sDriverClass) { static const OUString s_sNodeName("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths"); @@ -769,7 +769,7 @@ OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString } return sURL; } -// ----------------------------------------------------------------------------- + sal_Bool java_sql_Connection::construct(const OUString& url, const Sequence< PropertyValue >& info) { @@ -861,6 +861,6 @@ sal_Bool java_sql_Connection::construct(const OUString& url, } //t.pEnv return object != NULL; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index d867e50e784c..c1988f1ec5e9 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -40,38 +40,38 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + java_sql_Driver::java_sql_Driver(const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext) :m_aContext( _rxContext ) ,m_aLogger( _rxContext, "sdbcl", "org.openoffice.sdbc.jdbcBridge" ) { } -// -------------------------------------------------------------------------------- + java_sql_Driver::~java_sql_Driver() { } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString java_sql_Driver::getImplementationName_Static( ) throw(RuntimeException) { return OUString("com.sun.star.comp.sdbc.JDBCDriver"); // this name is referenced in the configuration and in the jdbc.xml // Please take care when changing it. } -//------------------------------------------------------------------------------ + Sequence< OUString > java_sql_Driver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 1 ); aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } -//------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::java_sql_Driver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { return *(new java_sql_Driver( comphelper::getComponentContext(_rxFactory))); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL java_sql_Driver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -82,12 +82,12 @@ sal_Bool SAL_CALL java_sql_Driver::supportsService( const OUString& _rServiceNam return cppu::supportsService(this, _rServiceName); } -// -------------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL java_sql_Driver::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL java_sql_Driver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { @@ -105,7 +105,7 @@ Reference< XConnection > SAL_CALL java_sql_Driver::connect( const OUString& url, } return xOut; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_Driver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { // don't ask the real driver for the url @@ -127,7 +127,7 @@ sal_Bool SAL_CALL java_sql_Driver::acceptsURL( const OUString& url ) throw(SQLEx } return bEnabled && url.startsWith("jdbc:"); } -// ------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) { @@ -237,17 +237,17 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const ::dbtools::throwGenericSQLException(sMessage ,*this); return Sequence< DriverPropertyInfo >(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_Driver::getMajorVersion( ) throw(RuntimeException) { return 1; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_Driver::getMinorVersion( ) throw(RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index c4b0f296ecda..5eba3aeb92ac 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -43,21 +43,21 @@ using namespace ::comphelper; using namespace connectivity; using namespace ::cppu; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -//------------------------------------------------------------------------------ + //************************************************************** //************ Class: java.sql.Statement //************************************************************** jclass java_sql_Statement_Base::theClass = 0; -// ------------------------------------------------------------------------- + java_sql_Statement_Base::java_sql_Statement_Base( JNIEnv * pEnv, java_sql_Connection& _rCon ) :java_sql_Statement_BASE(m_aMutex) ,java_lang_Object( pEnv, NULL ) @@ -72,12 +72,12 @@ java_sql_Statement_Base::java_sql_Statement_Base( JNIEnv * pEnv, java_sql_Connec m_pConnection->acquire(); } -//------------------------------------------------------------------------------ + java_sql_Statement_Base::~java_sql_Statement_Base() { } -//------------------------------------------------------------------------------ + void SAL_CALL OStatement_BASE2::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -96,7 +96,7 @@ void SAL_CALL OStatement_BASE2::disposing() dispose_ChildImpl(); java_sql_Statement_Base::disposing(); } -// ------------------------------------------------------------------------- + jclass java_sql_Statement_Base::getMyClass() const { // the class must be fetched only once, therefore static @@ -104,21 +104,21 @@ jclass java_sql_Statement_Base::getMyClass() const theClass = findMyClass("java/sql/Statement"); return theClass; } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement_Base::disposing(void) { m_aLogger.log( LogLevel::FINE, STR_LOG_CLOSING_STATEMENT ); java_sql_Statement_BASE::disposing(); clearObject(); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement_BASE2::release() throw() { relase_ChildImpl(); } -// ------------------------------------------------------------------------- + Any SAL_CALL java_sql_Statement_Base::queryInterface( const Type & rType ) throw(RuntimeException) { if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() && rType == ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ) ) @@ -126,7 +126,7 @@ Any SAL_CALL java_sql_Statement_Base::queryInterface( const Type & rType ) throw Any aRet( java_sql_Statement_BASE::queryInterface(rType) ); return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL java_sql_Statement_Base::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), @@ -143,7 +143,7 @@ Sequence< Type > SAL_CALL java_sql_Statement_Base::getTypes( ) throw(RuntimeExc return ::comphelper::concatSequences(aTypes.getTypes(),aOldTypes); } -// ----------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_Statement_Base::getGeneratedValues( ) throw (SQLException, RuntimeException) { m_aLogger.log( LogLevel::FINE, STR_LOG_GENERATED_VALUES ); @@ -185,7 +185,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::getGeneratedValues( ) return xRes; } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement_Base::cancel( ) throw(RuntimeException) { @@ -194,7 +194,7 @@ void SAL_CALL java_sql_Statement_Base::cancel( ) throw(RuntimeException) static jmethodID mID(NULL); callVoidMethod("cancel",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement_Base::close( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -205,7 +205,7 @@ void SAL_CALL java_sql_Statement_Base::close( ) throw(::com::sun::star::sdbc::S } dispose(); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement::clearBatch( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -217,7 +217,7 @@ void SAL_CALL java_sql_Statement::clearBatch( ) throw(::com::sun::star::sdbc::S callVoidMethod("clearBatch",mID); } //t.pEnv } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_Statement_Base::execute( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -251,7 +251,7 @@ sal_Bool SAL_CALL java_sql_Statement_Base::execute( const OUString& sql ) throw( } //t.pEnv return out; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -287,21 +287,21 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const OU // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this ); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL java_sql_Statement_Base::getConnection( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + Any SAL_CALL java_sql_Statement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ::cppu::queryInterface(rType,static_cast< XBatchExecution*> (this)); return aRet.hasValue() ? aRet : java_sql_Statement_Base::queryInterface(rType); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement::addBatch( const OUString& sql ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -314,7 +314,7 @@ void SAL_CALL java_sql_Statement::addBatch( const OUString& sql ) throw(::com::s callVoidMethodWithStringArg("addBatch",mID,sql); } //t.pEnv } -// ------------------------------------------------------------------------- + Sequence< sal_Int32 > SAL_CALL java_sql_Statement::executeBatch( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -334,7 +334,7 @@ Sequence< sal_Int32 > SAL_CALL java_sql_Statement::executeBatch( ) throw(::com: } return aSeq; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_Statement_Base::executeUpdate( const OUString& sql ) throw(SQLException, RuntimeException) @@ -349,7 +349,7 @@ sal_Int32 SAL_CALL java_sql_Statement_Base::executeUpdate( const OUString& sql ) static jmethodID mID(NULL); return callIntMethodWithStringArg("executeUpdate",mID,sql); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Statement_Base::getResultSet( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -361,7 +361,7 @@ Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Statement_Base // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_Statement_Base::getUpdateCount( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -372,16 +372,16 @@ sal_Int32 SAL_CALL java_sql_Statement_Base::getUpdateCount( ) throw(::com::sun: m_aLogger.log( LogLevel::FINER, STR_LOG_UPDATE_COUNT, (sal_Int32)out ); return out; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_Statement_Base::getMoreResults( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { static jmethodID mID(NULL); return callBooleanMethod( "getMoreResults", mID ); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { SDBThreadAttach t; @@ -399,7 +399,7 @@ Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sd return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement_Base::clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -412,32 +412,32 @@ void SAL_CALL java_sql_Statement_Base::clearWarnings( ) throw(::com::sun::star: callVoidMethod("clearWarnings",mID); } } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::getQueryTimeOut() throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_getProperty("getQueryTimeOut",mID); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::getMaxRows() throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_getProperty("getMaxRows",mID); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::getResultSetConcurrency() throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_getProperty("getResultSetConcurrency",mID,m_nResultSetConcurrency); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::getResultSetType() throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_getProperty("getResultSetType",mID,m_nResultSetType); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::impl_getProperty(const char* _pMethodName, jmethodID& _inout_MethodID,sal_Int32 _nDefault) { sal_Int32 out = _nDefault; @@ -446,7 +446,7 @@ sal_Int32 java_sql_Statement_Base::impl_getProperty(const char* _pMethodName, jm return out; } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::impl_getProperty(const char* _pMethodName, jmethodID& _inout_MethodID) { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); @@ -454,25 +454,25 @@ sal_Int32 java_sql_Statement_Base::impl_getProperty(const char* _pMethodName, jm return callIntMethod(_pMethodName,_inout_MethodID,true); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::getFetchDirection() throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_getProperty("getFetchDirection",mID); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::getFetchSize() throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_getProperty("getFetchSize",mID); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_Statement_Base::getMaxFieldSize() throw(SQLException, RuntimeException) { static jmethodID mID(NULL); return impl_getProperty("getMaxFieldSize",mID); } -//------------------------------------------------------------------------------ + OUString java_sql_Statement_Base::getCursorName() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -489,7 +489,7 @@ OUString java_sql_Statement_Base::getCursorName() throw(SQLException, RuntimeExc } return OUString(); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setQueryTimeOut(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -500,7 +500,7 @@ void java_sql_Statement_Base::setQueryTimeOut(sal_Int32 _par0) throw(SQLExceptio callVoidMethodWithIntArg("setQueryTimeOut",mID,_par0,true); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setEscapeProcessing(bool _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -514,7 +514,7 @@ void java_sql_Statement_Base::setEscapeProcessing(bool _par0) throw(SQLException callVoidMethodWithBoolArg("setEscapeProcessing",mID,_par0,true); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setMaxRows(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -524,7 +524,7 @@ void java_sql_Statement_Base::setMaxRows(sal_Int32 _par0) throw(SQLException, Ru static jmethodID mID(NULL); callVoidMethodWithIntArg("setMaxRows",mID,_par0,true); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setResultSetConcurrency(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -534,7 +534,7 @@ void java_sql_Statement_Base::setResultSetConcurrency(sal_Int32 _par0) throw(SQL clearObject(); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setResultSetType(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -544,7 +544,7 @@ void java_sql_Statement_Base::setResultSetType(sal_Int32 _par0) throw(SQLExcepti clearObject(); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setFetchDirection(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -555,7 +555,7 @@ void java_sql_Statement_Base::setFetchDirection(sal_Int32 _par0) throw(SQLExcept static jmethodID mID(NULL); callVoidMethodWithIntArg("setFetchDirection",mID,_par0,true); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setFetchSize(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -567,7 +567,7 @@ void java_sql_Statement_Base::setFetchSize(sal_Int32 _par0) throw(SQLException, static jmethodID mID(NULL); callVoidMethodWithIntArg("setFetchSize",mID,_par0,true); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setMaxFieldSize(sal_Int32 _par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -577,7 +577,7 @@ void java_sql_Statement_Base::setMaxFieldSize(sal_Int32 _par0) throw(SQLExceptio static jmethodID mID(NULL); callVoidMethodWithIntArg("setMaxFieldSize",mID,_par0,true); } -//------------------------------------------------------------------------------ + void java_sql_Statement_Base::setCursorName(const OUString &_par0) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -590,7 +590,7 @@ void java_sql_Statement_Base::setCursorName(const OUString &_par0) throw(SQLExce } //t.pEnv } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* java_sql_Statement_Base::createArrayHelper( ) const { Sequence< Property > aProps(10); @@ -610,13 +610,13 @@ void java_sql_Statement_Base::setCursorName(const OUString &_par0) throw(SQLExce return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & java_sql_Statement_Base::getInfoHelper() { return *const_cast<java_sql_Statement_Base*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_Statement_Base::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, @@ -662,7 +662,7 @@ sal_Bool java_sql_Statement_Base::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void java_sql_Statement_Base::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue @@ -704,7 +704,7 @@ void java_sql_Statement_Base::setFastPropertyValue_NoBroadcast( ; } } -// ------------------------------------------------------------------------- + void java_sql_Statement_Base::getFastPropertyValue( Any& rValue, sal_Int32 nHandle @@ -751,7 +751,7 @@ void java_sql_Statement_Base::getFastPropertyValue( { } } -// ------------------------------------------------------------------------- + jclass java_sql_Statement::theClass = 0; java_sql_Statement::~java_sql_Statement() @@ -765,7 +765,7 @@ jclass java_sql_Statement::getMyClass() const return theClass; } -// ----------------------------------------------------------------------------- + void java_sql_Statement::createStatement(JNIEnv* _pEnv) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -797,36 +797,36 @@ void java_sql_Statement::createStatement(JNIEnv* _pEnv) object = _pEnv->NewGlobalRef( out ); } //_pEnv } -// ----------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(java_sql_Statement,"com.sun.star.sdbcx.JStatement","com.sun.star.sdbc.Statement"); -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement_Base::acquire() throw() { java_sql_Statement_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement_Base::release() throw() { java_sql_Statement_BASE::release(); } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement::acquire() throw() { OStatement_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_Statement::release() throw() { OStatement_BASE2::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL java_sql_Statement_Base::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index f2a9ece8c85b..ef437409ba00 100644 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx @@ -40,7 +40,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ----------------------------------------------------------------------------- + ::rtl::Reference< jvmaccess::VirtualMachine > getJavaVM2(const ::rtl::Reference< jvmaccess::VirtualMachine >& _rVM = ::rtl::Reference< jvmaccess::VirtualMachine >(), sal_Bool _bSet = sal_False) { @@ -49,7 +49,7 @@ using namespace ::com::sun::star::lang; s_VM = _rVM; return s_VM; } -// ----------------------------------------------------------------------------- + ::rtl::Reference< jvmaccess::VirtualMachine > java_lang_Object::getVM(const Reference<XComponentContext >& _rxContext) { ::rtl::Reference< jvmaccess::VirtualMachine > xVM = getJavaVM2(); @@ -58,7 +58,7 @@ using namespace ::com::sun::star::lang; return xVM; } -// ----------------------------------------------------------------------------- + SDBThreadAttach::SDBThreadAttach() : m_aGuard(java_lang_Object::getVM()) , pEnv(NULL) @@ -66,22 +66,22 @@ SDBThreadAttach::SDBThreadAttach() pEnv = m_aGuard.getEnvironment(); OSL_ENSURE(pEnv,"Environment is nULL!"); } -// ----------------------------------------------------------------------------- + SDBThreadAttach::~SDBThreadAttach() { } -// ----------------------------------------------------------------------------- + oslInterlockedCount& getJavaVMRefCount() { static oslInterlockedCount s_nRefCount = 0; return s_nRefCount; } -// ----------------------------------------------------------------------------- + void SDBThreadAttach::addRef() { osl_atomic_increment(&getJavaVMRefCount()); } -// ----------------------------------------------------------------------------- + void SDBThreadAttach::releaseRef() { osl_atomic_decrement(&getJavaVMRefCount()); @@ -90,7 +90,7 @@ void SDBThreadAttach::releaseRef() getJavaVM2(::rtl::Reference< jvmaccess::VirtualMachine >(),sal_True); } } -// ----------------------------------------------------------------------------- + // static variables of the class jclass java_lang_Object::theClass = 0; @@ -157,7 +157,7 @@ OUString java_lang_Object::toString() const return callStringMethod("toString",mID); } -// -------------------------------------------------------------------------------- + namespace { bool lcl_translateJNIExceptionToUNOException( @@ -197,7 +197,7 @@ namespace } } -// -------------------------------------------------------------------------------- + void java_lang_Object::ThrowLoggedSQLException( const ::comphelper::ResourceBasedEventLogger& _rLogger, JNIEnv* _pEnvironment, const Reference< XInterface >& _rxContext ) { @@ -209,14 +209,14 @@ void java_lang_Object::ThrowLoggedSQLException( const ::comphelper::ResourceBase } } -// -------------------------------------------------------------------------------- + void java_lang_Object::ThrowSQLException( JNIEnv* _pEnvironment, const Reference< XInterface>& _rxContext ) { SQLException aException; if ( lcl_translateJNIExceptionToUNOException( _pEnvironment, _rxContext, aException ) ) throw aException; } -// ----------------------------------------------------------------------------- + void java_lang_Object::obtainMethodId(JNIEnv* _pEnv,const char* _pMethodName, const char* _pSignature,jmethodID& _inout_MethodID) const { if ( !_inout_MethodID ) @@ -227,7 +227,7 @@ void java_lang_Object::obtainMethodId(JNIEnv* _pEnv,const char* _pMethodName, co throw SQLException(); } // if ( !_inout_MethodID ) } -// ----------------------------------------------------------------------------- + sal_Bool java_lang_Object::callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const { jboolean out( sal_False ); @@ -241,7 +241,7 @@ sal_Bool java_lang_Object::callBooleanMethod( const char* _pMethodName, jmethodI return out; } -// ----------------------------------------------------------------------------- + sal_Bool java_lang_Object::callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const { jboolean out( sal_False ); @@ -254,14 +254,14 @@ sal_Bool java_lang_Object::callBooleanMethodWithIntArg( const char* _pMethodName return out; } -// ------------------------------------------------------------------------- + jobject java_lang_Object::callResultSetMethod( JNIEnv& _rEnv,const char* _pMethodName, jmethodID& _inout_MethodID ) const { // call method jobject out = callObjectMethod(&_rEnv,_pMethodName,"()Ljava/sql/ResultSet;", _inout_MethodID); return out; } -// ------------------------------------------------------------------------- + sal_Int32 java_lang_Object::callIntMethod( const char* _pMethodName, jmethodID& _inout_MethodID,bool _bIgnoreException ) const { SDBThreadAttach t; @@ -277,7 +277,7 @@ sal_Int32 java_lang_Object::callIntMethod( const char* _pMethodName, jmethodID& return (sal_Int32)out; } -// ------------------------------------------------------------------------- + sal_Int32 java_lang_Object::callIntMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID,sal_Int32 _nArgument ) const { SDBThreadAttach t; @@ -289,7 +289,7 @@ sal_Int32 java_lang_Object::callIntMethodWithIntArg( const char* _pMethodName, j return (sal_Int32)out; } -// ------------------------------------------------------------------------- + void java_lang_Object::callVoidMethod( const char* _pMethodName, jmethodID& _inout_MethodID) const { SDBThreadAttach t; @@ -300,7 +300,7 @@ void java_lang_Object::callVoidMethod( const char* _pMethodName, jmethodID& _ino t.pEnv->CallVoidMethod( object, _inout_MethodID ); ThrowSQLException( t.pEnv, NULL ); } -// ------------------------------------------------------------------------- + void java_lang_Object::callVoidMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument,bool _bIgnoreException ) const { SDBThreadAttach t; @@ -314,7 +314,7 @@ void java_lang_Object::callVoidMethodWithIntArg( const char* _pMethodName, jmeth else ThrowSQLException( t.pEnv, NULL ); } -// ------------------------------------------------------------------------- + void java_lang_Object::callVoidMethodWithBoolArg( const char* _pMethodName, jmethodID& _inout_MethodID, bool _nArgument,bool _bIgnoreException ) const { SDBThreadAttach t; @@ -327,7 +327,7 @@ void java_lang_Object::callVoidMethodWithBoolArg( const char* _pMethodName, jmet else ThrowSQLException( t.pEnv, NULL ); } -// ----------------------------------------------------------------------------- + OUString java_lang_Object::callStringMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const { SDBThreadAttach t; @@ -337,7 +337,7 @@ OUString java_lang_Object::callStringMethod( const char* _pMethodName, jmethodID jstring out = (jstring)callObjectMethod(t.pEnv,_pMethodName,"()Ljava/lang/String;", _inout_MethodID); return JavaString2String( t.pEnv, out ); } -// ----------------------------------------------------------------------------- + jobject java_lang_Object::callObjectMethod( JNIEnv * _pEnv,const char* _pMethodName,const char* _pSignature, jmethodID& _inout_MethodID ) const { // obtain method ID @@ -348,7 +348,7 @@ jobject java_lang_Object::callObjectMethod( JNIEnv * _pEnv,const char* _pMethodN return out; } -// ----------------------------------------------------------------------------- + jobject java_lang_Object::callObjectMethodWithIntArg( JNIEnv * _pEnv,const char* _pMethodName,const char* _pSignature, jmethodID& _inout_MethodID , sal_Int32 _nArgument) const { obtainMethodId(_pEnv, _pMethodName,_pSignature, _inout_MethodID); @@ -357,7 +357,7 @@ jobject java_lang_Object::callObjectMethodWithIntArg( JNIEnv * _pEnv,const char* ThrowSQLException( _pEnv, NULL ); return out; } -// ----------------------------------------------------------------------------- + OUString java_lang_Object::callStringMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID , sal_Int32 _nArgument) const { SDBThreadAttach t; @@ -365,7 +365,7 @@ OUString java_lang_Object::callStringMethodWithIntArg( const char* _pMethodName, jstring out = (jstring)callObjectMethodWithIntArg(t.pEnv,_pMethodName,"(I)Ljava/lang/String;",_inout_MethodID,_nArgument); return JavaString2String( t.pEnv, out ); } -// ------------------------------------------------------------------------- + void java_lang_Object::callVoidMethodWithStringArg( const char* _pMethodName, jmethodID& _inout_MethodID,const OUString& _nArgument ) const { SDBThreadAttach t; @@ -377,7 +377,7 @@ void java_lang_Object::callVoidMethodWithStringArg( const char* _pMethodName, jm t.pEnv->CallVoidMethod( object, _inout_MethodID , str.get()); ThrowSQLException( t.pEnv, NULL ); } -// ------------------------------------------------------------------------- + sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName, jmethodID& _inout_MethodID,const OUString& _nArgument ) const { SDBThreadAttach t; @@ -399,7 +399,7 @@ sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName ThrowSQLException( t.pEnv, NULL ); return (sal_Int32)out; } -// ----------------------------------------------------------------------------- + jclass java_lang_Object::findMyClass(const char* _pClassName) { // the class must be fetched only once, therefore static diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index fa941de61820..f15bd4f45b7d 100644 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx @@ -53,13 +53,13 @@ java_sql_PreparedStatement::java_sql_PreparedStatement( JNIEnv * pEnv, java_sql_ { m_sSqlStatement = sql; } -// ----------------------------------------------------------------------------- + jclass java_sql_PreparedStatement::theClass = 0; java_sql_PreparedStatement::~java_sql_PreparedStatement() { } -// ----------------------------------------------------------------------------- + jclass java_sql_PreparedStatement::getMyClass() const { @@ -68,7 +68,7 @@ jclass java_sql_PreparedStatement::getMyClass() const theClass = findMyClass("java/sql/PreparedStatement"); return theClass; } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Any SAL_CALL java_sql_PreparedStatement::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { @@ -79,7 +79,7 @@ jclass java_sql_PreparedStatement::getMyClass() const static_cast< XResultSetMetaDataSupplier*>(this), static_cast< XPreparedBatchExecution*>(this)); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_PreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), @@ -89,7 +89,7 @@ jclass java_sql_PreparedStatement::getMyClass() const return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE2::getTypes()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_PreparedStatement::execute( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -102,7 +102,7 @@ sal_Bool SAL_CALL java_sql_PreparedStatement::execute( ) throw(::com::sun::star static jmethodID mID(NULL); return callBooleanMethod( "execute", mID ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_PreparedStatement::executeUpdate( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -115,7 +115,7 @@ sal_Int32 SAL_CALL java_sql_PreparedStatement::executeUpdate( ) throw(::com::su static jmethodID mID(NULL); return callIntMethod("executeUpdate",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, const OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -137,13 +137,13 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); } //t.pEnv } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL java_sql_PreparedStatement::getConnection( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_PreparedStatement::executeQuery( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -158,7 +158,7 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -171,7 +171,7 @@ void SAL_CALL java_sql_PreparedStatement::setBoolean( sal_Int32 parameterIndex, static jmethodID mID(NULL); callVoidMethod("setBoolean", "(IZ)V", mID, parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -184,7 +184,7 @@ void SAL_CALL java_sql_PreparedStatement::setByte( sal_Int32 parameterIndex, sal static jmethodID mID(NULL); callVoidMethod("setByte", "(IB)V", mID, parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setDate( sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -198,7 +198,7 @@ void SAL_CALL java_sql_PreparedStatement::setDate( sal_Int32 parameterIndex, con static jmethodID mID(NULL); callVoidMethod("setDate", "(ILjava/sql/Date;)V", mID, parameterIndex, aT.getJavaObject()); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setTime( sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) @@ -213,7 +213,7 @@ void SAL_CALL java_sql_PreparedStatement::setTime( sal_Int32 parameterIndex, con static jmethodID mID(NULL); callVoidMethod("setTime", "(ILjava/sql/Time;)V", mID, parameterIndex, aT.getJavaObject()); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setTimestamp( sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -227,7 +227,7 @@ void SAL_CALL java_sql_PreparedStatement::setTimestamp( sal_Int32 parameterIndex java_sql_Timestamp aD(x); callVoidMethod("setTimestamp", "(ILjava/sql/Timestamp;)V", mID, parameterIndex, aD.getJavaObject()); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { m_aLogger.log( LogLevel::FINER, STR_LOG_DOUBLE_PARAMETER, parameterIndex, x ); @@ -239,7 +239,7 @@ void SAL_CALL java_sql_PreparedStatement::setDouble( sal_Int32 parameterIndex, d static jmethodID mID(NULL); callVoidMethod("setDouble", "(ID)V", mID, parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -252,7 +252,7 @@ void SAL_CALL java_sql_PreparedStatement::setFloat( sal_Int32 parameterIndex, fl static jmethodID mID(NULL); callVoidMethod("setFloat", "(IF)V", mID, parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -265,7 +265,7 @@ void SAL_CALL java_sql_PreparedStatement::setInt( sal_Int32 parameterIndex, sal_ static jmethodID mID(NULL); callVoidMethod("setInt", "(II)V", mID, parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -278,7 +278,7 @@ void SAL_CALL java_sql_PreparedStatement::setLong( sal_Int32 parameterIndex, sal static jmethodID mID(NULL); callVoidMethod("setLong", "(IJ)V", mID, parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -291,31 +291,31 @@ void SAL_CALL java_sql_PreparedStatement::setNull( sal_Int32 parameterIndex, sal static jmethodID mID(NULL); callVoidMethod("setNull", "(II)V", mID, parameterIndex, sqlType); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob >& /*x*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setClob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob >& /*x*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBlob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray >& /*x*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setArray", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef >& /*x*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setRef", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const ::com::sun::star::uno::Any& x, sal_Int32 targetSqlType, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -374,7 +374,7 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter } //mID } //t.pEnv } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/, const OUString& /*typeName*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -387,7 +387,7 @@ void SAL_CALL java_sql_PreparedStatement::setObjectNull( sal_Int32 parameterInde static jmethodID mID(NULL); callVoidMethod<jobject>("setObject", "(ILjava/lang/Object;)V", mID, parameterIndex, NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setObject( sal_Int32 parameterIndex, const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -400,7 +400,7 @@ void SAL_CALL java_sql_PreparedStatement::setObject( sal_Int32 parameterIndex, c ::dbtools::throwGenericSQLException(sError,*this); } } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -413,7 +413,7 @@ void SAL_CALL java_sql_PreparedStatement::setShort( sal_Int32 parameterIndex, sa static jmethodID mID(NULL); callVoidMethod("setShort", "(IS)V", mID, parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setBytes( sal_Int32 parameterIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -438,7 +438,7 @@ void SAL_CALL java_sql_PreparedStatement::setBytes( sal_Int32 parameterIndex, co ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); } //t.pEnv } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -486,7 +486,7 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); } //t.pEnv } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -535,7 +535,7 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn } } //t.pEnv } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::clearParameters( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -551,7 +551,7 @@ void SAL_CALL java_sql_PreparedStatement::clearParameters( ) throw(::com::sun:: callVoidMethod("clearParameters",mID); } //t.pEnv } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::clearBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -563,7 +563,7 @@ void SAL_CALL java_sql_PreparedStatement::clearBatch( ) throw(::com::sun::star: callVoidMethod("clearBatch",mID); } //t.pEnv } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -576,7 +576,7 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd callVoidMethod("addBatch",mID); } //t.pEnv } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL java_sql_PreparedStatement::executeBatch( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -596,7 +596,7 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd } return aSeq; } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL java_sql_PreparedStatement::getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -608,17 +608,17 @@ void SAL_CALL java_sql_PreparedStatement::addBatch( ) throw(::com::sun::star::sd return out==0 ? 0 : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection ); } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::acquire() throw() { OStatement_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_PreparedStatement::release() throw() { OStatement_BASE2::release(); } -// ----------------------------------------------------------------------------- + void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -656,7 +656,7 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv) object = _pEnv->NewGlobalRef( out ); } //t.pEnv } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx index a15066c9475e..1cf384c4ee31 100644 --- a/connectivity/source/drivers/jdbc/Reader.cxx +++ b/connectivity/source/drivers/jdbc/Reader.cxx @@ -77,7 +77,7 @@ void SAL_CALL java_io_Reader::closeInput( ) throw(::com::sun::star::io::NotConn static jmethodID mID(NULL); callVoidMethod("close",mID); } -// ----------------------------------------------------- + sal_Int32 SAL_CALL java_io_Reader::readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { OSL_ENSURE(aData.getLength() < nBytesToRead," Sequence is smaller than BytesToRead"); diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index 1b3c38c658c0..6912fce9b990 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -78,7 +78,7 @@ java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java osl_atomic_decrement(&m_refCount); } -// ----------------------------------------------------------------------------- + java_sql_ResultSet::~java_sql_ResultSet() { if ( !java_sql_ResultSet_BASE::rBHelper.bDisposed && !java_sql_ResultSet_BASE::rBHelper.bInDispose ) @@ -98,7 +98,7 @@ jclass java_sql_ResultSet::getMyClass() const return theClass; } -// ------------------------------------------------------------------------- + void java_sql_ResultSet::disposing(void) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::disposing" ); @@ -116,14 +116,14 @@ m_xMetaData.clear(); SDBThreadAttach::releaseRef(); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Any SAL_CALL java_sql_ResultSet::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::queryInterface" ); ::com::sun::star::uno::Any aRet = OPropertySetHelper::queryInterface(rType); return aRet.hasValue() ? aRet : java_sql_ResultSet_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_ResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getTypes" ); @@ -133,7 +133,7 @@ m_xMetaData.clear(); return ::comphelper::concatSequences(aTypes.getTypes(),java_sql_ResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const OUString& columnName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -141,7 +141,7 @@ sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const OUString& columnName ) static jmethodID mID(NULL); return callIntMethodWithStringArg("findColumn",mID,columnName); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getBinaryStream" ); @@ -152,7 +152,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_io_InputStream( t.pEnv, out ); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getCharacterStream" ); @@ -163,7 +163,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_io_Reader( t.pEnv, out ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -171,7 +171,7 @@ sal_Bool SAL_CALL java_sql_ResultSet::getBoolean( sal_Int32 columnIndex ) throw( static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "getBoolean", mID,columnIndex ); } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL java_sql_ResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -180,7 +180,7 @@ sal_Int8 SAL_CALL java_sql_ResultSet::getByte( sal_Int32 columnIndex ) throw(SQL jbyte (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallByteMethod; return callMethodWithIntArg<jbyte>(pCallMethod,"getByte","(I)B",mID,columnIndex); } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -198,7 +198,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde } return aSeq; } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL java_sql_ResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -209,7 +209,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::Date> (java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date(); } -// ------------------------------------------------------------------------- + double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -218,7 +218,7 @@ double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex ) throw(SQL jdouble (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallDoubleMethod; return callMethodWithIntArg<double>(pCallMethod,"getDouble","(I)D",mID,columnIndex); } -// ------------------------------------------------------------------------- + float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -227,7 +227,7 @@ float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLEx jfloat (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallFloatMethod; return callMethodWithIntArg<jfloat>(pCallMethod,"getFloat","(I)F",mID,columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -235,7 +235,7 @@ sal_Int32 SAL_CALL java_sql_ResultSet::getInt( sal_Int32 columnIndex ) throw(SQL static jmethodID mID(NULL); return callIntMethodWithIntArg("getInt",mID,columnIndex); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSet::getRow( ) throw(SQLException, RuntimeException) { @@ -243,7 +243,7 @@ sal_Int32 SAL_CALL java_sql_ResultSet::getRow( ) throw(SQLException, RuntimeExc static jmethodID mID(NULL); return callIntMethod("getRow",mID); } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -252,7 +252,7 @@ sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQ jlong (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallLongMethod; return callMethodWithIntArg<jlong>(pCallMethod,"getLong","(I)J",mID,columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL java_sql_ResultSet::getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -263,7 +263,7 @@ sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQ return out==0 ? 0 : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection ); } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getArray" ); @@ -274,7 +274,7 @@ Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Array( t.pEnv, out ); } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL java_sql_ResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -285,7 +285,7 @@ Reference< XClob > SAL_CALL java_sql_ResultSet::getClob( sal_Int32 columnIndex ) // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Clob( t.pEnv, out ); } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL java_sql_ResultSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getBlob" ); @@ -295,7 +295,7 @@ Reference< XBlob > SAL_CALL java_sql_ResultSet::getBlob( sal_Int32 columnIndex ) // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Blob( t.pEnv, out ); } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -307,7 +307,7 @@ Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) t // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Ref( t.pEnv, out ); } -// ------------------------------------------------------------------------- + Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException) { @@ -369,7 +369,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen } //t.pEnv return aRet; } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -378,7 +378,7 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S jshort (JNIEnv::*pCallMethod)( jobject obj, jmethodID methodID, ... ) = &JNIEnv::CallShortMethod; return callMethodWithIntArg<jshort>(pCallMethod,"getShort","(I)S",mID,columnIndex); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -387,7 +387,7 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S static jmethodID mID(NULL); return callStringMethodWithIntArg("getString",mID,columnIndex); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL java_sql_ResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -399,7 +399,7 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time(); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL java_sql_ResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -411,7 +411,7 @@ OUString SAL_CALL java_sql_ResultSet::getString( sal_Int32 columnIndex ) throw(S // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { @@ -419,42 +419,42 @@ sal_Bool SAL_CALL java_sql_ResultSet::isAfterLast( ) throw(SQLException, Runtim static jmethodID mID(NULL); return callBooleanMethod( "isAfterLast", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::isFirst( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::isFirst" ); static jmethodID mID(NULL); return callBooleanMethod( "isFirst", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::isLast( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::isLast" ); static jmethodID mID(NULL); return callBooleanMethod( "isLast", mID ); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::beforeFirst" ); static jmethodID mID(NULL); callVoidMethod("beforeFirst",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::afterLast( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::afterLast" ); static jmethodID mID(NULL); callVoidMethod("afterLast",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::close" ); dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::first( ) throw(SQLException, RuntimeException) { @@ -462,7 +462,7 @@ sal_Bool SAL_CALL java_sql_ResultSet::first( ) throw(SQLException, RuntimeExcep static jmethodID mID(NULL); return callBooleanMethod( "first", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::last( ) throw(SQLException, RuntimeException) { @@ -470,34 +470,34 @@ sal_Bool SAL_CALL java_sql_ResultSet::last( ) throw(SQLException, RuntimeExcept static jmethodID mID(NULL); return callBooleanMethod( "last", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::absolute" ); static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "absolute", mID,row ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::relative" ); static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "relative", mID,row ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::previous( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::previous" ); static jmethodID mID(NULL); return callBooleanMethod( "previous", mID ); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL java_sql_ResultSet::getStatement( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getStatement" ); return m_xStatement; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::rowDeleted( ) throw(SQLException, RuntimeException) { @@ -505,21 +505,21 @@ sal_Bool SAL_CALL java_sql_ResultSet::rowDeleted( ) throw(SQLException, Runtime static jmethodID mID(NULL); return callBooleanMethod( "rowDeleted", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::rowInserted( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::rowInserted" ); static jmethodID mID(NULL); return callBooleanMethod( "rowInserted", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::rowUpdated" ); static jmethodID mID(NULL); return callBooleanMethod( "rowUpdated", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { @@ -527,7 +527,7 @@ sal_Bool SAL_CALL java_sql_ResultSet::isBeforeFirst( ) throw(SQLException, Runt static jmethodID mID(NULL); return callBooleanMethod( "isBeforeFirst", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::next( ) throw(SQLException, RuntimeException) { @@ -535,7 +535,7 @@ sal_Bool SAL_CALL java_sql_ResultSet::next( ) throw(SQLException, RuntimeExcept static jmethodID mID(NULL); return callBooleanMethod( "next", mID ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -543,7 +543,7 @@ sal_Bool SAL_CALL java_sql_ResultSet::wasNull( ) throw(SQLException, RuntimeExc static jmethodID mID(NULL); return callBooleanMethod( "wasNull", mID ); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::cancel( ) throw(::com::sun::star::uno::RuntimeException) { @@ -551,15 +551,15 @@ void SAL_CALL java_sql_ResultSet::cancel( ) throw(::com::sun::star::uno::Runtim static jmethodID mID(NULL); callVoidMethod("cancel",mID); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::clearWarnings" ); static jmethodID mID(NULL); callVoidMethod("clearWarnings",mID); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Any SAL_CALL java_sql_ResultSet::getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getWarnings" ); @@ -577,7 +577,7 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc return ::com::sun::star::uno::Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -585,21 +585,21 @@ void SAL_CALL java_sql_ResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQ static jmethodID mID(NULL); callVoidMethod("insertRow",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::updateRow" ); static jmethodID mID(NULL); callVoidMethod("updateRow",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::deleteRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::deleteRow" ); static jmethodID mID(NULL); callVoidMethod("deleteRow",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::cancelRowUpdates( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -607,7 +607,7 @@ void SAL_CALL java_sql_ResultSet::cancelRowUpdates( ) throw(::com::sun::star::s static jmethodID mID(NULL); callVoidMethod("cancelRowUpdates",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -615,7 +615,7 @@ void SAL_CALL java_sql_ResultSet::moveToInsertRow( ) throw(::com::sun::star::sd static jmethodID mID(NULL); callVoidMethod("moveToInsertRow",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -623,7 +623,7 @@ void SAL_CALL java_sql_ResultSet::moveToCurrentRow( ) throw(::com::sun::star::s static jmethodID mID(NULL); callVoidMethod("moveToCurrentRow",mID); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateNull( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -631,7 +631,7 @@ void SAL_CALL java_sql_ResultSet::updateNull( sal_Int32 columnIndex ) throw(::co static jmethodID mID(NULL); callVoidMethodWithIntArg("updateNull",mID,columnIndex); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -639,14 +639,14 @@ void SAL_CALL java_sql_ResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool static jmethodID mID(NULL); callVoidMethod("updateBoolean", "(IZ)V", mID, columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::updateByte" ); static jmethodID mID(NULL); callVoidMethod("updateByte", "(IB)V", mID, columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -654,30 +654,30 @@ void SAL_CALL java_sql_ResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 static jmethodID mID(NULL); callVoidMethod("updateShort", "(IS)V", mID, columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::updateInt" ); static jmethodID mID(NULL); callVoidMethod("updateInt", "(II)V", mID, columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::updateLong" ); static jmethodID mID(NULL); callVoidMethod("updateLong", "(IJ)V", mID, columnIndex, x); } -// ------------------------------------------------------------------------- -// ----------------------------------------------------------------------- + + void SAL_CALL java_sql_ResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::updateFloat" ); static jmethodID mID(NULL); callVoidMethod("updateFloat", "(IF)V", mID, columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -685,7 +685,7 @@ void SAL_CALL java_sql_ResultSet::updateDouble( sal_Int32 columnIndex, double x static jmethodID mID(NULL); callVoidMethod("updateDouble", "(ID)V", mID, columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -713,7 +713,7 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const OUS } } } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -742,7 +742,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co } } } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -751,7 +751,7 @@ void SAL_CALL java_sql_ResultSet::updateDate( sal_Int32 columnIndex, const ::com static jmethodID mID(NULL); callVoidMethod("updateDate", "(ILjava/sql/Date;)V", mID, columnIndex, aD.getJavaObject()); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -760,7 +760,7 @@ void SAL_CALL java_sql_ResultSet::updateTime( sal_Int32 columnIndex, const ::com static jmethodID mID(NULL); callVoidMethod("updateTime", "(ILjava/sql/Time;)V", mID, columnIndex, aD.getJavaObject()); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -769,7 +769,7 @@ void SAL_CALL java_sql_ResultSet::updateTimestamp( sal_Int32 columnIndex, const static jmethodID mID(NULL); callVoidMethod("updateTimestamp", "(ILjava/sql/Timestamp;)V", mID, columnIndex, aD.getJavaObject()); } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -802,7 +802,7 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateBinaryStream", *this ); } } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::updateCharacterStream" ); @@ -834,7 +834,7 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateCharacterStream", *this ); } } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::updateObject" ); @@ -848,7 +848,7 @@ void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::c ::dbtools::throwGenericSQLException(sError,*this); } } -// ------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -892,35 +892,35 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co updateObject( columnIndex,x); } } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_ResultSet::getResultSetConcurrency() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getResultSetConcurrency" ); static jmethodID mID(NULL); return callIntMethod("getConcurrency",mID,true); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_ResultSet::getResultSetType() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getResultSetType" ); static jmethodID mID(NULL); return callIntMethod("getType",mID,true); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_ResultSet::getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getFetchDirection" ); static jmethodID mID(NULL); return callIntMethod("getFetchDirection",mID,true); } -//------------------------------------------------------------------------------ + sal_Int32 java_sql_ResultSet::getFetchSize() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getFetchSize" ); static jmethodID mID(NULL); return callIntMethod("getFetchSize",mID,true); } -//------------------------------------------------------------------------------ + OUString java_sql_ResultSet::getCursorName() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getCursorName" ); @@ -928,28 +928,28 @@ OUString java_sql_ResultSet::getCursorName() const throw(::com::sun::star::sdbc: return callStringMethod("getCursorName",mID); } -//------------------------------------------------------------------------------ + void java_sql_ResultSet::setFetchDirection(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::setFetchDirection" ); static jmethodID mID(NULL); callVoidMethodWithIntArg("setFetchDirection",mID,_par0,true); } -//------------------------------------------------------------------------------ + void SAL_CALL java_sql_ResultSet::refreshRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::refreshRow" ); static jmethodID mID(NULL); callVoidMethod("refreshRow",mID); } -//------------------------------------------------------------------------------ + void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::setFetchSize" ); static jmethodID mID(NULL); callVoidMethodWithIntArg("setFetchSize",mID,_par0,true); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* java_sql_ResultSet::createArrayHelper( ) const { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::createArrayHelper" ); @@ -964,13 +964,13 @@ void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::s return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & java_sql_ResultSet::getInfoHelper() { //SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getInfoHelper" ); return *const_cast<java_sql_ResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool java_sql_ResultSet::convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue, @@ -997,7 +997,7 @@ sal_Bool java_sql_ResultSet::convertFastPropertyValue( return bRet; } -// ------------------------------------------------------------------------- + void java_sql_ResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue @@ -1021,7 +1021,7 @@ void java_sql_ResultSet::setFastPropertyValue_NoBroadcast( ; } } -// ------------------------------------------------------------------------- + void java_sql_ResultSet::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle @@ -1053,23 +1053,23 @@ void java_sql_ResultSet::getFastPropertyValue( { } } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::acquire() throw() { java_sql_ResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL java_sql_ResultSet::release() throw() { java_sql_ResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL java_sql_ResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::getPropertySetInfo" ); return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx index b3876b187f93..2e65be4f1ebf 100644 --- a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx +++ b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx @@ -55,7 +55,7 @@ jclass java_sql_ResultSetMetaData::getMyClass() const theClass = findMyClass("java/sql/ResultSetMetaData"); return theClass; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -63,7 +63,7 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnDisplaySize( sal_Int32 c static jmethodID mID(NULL); return callIntMethodWithIntArg("getColumnDisplaySize",mID,column); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -71,7 +71,7 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnType( sal_Int32 column ) static jmethodID mID(NULL); return callIntMethodWithIntArg("getColumnType",mID,column); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { @@ -84,7 +84,7 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnCount( ) throw(SQLExcep return m_nColumnCount; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -92,14 +92,14 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "isCaseSensitive", mID,column ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_ResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getSchemaName" ); static jmethodID mID(NULL); return callStringMethodWithIntArg("getSchemaName",mID,column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_ResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -107,42 +107,42 @@ OUString SAL_CALL java_sql_ResultSetMetaData::getColumnName( sal_Int32 column ) static jmethodID mID(NULL); return callStringMethodWithIntArg("getColumnName",mID,column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_ResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getTableName" ); static jmethodID mID(NULL); return callStringMethodWithIntArg("getTableName",mID,column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_ResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getCatalogName" ); static jmethodID mID(NULL); return callStringMethodWithIntArg("getCatalogName",mID,column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_ResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnTypeName" ); static jmethodID mID(NULL); return callStringMethodWithIntArg("getColumnTypeName",mID,column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_ResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnLabel" ); static jmethodID mID(NULL); return callStringMethodWithIntArg("getColumnLabel",mID,column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL java_sql_ResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getColumnServiceName" ); static jmethodID mID(NULL); return callStringMethodWithIntArg("getColumnClassName",mID,column); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -152,7 +152,7 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCurrency( sal_Int32 column ) thr static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "isCurrency", mID,column ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -160,7 +160,7 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "isAutoIncrement", mID,column ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException) @@ -169,28 +169,28 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSigned( sal_Int32 column ) throw static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "isSigned", mID,column ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getPrecision" ); static jmethodID mID(NULL); return callIntMethodWithIntArg("getPrecision",mID,column); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::getScale" ); static jmethodID mID(NULL); return callIntMethodWithIntArg("getScale",mID,column); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL java_sql_ResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isNullable" ); static jmethodID mID(NULL); return callIntMethodWithIntArg("isNullable",mID,column); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -198,7 +198,7 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSearchable( sal_Int32 column ) t static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "isSearchable", mID,column ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -206,7 +206,7 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isReadOnly( sal_Int32 column ) thr static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "isReadOnly", mID,column ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -214,13 +214,13 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isDefinitelyWritable( sal_Int32 co static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "isDefinitelyWritable", mID,column ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL java_sql_ResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSetMetaData::isWritable" ); static jmethodID mID(NULL); return callBooleanMethodWithIntArg( "isWritable", mID,column ); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/String.cxx b/connectivity/source/drivers/jdbc/String.cxx index ce9d464ecf3e..477ab07036c2 100644 --- a/connectivity/source/drivers/jdbc/String.cxx +++ b/connectivity/source/drivers/jdbc/String.cxx @@ -41,7 +41,7 @@ jclass java_lang_String::st_getMyClass() return theClass; } -//-------------------------------------------------------------------------- + java_lang_String::operator OUString() { SDBThreadAttach t; diff --git a/connectivity/source/drivers/jdbc/Throwable.cxx b/connectivity/source/drivers/jdbc/Throwable.cxx index 90b4a015e673..6143ff7ec343 100644 --- a/connectivity/source/drivers/jdbc/Throwable.cxx +++ b/connectivity/source/drivers/jdbc/Throwable.cxx @@ -40,14 +40,14 @@ jclass java_lang_Throwable::st_getMyClass() theClass = findMyClass("java/lang/Throwable"); return theClass; } -// ----------------------------------------------------------------------------- + OUString java_lang_Throwable::getMessage() const { static jmethodID mID(NULL); return callStringMethod("getMessage",mID); } -// ----------------------------------------------------------------------------- + OUString java_lang_Throwable::getLocalizedMessage() const { diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx index c319f75679a0..20d257714514 100644 --- a/connectivity/source/drivers/jdbc/Timestamp.cxx +++ b/connectivity/source/drivers/jdbc/Timestamp.cxx @@ -68,7 +68,7 @@ jclass java_sql_Date::st_getMyClass() theClass = findMyClass("java/sql/Date"); return theClass; } -// ----------------------------------------------------------------------------- + java_sql_Date::operator ::com::sun::star::util::Date() { @@ -121,7 +121,7 @@ java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_ t.pEnv->DeleteLocalRef( tempObj ); // and clean } -// ----------------------------------------------------------------------------- + java_sql_Time::operator ::com::sun::star::util::Time() { return ::dbtools::DBTypeConversion::toTime(toString()); @@ -176,12 +176,12 @@ java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _ // and clean } -// ----------------------------------------------------------------------------- + java_sql_Timestamp::operator ::com::sun::star::util::DateTime() { return ::dbtools::DBTypeConversion::toDateTime(toString()); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx index 438bb28b3318..600294db836a 100644 --- a/connectivity/source/drivers/jdbc/jservices.cxx +++ b/connectivity/source/drivers/jdbc/jservices.cxx @@ -35,7 +35,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx index 02a8094ae36d..c443b229edcb 100644 --- a/connectivity/source/drivers/jdbc/tools.cxx +++ b/connectivity/source/drivers/jdbc/tools.cxx @@ -74,7 +74,7 @@ jclass java_util_Properties::getMyClass() const return theClass; } -//-------------------------------------------------------------------------- + java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, (jobject)NULL ) { SDBThreadAttach t; @@ -91,7 +91,7 @@ java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, (jobject) t.pEnv->DeleteLocalRef( tempObj ); } -// -------------------------------------------------------------------------------- + jstring connectivity::convertwchar_tToJavaString(JNIEnv *pEnv,const OUString& _rTemp) { OSL_ENSURE(pEnv,"Environment is NULL!"); @@ -101,7 +101,7 @@ jstring connectivity::convertwchar_tToJavaString(JNIEnv *pEnv,const OUString& _r return pStr; } -// -------------------------------------------------------------------------------- + java_util_Properties* connectivity::createStringPropertyArray(const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { java_util_Properties* pProps = new java_util_Properties(); @@ -152,7 +152,7 @@ java_util_Properties* connectivity::createStringPropertyArray(const Sequence< Pr } return pProps; } -// -------------------------------------------------------------------------------- + OUString connectivity::JavaString2String(JNIEnv *pEnv,jstring _Str) { OUString aStr; @@ -169,7 +169,7 @@ OUString connectivity::JavaString2String(JNIEnv *pEnv,jstring _Str) } return aStr; } -// -------------------------------------------------------------------------------- + jobject connectivity::convertTypeMapToJavaMap(JNIEnv* /*pEnv*/,const Reference< ::com::sun::star::container::XNameAccess > & _rMap) { if ( _rMap.is() ) @@ -180,7 +180,7 @@ jobject connectivity::convertTypeMapToJavaMap(JNIEnv* /*pEnv*/,const Reference< } return 0; } -// ----------------------------------------------------------------------------- + sal_Bool connectivity::isExceptionOccurred(JNIEnv *pEnv,sal_Bool _bClear) { if ( !pEnv ) @@ -208,7 +208,7 @@ sal_Bool connectivity::isExceptionOccurred(JNIEnv *pEnv,sal_Bool _bClear) return bRet; } -// ----------------------------------------------------------------------------- + jobject connectivity::createByteInputStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length) { SDBThreadAttach t; @@ -235,7 +235,7 @@ jobject connectivity::createByteInputStream(const ::com::sun::star::uno::Referen t.pEnv->DeleteLocalRef((jbyteArray)pByteArray); return out; } -// ----------------------------------------------------------------------------- + jobject connectivity::createCharArrayReader(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length) { SDBThreadAttach t; @@ -262,6 +262,6 @@ jobject connectivity::createCharArrayReader(const ::com::sun::star::uno::Referen t.pEnv->DeleteLocalRef((jcharArray)pCharArray); return out; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/kab/KCatalog.cxx b/connectivity/source/drivers/kab/KCatalog.cxx index a0b22b34e6e1..3eee195ee388 100644 --- a/connectivity/source/drivers/kab/KCatalog.cxx +++ b/connectivity/source/drivers/kab/KCatalog.cxx @@ -31,14 +31,14 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::cppu; -// ------------------------------------------------------------------------- + KabCatalog::KabCatalog(KabConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon), m_pConnection(_pCon), m_xMetaData(m_pConnection->getMetaData()) { } -// ------------------------------------------------------------------------- + void KabCatalog::refreshTables() { TStringVector aVector; @@ -68,19 +68,19 @@ void KabCatalog::refreshTables() else m_pTables = new KabTables(m_xMetaData,*this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void KabCatalog::refreshViews() { } -// ------------------------------------------------------------------------- + void KabCatalog::refreshGroups() { } -// ------------------------------------------------------------------------- + void KabCatalog::refreshUsers() { } -// ----------------------------------------------------------------------------- + // XTablesSupplier Reference< XNameAccess > SAL_CALL KabCatalog::getTables( ) throw(RuntimeException) diff --git a/connectivity/source/drivers/kab/KColumns.cxx b/connectivity/source/drivers/kab/KColumns.cxx index a73f813d357f..d3c0c8a891eb 100644 --- a/connectivity/source/drivers/kab/KColumns.cxx +++ b/connectivity/source/drivers/kab/KColumns.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + sdbcx::ObjectType KabColumns::createObject(const OUString& _rName) { const Any aCatalog; @@ -77,12 +77,12 @@ sdbcx::ObjectType KabColumns::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void KabColumns::impl_refresh() throw(RuntimeException) { m_pTable->refreshColumns(); } -// ------------------------------------------------------------------------- + KabColumns::KabColumns( KabTable* _pTable, ::osl::Mutex& _rMutex, const TStringVector &_rVector) diff --git a/connectivity/source/drivers/kab/KConnection.cxx b/connectivity/source/drivers/kab/KConnection.cxx index 0e0cc690083b..32d1cae21522 100644 --- a/connectivity/source/drivers/kab/KConnection.cxx +++ b/connectivity/source/drivers/kab/KConnection.cxx @@ -36,7 +36,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; IMPLEMENT_SERVICE_INFO(KabConnection, "com.sun.star.sdbc.drivers.KabConnection", "com.sun.star.sdbc.Connection") -//----------------------------------------------------------------------------- + KabConnection::KabConnection(KabDriver* _pDriver) : OMetaConnection_BASE(m_aMutex), OSubComponent<KabConnection, KabConnection_BASE>((::cppu::OWeakObject*)_pDriver, this), @@ -46,7 +46,7 @@ KabConnection::KabConnection(KabDriver* _pDriver) { m_pDriver->acquire(); } -//----------------------------------------------------------------------------- + KabConnection::~KabConnection() { if (!isClosed()) @@ -55,12 +55,12 @@ KabConnection::~KabConnection() m_pDriver->release(); m_pDriver = NULL; } -//----------------------------------------------------------------------------- + void SAL_CALL KabConnection::release() throw() { relase_ChildImpl(); } -// ----------------------------------------------------------------------------- + void KabConnection::construct(const OUString&, const Sequence< PropertyValue >&) throw(SQLException) { osl_atomic_increment( &m_refCount ); @@ -74,7 +74,7 @@ void KabConnection::construct(const OUString&, const Sequence< PropertyValue >&) osl_atomic_decrement( &m_refCount ); } // XServiceInfo -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL KabConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -86,7 +86,7 @@ Reference< XStatement > SAL_CALL KabConnection::createStatement( ) throw(SQLExc m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL KabConnection::prepareStatement( const OUString& _sSql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -98,7 +98,7 @@ Reference< XPreparedStatement > SAL_CALL KabConnection::prepareStatement( const m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL KabConnection::prepareCall( const OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -107,7 +107,7 @@ Reference< XPreparedStatement > SAL_CALL KabConnection::prepareCall( const OUStr // not implemented yet :-) a task to do return NULL; } -// -------------------------------------------------------------------------------- + OUString SAL_CALL KabConnection::nativeSQL( const OUString& _sSql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -115,14 +115,14 @@ OUString SAL_CALL KabConnection::nativeSQL( const OUString& _sSql ) throw(SQLExc return _sSql; } -// -------------------------------------------------------------------------------- + void SAL_CALL KabConnection::setAutoCommit( sal_Bool ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabConnection_BASE::rBHelper.bDisposed); // here you have to set your commit mode please have a look at the jdbc documentation to get a clear explanation } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL KabConnection::getAutoCommit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -132,7 +132,7 @@ sal_Bool SAL_CALL KabConnection::getAutoCommit( ) throw(SQLException, RuntimeEx return sal_True; } -// -------------------------------------------------------------------------------- + void SAL_CALL KabConnection::commit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -140,7 +140,7 @@ void SAL_CALL KabConnection::commit( ) throw(SQLException, RuntimeException) // when you database does support transactions you should commit here } -// -------------------------------------------------------------------------------- + void SAL_CALL KabConnection::rollback( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -148,7 +148,7 @@ void SAL_CALL KabConnection::rollback( ) throw(SQLException, RuntimeException) // same as commit but for the other case } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL KabConnection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -156,7 +156,7 @@ sal_Bool SAL_CALL KabConnection::isClosed( ) throw(SQLException, RuntimeExcepti // just simple -> we are closed when we are disposed, that means someone called dispose(); (XComponent) return KabConnection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL KabConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -173,7 +173,7 @@ Reference< XDatabaseMetaData > SAL_CALL KabConnection::getMetaData( ) throw(SQL return xMetaData; } -// -------------------------------------------------------------------------------- + void SAL_CALL KabConnection::setReadOnly( sal_Bool ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -181,7 +181,7 @@ void SAL_CALL KabConnection::setReadOnly( sal_Bool ) throw(SQLException, Runtime // set you connection to readonly } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL KabConnection::isReadOnly( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -190,7 +190,7 @@ sal_Bool SAL_CALL KabConnection::isReadOnly( ) throw(SQLException, RuntimeExcep // return if your connection to readonly return sal_False; } -// -------------------------------------------------------------------------------- + void SAL_CALL KabConnection::setCatalog( const OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -198,7 +198,7 @@ void SAL_CALL KabConnection::setCatalog( const OUString& ) throw(SQLException, R // if your database doesn't work with catalogs you go to next method otherwise you kjnow what to do } -// -------------------------------------------------------------------------------- + OUString SAL_CALL KabConnection::getCatalog( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -208,7 +208,7 @@ OUString SAL_CALL KabConnection::getCatalog( ) throw(SQLException, RuntimeExcep // return your current catalog return OUString(); } -// -------------------------------------------------------------------------------- + void SAL_CALL KabConnection::setTransactionIsolation( sal_Int32 ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -217,7 +217,7 @@ void SAL_CALL KabConnection::setTransactionIsolation( sal_Int32 ) throw(SQLExcep // set your isolation level // please have a look at @see com.sun.star.sdbc.TransactionIsolation } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -227,7 +227,7 @@ sal_Int32 SAL_CALL KabConnection::getTransactionIsolation( ) throw(SQLException // please have a look at @see com.sun.star.sdbc.TransactionIsolation return TransactionIsolation::NONE; } -// -------------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL KabConnection::getTypeMap( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -237,12 +237,12 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL KabConnection::ge return NULL; } -// -------------------------------------------------------------------------------- + void SAL_CALL KabConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& ) throw(SQLException, RuntimeException) { // the other way around } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL KabConnection::close( ) throw(SQLException, RuntimeException) { @@ -252,19 +252,19 @@ void SAL_CALL KabConnection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL KabConnection::getWarnings( ) throw(SQLException, RuntimeException) { // when you collected some warnings -> return it return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL KabConnection::clearWarnings( ) throw(SQLException, RuntimeException) { // you should clear your collected warnings here } -//------------------------------------------------------------------------------ + void KabConnection::disposing() { // we noticed that we should be destroied in near future so we have to dispose our statements @@ -289,7 +289,7 @@ void KabConnection::disposing() dispose_ChildImpl(); KabConnection_BASE::disposing(); } -// ----------------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL KabConnection::createCatalog() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -303,12 +303,12 @@ Reference< XTablesSupplier > SAL_CALL KabConnection::createCatalog() } return xTab; } -// ----------------------------------------------------------------------------- + ::KABC::AddressBook* KabConnection::getAddressBook() const { return m_pAddressBook; } -// ----------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL createKabConnection( void* _pDriver ) { KabConnection* pConnection = new KabConnection( static_cast< KabDriver* >( _pDriver ) ); diff --git a/connectivity/source/drivers/kab/KDEInit.cxx b/connectivity/source/drivers/kab/KDEInit.cxx index 83f4bd98f970..411bae233d21 100644 --- a/connectivity/source/drivers/kab/KDEInit.cxx +++ b/connectivity/source/drivers/kab/KDEInit.cxx @@ -42,11 +42,11 @@ namespace connectivity static void Shutdown(); }; - // --------------------------------------------------------------- + KApplication* KDEInit::s_pKApplication = NULL; bool KDEInit::s_bDidInsertCatalogue = false; - // --------------------------------------------------------------- + void KDEInit::Init() { // TODO: All this is not thread-safe @@ -77,7 +77,7 @@ namespace connectivity s_bDidInsertCatalogue = true; } - // --------------------------------------------------------------- + void KDEInit::Shutdown() { if ( s_bDidInsertCatalogue ) @@ -103,18 +103,18 @@ namespace } } -// ----------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL initKApplication() { ::connectivity::kab::KDEInit::Init(); } -// ----------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL shutdownKApplication() { ::connectivity::kab::KDEInit::Shutdown(); } -// ----------------------------------------------------------------------- + /** checks whether the KDE version on the system we're running at is supported by the driver diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx index 486eaff38e66..b2481c458983 100644 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx @@ -44,11 +44,11 @@ KabDatabaseMetaData::KabDatabaseMetaData(KabConnection* _pCon) m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + KabDatabaseMetaData::~KabDatabaseMetaData() { } -// ------------------------------------------------------------------------- + const OUString & KabDatabaseMetaData::getAddressBookTableName() { static const OUString aAddressBookTableName @@ -56,7 +56,7 @@ const OUString & KabDatabaseMetaData::getAddressBookTableName() return aAddressBookTableName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getCatalogSeparator( ) throw(SQLException, RuntimeException) { OUString aVal; @@ -66,73 +66,73 @@ OUString SAL_CALL KabDatabaseMetaData::getCatalogSeparator( ) throw(SQLExceptio return aVal; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException, RuntimeException) { // MaxTablesInSelect describes how many tables can participate in the FROM part of a given SELECT statement, @@ -140,63 +140,63 @@ sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxTablesInSelect( ) throw(SQLExcept sal_Int32 nValue = 1; return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { OUString aVal; @@ -205,25 +205,25 @@ OUString SAL_CALL KabDatabaseMetaData::getCatalogTerm( ) throw(SQLException, Ru } return aVal; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) { // normally this is " OUString aVal("\""); return aVal; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::isCatalogAtStart( ) throw(SQLException, RuntimeException) { sal_Bool bValue = sal_False; @@ -232,326 +232,326 @@ sal_Bool SAL_CALL KabDatabaseMetaData::isCatalogAtStart( ) throw(SQLException, } return bValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInDataManipulation( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { return sal_True; // should be supported at least } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInTableDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInDataManipulation( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxStatements( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { // for the moment, we have read-only addresses, but this might change in the future return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsConvert( sal_Int32, sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { // if someday we support more than the default address book, @@ -559,145 +559,145 @@ OUString SAL_CALL KabDatabaseMetaData::getURL( ) throw(SQLException, RuntimeExc OUString aValue( "sdbc:address:kab:" ); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { OUString aValue( "kab" ); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { OUString aValue(KAB_DRIVER_VERSION); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { return KAB_DRIVER_VERSION_MAJOR; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { return TransactionIsolation::NONE; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { return KAB_DRIVER_VERSION_MINOR; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabDatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException) { switch (setType) @@ -708,7 +708,7 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsResultSetType( sal_Int32 setType } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 ) throw(SQLException, RuntimeException) { switch (setType) @@ -719,62 +719,62 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsResultSetConcurrency( sal_Int32 s } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::ownUpdatesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::ownDeletesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::ownInsertsAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::othersUpdatesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::othersDeletesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::othersInsertsAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::updatesAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::deletesAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::insertsAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL KabDatabaseMetaData::getConnection( ) throw(SQLException, RuntimeException) { return (Reference< XConnection >) m_xConnection.get(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes); @@ -793,7 +793,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTableTypes( ) throw(SQ pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTypeInfo( ) throw(SQLException, RuntimeException) { ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo); @@ -830,24 +830,24 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTypeInfo( ) throw(SQLE pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCatalogs ); } -// ----------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eSchemas ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumnPrivileges( const Any&, const OUString&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumnPrivileges ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( const Any&, const OUString&, @@ -917,7 +917,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTables( const Any&, const OUString&, @@ -968,21 +968,21 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTables( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getProcedureColumns( const Any&, const OUString&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedureColumns ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getProcedures( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedures ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getVersionColumns( const Any&, const OUString&, const OUString& table ) throw(SQLException, RuntimeException) { @@ -1015,45 +1015,45 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getVersionColumns( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getExportedKeys( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eExportedKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getImportedKeys( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eImportedKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getPrimaryKeys( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::ePrimaryKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getIndexInfo( const Any&, const OUString&, const OUString&, sal_Bool, sal_Bool ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eIndexInfo ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getBestRowIdentifier( const Any&, const OUString&, const OUString&, sal_Int32, sal_Bool ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eBestRowIdentifier ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTablePrivileges( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCrossReference( const Any&, const OUString&, const OUString&, const Any&, @@ -1061,12 +1061,12 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCrossReference( { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCrossReference ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getUDTs( const Any&, const OUString&, const OUString&, const Sequence< sal_Int32 >& ) throw(SQLException, RuntimeException) { OSL_FAIL("Not implemented yet!"); throw SQLException(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx index 798d7405e224..ef551d500c2c 100644 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx @@ -45,7 +45,7 @@ using namespace connectivity::kab; // ======================================================================= // = KabImplModule // ======================================================================= -// -------------------------------------------------------------------------------- + KabImplModule::KabImplModule( const Reference< XComponentContext >& _rxContext ) :m_xContext(_rxContext) ,m_bAttemptedLoadModule(false) @@ -60,7 +60,7 @@ KabImplModule::KabImplModule( const Reference< XComponentContext >& _rxContext ) throw NullPointerException(); } -// -------------------------------------------------------------------------------- + bool KabImplModule::isKDEPresent() { if ( !impl_loadModule() ) @@ -69,7 +69,7 @@ bool KabImplModule::isKDEPresent() return true; } -// -------------------------------------------------------------------------------- + KabImplModule::KDEVersionType KabImplModule::matchKDEVersion() { OSL_PRECOND( m_pKDEVersionCheckFunc, "KabImplModule::matchKDEVersion: module not loaded!" ); @@ -82,7 +82,7 @@ KabImplModule::KDEVersionType KabImplModule::matchKDEVersion() return eSupported; } -// -------------------------------------------------------------------------------- + namespace { template< typename FUNCTION > @@ -108,7 +108,7 @@ namespace } } -// -------------------------------------------------------------------------------- + extern "C" { void SAL_CALL thisModule() {} } bool KabImplModule::impl_loadModule() @@ -138,7 +138,7 @@ bool KabImplModule::impl_loadModule() return true; } -// -------------------------------------------------------------------------------- + void KabImplModule::impl_unloadModule() { OSL_PRECOND( m_hConnectorModule != NULL, "KabImplModule::impl_unloadModule: no module!" ); @@ -154,7 +154,7 @@ void KabImplModule::impl_unloadModule() m_bAttemptedLoadModule = false; } -// -------------------------------------------------------------------------------- + void KabImplModule::init() { if ( !impl_loadModule() ) @@ -176,7 +176,7 @@ void KabImplModule::init() } } -// -------------------------------------------------------------------------------- + bool KabImplModule::impl_doAllowNewKDEVersion() { try @@ -206,7 +206,7 @@ bool KabImplModule::impl_doAllowNewKDEVersion() return false; } -// -------------------------------------------------------------------------------- + void KabImplModule::impl_throwNoKdeException() { ::connectivity::SharedResources aResources; @@ -216,7 +216,7 @@ void KabImplModule::impl_throwNoKdeException() impl_throwGenericSQLException( sError ); } -// -------------------------------------------------------------------------------- + void KabImplModule::impl_throwKdeTooOldException() { ::connectivity::SharedResources aResources; @@ -228,7 +228,7 @@ void KabImplModule::impl_throwKdeTooOldException() impl_throwGenericSQLException( sError ); } -// -------------------------------------------------------------------------------- + void KabImplModule::impl_throwGenericSQLException( const OUString& _rMessage ) { SQLException aError; @@ -238,7 +238,7 @@ void KabImplModule::impl_throwGenericSQLException( const OUString& _rMessage ) throw aError; } -// -------------------------------------------------------------------------------- + void KabImplModule::impl_throwKdeTooNewException() { ::connectivity::SharedResources aResources; @@ -275,7 +275,7 @@ void KabImplModule::impl_throwKdeTooNewException() throw aError; } -// -------------------------------------------------------------------------------- + KabConnection* KabImplModule::createConnection( KabDriver* _pDriver ) const { OSL_PRECOND( m_hConnectorModule, "KabImplModule::createConnection: not initialized!" ); @@ -287,7 +287,7 @@ KabConnection* KabImplModule::createConnection( KabDriver* _pDriver ) const return static_cast< KabConnection* >( pUntypedConnection ); } -// -------------------------------------------------------------------------------- + void KabImplModule::shutdown() { if ( !m_hConnectorModule ) @@ -323,7 +323,7 @@ KabDriver::KabDriver( } osl_atomic_decrement( &m_refCount ); } -// -------------------------------------------------------------------------------- + void KabDriver::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -340,12 +340,12 @@ void KabDriver::disposing() WeakComponentImplHelperBase::disposing(); } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString KabDriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString::createFromAscii( impl_getAsciiImplementationName() ); } -//------------------------------------------------------------------------------ + Sequence< OUString > KabDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { // which service is supported @@ -355,7 +355,7 @@ Sequence< OUString > KabDriver::getSupportedServiceNames_Static( ) throw (Runti return aSNS; } -//------------------------------------------------------------------ + OUString SAL_CALL KabDriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -365,12 +365,12 @@ sal_Bool SAL_CALL KabDriver::supportsService( const OUString& _rServiceName ) th { return cppu::supportsService(this, _rServiceName); } -//------------------------------------------------------------------ + Sequence< OUString > SAL_CALL KabDriver::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL KabDriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -393,7 +393,7 @@ Reference< XConnection > SAL_CALL KabDriver::connect( const OUString& url, const return xConnection; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL KabDriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { @@ -405,45 +405,45 @@ sal_Bool SAL_CALL KabDriver::acceptsURL( const OUString& url ) // here we have to look whether we support this URL format return url.startsWith("sdbc:address:kab:"); } -// -------------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL KabDriver::getPropertyInfo( const OUString&, const Sequence< PropertyValue >& ) throw(SQLException, RuntimeException) { // if you have something special to say, return it here :-) return Sequence< DriverPropertyInfo >(); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDriver::getMajorVersion( ) throw(RuntimeException) { return KAB_DRIVER_VERSION_MAJOR; } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabDriver::getMinorVersion( ) throw(RuntimeException) { return KAB_DRIVER_VERSION_MINOR; } -// -------------------------------------------------------------------------------- + void SAL_CALL KabDriver::queryTermination( const EventObject& ) throw (TerminationVetoException, RuntimeException) { // nothing to do, nothing to veto } -// -------------------------------------------------------------------------------- + void SAL_CALL KabDriver::notifyTermination( const EventObject& ) throw (RuntimeException) { m_aImplModule.shutdown(); } -// -------------------------------------------------------------------------------- + void SAL_CALL KabDriver::disposing( const EventObject& ) throw (RuntimeException) { // not interested in (this is the disposing of the desktop, if any) } -// -------------------------------------------------------------------------------- + const sal_Char* KabDriver::impl_getAsciiImplementationName() { return "com.sun.star.comp.sdbc.kab.Driver"; // this name is referenced in the configuration and in the kab.xml // Please be careful when changing it. } -// -------------------------------------------------------------------------------- + OUString KabDriver::impl_getConfigurationSettingsPath() { OUStringBuffer aPath; @@ -451,7 +451,7 @@ OUString KabDriver::impl_getConfigurationSettingsPath() aPath.appendAscii( "com.sun.star.comp.sdbc.kab.Driver" ); return aPath.makeStringAndClear(); } -// -------------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL KabDriver::Create( const Reference< XMultiServiceFactory >& _rxFactory ) throw( Exception ) { return *(new KabDriver( comphelper::getComponentContext(_rxFactory))); diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx index 85a254b6b69c..fe9fd4952cab 100644 --- a/connectivity/source/drivers/kab/KPreparedStatement.cxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.cxx @@ -32,7 +32,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::util; IMPLEMENT_SERVICE_INFO(KabPreparedStatement, "com.sun.star.sdbc.drivers.KabPreparedStatement", "com.sun.star.sdbc.PreparedStatement"); -// ------------------------------------------------------------------------- + void KabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(SQLException) { if ( !m_aParameterRow.is() ) @@ -44,7 +44,7 @@ void KabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(SQL if (nParams >= (sal_Int32) (m_aParameterRow->get()).size()) (m_aParameterRow->get()).resize(nParams); } -// ------------------------------------------------------------------------- + void KabPreparedStatement::setKabFields() const throw(SQLException) { ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns @@ -60,12 +60,12 @@ void KabPreparedStatement::setKabFields() const throw(SQLException) } m_xMetaData->setKabFields(xColumns); } -// ------------------------------------------------------------------------- + void KabPreparedStatement::resetParameters() const throw(SQLException) { m_nParameterIndex = 0; } -// ------------------------------------------------------------------------- + void KabPreparedStatement::getNextParameter(OUString &rParameter) const throw(SQLException) { if (m_nParameterIndex >= (sal_Int32) (m_aParameterRow->get()).size()) @@ -81,7 +81,7 @@ void KabPreparedStatement::getNextParameter(OUString &rParameter) const throw(SQ m_nParameterIndex++; } -// ------------------------------------------------------------------------- + KabPreparedStatement::KabPreparedStatement( KabConnection* _pConnection, const OUString& sql) @@ -92,11 +92,11 @@ KabPreparedStatement::KabPreparedStatement( m_aParameterRow() { } -// ------------------------------------------------------------------------- + KabPreparedStatement::~KabPreparedStatement() { } -// ------------------------------------------------------------------------- + void KabPreparedStatement::disposing() { KabPreparedStatement_BASE::disposing(); @@ -107,7 +107,7 @@ void KabPreparedStatement::disposing() m_aParameterRow = NULL; } } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL KabPreparedStatement::getMetaData() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -121,7 +121,7 @@ Reference< XResultSetMetaData > SAL_CALL KabPreparedStatement::getMetaData() thr Reference< XResultSetMetaData > xMetaData = m_xMetaData.get(); return xMetaData; } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::close() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -139,7 +139,7 @@ void SAL_CALL KabPreparedStatement::close() throw(SQLException, RuntimeException // Remove this Statement object from the Connection object's // list } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabPreparedStatement::execute() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -149,7 +149,7 @@ sal_Bool SAL_CALL KabPreparedStatement::execute() throw(SQLException, RuntimeExc return xRS.is(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabPreparedStatement::executeUpdate() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -158,7 +158,7 @@ sal_Int32 SAL_CALL KabPreparedStatement::executeUpdate() throw(SQLException, Run // same as in statement with the difference that this statement also can contain parameter return 0; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL KabPreparedStatement::getConnection() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -166,7 +166,7 @@ Reference< XConnection > SAL_CALL KabPreparedStatement::getConnection() throw(SQ return (Reference< XConnection >) m_pConnection; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabPreparedStatement::executeQuery() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -176,7 +176,7 @@ Reference< XResultSet > SAL_CALL KabPreparedStatement::executeQuery() throw(SQLE return rs; } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -186,7 +186,7 @@ void SAL_CALL KabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int32) (m_aParameterRow->get())[parameterIndex - 1].setNull(); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException) { @@ -194,7 +194,7 @@ void SAL_CALL KabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OU ::dbtools::throwFunctionNotSupportedException("setObjectNull", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException) { @@ -202,7 +202,7 @@ void SAL_CALL KabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLExc ::dbtools::throwFunctionNotSupportedException("setBoolean", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException) { @@ -210,7 +210,7 @@ void SAL_CALL KabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLExcept ::dbtools::throwFunctionNotSupportedException("setByte", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException) { @@ -218,7 +218,7 @@ void SAL_CALL KabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLExce ::dbtools::throwFunctionNotSupportedException("setShort", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { @@ -226,7 +226,7 @@ void SAL_CALL KabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLExcept ::dbtools::throwFunctionNotSupportedException("setInt", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException) { @@ -234,7 +234,7 @@ void SAL_CALL KabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLExcep ::dbtools::throwFunctionNotSupportedException("", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException) { @@ -242,7 +242,7 @@ void SAL_CALL KabPreparedStatement::setFloat(sal_Int32, float) throw(SQLExceptio ::dbtools::throwFunctionNotSupportedException("setFloat", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException) { @@ -250,7 +250,7 @@ void SAL_CALL KabPreparedStatement::setDouble(sal_Int32, double) throw(SQLExcept ::dbtools::throwFunctionNotSupportedException("setDouble", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setString(sal_Int32 parameterIndex, const OUString &x) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -260,7 +260,7 @@ void SAL_CALL KabPreparedStatement::setString(sal_Int32 parameterIndex, const OU (m_aParameterRow->get())[parameterIndex - 1] = x; } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException) { @@ -268,7 +268,7 @@ void SAL_CALL KabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 ::dbtools::throwFunctionNotSupportedException("setBytes", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException) { @@ -276,7 +276,7 @@ void SAL_CALL KabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLExc ::dbtools::throwFunctionNotSupportedException("setDate", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) { @@ -284,7 +284,7 @@ void SAL_CALL KabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLExc ::dbtools::throwFunctionNotSupportedException("setTime", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException) { @@ -292,7 +292,7 @@ void SAL_CALL KabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) thr ::dbtools::throwFunctionNotSupportedException("setTimestamp", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { @@ -300,7 +300,7 @@ void SAL_CALL KabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::dbtools::throwFunctionNotSupportedException("setBinaryStream", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { @@ -308,7 +308,7 @@ void SAL_CALL KabPreparedStatement::setCharacterStream(sal_Int32, const Referenc ::dbtools::throwFunctionNotSupportedException("setCharacterStream", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException) { if(!::dbtools::implSetObject(this,parameterIndex,x)) @@ -316,7 +316,7 @@ void SAL_CALL KabPreparedStatement::setObject(sal_Int32 parameterIndex, const An throw SQLException(); } } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { @@ -324,7 +324,7 @@ void SAL_CALL KabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal ::dbtools::throwFunctionNotSupportedException("setObjectWithInfo", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException) { @@ -332,7 +332,7 @@ void SAL_CALL KabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) ::dbtools::throwFunctionNotSupportedException("setRef", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException) { @@ -340,7 +340,7 @@ void SAL_CALL KabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >& ::dbtools::throwFunctionNotSupportedException("setBlob", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException) { @@ -348,7 +348,7 @@ void SAL_CALL KabPreparedStatement::setClob(sal_Int32, const Reference< XClob >& ::dbtools::throwFunctionNotSupportedException("setClob", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException) { @@ -356,12 +356,12 @@ void SAL_CALL KabPreparedStatement::setArray(sal_Int32, const Reference< XArray ::dbtools::throwFunctionNotSupportedException("setArray", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL KabPreparedStatement::clearParameters() throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException("clearParameters", NULL); } -// ------------------------------------------------------------------------- + void KabPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { switch (nHandle) diff --git a/connectivity/source/drivers/kab/KResultSet.cxx b/connectivity/source/drivers/kab/KResultSet.cxx index e797274fc143..1dbeabff6599 100644 --- a/connectivity/source/drivers/kab/KResultSet.cxx +++ b/connectivity/source/drivers/kab/KResultSet.cxx @@ -43,7 +43,7 @@ using namespace com::sun::star::io; namespace cssu = com::sun::star::util; IMPLEMENT_SERVICE_INFO(KabResultSet, "com.sun.star.sdbc.drivers.KabResultSet", "com.sun.star.sdbc.ResultSet"); -// ------------------------------------------------------------------------- + KabResultSet::KabResultSet(KabCommonStatement* pStmt) : KabResultSet_BASE(m_aMutex), OPropertySetHelper(KabResultSet_BASE::rBHelper), @@ -54,11 +54,11 @@ KabResultSet::KabResultSet(KabCommonStatement* pStmt) m_bWasNull(sal_True) { } -// ------------------------------------------------------------------------- + KabResultSet::~KabResultSet() { } -// ------------------------------------------------------------------------- + void KabResultSet::allKabAddressees() { KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get()); @@ -66,7 +66,7 @@ void KabResultSet::allKabAddressees() m_aKabAddressees = pAddressBook->allAddressees(); } -// ------------------------------------------------------------------------- + void KabResultSet::someKabAddressees(const KabCondition *pCondition) { KabConnection* pConnection = static_cast< KabConnection *>(m_xStatement->getConnection().get()); @@ -82,7 +82,7 @@ void KabResultSet::someKabAddressees(const KabCondition *pCondition) m_aKabAddressees.push_back(*iterator); } } -// ------------------------------------------------------------------------- + void KabResultSet::sortKabAddressees(const KabOrder *pOrder) { // We do not use class KAddresseeList, which has a sorting algorithm in it, because @@ -105,7 +105,7 @@ void KabResultSet::sortKabAddressees(const KabOrder *pOrder) } } } -// ------------------------------------------------------------------------- + void KabResultSet::disposing() { OPropertySetHelper::disposing(); @@ -115,7 +115,7 @@ void KabResultSet::disposing() m_xStatement.clear(); m_xMetaData.clear(); } -// ------------------------------------------------------------------------- + Any SAL_CALL KabResultSet::queryInterface(const Type & rType) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); @@ -123,17 +123,17 @@ Any SAL_CALL KabResultSet::queryInterface(const Type & rType) throw(RuntimeExcep aRet = KabResultSet_BASE::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::acquire() throw() { KabResultSet_BASE::acquire(); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::release() throw() { KabResultSet_BASE::release(); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL KabResultSet::getTypes() throw(RuntimeException) { OTypeCollection aTypes( @@ -143,12 +143,12 @@ Sequence< Type > SAL_CALL KabResultSet::getTypes() throw(RuntimeException) return comphelper::concatSequences(aTypes.getTypes(), KabResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL KabResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSet::findColumn(const OUString& columnName) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -168,7 +168,7 @@ sal_Int32 SAL_CALL KabResultSet::findColumn(const OUString& columnName) throw(SQ assert(false); return 0; // Never reached } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabResultSet::getString(sal_Int32 columnIndex) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -205,7 +205,7 @@ return aRet; m_bWasNull = true; return aRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::getBoolean(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -215,7 +215,7 @@ sal_Bool SAL_CALL KabResultSet::getBoolean(sal_Int32) throw(SQLException, Runtim return sal_False; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL KabResultSet::getByte(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -226,7 +226,7 @@ sal_Int8 SAL_CALL KabResultSet::getByte(sal_Int32) throw(SQLException, RuntimeEx sal_Int8 nRet = 0; return nRet; } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL KabResultSet::getShort(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -237,7 +237,7 @@ sal_Int16 SAL_CALL KabResultSet::getShort(sal_Int32) throw(SQLException, Runtime sal_Int16 nRet = 0; return nRet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSet::getInt(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -248,7 +248,7 @@ sal_Int32 SAL_CALL KabResultSet::getInt(sal_Int32) throw(SQLException, RuntimeEx sal_Int32 nRet = 0; return nRet; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL KabResultSet::getLong(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -258,7 +258,7 @@ sal_Int64 SAL_CALL KabResultSet::getLong(sal_Int32) throw(SQLException, RuntimeE return sal_Int64(); } -// ------------------------------------------------------------------------- + float SAL_CALL KabResultSet::getFloat(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -269,7 +269,7 @@ float SAL_CALL KabResultSet::getFloat(sal_Int32) throw(SQLException, RuntimeExce float nVal(0); return nVal; } -// ------------------------------------------------------------------------- + double SAL_CALL KabResultSet::getDouble(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -280,7 +280,7 @@ double SAL_CALL KabResultSet::getDouble(sal_Int32) throw(SQLException, RuntimeEx double nRet = 0; return nRet; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL KabResultSet::getBytes(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -290,7 +290,7 @@ Sequence< sal_Int8 > SAL_CALL KabResultSet::getBytes(sal_Int32) throw(SQLExcepti return Sequence< sal_Int8 >(); } -// ------------------------------------------------------------------------- + cssu::Date SAL_CALL KabResultSet::getDate(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -301,7 +301,7 @@ cssu::Date SAL_CALL KabResultSet::getDate(sal_Int32) throw(SQLException, Runtime cssu::Date aRet; return aRet; } -// ------------------------------------------------------------------------- + cssu::Time SAL_CALL KabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -312,7 +312,7 @@ cssu::Time SAL_CALL KabResultSet::getTime(sal_Int32) throw(SQLException, Runtime cssu::Time nRet; return nRet; } -// ------------------------------------------------------------------------- + cssu::DateTime SAL_CALL KabResultSet::getTimestamp(sal_Int32 columnIndex) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -351,7 +351,7 @@ cssu::DateTime SAL_CALL KabResultSet::getTimestamp(sal_Int32 columnIndex) throw( m_bWasNull = true; return nRet; } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL KabResultSet::getBinaryStream(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -361,7 +361,7 @@ Reference< XInputStream > SAL_CALL KabResultSet::getBinaryStream(sal_Int32) thro return NULL; } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL KabResultSet::getCharacterStream(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -371,7 +371,7 @@ Reference< XInputStream > SAL_CALL KabResultSet::getCharacterStream(sal_Int32) t return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL KabResultSet::getObject(sal_Int32, const Reference< ::com::sun::star::container::XNameAccess >&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -381,7 +381,7 @@ Any SAL_CALL KabResultSet::getObject(sal_Int32, const Reference< ::com::sun::sta return Any(); } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL KabResultSet::getRef(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -391,7 +391,7 @@ Reference< XRef > SAL_CALL KabResultSet::getRef(sal_Int32) throw(SQLException, R return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL KabResultSet::getBlob(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -401,7 +401,7 @@ Reference< XBlob > SAL_CALL KabResultSet::getBlob(sal_Int32) throw(SQLException, return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL KabResultSet::getClob(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -411,7 +411,7 @@ Reference< XClob > SAL_CALL KabResultSet::getClob(sal_Int32) throw(SQLException, return NULL; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL KabResultSet::getArray(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -421,7 +421,7 @@ Reference< XArray > SAL_CALL KabResultSet::getArray(sal_Int32) throw(SQLExceptio return NULL; } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL KabResultSet::getMetaData() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -433,7 +433,7 @@ Reference< XResultSetMetaData > SAL_CALL KabResultSet::getMetaData() throw(SQLEx Reference< XResultSetMetaData > xMetaData = m_xMetaData.get(); return xMetaData; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::isBeforeFirst() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -444,7 +444,7 @@ sal_Bool SAL_CALL KabResultSet::isBeforeFirst() throw(SQLException, RuntimeExcep return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::isAfterLast() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -456,7 +456,7 @@ sal_Bool SAL_CALL KabResultSet::isAfterLast() throw(SQLException, RuntimeExcepti return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::isFirst() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -467,7 +467,7 @@ sal_Bool SAL_CALL KabResultSet::isFirst() throw(SQLException, RuntimeException) return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::isLast() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -479,7 +479,7 @@ sal_Bool SAL_CALL KabResultSet::isLast() throw(SQLException, RuntimeException) return sal_False; } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::beforeFirst() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -488,7 +488,7 @@ void SAL_CALL KabResultSet::beforeFirst() throw(SQLException, RuntimeException) // move before the first row m_nRowPos = -1; } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::afterLast() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -498,7 +498,7 @@ void SAL_CALL KabResultSet::afterLast() throw(SQLException, RuntimeException) sal_Int32 nAddressees = m_aKabAddressees.size(); m_nRowPos = nAddressees; } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::close() throw(SQLException, RuntimeException) { { @@ -507,7 +507,7 @@ void SAL_CALL KabResultSet::close() throw(SQLException, RuntimeException) } dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::first() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -520,7 +520,7 @@ sal_Bool SAL_CALL KabResultSet::first() throw(SQLException, RuntimeException) m_nRowPos = 0; return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::last() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -533,7 +533,7 @@ sal_Bool SAL_CALL KabResultSet::last() throw(SQLException, RuntimeException) m_nRowPos = nAddressees - 1; return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSet::getRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -541,7 +541,7 @@ sal_Int32 SAL_CALL KabResultSet::getRow() throw(SQLException, RuntimeException) return m_nRowPos; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::absolute(sal_Int32 row) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -555,7 +555,7 @@ sal_Bool SAL_CALL KabResultSet::absolute(sal_Int32 row) throw(SQLException, Runt m_nRowPos = row; return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::relative(sal_Int32 row) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -563,7 +563,7 @@ sal_Bool SAL_CALL KabResultSet::relative(sal_Int32 row) throw(SQLException, Runt return absolute(m_nRowPos + row); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::next() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -571,7 +571,7 @@ sal_Bool SAL_CALL KabResultSet::next() throw(SQLException, RuntimeException) return absolute(m_nRowPos + 1); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::previous() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -579,7 +579,7 @@ sal_Bool SAL_CALL KabResultSet::previous() throw(SQLException, RuntimeException) return absolute(m_nRowPos - 1); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL KabResultSet::getStatement() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -588,7 +588,7 @@ Reference< XInterface > SAL_CALL KabResultSet::getStatement() throw(SQLException Reference< XStatement > xStatement = m_xStatement.get(); return xStatement; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::rowDeleted() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -596,7 +596,7 @@ sal_Bool SAL_CALL KabResultSet::rowDeleted() throw(SQLException, RuntimeExceptio return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::rowInserted() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -604,7 +604,7 @@ sal_Bool SAL_CALL KabResultSet::rowInserted() throw(SQLException, RuntimeExcepti return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::rowUpdated() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -612,7 +612,7 @@ sal_Bool SAL_CALL KabResultSet::rowUpdated() throw(SQLException, RuntimeExceptio return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::wasNull() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -620,22 +620,22 @@ sal_Bool SAL_CALL KabResultSet::wasNull() throw(SQLException, RuntimeException) return m_bWasNull; } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::cancel() throw(RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::clearWarnings() throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + Any SAL_CALL KabResultSet::getWarnings() throw(SQLException, RuntimeException) { return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::insertRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -643,7 +643,7 @@ void SAL_CALL KabResultSet::insertRow() throw(SQLException, RuntimeException) // you only have to implement this if you want to insert new rows } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -651,19 +651,19 @@ void SAL_CALL KabResultSet::updateRow() throw(SQLException, RuntimeException) // only when you allow updates } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::deleteRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::cancelRowUpdates() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::moveToInsertRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -671,121 +671,121 @@ void SAL_CALL KabResultSet::moveToInsertRow() throw(SQLException, RuntimeExcepti // only when you allow inserts } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::moveToCurrentRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateNull(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException) { checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ----------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateFloat(sal_Int32, float) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateDouble(sal_Int32, double) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateString(sal_Int32, const OUString&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateDate(sal_Int32, const cssu::Date&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateTime(sal_Int32, const cssu::Time&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateTimestamp(sal_Int32, const cssu::DateTime&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateBinaryStream(sal_Int32, const Reference< XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateCharacterStream(sal_Int32, const Reference< XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::refreshRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateObject(sal_Int32, const Any&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL KabResultSet::updateNumericObject(sal_Int32, const Any&, sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + // XRowLocate Any SAL_CALL KabResultSet::getBookmark() throw( SQLException, RuntimeException) { @@ -802,7 +802,7 @@ Any SAL_CALL KabResultSet::getBookmark() throw( SQLException, RuntimeException) } return Any(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::moveToBookmark(const Any& bookmark) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -824,7 +824,7 @@ sal_Bool SAL_CALL KabResultSet::moveToBookmark(const Any& bookmark) throw( SQLE } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::moveRelativeToBookmark(const Any& bookmark, sal_Int32 rows) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -845,7 +845,7 @@ sal_Bool SAL_CALL KabResultSet::moveRelativeToBookmark(const Any& bookmark, sal m_nRowPos = nRowSave; return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSet::compareBookmarks(const Any& firstItem, const Any& secondItem) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -860,12 +860,12 @@ sal_Int32 SAL_CALL KabResultSet::compareBookmarks(const Any& firstItem, const return CompareBookmark::GREATER; return CompareBookmark::EQUAL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSet::hasOrderedBookmarks() throw( SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSet::hashBookmark(const Any& bookmark) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -875,7 +875,7 @@ sal_Int32 SAL_CALL KabResultSet::hashBookmark(const Any& bookmark) throw( SQLEx return sBookmark.hashCode(); } -// ------------------------------------------------------------------------- + // XDeleteRows Sequence< sal_Int32 > SAL_CALL KabResultSet::deleteRows(const Sequence< Any >&) throw( SQLException, RuntimeException) { @@ -884,7 +884,7 @@ Sequence< sal_Int32 > SAL_CALL KabResultSet::deleteRows(const Sequence< Any >& return Sequence< sal_Int32 >(); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper* KabResultSet::createArrayHelper() const { Sequence< Property > aProps(6); @@ -899,12 +899,12 @@ IPropertyArrayHelper* KabResultSet::createArrayHelper() const return new OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper & KabResultSet::getInfoHelper() { return *static_cast<KabResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool KabResultSet::convertFastPropertyValue( Any &, Any &, @@ -927,7 +927,7 @@ sal_Bool KabResultSet::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void KabResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& ) @@ -949,7 +949,7 @@ void KabResultSet::setFastPropertyValue_NoBroadcast( ; } } -// ------------------------------------------------------------------------- + void KabResultSet::getFastPropertyValue( Any& _rValue, sal_Int32 nHandle) const @@ -967,6 +967,6 @@ void KabResultSet::getFastPropertyValue( ; } } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.cxx b/connectivity/source/drivers/kab/KResultSetMetaData.cxx index ed384ba19801..2ef79e4fd606 100644 --- a/connectivity/source/drivers/kab/KResultSetMetaData.cxx +++ b/connectivity/source/drivers/kab/KResultSetMetaData.cxx @@ -31,11 +31,11 @@ using namespace com::sun::star::sdbc; KabResultSetMetaData::KabResultSetMetaData() { } -// ------------------------------------------------------------------------- + KabResultSetMetaData::~KabResultSetMetaData() { } -// ------------------------------------------------------------------------- + void KabResultSetMetaData::setKabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException) { OSQLColumns::Vector::const_iterator aIter; @@ -51,32 +51,32 @@ void KabResultSetMetaData::setKabFields(const ::rtl::Reference<connectivity::OSQ m_aKabFields.push_back(nFieldNumber); } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSetMetaData::getColumnDisplaySize(sal_Int32 column) throw(SQLException, RuntimeException) { return m_aKabFields[column - 1] < KAB_DATA_FIELDS? 20: 50; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSetMetaData::getColumnType(sal_Int32 column) throw(SQLException, RuntimeException) { return m_aKabFields[column - 1] == KAB_FIELD_REVISION? DataType::TIMESTAMP: DataType::CHAR; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSetMetaData::getColumnCount() throw(SQLException, RuntimeException) { return m_aKabFields.size(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSetMetaData::isCaseSensitive(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabResultSetMetaData::getSchemaName(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabResultSetMetaData::getColumnName(sal_Int32 column) throw(SQLException, RuntimeException) { sal_uInt32 nFieldNumber = m_aKabFields[column - 1]; @@ -95,83 +95,83 @@ OUString SAL_CALL KabResultSetMetaData::getColumnName(sal_Int32 column) throw(SQ return aName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabResultSetMetaData::getTableName(sal_Int32) throw(SQLException, RuntimeException) { return KabDatabaseMetaData::getAddressBookTableName(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabResultSetMetaData::getCatalogName(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabResultSetMetaData::getColumnTypeName(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabResultSetMetaData::getColumnLabel(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL KabResultSetMetaData::getColumnServiceName(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSetMetaData::isCurrency(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSetMetaData::isAutoIncrement(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSetMetaData::isSigned(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSetMetaData::getPrecision(sal_Int32) throw(SQLException, RuntimeException) { return 0; } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSetMetaData::getScale(sal_Int32) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabResultSetMetaData::isNullable(sal_Int32) throw(SQLException, RuntimeException) { return (sal_Int32) sal_True; // KDE address book currently does not use NULL values. // But it might do it someday } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSetMetaData::isSearchable(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSetMetaData::isReadOnly(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSetMetaData::isDefinitelyWritable(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabResultSetMetaData::isWritable(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/kab/KServices.cxx b/connectivity/source/drivers/kab/KServices.cxx index 61cd54456ce2..dc99bce6e61f 100644 --- a/connectivity/source/drivers/kab/KServices.cxx +++ b/connectivity/source/drivers/kab/KServices.cxx @@ -36,7 +36,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -76,7 +76,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL kab_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index 99a08dd58b8e..85885cbc1f12 100644 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx @@ -58,7 +58,7 @@ namespace } IMPLEMENT_SERVICE_INFO(KabStatement, "com.sun.star.sdbc.drivers.KabStatement", "com.sun.star.sdbc.Statement"); -//------------------------------------------------------------------------------ + KabCommonStatement::KabCommonStatement(KabConnection* _pConnection ) : KabCommonStatement_BASE(m_aMutex), OPropertySetHelper(KabCommonStatement_BASE::rBHelper), @@ -70,26 +70,26 @@ KabCommonStatement::KabCommonStatement(KabConnection* _pConnection ) { m_pConnection->acquire(); } -// ----------------------------------------------------------------------------- + KabCommonStatement::~KabCommonStatement() { } -// ----------------------------------------------------------------------------- + void KabCommonStatement::disposing() { KabCommonStatement_BASE::disposing(); } -// ----------------------------------------------------------------------------- + void KabCommonStatement::resetParameters() const throw(::com::sun::star::sdbc::SQLException) { lcl_throwError(STR_PARA_ONLY_PREPARED); } -// ----------------------------------------------------------------------------- + void KabCommonStatement::getNextParameter(OUString &) const throw(::com::sun::star::sdbc::SQLException) { lcl_throwError(STR_PARA_ONLY_PREPARED); } -// ----------------------------------------------------------------------------- + KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParseNode) const throw(SQLException) { if (pParseNode->count() == 3) @@ -236,7 +236,7 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse OSL_ASSERT(false); return 0; } -// ----------------------------------------------------------------------------- + KabOrder *KabCommonStatement::analyseOrderByClause(const OSQLParseNode *pParseNode) const throw(SQLException) { if (SQL_ISRULE(pParseNode, ordering_spec_commalist)) @@ -284,7 +284,7 @@ KabOrder *KabCommonStatement::analyseOrderByClause(const OSQLParseNode *pParseNo OSL_ASSERT(false); return 0; } -//------------------------------------------------------------------------------ + sal_Bool KabCommonStatement::isTableKnown(KabResultSet *pResult) const { // can handle requests like SELECT * FROM addresses addresses @@ -297,7 +297,7 @@ sal_Bool KabCommonStatement::isTableKnown(KabResultSet *pResult) const return sal_True; } -//------------------------------------------------------------------------------ + void KabCommonStatement::setKabFields(KabResultSet *pResult) const throw(SQLException) { ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns @@ -309,7 +309,7 @@ void KabCommonStatement::setKabFields(KabResultSet *pResult) const throw(SQLExce } pResult->getKabMetaData()->setKabFields(xColumns); } -// ------------------------------------------------------------------------- + void KabCommonStatement::selectAddressees(KabResultSet *pResult) const throw(SQLException) { const OSQLParseNode *pParseNode; @@ -334,7 +334,7 @@ void KabCommonStatement::selectAddressees(KabResultSet *pResult) const throw(SQL // no WHERE clause: get all rows pResult->allKabAddressees(); } -// ------------------------------------------------------------------------- + void KabCommonStatement::sortAddressees(KabResultSet *pResult) const throw(SQLException) { const OSQLParseNode *pParseNode; @@ -351,7 +351,7 @@ void KabCommonStatement::sortAddressees(KabResultSet *pResult) const throw(SQLEx } } } -//----------------------------------------------------------------------------- + Any SAL_CALL KabCommonStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = KabCommonStatement_BASE::queryInterface(rType); @@ -359,7 +359,7 @@ Any SAL_CALL KabCommonStatement::queryInterface( const Type & rType ) throw(Runt aRet = OPropertySetHelper::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL KabCommonStatement::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), @@ -368,7 +368,7 @@ Sequence< Type > SAL_CALL KabCommonStatement::getTypes( ) throw(RuntimeExceptio return comphelper::concatSequences(aTypes.getTypes(),KabCommonStatement_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void SAL_CALL KabCommonStatement::cancel( ) throw(RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -376,7 +376,7 @@ void SAL_CALL KabCommonStatement::cancel( ) throw(RuntimeException) checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); // cancel the current sql statement } -// ------------------------------------------------------------------------- + void SAL_CALL KabCommonStatement::close( ) throw(SQLException, RuntimeException) { { @@ -386,7 +386,7 @@ void SAL_CALL KabCommonStatement::close( ) throw(SQLException, RuntimeException } dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL KabCommonStatement::execute( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -397,7 +397,7 @@ sal_Bool SAL_CALL KabCommonStatement::execute( return xRS.is(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL KabCommonStatement::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -438,7 +438,7 @@ OSL_TRACE("KDE Address book - SQL Request: %s", OUtoCStr(sql)); return xRS; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL KabCommonStatement::getConnection( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -447,7 +447,7 @@ Reference< XConnection > SAL_CALL KabCommonStatement::getConnection( ) throw(SQ // just return our connection here return (Reference< XConnection >) m_pConnection; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL KabCommonStatement::executeUpdate( const OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -456,7 +456,7 @@ sal_Int32 SAL_CALL KabCommonStatement::executeUpdate( const OUString& ) throw(SQ // the return values gives information about how many rows are affected by executing the sql statement return 0; } -// ------------------------------------------------------------------------- + Any SAL_CALL KabCommonStatement::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -464,7 +464,7 @@ Any SAL_CALL KabCommonStatement::getWarnings( ) throw(SQLException, RuntimeExce return makeAny(m_aLastWarning); } -// ------------------------------------------------------------------------- + void SAL_CALL KabCommonStatement::clearWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -472,7 +472,7 @@ void SAL_CALL KabCommonStatement::clearWarnings( ) throw(SQLException, RuntimeE m_aLastWarning = SQLWarning(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* KabCommonStatement::createArrayHelper( ) const { // this properties are defined by the service statement @@ -493,12 +493,12 @@ void SAL_CALL KabCommonStatement::clearWarnings( ) throw(SQLException, RuntimeE return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & KabCommonStatement::getInfoHelper() { return *const_cast<KabCommonStatement*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool KabCommonStatement::convertFastPropertyValue( Any &, Any &, @@ -509,7 +509,7 @@ sal_Bool KabCommonStatement::convertFastPropertyValue( // here we have to try to convert return bConverted; } -// ------------------------------------------------------------------------- + void KabCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any&) throw (Exception) { // set the value to whatever is necessary @@ -529,7 +529,7 @@ void KabCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons ; } } -// ------------------------------------------------------------------------- + void KabCommonStatement::getFastPropertyValue(Any&,sal_Int32 nHandle) const { switch (nHandle) @@ -548,22 +548,22 @@ void KabCommonStatement::getFastPropertyValue(Any&,sal_Int32 nHandle) const ; } } -// ----------------------------------------------------------------------------- + void SAL_CALL KabCommonStatement::acquire() throw() { KabCommonStatement_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL KabCommonStatement::release() throw() { KabCommonStatement_BASE::release(); } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL KabCommonStatement::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + KabStatement::KabStatement(KabConnection* _pConnection) : KabStatement_BASE(_pConnection) { diff --git a/connectivity/source/drivers/kab/KTable.cxx b/connectivity/source/drivers/kab/KTable.cxx index 0469acbc61bd..ca31e546f6d4 100644 --- a/connectivity/source/drivers/kab/KTable.cxx +++ b/connectivity/source/drivers/kab/KTable.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + KabTable::KabTable( sdbcx::OCollection* _pTables, KabConnection* _pConnection, const OUString& _Name, @@ -51,7 +51,7 @@ KabTable::KabTable( sdbcx::OCollection* _pTables, { construct(); } -// ------------------------------------------------------------------------- + void KabTable::refreshColumns() { TStringVector aVector; diff --git a/connectivity/source/drivers/kab/KTables.cxx b/connectivity/source/drivers/kab/KTables.cxx index f0ec31cad9ba..6f910d4e25ce 100644 --- a/connectivity/source/drivers/kab/KTables.cxx +++ b/connectivity/source/drivers/kab/KTables.cxx @@ -67,12 +67,12 @@ sdbcx::ObjectType KabTables::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void KabTables::impl_refresh( ) throw(RuntimeException) { static_cast<KabCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void KabTables::disposing(void) { m_xMetaData.clear(); diff --git a/connectivity/source/drivers/kab/kcondition.cxx b/connectivity/source/drivers/kab/kcondition.cxx index ab0273c7dbfc..1e69494f2a8f 100644 --- a/connectivity/source/drivers/kab/kcondition.cxx +++ b/connectivity/source/drivers/kab/kcondition.cxx @@ -24,55 +24,55 @@ using namespace ::connectivity::kab; using namespace ::com::sun::star::sdbc; -// ----------------------------------------------------------------------------- + KabCondition::~KabCondition() { } -// ----------------------------------------------------------------------------- + KabConditionConstant::KabConditionConstant(const sal_Bool bValue) : KabCondition(), m_bValue(bValue) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionConstant::isAlwaysTrue() const { return m_bValue; } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionConstant::isAlwaysFalse() const { return !m_bValue; } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionConstant::eval(const ::KABC::Addressee &) const { return m_bValue; } -// ----------------------------------------------------------------------------- + KabConditionColumn::KabConditionColumn(const OUString &sColumnName) throw(SQLException) : KabCondition(), m_nFieldNumber(findKabField(sColumnName)) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionColumn::isAlwaysTrue() const { // Sometimes true, sometimes false return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionColumn::isAlwaysFalse() const { // Sometimes true, sometimes false return sal_False; } -// ----------------------------------------------------------------------------- + KabConditionNull::KabConditionNull(const OUString &sColumnName) throw(SQLException) : KabConditionColumn(sColumnName) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionNull::eval(const ::KABC::Addressee &aAddressee) const { QString aQtName = valueOfKabField(aAddressee, m_nFieldNumber); @@ -81,12 +81,12 @@ sal_Bool KabConditionNull::eval(const ::KABC::Addressee &aAddressee) const // KDE address book currently does not use NULL values. // But it might do it someday } -// ----------------------------------------------------------------------------- + KabConditionNotNull::KabConditionNotNull(const OUString &sColumnName) throw(SQLException) : KabConditionColumn(sColumnName) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionNotNull::eval(const ::KABC::Addressee &aAddressee) const { QString aQtName = valueOfKabField(aAddressee, m_nFieldNumber); @@ -95,18 +95,18 @@ sal_Bool KabConditionNotNull::eval(const ::KABC::Addressee &aAddressee) const // KDE address book currently does not use NULL values. // But it might do it someday } -// ----------------------------------------------------------------------------- + KabConditionCompare::KabConditionCompare(const OUString &sColumnName, const OUString &sMatchString) throw(SQLException) : KabConditionColumn(sColumnName), m_sMatchString(sMatchString) { } -// ----------------------------------------------------------------------------- + KabConditionEqual::KabConditionEqual(const OUString &sColumnName, const OUString &sMatchString) throw(SQLException) : KabConditionCompare(sColumnName, sMatchString) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionEqual::eval(const ::KABC::Addressee &aAddressee) const { QString aQtName = valueOfKabField(aAddressee, m_nFieldNumber); @@ -120,12 +120,12 @@ sal_Bool KabConditionEqual::eval(const ::KABC::Addressee &aAddressee) const OUString sValue((const sal_Unicode *) aQtName.ucs2()); return sValue == m_sMatchString; } -// ----------------------------------------------------------------------------- + KabConditionDifferent::KabConditionDifferent(const OUString &sColumnName, const OUString &sMatchString) throw(SQLException) : KabConditionCompare(sColumnName, sMatchString) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionDifferent::eval(const ::KABC::Addressee &aAddressee) const { QString aQtName = valueOfKabField(aAddressee, m_nFieldNumber); @@ -135,12 +135,12 @@ sal_Bool KabConditionDifferent::eval(const ::KABC::Addressee &aAddressee) const OUString sValue((const sal_Unicode *) aQtName.ucs2()); return sValue != m_sMatchString; } -// ----------------------------------------------------------------------------- + KabConditionSimilar::KabConditionSimilar(const OUString &sColumnName, const OUString &sMatchString) throw(SQLException) : KabConditionCompare(sColumnName, sMatchString) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionSimilar::eval(const ::KABC::Addressee &aAddressee) const { QString aQtName = valueOfKabField(aAddressee, m_nFieldNumber); @@ -150,35 +150,35 @@ sal_Bool KabConditionSimilar::eval(const ::KABC::Addressee &aAddressee) const OUString sValue((const sal_Unicode *) aQtName.ucs2()); return match(m_sMatchString, sValue, '\0'); } -// ----------------------------------------------------------------------------- + KabConditionBoolean::KabConditionBoolean(KabCondition *pLeft, KabCondition *pRight) : KabCondition(), m_pLeft(pLeft), m_pRight(pRight) { } -// ----------------------------------------------------------------------------- + KabConditionBoolean::~KabConditionBoolean() { delete m_pLeft; delete m_pRight; } -// ----------------------------------------------------------------------------- + KabConditionOr::KabConditionOr(KabCondition *pLeft, KabCondition *pRight) : KabConditionBoolean(pLeft, pRight) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionOr::isAlwaysTrue() const { return m_pLeft->isAlwaysTrue() || m_pRight->isAlwaysTrue(); } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionOr::isAlwaysFalse() const { return m_pLeft->isAlwaysFalse() && m_pRight->isAlwaysFalse(); } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionOr::eval(const ::KABC::Addressee &aAddressee) const { // We avoid evaluating terms as much as we can @@ -190,22 +190,22 @@ sal_Bool KabConditionOr::eval(const ::KABC::Addressee &aAddressee) const return sal_False; } -// ----------------------------------------------------------------------------- + KabConditionAnd::KabConditionAnd(KabCondition *pLeft, KabCondition *pRight) : KabConditionBoolean(pLeft, pRight) { } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionAnd::isAlwaysTrue() const { return m_pLeft->isAlwaysTrue() && m_pRight->isAlwaysTrue(); } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionAnd::isAlwaysFalse() const { return m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse(); } -// ----------------------------------------------------------------------------- + sal_Bool KabConditionAnd::eval(const ::KABC::Addressee &aAddressee) const { // We avoid evaluating terms as much as we can diff --git a/connectivity/source/drivers/kab/kfields.cxx b/connectivity/source/drivers/kab/kfields.cxx index e1576c6a1f42..ec7d40037bd0 100644 --- a/connectivity/source/drivers/kab/kfields.cxx +++ b/connectivity/source/drivers/kab/kfields.cxx @@ -29,7 +29,7 @@ namespace connectivity { namespace kab { -// ----------------------------------------------------------------------------- + // return the value of a KDE address book field, given an addressee and a field number QString valueOfKabField(const ::KABC::Addressee &aAddressee, sal_Int32 nFieldNumber) { @@ -42,7 +42,7 @@ QString valueOfKabField(const ::KABC::Addressee &aAddressee, sal_Int32 nFieldNum return aFields[nFieldNumber - KAB_DATA_FIELDS]->value(aAddressee); } } -// ------------------------------------------------------------------------------ + // search the KDE address book field number of a given column name sal_uInt32 findKabField(const OUString& columnName) throw(SQLException) { @@ -79,7 +79,7 @@ sal_uInt32 findKabField(const OUString& columnName) throw(SQLException) OSL_ASSERT(false); return 0; } -// ------------------------------------------------------------------------------ + } } diff --git a/connectivity/source/drivers/kab/korder.cxx b/connectivity/source/drivers/kab/korder.cxx index 3a8e42fcebeb..cb9fe4494932 100644 --- a/connectivity/source/drivers/kab/korder.cxx +++ b/connectivity/source/drivers/kab/korder.cxx @@ -26,14 +26,14 @@ using namespace ::connectivity::kab; KabOrder::~KabOrder() { } -// ----------------------------------------------------------------------------- + KabSimpleOrder::KabSimpleOrder(OUString &sColumnName, sal_Bool bAscending) : KabOrder(), m_nFieldNumber(findKabField(sColumnName)), m_bAscending(bAscending) { } -// ----------------------------------------------------------------------------- + sal_Int32 KabSimpleOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const { sal_Int32 result; @@ -47,24 +47,24 @@ sal_Int32 KabSimpleOrder::compare(const ::KABC::Addressee &aAddressee1, const :: return result; } -// ----------------------------------------------------------------------------- + KabComplexOrder::KabComplexOrder() : KabOrder(), m_aOrders() { } -// ----------------------------------------------------------------------------- + KabComplexOrder::~KabComplexOrder() { for (sal_uInt32 i = 0; i < m_aOrders.size(); i++) delete m_aOrders[i]; } -// ----------------------------------------------------------------------------- + void KabComplexOrder::addOrder(KabOrder *pOrder) { m_aOrders.push_back(pOrder); } -// ----------------------------------------------------------------------------- + sal_Int32 KabComplexOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const { for (sal_uInt32 i = 0; i < m_aOrders.size(); i++) diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx b/connectivity/source/drivers/macab/MacabAddressBook.cxx index 3a61df373ab9..48559c810586 100644 --- a/connectivity/source/drivers/macab/MacabAddressBook.cxx +++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx @@ -33,7 +33,7 @@ using namespace connectivity::macab; using namespace ::com::sun::star::uno; -// ----------------------------------------------------------------------------- + MacabAddressBook::MacabAddressBook( ) { m_aAddressBook = ABGetSharedAddressBook(); @@ -41,7 +41,7 @@ MacabAddressBook::MacabAddressBook( ) m_bRetrievedGroups = sal_False; } -// ----------------------------------------------------------------------------- + MacabAddressBook::~MacabAddressBook() { if(m_xMacabRecords != NULL) @@ -62,7 +62,7 @@ MacabAddressBook::~MacabAddressBook() m_bRetrievedGroups = sal_False; } -// ----------------------------------------------------------------------------- + /* Get the address book's default table name. This is the table name that * refers to the table containing _all_ records in the address book. */ @@ -75,7 +75,7 @@ const OUString & MacabAddressBook::getDefaultTableName() return aDefaultTableName; } -// ----------------------------------------------------------------------------- + MacabRecords *MacabAddressBook::getMacabRecords() { /* If the MacabRecords don't exist, create them. */ @@ -89,7 +89,7 @@ MacabRecords *MacabAddressBook::getMacabRecords() return m_xMacabRecords; } -// ----------------------------------------------------------------------------- + /* Get the MacabRecords for a given name: either a group name or the * default table name. */ @@ -105,7 +105,7 @@ MacabRecords *MacabAddressBook::getMacabRecords(const OUString _tableName) } } -// ----------------------------------------------------------------------------- + MacabRecords *MacabAddressBook::getMacabRecordsMatch(const OUString _tableName) { if(match(_tableName, getDefaultTableName(), '\0')) @@ -116,7 +116,7 @@ MacabRecords *MacabAddressBook::getMacabRecordsMatch(const OUString _tableName) return getMacabGroupMatch(_tableName); } -// ----------------------------------------------------------------------------- + ::std::vector<MacabGroup *> MacabAddressBook::getMacabGroups() { /* If the MacabGroups haven't been created yet, create them. */ @@ -154,7 +154,7 @@ MacabRecords *MacabAddressBook::getMacabRecordsMatch(const OUString _tableName) return m_xMacabGroups; } -// ----------------------------------------------------------------------------- + MacabGroup *MacabAddressBook::getMacabGroup(OUString _groupName) { // initialize groups if not already initialized @@ -178,7 +178,7 @@ MacabGroup *MacabAddressBook::getMacabGroup(OUString _groupName) return NULL; } -// ----------------------------------------------------------------------------- + MacabGroup *MacabAddressBook::getMacabGroupMatch(OUString _groupName) { // initialize groups if not already initialized @@ -202,7 +202,7 @@ MacabGroup *MacabAddressBook::getMacabGroupMatch(OUString _groupName) return NULL; } -// ------------------------------------------------------------------------- + void MacabAddressBook::manageDuplicateGroups(::std::vector<MacabGroup *> _xGroups) const { /* If we have two cases of groups, say, family, this makes it: diff --git a/connectivity/source/drivers/macab/MacabCatalog.cxx b/connectivity/source/drivers/macab/MacabCatalog.cxx index 17e7ed69cd35..62589d7a1261 100644 --- a/connectivity/source/drivers/macab/MacabCatalog.cxx +++ b/connectivity/source/drivers/macab/MacabCatalog.cxx @@ -31,14 +31,14 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::cppu; -// ------------------------------------------------------------------------- + MacabCatalog::MacabCatalog(MacabConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon), m_pConnection(_pCon), m_xMetaData(m_pConnection->getMetaData()) { } -// ------------------------------------------------------------------------- + void MacabCatalog::refreshTables() { TStringVector aVector; @@ -69,25 +69,25 @@ void MacabCatalog::refreshTables() else m_pTables = new MacabTables(m_xMetaData,*this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void MacabCatalog::refreshViews() { } -// ------------------------------------------------------------------------- + void MacabCatalog::refreshGroups() { } -// ------------------------------------------------------------------------- + void MacabCatalog::refreshUsers() { } -// ------------------------------------------------------------------------- + const OUString& MacabCatalog::getDot() { static const OUString sDot = "."; return sDot; } -// ----------------------------------------------------------------------------- + // XTablesSupplier Reference< XNameAccess > SAL_CALL MacabCatalog::getTables( ) throw(RuntimeException) diff --git a/connectivity/source/drivers/macab/MacabColumns.cxx b/connectivity/source/drivers/macab/MacabColumns.cxx index 38d6e5606051..713ff04396e3 100644 --- a/connectivity/source/drivers/macab/MacabColumns.cxx +++ b/connectivity/source/drivers/macab/MacabColumns.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + sdbcx::ObjectType MacabColumns::createObject(const OUString& _rName) { const Any aCatalog; @@ -77,12 +77,12 @@ sdbcx::ObjectType MacabColumns::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void MacabColumns::impl_refresh() throw(RuntimeException) { m_pTable->refreshColumns(); } -// ------------------------------------------------------------------------- + MacabColumns::MacabColumns( MacabTable* _pTable, ::osl::Mutex& _rMutex, const TStringVector &_rVector) diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx index 6932f5aea724..28bcb7c3675d 100644 --- a/connectivity/source/drivers/macab/MacabConnection.cxx +++ b/connectivity/source/drivers/macab/MacabConnection.cxx @@ -36,7 +36,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; IMPLEMENT_SERVICE_INFO(MacabConnection, "com.sun.star.sdbc.drivers.MacabConnection", "com.sun.star.sdbc.Connection") -//----------------------------------------------------------------------------- + MacabConnection::MacabConnection(MacabDriver* _pDriver) : OSubComponent<MacabConnection, MacabConnection_BASE>((::cppu::OWeakObject*)_pDriver, this), m_pAddressBook(NULL), @@ -44,7 +44,7 @@ MacabConnection::MacabConnection(MacabDriver* _pDriver) { m_pDriver->acquire(); } -//----------------------------------------------------------------------------- + MacabConnection::~MacabConnection() { if (!isClosed()) @@ -53,12 +53,12 @@ MacabConnection::~MacabConnection() m_pDriver->release(); m_pDriver = NULL; } -//----------------------------------------------------------------------------- + void SAL_CALL MacabConnection::release() throw() { relase_ChildImpl(); } -// ----------------------------------------------------------------------------- + void MacabConnection::construct(const OUString&, const Sequence< PropertyValue >&) throw(SQLException) { osl_atomic_increment( &m_refCount ); @@ -69,7 +69,7 @@ void MacabConnection::construct(const OUString&, const Sequence< PropertyValue > osl_atomic_decrement( &m_refCount ); } // XServiceInfo -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL MacabConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -81,7 +81,7 @@ Reference< XStatement > SAL_CALL MacabConnection::createStatement( ) throw(SQLE m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareStatement( const OUString& _sSql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -93,7 +93,7 @@ Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareStatement( cons m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareCall( const OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -102,7 +102,7 @@ Reference< XPreparedStatement > SAL_CALL MacabConnection::prepareCall( const OUS // not implemented yet :-) a task to do return NULL; } -// -------------------------------------------------------------------------------- + OUString SAL_CALL MacabConnection::nativeSQL( const OUString& _sSql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -110,14 +110,14 @@ OUString SAL_CALL MacabConnection::nativeSQL( const OUString& _sSql ) throw(SQLE return _sSql; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setAutoCommit( sal_Bool ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabConnection_BASE::rBHelper.bDisposed); // here you have to set your commit mode please have a look at the jdbc documentation to get a clear explanation } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabConnection::getAutoCommit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -127,7 +127,7 @@ sal_Bool SAL_CALL MacabConnection::getAutoCommit( ) throw(SQLException, Runtime return sal_True; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::commit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -135,7 +135,7 @@ void SAL_CALL MacabConnection::commit( ) throw(SQLException, RuntimeException) // when you database does support transactions you should commit here } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::rollback( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -143,7 +143,7 @@ void SAL_CALL MacabConnection::rollback( ) throw(SQLException, RuntimeException // same as commit but for the other case } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabConnection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -151,7 +151,7 @@ sal_Bool SAL_CALL MacabConnection::isClosed( ) throw(SQLException, RuntimeExcep // just simple -> we are closed when we are disposed, that means someone called dispose(); (XComponent) return MacabConnection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL MacabConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -168,7 +168,7 @@ Reference< XDatabaseMetaData > SAL_CALL MacabConnection::getMetaData( ) throw(S return xMetaData; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setReadOnly( sal_Bool ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -176,7 +176,7 @@ void SAL_CALL MacabConnection::setReadOnly( sal_Bool ) throw(SQLException, Runti // set you connection to readonly } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabConnection::isReadOnly( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -185,7 +185,7 @@ sal_Bool SAL_CALL MacabConnection::isReadOnly( ) throw(SQLException, RuntimeExc // return if your connection to readonly return sal_False; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setCatalog( const OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -193,7 +193,7 @@ void SAL_CALL MacabConnection::setCatalog( const OUString& ) throw(SQLException, // if your database doesn't work with catalogs you go to next method otherwise you kjnow what to do } -// -------------------------------------------------------------------------------- + OUString SAL_CALL MacabConnection::getCatalog( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -203,7 +203,7 @@ OUString SAL_CALL MacabConnection::getCatalog( ) throw(SQLException, RuntimeExc // return your current catalog return OUString(); } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setTransactionIsolation( sal_Int32 ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -212,7 +212,7 @@ void SAL_CALL MacabConnection::setTransactionIsolation( sal_Int32 ) throw(SQLExc // set your isolation level // please have a look at @see com.sun.star.sdbc.TransactionIsolation } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -222,7 +222,7 @@ sal_Int32 SAL_CALL MacabConnection::getTransactionIsolation( ) throw(SQLExcepti // please have a look at @see com.sun.star.sdbc.TransactionIsolation return TransactionIsolation::NONE; } -// -------------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL MacabConnection::getTypeMap( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -232,12 +232,12 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL MacabConnection:: return NULL; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& ) throw(SQLException, RuntimeException) { // the other way around } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL MacabConnection::close( ) throw(SQLException, RuntimeException) { @@ -247,19 +247,19 @@ void SAL_CALL MacabConnection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL MacabConnection::getWarnings( ) throw(SQLException, RuntimeException) { // when you collected some warnings -> return it return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabConnection::clearWarnings( ) throw(SQLException, RuntimeException) { // you should clear your collected warnings here } -//------------------------------------------------------------------------------ + void MacabConnection::disposing() { // we noticed that we should be destroied in near future so we have to dispose our statements @@ -284,7 +284,7 @@ void MacabConnection::disposing() dispose_ChildImpl(); MacabConnection_BASE::disposing(); } -// ----------------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL MacabConnection::createCatalog() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -298,12 +298,12 @@ Reference< XTablesSupplier > SAL_CALL MacabConnection::createCatalog() } return xTab; } -// ----------------------------------------------------------------------------- + MacabAddressBook* MacabConnection::getAddressBook() const { return m_pAddressBook; } -// ----------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL createMacabConnection( void* _pDriver ) { MacabConnection* pConnection = new MacabConnection( static_cast< MacabDriver* >( _pDriver ) ); diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index a832c33faec7..ead208d0871f 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx @@ -49,11 +49,11 @@ MacabDatabaseMetaData::MacabDatabaseMetaData(MacabConnection* _pCon) m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + MacabDatabaseMetaData::~MacabDatabaseMetaData() { } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getCatalogSeparator( ) throw(SQLException, RuntimeException) { OUString aVal; @@ -63,73 +63,73 @@ OUString SAL_CALL MacabDatabaseMetaData::getCatalogSeparator( ) throw(SQLExcept return aVal; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException, RuntimeException) { // MaxTablesInSelect describes how many tables can participate in the FROM part of a given SELECT statement, @@ -137,63 +137,63 @@ sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxTablesInSelect( ) throw(SQLExce sal_Int32 nValue = 1; return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { OUString aVal; @@ -202,25 +202,25 @@ OUString SAL_CALL MacabDatabaseMetaData::getCatalogTerm( ) throw(SQLException, } return aVal; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) { // normally this is " OUString aVal("\""); return aVal; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::isCatalogAtStart( ) throw(SQLException, RuntimeException) { sal_Bool bValue = sal_False; @@ -229,326 +229,326 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::isCatalogAtStart( ) throw(SQLException } return bValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInDataManipulation( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { return sal_True; // should be supported at least } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInTableDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInDataManipulation( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxStatements( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { // for the moment, we have read-only addresses, but this might change in the future return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsConvert( sal_Int32, sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { // if someday we support more than the default address book, @@ -556,145 +556,145 @@ OUString SAL_CALL MacabDatabaseMetaData::getURL( ) throw(SQLException, RuntimeE OUString aValue( "sdbc:address:macab:" ); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { OUString aValue( "macab" ); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { OUString aValue(MACAB_DRIVER_VERSION); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { return MACAB_DRIVER_VERSION_MAJOR; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { return TransactionIsolation::NONE; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { return MACAB_DRIVER_VERSION_MINOR; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabDatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException) { switch (setType) @@ -705,7 +705,7 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsResultSetType( sal_Int32 setTyp } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 ) throw(SQLException, RuntimeException) { switch (setType) @@ -716,62 +716,62 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsResultSetConcurrency( sal_Int32 } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::ownUpdatesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::ownDeletesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::ownInsertsAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::othersUpdatesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::othersDeletesAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::othersInsertsAreVisible( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::updatesAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::deletesAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::insertsAreDetected( sal_Int32 ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL MacabDatabaseMetaData::getConnection( ) throw(SQLException, RuntimeException) { return (Reference< XConnection >) m_xConnection.get(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTableTypes); @@ -790,7 +790,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) throw( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTypeInfo( ) throw(SQLException, RuntimeException) { ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTypeInfo); @@ -846,24 +846,24 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTypeInfo( ) throw(SQ pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCatalogs ); } -// ----------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eSchemas ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumnPrivileges( const Any&, const OUString&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumnPrivileges ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( const Any&, const OUString&, @@ -950,7 +950,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( const Any&, const OUString&, @@ -1012,21 +1012,21 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getProcedureColumns( const Any&, const OUString&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedureColumns ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getProcedures( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedures ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns( const Any&, const OUString&, const OUString& table ) throw(SQLException, RuntimeException) { @@ -1057,45 +1057,45 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getExportedKeys( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eExportedKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getImportedKeys( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eImportedKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getPrimaryKeys( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::ePrimaryKeys ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getIndexInfo( const Any&, const OUString&, const OUString&, sal_Bool, sal_Bool ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eIndexInfo ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getBestRowIdentifier( const Any&, const OUString&, const OUString&, sal_Int32, sal_Bool ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eBestRowIdentifier ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTablePrivileges( const Any&, const OUString&, const OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCrossReference( const Any&, const OUString&, const OUString&, const Any&, @@ -1103,12 +1103,12 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCrossReference( { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCrossReference ); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getUDTs( const Any&, const OUString&, const OUString&, const Sequence< sal_Int32 >& ) throw(SQLException, RuntimeException) { OSL_FAIL("Not implemented yet!"); throw SQLException(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx index b08e754a7e20..7a23ae394129 100644 --- a/connectivity/source/drivers/macab/MacabDriver.cxx +++ b/connectivity/source/drivers/macab/MacabDriver.cxx @@ -41,7 +41,7 @@ using namespace connectivity::macab; // ======================================================================= // = MacabImplModule // ======================================================================= -// -------------------------------------------------------------------------------- + MacabImplModule::MacabImplModule() :m_bAttemptedLoadModule(false) ,m_hConnectorModule(NULL) @@ -49,13 +49,13 @@ MacabImplModule::MacabImplModule() { } -// -------------------------------------------------------------------------------- + bool MacabImplModule::isMacOSPresent() { return impl_loadModule(); } -// -------------------------------------------------------------------------------- + namespace { template< typename FUNCTION > @@ -78,7 +78,7 @@ namespace } } -// -------------------------------------------------------------------------------- + extern "C" { static void SAL_CALL thisModule() {} } bool MacabImplModule::impl_loadModule() @@ -105,7 +105,7 @@ bool MacabImplModule::impl_loadModule() return true; } -// -------------------------------------------------------------------------------- + void MacabImplModule::impl_unloadModule() { OSL_PRECOND( m_hConnectorModule != NULL, "MacabImplModule::impl_unloadModule: no module!" ); @@ -118,7 +118,7 @@ void MacabImplModule::impl_unloadModule() m_bAttemptedLoadModule = false; } -// -------------------------------------------------------------------------------- + void MacabImplModule::init() { if ( !impl_loadModule() ) @@ -126,7 +126,7 @@ void MacabImplModule::init() } -// -------------------------------------------------------------------------------- + void MacabImplModule::impl_throwNoMacOSException() { ::connectivity::SharedResources aResources; @@ -136,7 +136,7 @@ void MacabImplModule::impl_throwNoMacOSException() impl_throwGenericSQLException( sError ); } -// -------------------------------------------------------------------------------- + void MacabImplModule::impl_throwGenericSQLException( const OUString& _rMessage ) { SQLException aError; @@ -146,7 +146,7 @@ void MacabImplModule::impl_throwGenericSQLException( const OUString& _rMessage ) throw aError; } -// -------------------------------------------------------------------------------- + MacabConnection* MacabImplModule::createConnection( MacabDriver* _pDriver ) const { OSL_PRECOND( m_hConnectorModule, "MacabImplModule::createConnection: not initialized!" ); @@ -158,7 +158,7 @@ MacabConnection* MacabImplModule::createConnection( MacabDriver* _pDriver ) cons return static_cast< MacabConnection* >( pUntypedConnection ); } -// -------------------------------------------------------------------------------- + void MacabImplModule::shutdown() { if ( !m_hConnectorModule ) @@ -191,7 +191,7 @@ MacabDriver::MacabDriver( } osl_atomic_decrement( &m_refCount ); } -// -------------------------------------------------------------------------------- + void MacabDriver::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -208,12 +208,12 @@ void MacabDriver::disposing() WeakComponentImplHelperBase::disposing(); } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString MacabDriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString::createFromAscii( impl_getAsciiImplementationName() ); } -//------------------------------------------------------------------------------ + Sequence< OUString > MacabDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { // which service is supported @@ -223,7 +223,7 @@ Sequence< OUString > MacabDriver::getSupportedServiceNames_Static( ) throw (Run return aSNS; } -//------------------------------------------------------------------ + OUString SAL_CALL MacabDriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -233,12 +233,12 @@ sal_Bool SAL_CALL MacabDriver::supportsService( const OUString& _rServiceName ) { return cppu::supportsService(this, _rServiceName); } -//------------------------------------------------------------------ + Sequence< OUString > SAL_CALL MacabDriver::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL MacabDriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -261,7 +261,7 @@ Reference< XConnection > SAL_CALL MacabDriver::connect( const OUString& url, con return xConnection; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabDriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { @@ -273,45 +273,45 @@ sal_Bool SAL_CALL MacabDriver::acceptsURL( const OUString& url ) // here we have to look whether we support this URL format return url.equals("sdbc:address:macab"); } -// -------------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL MacabDriver::getPropertyInfo( const OUString&, const Sequence< PropertyValue >& ) throw(SQLException, RuntimeException) { // if you have something special to say, return it here :-) return Sequence< DriverPropertyInfo >(); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDriver::getMajorVersion( ) throw(RuntimeException) { return MACAB_DRIVER_VERSION_MAJOR; } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabDriver::getMinorVersion( ) throw(RuntimeException) { return MACAB_DRIVER_VERSION_MINOR; } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabDriver::queryTermination( const EventObject& ) throw (TerminationVetoException, RuntimeException) { // nothing to do, nothing to veto } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabDriver::notifyTermination( const EventObject& ) throw (RuntimeException) { m_aImplModule.shutdown(); } -// -------------------------------------------------------------------------------- + void SAL_CALL MacabDriver::disposing( const EventObject& ) throw (RuntimeException) { // not interested in (this is the disposing of the desktop, if any) } -// -------------------------------------------------------------------------------- + const sal_Char* MacabDriver::impl_getAsciiImplementationName() { return "com.sun.star.comp.sdbc.macab.Driver"; // this name is referenced in the configuration and in the macab.xml // Please be careful when changing it. } -// -------------------------------------------------------------------------------- + OUString MacabDriver::impl_getConfigurationSettingsPath() { OUStringBuffer aPath; @@ -319,7 +319,7 @@ OUString MacabDriver::impl_getConfigurationSettingsPath() aPath.appendAscii( "com.sun.star.comp.sdbc.macab.Driver" ); return aPath.makeStringAndClear(); } -// -------------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL MacabDriver::Create( const Reference< XMultiServiceFactory >& _rxFactory ) throw( Exception ) { return *(new MacabDriver(comphelper::getComponentContext(_rxFactory))); diff --git a/connectivity/source/drivers/macab/MacabGroup.cxx b/connectivity/source/drivers/macab/MacabGroup.cxx index a169c302f331..8911550b14d5 100644 --- a/connectivity/source/drivers/macab/MacabGroup.cxx +++ b/connectivity/source/drivers/macab/MacabGroup.cxx @@ -24,7 +24,7 @@ using namespace connectivity::macab; -// ------------------------------------------------------------------------- + /* A MacabGroup is basically a MacabRecords with a different constructor. * It only exists as a different entity for clarification purposes (a group * is its own entity in the Mac OS X Address Book) and because its diff --git a/connectivity/source/drivers/macab/MacabHeader.cxx b/connectivity/source/drivers/macab/MacabHeader.cxx index 419e35101e14..6d0eb20005eb 100644 --- a/connectivity/source/drivers/macab/MacabHeader.cxx +++ b/connectivity/source/drivers/macab/MacabHeader.cxx @@ -31,7 +31,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::util; using namespace ::dbtools; -// ------------------------------------------------------------------------- + MacabHeader::MacabHeader(const sal_Int32 _size, macabfield **_fields) { sal_Int32 i; @@ -58,19 +58,19 @@ MacabHeader::MacabHeader(const sal_Int32 _size, macabfield **_fields) } -// ------------------------------------------------------------------------- + MacabHeader::MacabHeader() { size = 0; fields = NULL; } -// ------------------------------------------------------------------------- + MacabHeader::~MacabHeader() { } -// ------------------------------------------------------------------------- + void MacabHeader::operator+= (const MacabHeader *r) { /* Add one MacabHeader to another. Anything not already in the header is @@ -139,7 +139,7 @@ void MacabHeader::operator+= (const MacabHeader *r) } } -// ------------------------------------------------------------------------- + OUString MacabHeader::getString(const sal_Int32 i) const { OUString nRet; @@ -158,13 +158,13 @@ OUString MacabHeader::getString(const sal_Int32 i) const return nRet; } -// ------------------------------------------------------------------------- + void MacabHeader::sortRecord() { sortRecord(0,size); } -// ------------------------------------------------------------------------- + macabfield **MacabHeader::sortRecord(const sal_Int32 _start, const sal_Int32 _length) { /* Sort using mergesort. Because it uses mergesort, it is recursive and @@ -263,7 +263,7 @@ sal_Int32 MacabHeader::compareFields(const macabfield *_field1, const macabfield return (sal_Int32) result; } -// ------------------------------------------------------------------------- + sal_Int32 MacabHeader::getColumnNumber(const OUString s) const { sal_Int32 i; @@ -279,18 +279,18 @@ sal_Int32 MacabHeader::getColumnNumber(const OUString s) const return i; } -// ------------------------------------------------------------------------- + MacabHeader *MacabHeader::begin() { return this; } -// ------------------------------------------------------------------------- + MacabHeader::iterator::iterator () { } -// ------------------------------------------------------------------------- + MacabHeader::iterator::~iterator () { } @@ -302,31 +302,31 @@ MacabHeader::iterator& MacabHeader::iterator::operator= (MacabHeader *_record) return *this; } -// ------------------------------------------------------------------------- + void MacabHeader::iterator::operator++ () { id++; } -// ------------------------------------------------------------------------- + sal_Bool MacabHeader::iterator::operator!= (const sal_Int32 i) const { return(id != i); } -// ------------------------------------------------------------------------- + sal_Bool MacabHeader::iterator::operator== (const sal_Int32 i) const { return(id == i); } -// ------------------------------------------------------------------------- + macabfield *MacabHeader::iterator::operator* () const { return record->get(id); } -// ------------------------------------------------------------------------- + sal_Int32 MacabHeader::end() const { return size; diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx index 1072dacb4ac8..5f1924c759ea 100644 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx @@ -33,7 +33,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::util; IMPLEMENT_SERVICE_INFO(MacabPreparedStatement, "com.sun.star.sdbc.drivers.MacabPreparedStatement", "com.sun.star.sdbc.PreparedStatement"); -// ------------------------------------------------------------------------- + void MacabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(SQLException) { if ( !m_aParameterRow.is() ) @@ -45,7 +45,7 @@ void MacabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(S if (nParams >= (sal_Int32) (m_aParameterRow->get()).size()) (m_aParameterRow->get()).resize(nParams); } -// ------------------------------------------------------------------------- + void MacabPreparedStatement::setMacabFields() const throw(SQLException) { ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns @@ -61,12 +61,12 @@ void MacabPreparedStatement::setMacabFields() const throw(SQLException) } m_xMetaData->setMacabFields(xColumns); } -// ------------------------------------------------------------------------- + void MacabPreparedStatement::resetParameters() const throw(SQLException) { m_nParameterIndex = 0; } -// ------------------------------------------------------------------------- + void MacabPreparedStatement::getNextParameter(OUString &rParameter) const throw(SQLException) { if (m_nParameterIndex >= (sal_Int32) (m_aParameterRow->get()).size()) @@ -82,7 +82,7 @@ void MacabPreparedStatement::getNextParameter(OUString &rParameter) const throw( m_nParameterIndex++; } -// ------------------------------------------------------------------------- + MacabPreparedStatement::MacabPreparedStatement( MacabConnection* _pConnection, const OUString& sql) @@ -94,11 +94,11 @@ MacabPreparedStatement::MacabPreparedStatement( { } -// ------------------------------------------------------------------------- + MacabPreparedStatement::~MacabPreparedStatement() { } -// ------------------------------------------------------------------------- + void MacabPreparedStatement::disposing() { MacabPreparedStatement_BASE::disposing(); @@ -109,7 +109,7 @@ void MacabPreparedStatement::disposing() m_aParameterRow = NULL; } } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL MacabPreparedStatement::getMetaData() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -134,7 +134,7 @@ Reference< XResultSetMetaData > SAL_CALL MacabPreparedStatement::getMetaData() t Reference< XResultSetMetaData > xMetaData = m_xMetaData.get(); return xMetaData; } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::close() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -152,7 +152,7 @@ void SAL_CALL MacabPreparedStatement::close() throw(SQLException, RuntimeExcepti // Remove this Statement object from the Connection object's // list } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabPreparedStatement::execute() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -162,7 +162,7 @@ sal_Bool SAL_CALL MacabPreparedStatement::execute() throw(SQLException, RuntimeE return xRS.is(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabPreparedStatement::executeUpdate() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -171,7 +171,7 @@ sal_Int32 SAL_CALL MacabPreparedStatement::executeUpdate() throw(SQLException, R // same as in statement with the difference that this statement also can contain parameter return 0; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL MacabPreparedStatement::getConnection() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -179,7 +179,7 @@ Reference< XConnection > SAL_CALL MacabPreparedStatement::getConnection() throw( return (Reference< XConnection >) m_pConnection; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabPreparedStatement::executeQuery() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -189,7 +189,7 @@ Reference< XResultSet > SAL_CALL MacabPreparedStatement::executeQuery() throw(SQ return rs; } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -199,7 +199,7 @@ void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int3 (m_aParameterRow->get())[parameterIndex - 1].setNull(); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException) { @@ -207,7 +207,7 @@ void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const ::dbtools::throwFunctionNotSupportedException("setObjectNull", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException) { @@ -215,7 +215,7 @@ void SAL_CALL MacabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLE ::dbtools::throwFunctionNotSupportedException("setBoolean", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException) { @@ -223,7 +223,7 @@ void SAL_CALL MacabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLExce ::dbtools::throwFunctionNotSupportedException("setByte", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException) { @@ -231,7 +231,7 @@ void SAL_CALL MacabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLEx ::dbtools::throwFunctionNotSupportedException("setShort", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { @@ -239,7 +239,7 @@ void SAL_CALL MacabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLExce ::dbtools::throwFunctionNotSupportedException("setInt", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException) { @@ -247,7 +247,7 @@ void SAL_CALL MacabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLExc ::dbtools::throwFunctionNotSupportedException("setLong", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException) { @@ -255,7 +255,7 @@ void SAL_CALL MacabPreparedStatement::setFloat(sal_Int32, float) throw(SQLExcept ::dbtools::throwFunctionNotSupportedException("setFloat", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException) { @@ -263,7 +263,7 @@ void SAL_CALL MacabPreparedStatement::setDouble(sal_Int32, double) throw(SQLExce ::dbtools::throwFunctionNotSupportedException("setDouble", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const OUString &x) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -273,7 +273,7 @@ void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const (m_aParameterRow->get())[parameterIndex - 1] = x; } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException) { @@ -281,7 +281,7 @@ void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_In ::dbtools::throwFunctionNotSupportedException("setBytes", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException) { @@ -289,7 +289,7 @@ void SAL_CALL MacabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLE ::dbtools::throwFunctionNotSupportedException("setDate", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) { @@ -297,7 +297,7 @@ void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLE ::dbtools::throwFunctionNotSupportedException("setTime", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException) { @@ -305,7 +305,7 @@ void SAL_CALL MacabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) t ::dbtools::throwFunctionNotSupportedException("setTimestamp", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { @@ -313,7 +313,7 @@ void SAL_CALL MacabPreparedStatement::setBinaryStream(sal_Int32, const Reference ::dbtools::throwFunctionNotSupportedException("setBinaryStream", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { @@ -321,7 +321,7 @@ void SAL_CALL MacabPreparedStatement::setCharacterStream(sal_Int32, const Refere ::dbtools::throwFunctionNotSupportedException("setCharacterStream", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException) { if(!::dbtools::implSetObject(this,parameterIndex,x)) @@ -333,7 +333,7 @@ void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const ::dbtools::throwGenericSQLException(sError,*this); } } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { @@ -341,7 +341,7 @@ void SAL_CALL MacabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, s ::dbtools::throwFunctionNotSupportedException("setObjectWithInfo", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException) { @@ -349,7 +349,7 @@ void SAL_CALL MacabPreparedStatement::setRef(sal_Int32, const Reference< XRef >& ::dbtools::throwFunctionNotSupportedException("setRef", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException) { @@ -357,7 +357,7 @@ void SAL_CALL MacabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob ::dbtools::throwFunctionNotSupportedException("setBlob", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException) { @@ -365,7 +365,7 @@ void SAL_CALL MacabPreparedStatement::setClob(sal_Int32, const Reference< XClob ::dbtools::throwFunctionNotSupportedException("setClob", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException) { @@ -373,12 +373,12 @@ void SAL_CALL MacabPreparedStatement::setArray(sal_Int32, const Reference< XArra ::dbtools::throwFunctionNotSupportedException("setArray", NULL); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabPreparedStatement::clearParameters() throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException("clearParameters", NULL); } -// ------------------------------------------------------------------------- + void MacabPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { switch (nHandle) diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx index 2ebd7869429a..81c99ef9a3e3 100644 --- a/connectivity/source/drivers/macab/MacabRecord.cxx +++ b/connectivity/source/drivers/macab/MacabRecord.cxx @@ -32,14 +32,14 @@ using namespace connectivity::macab; using namespace com::sun::star::util; using namespace ::dbtools; -// ------------------------------------------------------------------------- + MacabRecord::MacabRecord() { size = 0; fields = NULL; } -// ------------------------------------------------------------------------- + MacabRecord::MacabRecord(const sal_Int32 _size) { size = _size; @@ -49,7 +49,7 @@ MacabRecord::MacabRecord(const sal_Int32 _size) fields[i] = NULL; } -// ------------------------------------------------------------------------- + MacabRecord::~MacabRecord() { if(size > 0) @@ -65,7 +65,7 @@ MacabRecord::~MacabRecord() fields = NULL; } -// ------------------------------------------------------------------------- + void MacabRecord::insertAtColumn (CFTypeRef _value, ABPropertyType _type, const sal_Int32 _column) { if(_column < size) @@ -80,7 +80,7 @@ void MacabRecord::insertAtColumn (CFTypeRef _value, ABPropertyType _type, const } } -// ------------------------------------------------------------------------- + sal_Bool MacabRecord::contains (const macabfield *_field) const { if(_field == NULL) @@ -89,7 +89,7 @@ sal_Bool MacabRecord::contains (const macabfield *_field) const return contains(_field->value); } -// ------------------------------------------------------------------------- + sal_Bool MacabRecord::contains (const CFTypeRef _value) const { sal_Int32 i; @@ -107,13 +107,13 @@ sal_Bool MacabRecord::contains (const CFTypeRef _value) const return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 MacabRecord::getSize() const { return size; } -// ------------------------------------------------------------------------- + macabfield *MacabRecord::copy(const sal_Int32 i) const { /* Note: copy(i) creates a new macabfield identical to that at @@ -133,7 +133,7 @@ macabfield *MacabRecord::copy(const sal_Int32 i) const return NULL; } -// ------------------------------------------------------------------------- + macabfield *MacabRecord::get(const sal_Int32 i) const { /* Note: copy(i) creates a new macabfield identical to that at @@ -148,7 +148,7 @@ macabfield *MacabRecord::get(const sal_Int32 i) const return NULL; } -// ------------------------------------------------------------------------- + void MacabRecord::releaseFields() { /* This method is, at the moment, only used in MacabHeader.cxx, but @@ -161,7 +161,7 @@ void MacabRecord::releaseFields() CFRelease(fields[i]->value); } -// ------------------------------------------------------------------------- + sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield *_field2) { @@ -217,7 +217,7 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield return (sal_Int32) result; } -// ------------------------------------------------------------------------- + /* Create a macabfield out of an OUString and type. Together with the * method fieldToString() (below), it is possible to switch conveniently * between an OUString and a macabfield (for use when creating and handling @@ -285,7 +285,7 @@ macabfield *MacabRecord::createMacabField(const OUString _newFieldString, const return newField; } -// ------------------------------------------------------------------------- + /* Create an OUString out of a macabfield. Together with the method * createMacabField() (above), it is possible to switch conveniently * between an OUString and a macabfield (for use when creating and handling diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx index 802a15a52b55..4a86821e05ac 100644 --- a/connectivity/source/drivers/macab/MacabRecords.cxx +++ b/connectivity/source/drivers/macab/MacabRecords.cxx @@ -32,7 +32,7 @@ using namespace connectivity::macab; using namespace com::sun::star::util; -// ------------------------------------------------------------------------- + MacabRecords::MacabRecords(const ABAddressBookRef _addressBook, MacabHeader *_header, MacabRecord **_records, sal_Int32 _numRecords) { /* Variables passed in... */ @@ -50,7 +50,7 @@ MacabRecords::MacabRecords(const ABAddressBookRef _addressBook, MacabHeader *_he bootstrap_requiredProperties(); } -// ------------------------------------------------------------------------- + /* Creates a MacabRecords from another: copies the length, name, and * address book of the original, but the header or the records themselves. * The idea is that the only reason to copy a MacabRecords is to create @@ -77,7 +77,7 @@ MacabRecords::MacabRecords(const MacabRecords *_copy) bootstrap_requiredProperties(); } -// ------------------------------------------------------------------------- + MacabRecords::MacabRecords(const ABAddressBookRef _addressBook) { /* Variables passed in... */ @@ -95,7 +95,7 @@ MacabRecords::MacabRecords(const ABAddressBookRef _addressBook) bootstrap_requiredProperties(); } -// ------------------------------------------------------------------------- + void MacabRecords::initialize() { @@ -145,12 +145,12 @@ void MacabRecords::initialize() CFRelease(allRecords); } -// ------------------------------------------------------------------------- + MacabRecords::~MacabRecords() { } -// ------------------------------------------------------------------------- + void MacabRecords::setHeader(MacabHeader *_header) { if(header != NULL) @@ -158,13 +158,13 @@ void MacabRecords::setHeader(MacabHeader *_header) header = _header; } -// ------------------------------------------------------------------------- + MacabHeader *MacabRecords::getHeader() const { return header; } -// ------------------------------------------------------------------------- + /* Inserts a MacabRecord at a given location. If there is already a * MacabRecord at that location, return it. */ @@ -199,14 +199,14 @@ MacabRecord *MacabRecords::insertRecord(MacabRecord *_newRecord, const sal_Int32 return oldRecord; } -// ------------------------------------------------------------------------- + /* Insert a record at the next available place. */ void MacabRecords::insertRecord(MacabRecord *_newRecord) { insertRecord(_newRecord, currentRecord); } -// ------------------------------------------------------------------------- + MacabRecord *MacabRecords::getRecord(const sal_Int32 _location) const { if(_location >= recordsSize) @@ -214,7 +214,7 @@ MacabRecord *MacabRecords::getRecord(const sal_Int32 _location) const return records[_location]; } -// ------------------------------------------------------------------------- + macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const sal_Int32 _columnNumber) const { if(_recordNumber >= recordsSize) @@ -228,7 +228,7 @@ macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const sal_Int3 return record->get(_columnNumber); } -// ------------------------------------------------------------------------- + macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const OUString _columnName) const { if(header != NULL) @@ -246,7 +246,7 @@ macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const OUString } } -// ------------------------------------------------------------------------- + sal_Int32 MacabRecords::getFieldNumber(const OUString _columnName) const { if(header != NULL) @@ -256,7 +256,7 @@ sal_Int32 MacabRecords::getFieldNumber(const OUString _columnName) const return -1; } -// ------------------------------------------------------------------------- + /* Create the lcl_CFTypes array -- we need this because there is no * way to get the ABType of an object from the object itself, and the * function ABTypeOfProperty can't handle multiple levels of data @@ -295,7 +295,7 @@ void MacabRecords::bootstrap_CF_types() lcl_CFTypes[5].ab = kABDataProperty; } -// ------------------------------------------------------------------------- + /* This is based on the possible fields required in the mail merge template * in sw. If the fields possible there change, it would be optimal to * change these fields as well. @@ -313,7 +313,7 @@ void MacabRecords::bootstrap_requiredProperties() requiredProperties[6] = kABEmailProperty; } -// ------------------------------------------------------------------------- + /* Create the header for a given record type and a given array of records. * Because the array of records and the record type are given, if you want * to, you can run this method on the members of a group, or on any other @@ -470,7 +470,7 @@ MacabHeader *MacabRecords::createHeaderForRecordType(const CFArrayRef _records, return lcl_header; } -// ------------------------------------------------------------------------- + /* Create a header for a single property. Basically, this method gets * the property's value and type and then calls another method of * the same name to do the dirty work. @@ -499,7 +499,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABRecordRef _record, co return result; } -// ------------------------------------------------------------------------- + /* Create a header for a single property. This method is recursive * because a single property might contain several sub-properties that * we also want to treat singly. @@ -810,7 +810,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert return NULL; } -// ------------------------------------------------------------------------- + void MacabRecords::manageDuplicateHeaders(macabfield **_headerNames, const sal_Int32 _length) const { /* If we have two cases of, say, phone: home, this makes it: @@ -842,7 +842,7 @@ void MacabRecords::manageDuplicateHeaders(macabfield **_headerNames, const sal_I } } -// ------------------------------------------------------------------------- + /* Create a MacabRecord out of an ABRecord, using a given MacabHeader and * the record's type. We go through each property for this record type * then process it much like we processed the header (above), with two @@ -889,7 +889,7 @@ MacabRecord *MacabRecords::createMacabRecord(const ABRecordRef _abrecord, const return macabRecord; } -// ------------------------------------------------------------------------- + /* Inserts a given property into a MacabRecord. This method calls another * method by the same name after getting the property type (it only * receives the property value). It is called when we aren't given the @@ -904,7 +904,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(MacabRecord *_abrecord, const M insertPropertyIntoMacabRecord(ab_type, _abrecord, _header, _propertyName, _propertyValue); } -// ------------------------------------------------------------------------- + /* Inserts a given property into a MacabRecord. This method is recursive * because properties can contain many sub-properties. */ @@ -1105,7 +1105,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT } -// ------------------------------------------------------------------------- + ABPropertyType MacabRecords::getABTypeFromCFType(const CFTypeID cf_type ) const { sal_Int32 i; @@ -1120,29 +1120,29 @@ ABPropertyType MacabRecords::getABTypeFromCFType(const CFTypeID cf_type ) const return kABErrorInProperty; } -// ------------------------------------------------------------------------- + sal_Int32 MacabRecords::size() const { return currentRecord; } -// ------------------------------------------------------------------------- + MacabRecords *MacabRecords::begin() { return this; } -// ------------------------------------------------------------------------- + MacabRecords::iterator::iterator () { } -// ------------------------------------------------------------------------- + MacabRecords::iterator::~iterator () { } -// ------------------------------------------------------------------------- + MacabRecords::iterator& MacabRecords::iterator::operator= (MacabRecords *_records) { id = 0; @@ -1150,37 +1150,37 @@ MacabRecords::iterator& MacabRecords::iterator::operator= (MacabRecords *_record return *this; } -// ------------------------------------------------------------------------- + void MacabRecords::iterator::operator++ () { id++; } -// ------------------------------------------------------------------------- + sal_Bool MacabRecords::iterator::operator!= (const sal_Int32 i) const { return(id != i); } -// ------------------------------------------------------------------------- + sal_Bool MacabRecords::iterator::operator== (const sal_Int32 i) const { return(id == i); } -// ------------------------------------------------------------------------- + MacabRecord *MacabRecords::iterator::operator* () const { return records->getRecord(id); } -// ------------------------------------------------------------------------- + sal_Int32 MacabRecords::end() const { return currentRecord; } -// ------------------------------------------------------------------------- + void MacabRecords::swap(const sal_Int32 _id1, const sal_Int32 _id2) { MacabRecord *swapRecord = records[_id1]; @@ -1189,13 +1189,13 @@ void MacabRecords::swap(const sal_Int32 _id1, const sal_Int32 _id2) records[_id2] = swapRecord; } -// ------------------------------------------------------------------------- + void MacabRecords::setName(const OUString _sName) { m_sName = _sName; } -// ------------------------------------------------------------------------- + OUString MacabRecords::getName() const { return m_sName; diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index c9f866e6b992..95e3b09de90a 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx @@ -44,7 +44,7 @@ using namespace com::sun::star::io; using namespace com::sun::star::util; IMPLEMENT_SERVICE_INFO(MacabResultSet, "com.sun.star.sdbc.drivers.MacabResultSet", "com.sun.star.sdbc.ResultSet"); -// ------------------------------------------------------------------------- + MacabResultSet::MacabResultSet(MacabCommonStatement* pStmt) : MacabResultSet_BASE(m_aMutex), OPropertySetHelper(MacabResultSet_BASE::rBHelper), @@ -56,18 +56,18 @@ MacabResultSet::MacabResultSet(MacabCommonStatement* pStmt) { m_sTableName = MacabAddressBook::getDefaultTableName(); } -// ------------------------------------------------------------------------- + MacabResultSet::~MacabResultSet() { } -// ------------------------------------------------------------------------- + void MacabResultSet::allMacabRecords() { MacabConnection* pConnection = static_cast< MacabConnection *>(m_xStatement->getConnection().get()); m_aMacabRecords = pConnection->getAddressBook()->getMacabRecords(m_sTableName); } -// ------------------------------------------------------------------------- + void MacabResultSet::someMacabRecords(const MacabCondition *pCondition) { MacabConnection* pConnection = static_cast< MacabConnection *>(m_xStatement->getConnection().get()); @@ -96,7 +96,7 @@ void MacabResultSet::someMacabRecords(const MacabCondition *pCondition) m_aMacabRecords->insertRecord(*iterator); } } -// ------------------------------------------------------------------------- + void MacabResultSet::sortMacabRecords(const MacabOrder *pOrder) { // I do this with ints rather than an iterator because the ids will @@ -126,12 +126,12 @@ void MacabResultSet::sortMacabRecords(const MacabOrder *pOrder) } } -// ------------------------------------------------------------------------- + void MacabResultSet::setTableName(OUString _sTableName) { m_sTableName = _sTableName; } -// ------------------------------------------------------------------------- + void MacabResultSet::disposing() { OPropertySetHelper::disposing(); @@ -141,7 +141,7 @@ void MacabResultSet::disposing() m_xStatement.clear(); m_xMetaData.clear(); } -// ------------------------------------------------------------------------- + Any SAL_CALL MacabResultSet::queryInterface(const Type & rType) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); @@ -149,17 +149,17 @@ Any SAL_CALL MacabResultSet::queryInterface(const Type & rType) throw(RuntimeExc aRet = MacabResultSet_BASE::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::acquire() throw() { MacabResultSet_BASE::acquire(); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::release() throw() { MacabResultSet_BASE::release(); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL MacabResultSet::getTypes() throw(RuntimeException) { OTypeCollection aTypes( @@ -169,12 +169,12 @@ Sequence< Type > SAL_CALL MacabResultSet::getTypes() throw(RuntimeException) return comphelper::concatSequences(aTypes.getTypes(), MacabResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL MacabResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSet::findColumn(const OUString& columnName) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -196,7 +196,7 @@ sal_Int32 SAL_CALL MacabResultSet::findColumn(const OUString& columnName) throw( assert(false); return 0; // Never reached } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabResultSet::getString(sal_Int32 columnIndex) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -223,7 +223,7 @@ OUString SAL_CALL MacabResultSet::getString(sal_Int32 columnIndex) throw(SQLExce // Trigger an exception if m_bWasNull is true? return aRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::getBoolean(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -233,7 +233,7 @@ sal_Bool SAL_CALL MacabResultSet::getBoolean(sal_Int32) throw(SQLException, Runt return sal_False; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL MacabResultSet::getByte(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -244,7 +244,7 @@ sal_Int8 SAL_CALL MacabResultSet::getByte(sal_Int32) throw(SQLException, Runtime sal_Int8 nRet = 0; return nRet; } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL MacabResultSet::getShort(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -255,7 +255,7 @@ sal_Int16 SAL_CALL MacabResultSet::getShort(sal_Int32) throw(SQLException, Runti sal_Int16 nRet = 0; return nRet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSet::getInt(sal_Int32 columnIndex) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -284,7 +284,7 @@ sal_Int32 SAL_CALL MacabResultSet::getInt(sal_Int32 columnIndex) throw(SQLExcept // Trigger an exception if m_bWasNull is true? return nRet; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL MacabResultSet::getLong(sal_Int32 columnIndex) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -313,7 +313,7 @@ sal_Int64 SAL_CALL MacabResultSet::getLong(sal_Int32 columnIndex) throw(SQLExcep // Trigger an exception if m_bWasNull is true? return nRet; } -// ------------------------------------------------------------------------- + float SAL_CALL MacabResultSet::getFloat(sal_Int32 columnIndex) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -342,7 +342,7 @@ float SAL_CALL MacabResultSet::getFloat(sal_Int32 columnIndex) throw(SQLExceptio // Trigger an exception if m_bWasNull is true? return nVal; } -// ------------------------------------------------------------------------- + double SAL_CALL MacabResultSet::getDouble(sal_Int32 columnIndex) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -371,7 +371,7 @@ double SAL_CALL MacabResultSet::getDouble(sal_Int32 columnIndex) throw(SQLExcept // Trigger an exception if m_bWasNull is true? return nVal; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL MacabResultSet::getBytes(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -381,7 +381,7 @@ Sequence< sal_Int8 > SAL_CALL MacabResultSet::getBytes(sal_Int32) throw(SQLExcep return Sequence< sal_Int8 >(); } -// ------------------------------------------------------------------------- + Date SAL_CALL MacabResultSet::getDate(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -392,7 +392,7 @@ Date SAL_CALL MacabResultSet::getDate(sal_Int32) throw(SQLException, RuntimeExce Date aRet; return aRet; } -// ------------------------------------------------------------------------- + Time SAL_CALL MacabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -403,7 +403,7 @@ Time SAL_CALL MacabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeExce Time nRet; return nRet; } -// ------------------------------------------------------------------------- + DateTime SAL_CALL MacabResultSet::getTimestamp(sal_Int32 columnIndex) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -430,7 +430,7 @@ DateTime SAL_CALL MacabResultSet::getTimestamp(sal_Int32 columnIndex) throw(SQLE // Trigger an exception if m_bWasNull is true? return nRet; } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL MacabResultSet::getBinaryStream(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -440,7 +440,7 @@ Reference< XInputStream > SAL_CALL MacabResultSet::getBinaryStream(sal_Int32) th return NULL; } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL MacabResultSet::getCharacterStream(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -450,7 +450,7 @@ Reference< XInputStream > SAL_CALL MacabResultSet::getCharacterStream(sal_Int32) return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL MacabResultSet::getObject(sal_Int32, const Reference< ::com::sun::star::container::XNameAccess >&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -460,7 +460,7 @@ Any SAL_CALL MacabResultSet::getObject(sal_Int32, const Reference< ::com::sun::s return Any(); } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL MacabResultSet::getRef(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -470,7 +470,7 @@ Reference< XRef > SAL_CALL MacabResultSet::getRef(sal_Int32) throw(SQLException, return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL MacabResultSet::getBlob(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -480,7 +480,7 @@ Reference< XBlob > SAL_CALL MacabResultSet::getBlob(sal_Int32) throw(SQLExceptio return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL MacabResultSet::getClob(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -490,7 +490,7 @@ Reference< XClob > SAL_CALL MacabResultSet::getClob(sal_Int32) throw(SQLExceptio return NULL; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL MacabResultSet::getArray(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -500,7 +500,7 @@ Reference< XArray > SAL_CALL MacabResultSet::getArray(sal_Int32) throw(SQLExcept return NULL; } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL MacabResultSet::getMetaData() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -512,7 +512,7 @@ Reference< XResultSetMetaData > SAL_CALL MacabResultSet::getMetaData() throw(SQL Reference< XResultSetMetaData > xMetaData = m_xMetaData.get(); return xMetaData; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::isBeforeFirst() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -523,7 +523,7 @@ sal_Bool SAL_CALL MacabResultSet::isBeforeFirst() throw(SQLException, RuntimeExc return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::isAfterLast() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -535,7 +535,7 @@ sal_Bool SAL_CALL MacabResultSet::isAfterLast() throw(SQLException, RuntimeExcep return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::isFirst() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -546,7 +546,7 @@ sal_Bool SAL_CALL MacabResultSet::isFirst() throw(SQLException, RuntimeException return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::isLast() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -558,7 +558,7 @@ sal_Bool SAL_CALL MacabResultSet::isLast() throw(SQLException, RuntimeException) return sal_False; } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::beforeFirst() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -567,7 +567,7 @@ void SAL_CALL MacabResultSet::beforeFirst() throw(SQLException, RuntimeException // move before the first row m_nRowPos = -1; } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::afterLast() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -577,7 +577,7 @@ void SAL_CALL MacabResultSet::afterLast() throw(SQLException, RuntimeException) sal_Int32 nRecords = m_aMacabRecords->size(); m_nRowPos = nRecords; } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::close() throw(SQLException, RuntimeException) { { @@ -586,7 +586,7 @@ void SAL_CALL MacabResultSet::close() throw(SQLException, RuntimeException) } dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::first() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -599,7 +599,7 @@ sal_Bool SAL_CALL MacabResultSet::first() throw(SQLException, RuntimeException) m_nRowPos = 0; return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::last() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -612,7 +612,7 @@ sal_Bool SAL_CALL MacabResultSet::last() throw(SQLException, RuntimeException) m_nRowPos = nRecords - 1; return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSet::getRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -620,7 +620,7 @@ sal_Int32 SAL_CALL MacabResultSet::getRow() throw(SQLException, RuntimeException return m_nRowPos; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::absolute(sal_Int32 row) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -634,7 +634,7 @@ sal_Bool SAL_CALL MacabResultSet::absolute(sal_Int32 row) throw(SQLException, Ru m_nRowPos = row; return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::relative(sal_Int32 row) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -642,7 +642,7 @@ sal_Bool SAL_CALL MacabResultSet::relative(sal_Int32 row) throw(SQLException, Ru return absolute(m_nRowPos + row); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::next() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -650,7 +650,7 @@ sal_Bool SAL_CALL MacabResultSet::next() throw(SQLException, RuntimeException) return absolute(m_nRowPos + 1); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::previous() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -658,7 +658,7 @@ sal_Bool SAL_CALL MacabResultSet::previous() throw(SQLException, RuntimeExceptio return absolute(m_nRowPos - 1); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL MacabResultSet::getStatement() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -667,7 +667,7 @@ Reference< XInterface > SAL_CALL MacabResultSet::getStatement() throw(SQLExcepti Reference< XStatement > xStatement = m_xStatement.get(); return xStatement; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::rowDeleted() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -675,7 +675,7 @@ sal_Bool SAL_CALL MacabResultSet::rowDeleted() throw(SQLException, RuntimeExcept return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::rowInserted() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -683,7 +683,7 @@ sal_Bool SAL_CALL MacabResultSet::rowInserted() throw(SQLException, RuntimeExcep return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::rowUpdated() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -691,7 +691,7 @@ sal_Bool SAL_CALL MacabResultSet::rowUpdated() throw(SQLException, RuntimeExcept return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::wasNull() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -699,22 +699,22 @@ sal_Bool SAL_CALL MacabResultSet::wasNull() throw(SQLException, RuntimeException return m_bWasNull; } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::cancel() throw(RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::clearWarnings() throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + Any SAL_CALL MacabResultSet::getWarnings() throw(SQLException, RuntimeException) { return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::insertRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -722,7 +722,7 @@ void SAL_CALL MacabResultSet::insertRow() throw(SQLException, RuntimeException) // you only have to implement this if you want to insert new rows } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -730,19 +730,19 @@ void SAL_CALL MacabResultSet::updateRow() throw(SQLException, RuntimeException) // only when you allow updates } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::deleteRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::cancelRowUpdates() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::moveToInsertRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -750,121 +750,121 @@ void SAL_CALL MacabResultSet::moveToInsertRow() throw(SQLException, RuntimeExcep // only when you allow inserts } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::moveToCurrentRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateNull(sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException) { checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ----------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateFloat(sal_Int32, float) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateDouble(sal_Int32, double) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateString(sal_Int32, const OUString&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateDate(sal_Int32, const Date&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateBinaryStream(sal_Int32, const Reference< XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateCharacterStream(sal_Int32, const Reference< XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::refreshRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateObject(sal_Int32, const Any&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabResultSet::updateNumericObject(sal_Int32, const Any&, sal_Int32) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + // XRowLocate Any SAL_CALL MacabResultSet::getBookmark() throw( SQLException, RuntimeException) { @@ -886,7 +886,7 @@ Any SAL_CALL MacabResultSet::getBookmark() throw( SQLException, RuntimeExceptio } return Any(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::moveToBookmark(const Any& bookmark) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -913,7 +913,7 @@ sal_Bool SAL_CALL MacabResultSet::moveToBookmark(const Any& bookmark) throw( SQ } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::moveRelativeToBookmark(const Any& bookmark, sal_Int32 rows) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -934,7 +934,7 @@ sal_Bool SAL_CALL MacabResultSet::moveRelativeToBookmark(const Any& bookmark, s m_nRowPos = nRowSave; return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSet::compareBookmarks(const Any& firstItem, const Any& secondItem) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -949,12 +949,12 @@ sal_Int32 SAL_CALL MacabResultSet::compareBookmarks(const Any& firstItem, const return CompareBookmark::GREATER; return CompareBookmark::EQUAL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSet::hasOrderedBookmarks() throw( SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSet::hashBookmark(const Any& bookmark) throw( SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -964,7 +964,7 @@ sal_Int32 SAL_CALL MacabResultSet::hashBookmark(const Any& bookmark) throw( SQL return sBookmark.hashCode(); } -// ------------------------------------------------------------------------- + // XDeleteRows Sequence< sal_Int32 > SAL_CALL MacabResultSet::deleteRows(const Sequence< Any >&) throw( SQLException, RuntimeException) { @@ -973,7 +973,7 @@ Sequence< sal_Int32 > SAL_CALL MacabResultSet::deleteRows(const Sequence< Any return Sequence< sal_Int32 >(); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper* MacabResultSet::createArrayHelper() const { Sequence< Property > aProps(6); @@ -988,12 +988,12 @@ IPropertyArrayHelper* MacabResultSet::createArrayHelper() const return new OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper & MacabResultSet::getInfoHelper() { return *static_cast<MacabResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool MacabResultSet::convertFastPropertyValue( Any &, Any &, @@ -1016,7 +1016,7 @@ sal_Bool MacabResultSet::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void MacabResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& ) @@ -1038,7 +1038,7 @@ void MacabResultSet::setFastPropertyValue_NoBroadcast( ; } } -// ------------------------------------------------------------------------- + void MacabResultSet::getFastPropertyValue( Any& _rValue, sal_Int32 nHandle) const @@ -1056,6 +1056,6 @@ void MacabResultSet::getFastPropertyValue( ; } } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx index c3199ebe8670..5da1a2811f9e 100644 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx @@ -36,11 +36,11 @@ MacabResultSetMetaData::MacabResultSetMetaData(MacabConnection* _pConnection, OU m_aMacabFields() { } -// ------------------------------------------------------------------------- + MacabResultSetMetaData::~MacabResultSetMetaData() { } -// ------------------------------------------------------------------------- + void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException) { OSQLColumns::Vector::const_iterator aIter; @@ -69,13 +69,13 @@ void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity: } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSetMetaData::getColumnDisplaySize(sal_Int32 /* column */) throw(SQLException, RuntimeException) { // For now, all columns are the same size. return 50; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSetMetaData::getColumnType(sal_Int32 column) throw(SQLException, RuntimeException) { MacabRecords *aRecords; @@ -101,22 +101,22 @@ sal_Int32 SAL_CALL MacabResultSetMetaData::getColumnType(sal_Int32 column) throw return ABTypeToDataType(aField->type); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSetMetaData::getColumnCount() throw(SQLException, RuntimeException) { return m_aMacabFields.size(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSetMetaData::isCaseSensitive(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabResultSetMetaData::getSchemaName(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabResultSetMetaData::getColumnName(sal_Int32 column) throw(SQLException, RuntimeException) { sal_uInt32 nFieldNumber = m_aMacabFields[column - 1]; @@ -136,81 +136,81 @@ OUString SAL_CALL MacabResultSetMetaData::getColumnName(sal_Int32 column) throw( return aName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabResultSetMetaData::getTableName(sal_Int32) throw(SQLException, RuntimeException) { return m_sTableName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabResultSetMetaData::getCatalogName(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabResultSetMetaData::getColumnTypeName(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabResultSetMetaData::getColumnLabel(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL MacabResultSetMetaData::getColumnServiceName(sal_Int32) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSetMetaData::isCurrency(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSetMetaData::isAutoIncrement(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSetMetaData::isSigned(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSetMetaData::getPrecision(sal_Int32) throw(SQLException, RuntimeException) { return 0; } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSetMetaData::getScale(sal_Int32) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabResultSetMetaData::isNullable(sal_Int32) throw(SQLException, RuntimeException) { return (sal_Int32) sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSetMetaData::isSearchable(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSetMetaData::isReadOnly(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSetMetaData::isDefinitelyWritable(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabResultSetMetaData::isWritable(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/macab/MacabServices.cxx b/connectivity/source/drivers/macab/MacabServices.cxx index 6c7cd113a165..5428db736cb5 100644 --- a/connectivity/source/drivers/macab/MacabServices.cxx +++ b/connectivity/source/drivers/macab/MacabServices.cxx @@ -36,7 +36,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -74,7 +74,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL macab_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx index 026e69dc28cb..6b85a0ef5225 100644 --- a/connectivity/source/drivers/macab/MacabStatement.cxx +++ b/connectivity/source/drivers/macab/MacabStatement.cxx @@ -61,7 +61,7 @@ namespace connectivity } IMPLEMENT_SERVICE_INFO(MacabStatement, "com.sun.star.sdbc.drivers.MacabStatement", "com.sun.star.sdbc.Statement"); -//------------------------------------------------------------------------------ + MacabCommonStatement::MacabCommonStatement(MacabConnection* _pConnection ) : MacabCommonStatement_BASE(m_aMutex), OPropertySetHelper(MacabCommonStatement_BASE::rBHelper), @@ -73,26 +73,26 @@ MacabCommonStatement::MacabCommonStatement(MacabConnection* _pConnection ) { m_pConnection->acquire(); } -// ----------------------------------------------------------------------------- + MacabCommonStatement::~MacabCommonStatement() { } -// ----------------------------------------------------------------------------- + void MacabCommonStatement::disposing() { MacabCommonStatement_BASE::disposing(); } -// ----------------------------------------------------------------------------- + void MacabCommonStatement::resetParameters() const throw(::com::sun::star::sdbc::SQLException) { impl_throwError(STR_PARA_ONLY_PREPARED); } -// ----------------------------------------------------------------------------- + void MacabCommonStatement::getNextParameter(OUString &) const throw(::com::sun::star::sdbc::SQLException) { impl_throwError(STR_PARA_ONLY_PREPARED); } -// ----------------------------------------------------------------------------- + MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pParseNode) const throw(SQLException) { if (pParseNode->count() == 3) @@ -237,7 +237,7 @@ MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pP OSL_ASSERT(false); return 0; } -// ----------------------------------------------------------------------------- + MacabOrder *MacabCommonStatement::analyseOrderByClause(const OSQLParseNode *pParseNode) const throw(SQLException) { if (SQL_ISRULE(pParseNode, ordering_spec_commalist)) @@ -285,7 +285,7 @@ MacabOrder *MacabCommonStatement::analyseOrderByClause(const OSQLParseNode *pPar OSL_ASSERT(false); return 0; } -//------------------------------------------------------------------------------ + OUString MacabCommonStatement::getTableName() const { const OSQLTables& xTabs = m_aSQLIterator.getTables(); @@ -299,7 +299,7 @@ OUString MacabCommonStatement::getTableName() const return xTabs.begin()->first; } -//------------------------------------------------------------------------------ + void MacabCommonStatement::setMacabFields(MacabResultSet *pResult) const throw(SQLException) { ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns @@ -317,7 +317,7 @@ void MacabCommonStatement::setMacabFields(MacabResultSet *pResult) const throw(S pMeta = static_cast<MacabResultSetMetaData *>(pResult->getMetaData().get()); pMeta->setMacabFields(xColumns); } -// ------------------------------------------------------------------------- + void MacabCommonStatement::selectRecords(MacabResultSet *pResult) const throw(SQLException) { const OSQLParseNode *pParseNode; @@ -344,7 +344,7 @@ void MacabCommonStatement::selectRecords(MacabResultSet *pResult) const throw(SQ // no WHERE clause: get all rows pResult->allMacabRecords(); } -// ------------------------------------------------------------------------- + void MacabCommonStatement::sortRecords(MacabResultSet *pResult) const throw(SQLException) { const OSQLParseNode *pParseNode; @@ -361,7 +361,7 @@ void MacabCommonStatement::sortRecords(MacabResultSet *pResult) const throw(SQLE } } } -//----------------------------------------------------------------------------- + Any SAL_CALL MacabCommonStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = MacabCommonStatement_BASE::queryInterface(rType); @@ -369,7 +369,7 @@ Any SAL_CALL MacabCommonStatement::queryInterface( const Type & rType ) throw(Ru aRet = OPropertySetHelper::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL MacabCommonStatement::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), @@ -378,7 +378,7 @@ Sequence< Type > SAL_CALL MacabCommonStatement::getTypes( ) throw(RuntimeExcept return comphelper::concatSequences(aTypes.getTypes(),MacabCommonStatement_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabCommonStatement::cancel( ) throw(RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -386,7 +386,7 @@ void SAL_CALL MacabCommonStatement::cancel( ) throw(RuntimeException) checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed); // cancel the current sql statement } -// ------------------------------------------------------------------------- + void SAL_CALL MacabCommonStatement::close( ) throw(SQLException, RuntimeException) { { @@ -396,7 +396,7 @@ void SAL_CALL MacabCommonStatement::close( ) throw(SQLException, RuntimeExcepti } dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL MacabCommonStatement::execute( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -407,7 +407,7 @@ sal_Bool SAL_CALL MacabCommonStatement::execute( return xRS.is(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL MacabCommonStatement::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -467,7 +467,7 @@ OSL_TRACE("Mac OS Address book - SQL Request: %s", OUtoCStr(sql)); m_xResultSet = Reference<XResultSet>(pResult); return xRS; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL MacabCommonStatement::getConnection( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -476,7 +476,7 @@ Reference< XConnection > SAL_CALL MacabCommonStatement::getConnection( ) throw( // just return our connection here return (Reference< XConnection >) m_pConnection; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL MacabCommonStatement::executeUpdate( const OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -485,7 +485,7 @@ sal_Int32 SAL_CALL MacabCommonStatement::executeUpdate( const OUString& ) throw( // the return values gives information about how many rows are affected by executing the sql statement return 0; } -// ------------------------------------------------------------------------- + Any SAL_CALL MacabCommonStatement::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -493,7 +493,7 @@ Any SAL_CALL MacabCommonStatement::getWarnings( ) throw(SQLException, RuntimeEx return makeAny(m_aLastWarning); } -// ------------------------------------------------------------------------- + void SAL_CALL MacabCommonStatement::clearWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -501,7 +501,7 @@ void SAL_CALL MacabCommonStatement::clearWarnings( ) throw(SQLException, Runtim m_aLastWarning = SQLWarning(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* MacabCommonStatement::createArrayHelper( ) const { // this properties are defined by the service statement @@ -522,12 +522,12 @@ void SAL_CALL MacabCommonStatement::clearWarnings( ) throw(SQLException, Runtim return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & MacabCommonStatement::getInfoHelper() { return *const_cast<MacabCommonStatement*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool MacabCommonStatement::convertFastPropertyValue( Any &, Any &, @@ -538,7 +538,7 @@ sal_Bool MacabCommonStatement::convertFastPropertyValue( // here we have to try to convert return bConverted; } -// ------------------------------------------------------------------------- + void MacabCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any&) throw (Exception) { // set the value to whatever is necessary @@ -558,7 +558,7 @@ void MacabCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,co ; } } -// ------------------------------------------------------------------------- + void MacabCommonStatement::getFastPropertyValue(Any&,sal_Int32 nHandle) const { switch (nHandle) @@ -577,22 +577,22 @@ void MacabCommonStatement::getFastPropertyValue(Any&,sal_Int32 nHandle) const ; } } -// ----------------------------------------------------------------------------- + void SAL_CALL MacabCommonStatement::acquire() throw() { MacabCommonStatement_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL MacabCommonStatement::release() throw() { MacabCommonStatement_BASE::release(); } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL MacabCommonStatement::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + MacabStatement::MacabStatement(MacabConnection* _pConnection) : MacabStatement_BASE(_pConnection) { diff --git a/connectivity/source/drivers/macab/MacabTable.cxx b/connectivity/source/drivers/macab/MacabTable.cxx index 341b2ff5e87b..26c83eb2b4d3 100644 --- a/connectivity/source/drivers/macab/MacabTable.cxx +++ b/connectivity/source/drivers/macab/MacabTable.cxx @@ -33,14 +33,14 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + MacabTable::MacabTable( sdbcx::OCollection* _pTables, MacabConnection* _pConnection) : MacabTable_TYPEDEF(_pTables, sal_True), m_pConnection(_pConnection) { construct(); } -// ------------------------------------------------------------------------- + MacabTable::MacabTable( sdbcx::OCollection* _pTables, MacabConnection* _pConnection, const OUString& _Name, @@ -58,7 +58,7 @@ MacabTable::MacabTable( sdbcx::OCollection* _pTables, { construct(); } -// ------------------------------------------------------------------------- + void MacabTable::refreshColumns() { TStringVector aVector; diff --git a/connectivity/source/drivers/macab/MacabTables.cxx b/connectivity/source/drivers/macab/MacabTables.cxx index 32fd6ab96cbf..6fa6dc45c6a6 100644 --- a/connectivity/source/drivers/macab/MacabTables.cxx +++ b/connectivity/source/drivers/macab/MacabTables.cxx @@ -67,12 +67,12 @@ sdbcx::ObjectType MacabTables::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void MacabTables::impl_refresh( ) throw(RuntimeException) { static_cast<MacabCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void MacabTables::disposing(void) { m_xMetaData.clear(); diff --git a/connectivity/source/drivers/macab/macabcondition.cxx b/connectivity/source/drivers/macab/macabcondition.cxx index 175076ea6447..186802670f8b 100644 --- a/connectivity/source/drivers/macab/macabcondition.cxx +++ b/connectivity/source/drivers/macab/macabcondition.cxx @@ -25,55 +25,55 @@ using namespace ::connectivity::macab; using namespace ::com::sun::star::sdbc; -// ----------------------------------------------------------------------------- + MacabCondition::~MacabCondition() { } -// ----------------------------------------------------------------------------- + MacabConditionConstant::MacabConditionConstant(const sal_Bool bValue) : MacabCondition(), m_bValue(bValue) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionConstant::isAlwaysTrue() const { return m_bValue; } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionConstant::isAlwaysFalse() const { return !m_bValue; } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionConstant::eval(const MacabRecord *) const { return m_bValue; } -// ----------------------------------------------------------------------------- + MacabConditionColumn::MacabConditionColumn(const MacabHeader *header, const OUString &sColumnName) throw(SQLException) : MacabCondition(), m_nFieldNumber(header->getColumnNumber(sColumnName)) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionColumn::isAlwaysTrue() const { // Sometimes true, sometimes false return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionColumn::isAlwaysFalse() const { // Sometimes true, sometimes false return sal_False; } -// ----------------------------------------------------------------------------- + MacabConditionNull::MacabConditionNull(const MacabHeader *header, const OUString &sColumnName) throw(SQLException) : MacabConditionColumn(header, sColumnName) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionNull::eval(const MacabRecord *aRecord) const { macabfield *aValue = aRecord->get(m_nFieldNumber); @@ -85,12 +85,12 @@ sal_Bool MacabConditionNull::eval(const MacabRecord *aRecord) const else return sal_False; } -// ----------------------------------------------------------------------------- + MacabConditionNotNull::MacabConditionNotNull(const MacabHeader *header, const OUString &sColumnName) throw(SQLException) : MacabConditionColumn(header, sColumnName) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionNotNull::eval(const MacabRecord *aRecord) const { macabfield *aValue = aRecord->get(m_nFieldNumber); @@ -102,18 +102,18 @@ sal_Bool MacabConditionNotNull::eval(const MacabRecord *aRecord) const else return sal_True; } -// ----------------------------------------------------------------------------- + MacabConditionCompare::MacabConditionCompare(const MacabHeader *header, const OUString &sColumnName, const OUString &sMatchString) throw(SQLException) : MacabConditionColumn(header, sColumnName), m_sMatchString(sMatchString) { } -// ----------------------------------------------------------------------------- + MacabConditionEqual::MacabConditionEqual(const MacabHeader *header, const OUString &sColumnName, const OUString &sMatchString) throw(SQLException) : MacabConditionCompare(header, sColumnName, sMatchString) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionEqual::eval(const MacabRecord *aRecord) const { macabfield *aValue = aRecord->get(m_nFieldNumber); @@ -131,12 +131,12 @@ sal_Bool MacabConditionEqual::eval(const MacabRecord *aRecord) const delete aValue2; return nReturn == 0; } -// ----------------------------------------------------------------------------- + MacabConditionDifferent::MacabConditionDifferent(const MacabHeader *header, const OUString &sColumnName, const OUString &sMatchString) throw(SQLException) : MacabConditionCompare(header, sColumnName, sMatchString) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionDifferent::eval(const MacabRecord *aRecord) const { macabfield *aValue = aRecord->get(m_nFieldNumber); @@ -154,12 +154,12 @@ sal_Bool MacabConditionDifferent::eval(const MacabRecord *aRecord) const delete aValue2; return nReturn != 0; } -// ----------------------------------------------------------------------------- + MacabConditionSimilar::MacabConditionSimilar(const MacabHeader *header, const OUString &sColumnName, const OUString &sMatchString) throw(SQLException) : MacabConditionCompare(header, sColumnName, sMatchString) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionSimilar::eval(const MacabRecord *aRecord) const { macabfield *aValue = aRecord->get(m_nFieldNumber); @@ -171,35 +171,35 @@ sal_Bool MacabConditionSimilar::eval(const MacabRecord *aRecord) const return match(m_sMatchString, sName, '\0'); } -// ----------------------------------------------------------------------------- + MacabConditionBoolean::MacabConditionBoolean(MacabCondition *pLeft, MacabCondition *pRight) : MacabCondition(), m_pLeft(pLeft), m_pRight(pRight) { } -// ----------------------------------------------------------------------------- + MacabConditionBoolean::~MacabConditionBoolean() { delete m_pLeft; delete m_pRight; } -// ----------------------------------------------------------------------------- + MacabConditionOr::MacabConditionOr(MacabCondition *pLeft, MacabCondition *pRight) : MacabConditionBoolean(pLeft, pRight) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionOr::isAlwaysTrue() const { return m_pLeft->isAlwaysTrue() || m_pRight->isAlwaysTrue(); } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionOr::isAlwaysFalse() const { return m_pLeft->isAlwaysFalse() && m_pRight->isAlwaysFalse(); } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionOr::eval(const MacabRecord *aRecord) const { // We avoid evaluating terms as much as we can @@ -211,22 +211,22 @@ sal_Bool MacabConditionOr::eval(const MacabRecord *aRecord) const return sal_False; } -// ----------------------------------------------------------------------------- + MacabConditionAnd::MacabConditionAnd(MacabCondition *pLeft, MacabCondition *pRight) : MacabConditionBoolean(pLeft, pRight) { } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionAnd::isAlwaysTrue() const { return m_pLeft->isAlwaysTrue() && m_pRight->isAlwaysTrue(); } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionAnd::isAlwaysFalse() const { return m_pLeft->isAlwaysFalse() || m_pRight->isAlwaysFalse(); } -// ----------------------------------------------------------------------------- + sal_Bool MacabConditionAnd::eval(const MacabRecord *aRecord) const { // We avoid evaluating terms as much as we can diff --git a/connectivity/source/drivers/macab/macaborder.cxx b/connectivity/source/drivers/macab/macaborder.cxx index 79dd1c18619d..18e8def51e4c 100644 --- a/connectivity/source/drivers/macab/macaborder.cxx +++ b/connectivity/source/drivers/macab/macaborder.cxx @@ -27,14 +27,14 @@ using namespace ::connectivity::macab; MacabOrder::~MacabOrder() { } -// ----------------------------------------------------------------------------- + MacabSimpleOrder::MacabSimpleOrder(MacabHeader *header, OUString &sColumnName, sal_Bool bAscending) : MacabOrder(), m_nFieldNumber(header->getColumnNumber(sColumnName)), m_bAscending(bAscending) { } -// ----------------------------------------------------------------------------- + sal_Int32 MacabSimpleOrder::compare(const MacabRecord *record1, const MacabRecord *record2) const { sal_Int32 result; @@ -45,24 +45,24 @@ sal_Int32 MacabSimpleOrder::compare(const MacabRecord *record1, const MacabRecor return result; } -// ----------------------------------------------------------------------------- + MacabComplexOrder::MacabComplexOrder() : MacabOrder(), m_aOrders() { } -// ----------------------------------------------------------------------------- + MacabComplexOrder::~MacabComplexOrder() { for (sal_uInt32 i = 0; i < m_aOrders.size(); i++) delete m_aOrders[i]; } -// ----------------------------------------------------------------------------- + void MacabComplexOrder::addOrder(MacabOrder *pOrder) { m_aOrders.push_back(pOrder); } -// ----------------------------------------------------------------------------- + sal_Int32 MacabComplexOrder::compare(const MacabRecord *record1, const MacabRecord *record2) const { for (sal_uInt32 i = 0; i < m_aOrders.size(); i++) diff --git a/connectivity/source/drivers/mork/MCatalog.cxx b/connectivity/source/drivers/mork/MCatalog.cxx index 663ee08d2267..1426378f48dc 100644 --- a/connectivity/source/drivers/mork/MCatalog.cxx +++ b/connectivity/source/drivers/mork/MCatalog.cxx @@ -24,7 +24,7 @@ #include <com/sun/star/sdbc/XResultSet.hpp> #include <cppuhelper/interfacecontainer.h> -// ------------------------------------------------------------------------- + using namespace connectivity::mork; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -34,7 +34,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::cppu; -// ------------------------------------------------------------------------- + OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon) ,m_pConnection(_pCon) ,m_xMetaData(m_pConnection->getMetaData( )) @@ -46,7 +46,7 @@ OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon) // refreshUsers(); // osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + void OCatalog::refreshTables() { TStringVector aVector; @@ -70,19 +70,19 @@ void OCatalog::refreshTables() else m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void OCatalog::refreshViews() { } -// ------------------------------------------------------------------------- + void OCatalog::refreshGroups() { } -// ------------------------------------------------------------------------- + void OCatalog::refreshUsers() { } -// ----------------------------------------------------------------------------- + // XTablesSupplier Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) throw(RuntimeException) diff --git a/connectivity/source/drivers/mork/MColumnAlias.cxx b/connectivity/source/drivers/mork/MColumnAlias.cxx index 96af40bf706b..0ad8a3dc8685 100644 --- a/connectivity/source/drivers/mork/MColumnAlias.cxx +++ b/connectivity/source/drivers/mork/MColumnAlias.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -//------------------------------------------------------------------------------ + OColumnAlias::OColumnAlias( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB ) { static const sal_Char* s_pProgrammaticNames[] = @@ -87,7 +87,7 @@ OColumnAlias::OColumnAlias( const ::com::sun::star::uno::Reference< ::com::sun:: initialize( _rxORB ); } -//------------------------------------------------------------------------------ + void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB ) { Reference< XNameAccess > xAliasesNode( @@ -125,7 +125,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su } } -//------------------------------------------------------------------ + OString OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias( const OUString& _rAlias ) const { AliasMap::const_iterator pos = m_aAliasMap.find( _rAlias ); diff --git a/connectivity/source/drivers/mork/MColumns.cxx b/connectivity/source/drivers/mork/MColumns.cxx index 009ed6b998ad..57851ee70f70 100644 --- a/connectivity/source/drivers/mork/MColumns.cxx +++ b/connectivity/source/drivers/mork/MColumns.cxx @@ -82,12 +82,12 @@ sdbcx::ObjectType OColumns::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OColumns::impl_refresh() throw(RuntimeException) { m_pTable->refreshColumns(); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx index 78956371372f..71b44a115648 100644 --- a/connectivity/source/drivers/mork/MConnection.cxx +++ b/connectivity/source/drivers/mork/MConnection.cxx @@ -32,19 +32,19 @@ using namespace dbtools; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -// -------------------------------------------------------------------------------- + namespace connectivity { namespace mork { static const int defaultScope = 0x80; -// ----------------------------------------------------------------------------- + OConnection::OConnection(MorkDriver* _pDriver) :OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this) @@ -56,7 +56,7 @@ OConnection::OConnection(MorkDriver* _pDriver) m_pBook = new MorkParser(); m_pHistory = new MorkParser(); } -//----------------------------------------------------------------------------- + OConnection::~OConnection() { acquire(); @@ -68,13 +68,13 @@ OConnection::~OConnection() delete m_pBook; delete m_pHistory; } -//----------------------------------------------------------------------------- + void SAL_CALL OConnection::release() throw() { relase_ChildImpl(); } -// ----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- + + void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& info) throw(SQLException) { (void) info; // avoid warnings @@ -173,10 +173,10 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OConnection, "com.sun.star.sdbc.drivers.mork.OConnection", "com.sun.star.sdbc.Connection") -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OConnection::createStatement()" ); @@ -190,7 +190,7 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLExcep m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OUString& _sSql ) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OConnection::prepareStatement()" ); @@ -210,7 +210,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& _sSql ) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OConnection::prepareCall()" ); @@ -220,7 +220,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUStrin SAL_INFO("connectivity.mork", "OConnection::prepareCall( " << _sSql << " )"); return NULL; } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::nativeSQL( const OUString& _sSql ) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OConnection::nativeSQL()" ); @@ -232,12 +232,12 @@ OUString SAL_CALL OConnection::nativeSQL( const OUString& _sSql ) throw(SQLExcep return _sSql; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setAutoCommit( sal_Bool /*autoCommit*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setAutoCommit", *this ); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeException) { // you have to distinguish which if you are in autocommit mode or not @@ -245,17 +245,17 @@ sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeExce return sal_True; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException) { // when you database does support transactions you should commit here } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException) { // same as commit but for the other case } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -263,7 +263,7 @@ sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException // just simple -> we are close when we are disposed that means someone called dispose(); (XComponent) return OConnection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OConnection::getMetaData()" ); @@ -282,50 +282,50 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx return xMetaData; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setReadOnly( sal_Bool /*readOnly*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setReadOnly", *this ); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeException) { // return if your connection to readonly return sal_False; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setCatalog( const OUString& /*catalog*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setCatalog", *this ); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeException) { return OUString(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 /*level*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setTransactionIsolation", *this ); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { // please have a look at @see com.sun.star.sdbc.TransactionIsolation return TransactionIsolation::NONE; } -// -------------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException) { // if your driver has special database types you can return it here return NULL; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setTypeMap", *this ); } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) { @@ -337,26 +337,26 @@ void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL OConnection::getWarnings( ) throw(SQLException, RuntimeException) { // when you collected some warnings -> return it return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException) { // you should clear your collected warnings here } -//------------------------------------------------------------------------------ + void OConnection::disposing() { // we noticed that we should be destroied in near future so we have to dispose our statements ::osl::MutexGuard aGuard(m_aMutex); dispose_ChildImpl(); } -// ----------------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL OConnection::createCatalog() { @@ -372,9 +372,9 @@ Reference< XTablesSupplier > SAL_CALL OConnection::createCatalog() OSL_TRACE( "\tOUT OConnection::createCatalog()" ); return xTab; } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Reference< XInterface >& _rxContext ) { if ( _rError.getResId() != 0 ) @@ -411,7 +411,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer throwGenericSQLException( STR_UNSPECIFIED_ERROR, _rxContext ); } -// ----------------------------------------------------------------------------- + void OConnection::throwSQLException( const sal_uInt16 _nErrorResourceId, const Reference< XInterface >& _rxContext ) { ErrorDescriptor aError; diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx index a850bdec26dd..94be41197400 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx @@ -52,13 +52,13 @@ ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!"); m_pMetaDataHelper = new MDatabaseMetaDataHelper(); } -// ------------------------------------------------------------------------- + ODatabaseMetaData::~ODatabaseMetaData() { delete m_pMetaDataHelper; } -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows( const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException) @@ -147,317 +147,317 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows( } return( aRows ); } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( ) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 65535; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 254; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 20; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( ) { return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { // We only support a single table return 1; } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { // normally this is " return OUString( "\""); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { //We support create table return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 /*level*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { return sal_True; // should be supported at least } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { // We allow you to select from any table. return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { //we support insert/update/delete now @@ -465,384 +465,384 @@ sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeE //entry to the popup menu. We should avoid them. return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { // Support added for this. return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 /*fromType*/, sal_Int32 /*toType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { // Any case may be used return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_pConnection->getURL(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { OUString aValue = OUString::number(1); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { OUString aValue = OUString::number(0); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { return 1; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { return TransactionIsolation::NONE; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 /*setType*/, sal_Int32 /*concurrency*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + // here follow all methods which return a resultset // the first methods is an example implementation how to use this resultset // of course you could implement it on your and you should do this because // the general way is more memory expensive -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { // there exists no possibility to get table types so we have to check @@ -876,7 +876,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLE pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) { // this returns an empty resultset where the column-names are already set @@ -916,7 +916,7 @@ Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) pResultSet->setRows(aRows); return xResultSet; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -928,7 +928,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( pResultSet->setRows( getColumnRows( tableNamePattern, columnNamePattern )); return xResultSet; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern, const Sequence< OUString >& /*types*/ ) throw(SQLException, RuntimeException) @@ -954,7 +954,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( return xResultSet; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern ) throw(SQLException, RuntimeException) { @@ -1013,11 +1013,11 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx index 9502919bc569..4aba2596cfd0 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx @@ -36,13 +36,13 @@ static ::osl::Mutex m_aMetaMutex; using namespace connectivity; using namespace connectivity::mork; -// ------------------------------------------------------------------------- + MDatabaseMetaDataHelper::MDatabaseMetaDataHelper() { SAL_INFO("connectivity.mork", "=> MDatabaseMetaDataHelper::MDatabaseMetaDataHelper()" ); } -// ------------------------------------------------------------------------- + MDatabaseMetaDataHelper::~MDatabaseMetaDataHelper() { } diff --git a/connectivity/source/drivers/mork/MDriver.cxx b/connectivity/source/drivers/mork/MDriver.cxx index 33a22aa90b6b..11619f08487b 100644 --- a/connectivity/source/drivers/mork/MDriver.cxx +++ b/connectivity/source/drivers/mork/MDriver.cxx @@ -38,13 +38,13 @@ MorkDriver::MorkDriver(css::uno::Reference< css::uno::XComponentContext > const } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString MorkDriver::getImplementationName_Static( ) throw(css::uno::RuntimeException) { return OUString(MORK_DRIVER_IMPL_NAME); } -//------------------------------------------------------------------------------ + css::uno::Sequence< OUString > MorkDriver::getSupportedServiceNames_Static( ) throw (css::uno::RuntimeException) { css::uno::Sequence< OUString > aSNS(1); diff --git a/connectivity/source/drivers/mork/MNSFolders.cxx b/connectivity/source/drivers/mork/MNSFolders.cxx index 71a01493d659..5237a9304f23 100644 --- a/connectivity/source/drivers/mork/MNSFolders.cxx +++ b/connectivity/source/drivers/mork/MNSFolders.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::mozilla; namespace { - // ------------------------------------------------------------------- + static OUString lcl_getUserDataDirectory() { ::osl::Security aSecurity; @@ -59,7 +59,7 @@ namespace return aConfigPath + "/"; } - // ------------------------------------------------------------------- + const size_t NB_PRODUCTS = 3; const size_t NB_CANDIDATES = 4; @@ -87,7 +87,7 @@ namespace "MOZILLA_THUNDERBIRD_PROFILE_ROOT", }; - // ------------------------------------------------------------------- + static OUString lcl_guessProfileRoot( MozillaProductType _product ) { size_t productIndex = _product - 1; @@ -144,7 +144,7 @@ namespace } } -// ----------------------------------------------------------------------- + OUString getRegistryDir(MozillaProductType product) { if (product == MozillaProductType_Default) diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx index 00bf3ca1ec70..3cbc45d904e2 100644 --- a/connectivity/source/drivers/mork/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx @@ -51,17 +51,17 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString ,m_pResultSet() { } -// ----------------------------------------------------------------------------- + OPreparedStatement::~OPreparedStatement() { } -// ----------------------------------------------------------------------------- + void OPreparedStatement::lateInit() { if ( eSelect != parseSql( m_sSqlStatement ) ) throw SQLException(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -76,7 +76,7 @@ void SAL_CALL OPreparedStatement::disposing() } m_xParamColumns = NULL; } -// ----------------------------------------------------------------------------- + OCommonStatement::StatementType OPreparedStatement::parseSql( const OUString& sql , sal_Bool bAdjusted ) throw ( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) @@ -98,7 +98,7 @@ OCommonStatement::StatementType OPreparedStatement::parseSql( const OUString& sq return eStatementType; } -// ----------------------------------------------------------------------------- + void OPreparedStatement::initializeResultSet( OResultSet* _pResult ) { OCommonStatement::initializeResultSet( _pResult ); @@ -106,14 +106,14 @@ void OPreparedStatement::initializeResultSet( OResultSet* _pResult ) _pResult->setParameterRow( m_aParameterRow ); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::clearCachedResultSet() { OCommonStatement::clearCachedResultSet(); m_pResultSet.clear(); m_xMetaData.clear(); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::cacheResultSet( const ::rtl::Reference< OResultSet >& _pResult ) { OCommonStatement::cacheResultSet( _pResult ); @@ -121,17 +121,17 @@ void OPreparedStatement::cacheResultSet( const ::rtl::Reference< OResultSet >& _ m_pResultSet = _pResult; } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::acquire() throw() { OCommonStatement::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::release() throw() { OCommonStatement::release(); } -// ----------------------------------------------------------------------------- + Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OCommonStatement::queryInterface(rType); @@ -139,12 +139,12 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt aRet = OPreparedStatement_BASE::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { return ::comphelper::concatSequences(OPreparedStatement_BASE::getTypes(),OCommonStatement::getTypes()); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) throw(SQLException, RuntimeException) { @@ -165,7 +165,7 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr return m_xMetaData; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OPreparedStatement::execute()" ); @@ -175,7 +175,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc Reference< XResultSet> xResult = executeQuery(); return xResult.is(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, RuntimeException) { @@ -184,7 +184,7 @@ sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, Run ::dbtools::throwFeatureNotImplementedException( "XStatement::executeUpdate", *this ); return 0; } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const OUString& x ) throw(SQLException, RuntimeException) { @@ -194,7 +194,7 @@ void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const OUS OSL_TRACE("prepStmt::setString( %s )", OUtoCStr( x ) ); setParameter( parameterIndex, x ); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQLException, RuntimeException) { @@ -203,7 +203,7 @@ Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQ return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLException, RuntimeException) { @@ -217,62 +217,62 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE // stuff again. Just execute. return impl_executeCurrentQuery(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 /*parameterIndex*/, sal_Bool /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBoolean", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setByte( sal_Int32 /*parameterIndex*/, sal_Int8 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setByte", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const Date& /*aData*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setDate", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setTime", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 /*parameterIndex*/, const DateTime& /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setTimestamp", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setDouble( sal_Int32 /*parameterIndex*/, double /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setDouble", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setFloat( sal_Int32 /*parameterIndex*/, float /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setFloat", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setInt( sal_Int32 /*parameterIndex*/, sal_Int32 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setInt", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setLong( sal_Int32 /*parameterIndex*/, sal_Int64 /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setLong", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/ ) throw(SQLException, RuntimeException) { @@ -283,79 +283,79 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 / (m_aParameterRow->get())[parameterIndex].setNull(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setClob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBlob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setArray", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setRef", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 /*parameterIndex*/, const Any& /*x*/, sal_Int32 /*sqlType*/, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setObjectWithInfo", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& /*typeName*/ ) throw(SQLException, RuntimeException) { setNull(parameterIndex,sqlType); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException) { ::dbtools::implSetObject(this,parameterIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setShort( sal_Int32 /*parameterIndex*/, sal_Int16 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setShort", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBytes( sal_Int32 /*parameterIndex*/, const Sequence< sal_Int8 >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBytes", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 /*parameterIndex*/, const Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setCharacterStream", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 /*parameterIndex*/, const Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBinaryStream", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { switch(nHandle) @@ -373,7 +373,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex) { ::connectivity::checkDisposed(OCommonStatement_IBASE::rBHelper.bDisposed); @@ -386,7 +386,7 @@ void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex) if ((sal_Int32)(m_aParameterRow->get()).size() <= parameterIndex) (m_aParameterRow->get()).resize(parameterIndex+1); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetValue& x) { @@ -397,7 +397,7 @@ ORowSetValue& x) (m_aParameterRow->get())[parameterIndex] = x; } -//------------------------------------------------------------------ + size_t OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol) { OSL_UNUSED( pParameter ); @@ -449,7 +449,7 @@ size_t OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere m_xParamColumns->get().push_back(xParaColumn); return nParameter; } -// ----------------------------------------------------------------------------- + void OPreparedStatement::describeColumn(OSQLParseNode* _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable) { @@ -469,7 +469,7 @@ _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable) // else // AddParameter(_pParameter,xProp); } -// ------------------------------------------------------------------------- + void OPreparedStatement::describeParameter() { ::std::vector< OSQLParseNode*> aParseNodes; @@ -491,7 +491,7 @@ aParseNodes.begin(); } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes) { OSL_ENSURE(pParseNode != NULL,"OResultSet: internal error: invalid ParseNode"); @@ -511,22 +511,22 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< for (sal_uInt32 i = 0; i < pParseNode->count(); i++) scanParameter(pParseNode->getChild(i),_rParaNodes); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL OPreparedStatement::getResultSet( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return NULL; } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OPreparedStatement::getUpdateCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return 0; } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL OPreparedStatement::getMoreResults( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return sal_False; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx index 05dd1219f6fc..8f09d46aacdb 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.cxx +++ b/connectivity/source/drivers/mork/MQueryHelper.cxx @@ -92,7 +92,7 @@ MQueryHelper::~MQueryHelper() OSL_TRACE("OUT MQueryHelper::~MQueryHelper()"); } -// ------------------------------------------------------------------------- + void MQueryHelper::setAddressbook(OUString &ab) { SAL_INFO("connectivity.mork", "MQueryHelper::setAddressbook()"); @@ -103,7 +103,7 @@ void MQueryHelper::setAddressbook(OUString &ab) OSL_TRACE("\tOUT MQuery::setAddressbook()"); } -// ------------------------------------------------------------------------- + void MQueryHelper::setExpression( MQueryExpression &_expr ) { SAL_INFO("connectivity.mork", "MQueryHelper::setExpression()"); @@ -164,7 +164,7 @@ sal_Int32 MQueryHelper::getResultCount() const return result; } -// ------------------------------------------------------------------------- + sal_Bool MQueryHelper::queryComplete() const { diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index 7baac6653c6e..d2c4b1c610af 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -61,13 +61,13 @@ using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -//------------------------------------------------------------------------------ + // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) \ { return OUString("com.sun.star.sdbcx.mork.ResultSet"); } -// ------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(2); @@ -81,7 +81,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) t return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< connectivity::OSQLParseTreeIterator >& _pSQLIterator ) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) @@ -111,12 +111,12 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< conne { //m_aQuery.setMaxNrOfReturns(pStmt->getOwnConnection()->getMaxResultRecords()); } -// ------------------------------------------------------------------------- + OResultSet::~OResultSet() { } -// ------------------------------------------------------------------------- + void OResultSet::disposing(void) { OPropertySetHelper::disposing(); @@ -135,7 +135,7 @@ void OResultSet::disposing(void) m_pTable = NULL; } } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); @@ -143,7 +143,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep aRet = OResultSet_BASE::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException) { OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), @@ -152,7 +152,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void OResultSet::methodEntry() { checkDisposed(OResultSet_BASE::rBHelper.bDisposed); @@ -163,7 +163,7 @@ void OResultSet::methodEntry() } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -183,60 +183,60 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQ assert(false); return 0; // Never reached } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); m_bWasNull = sal_True; return sal_False; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return 0; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return Sequence< sal_Int8 >(); } -// ------------------------------------------------------------------------- + Date SAL_CALL OResultSet::getDate( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return Date(); } -// ------------------------------------------------------------------------- + double SAL_CALL OResultSet::getDouble( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return 0.0; } -// ------------------------------------------------------------------------- + float SAL_CALL OResultSet::getFloat( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { @@ -244,7 +244,7 @@ sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 /*columnIndex*/ ) throw(SQLExce return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -252,14 +252,14 @@ sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) OSL_TRACE("In/Out: OResultSet::getRow, return = %u", m_nRowPos ); return m_nRowPos; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return sal_Int64(); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException) { @@ -270,49 +270,49 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx m_pSQLIterator->getSelectColumns(), m_pSQLIterator->getTables().begin()->first ,m_pTable,determineReadOnly()); return m_xMetaData; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getObject( sal_Int32 /*columnIndex*/, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { return Any(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + void OResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException) { if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->get().size()) ::dbtools::throwInvalidIndexException(*this); } -// ------------------------------------------------------------------------- + sal_uInt32 OResultSet::currentRowCount() { if ( m_bIsAlwaysFalseQuery ) @@ -322,7 +322,7 @@ sal_uInt32 OResultSet::currentRowCount() return m_aQueryHelper.getResultCount(); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::fetchCurrentRow( ) throw(SQLException, RuntimeException) { @@ -330,7 +330,7 @@ sal_Bool OResultSet::fetchCurrentRow( ) throw(SQLException, RuntimeException) return fetchRow(getCurrentCardNumber()); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::pushCard(sal_uInt32 /*cardNumber*/) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OResultSet::pushCard()" ); @@ -360,7 +360,7 @@ sal_Bool OResultSet::pushCard(sal_uInt32 /*cardNumber*/) throw(SQLException, Run return sal_True; */ } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OResultSet::fetchRow()" ); @@ -404,7 +404,7 @@ sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw( return sal_True; } -// ------------------------------------------------------------------------- + const ORowSetValue& OResultSet::getValue(sal_Int32 cardNumber, sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -419,7 +419,7 @@ const ORowSetValue& OResultSet::getValue(sal_Int32 cardNumber, sal_Int32 columnI return (m_aRow->get())[columnIndex]; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -434,14 +434,14 @@ OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLExcept return getValue(getCurrentCardNumber(), mapColumn( columnIndex ) ); } -// ------------------------------------------------------------------------- + Time SAL_CALL OResultSet::getTime( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return Time(); } -// ------------------------------------------------------------------------- + DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) @@ -449,7 +449,7 @@ DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 /*columnIndex*/ ) throw(SQ ResultSetEntryGuard aGuard( *this ); return DateTime(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { @@ -460,7 +460,7 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeExcep OSL_TRACE("In/Out: OResultSet::isBeforeFirst" ); return( m_nRowPos < 1 ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { SAL_WARN("connectivity.mork", "OResultSet::isAfterLast() NOT IMPLEMENTED!"); @@ -470,7 +470,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeExcepti // return sal_True; return m_nRowPos > currentRowCount() && m_aQueryHelper.queryComplete(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -478,7 +478,7 @@ sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) OSL_TRACE("In/Out: OResultSet::isFirst" ); return m_nRowPos == 1; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) { SAL_WARN("connectivity.mork", "OResultSet::isLast() NOT IMPLEMENTED!"); @@ -488,7 +488,7 @@ sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) // return sal_True; return m_nRowPos == currentRowCount() && m_aQueryHelper.queryComplete(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -498,7 +498,7 @@ void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) if ( first() ) previous(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -507,47 +507,47 @@ void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) if(last()) next(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::close() throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::close" ); dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::first" ); return seekRow( FIRST_POS ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::last" ); return seekRow( LAST_POS ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::absolute" ); return seekRow( ABSOLUTE_POS, row ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::relative" ); return seekRow( RELATIVE_POS, row ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); OSL_TRACE("In/Out: OResultSet::previous" ); return seekRow( PRIOR_POS ); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -555,7 +555,7 @@ Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException OSL_TRACE("In/Out: OResultSet::getStatement" ); return m_xStatement; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeException) { @@ -564,7 +564,7 @@ sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeExceptio OSL_TRACE("In/Out: OResultSet::rowDeleted, m_RowStates=%u",m_RowStates ); return sal_True;//return ((m_RowStates & RowStates_Deleted) == RowStates_Deleted) ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException) { SAL_WARN("connectivity.mork", "OResultSet::rowInserted() NOT IMPLEMENTED!"); @@ -572,7 +572,7 @@ sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeExcepti OSL_TRACE("In/Out: OResultSet::rowInserted,m_RowStates=%u",m_RowStates ); return sal_True;//return ((m_RowStates & RowStates_Inserted) == RowStates_Inserted); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { SAL_WARN("connectivity.mork", "OResultSet::rowUpdated() NOT IMPLEMENTED!"); @@ -580,13 +580,13 @@ sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeExceptio OSL_TRACE("In/Out: OResultSet::rowUpdated,m_RowStates=%u",m_RowStates ); return sal_True;// return ((m_RowStates & RowStates_Updated) == RowStates_Updated) ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException) { return seekRow( NEXT_POS ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -594,7 +594,7 @@ sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) return m_bWasNull; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) { @@ -602,18 +602,18 @@ void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) OSL_TRACE("In/Out: OResultSet::cancel" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::clearWarnings" ); } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::getWarnings" ); return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::refreshRow" ); @@ -622,7 +622,7 @@ void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) m_pStatement->getOwnConnection()->throwSQLException( STR_ERROR_REFRESH_ROW, *this ); } } -// ------------------------------------------------------------------------- + IPropertyArrayHelper* OResultSet::createArrayHelper( ) const { Sequence< Property > aProps(5); @@ -636,12 +636,12 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const return new OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper & OResultSet::getInfoHelper() { return *const_cast<OResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::convertFastPropertyValue( Any & /*rConvertedValue*/, Any & /*rOldValue*/, @@ -663,7 +663,7 @@ sal_Bool OResultSet::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& /*rValue*/ @@ -685,7 +685,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast( ; } } -// ------------------------------------------------------------------------- + void OResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle @@ -711,23 +711,23 @@ void OResultSet::getFastPropertyValue( break; } } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::acquire() throw() { OResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::release() throw() { OResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ------------------------------------------------------------------------- + void OResultSet::parseParameter( const OSQLParseNode* pNode, OUString& rMatchString ) { OSL_ENSURE(pNode->count() > 0,"Error parsing parameter in Parse Tree"); @@ -1051,7 +1051,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT } } -// ----------------------------------------------------------------------------- + void OResultSet::fillRowData() throw( ::com::sun::star::sdbc::SQLException ) @@ -1123,7 +1123,7 @@ void OResultSet::fillRowData() #endif } -// ----------------------------------------------------------------------------- + static sal_Bool matchRow( OValueRow& row1, OValueRow& row2 ) { OValueVector::Vector::iterator row1Iter = row1->get().begin(); @@ -1165,7 +1165,7 @@ sal_Int32 OResultSet::getRowForCardNumber(sal_Int32 nCardNum) return 0; } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -1335,7 +1335,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep } } -// ----------------------------------------------------------------------------- + void OResultSet::setBoundedColumns(const OValueRow& _rRow, @@ -1418,7 +1418,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::isCount() const { return (m_pParseTree && @@ -1430,7 +1430,7 @@ sal_Bool OResultSet::isCount() const ); } -// ----------------------------------------------------------------------------- + // // Check for valid row in m_aQuery // @@ -1489,7 +1489,7 @@ sal_Int32 OResultSet::deletedCount() return m_CurrentRowCount - static_cast<sal_Int32>(m_pKeySet->get().size()); } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) { SAL_INFO("connectivity.mork", "=> OResultSet::seekRow()" ); @@ -1559,7 +1559,7 @@ sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) fetchCurrentRow(); return sal_True; } -// ----------------------------------------------------------------------------- + void OResultSet::setColumnMapping(const ::std::vector<sal_Int32>& _aColumnMapping) { m_aColMapping = _aColumnMapping; @@ -1568,7 +1568,7 @@ void OResultSet::setColumnMapping(const ::std::vector<sal_Int32>& _aColumnMappin OSL_TRACE("Set Mapped: %d -> %d", i, m_aColMapping[i] ); #endif } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Any OResultSet::getBookmark( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -1677,7 +1677,7 @@ void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x) throw m_nUpdatedRow = getCurrentCardNumber(); // m_RowStates = m_RowStates | RowStates_Updated; } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -1695,72 +1695,72 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException m_nUpdatedRow = getCurrentCardNumber(); // m_RowStates = m_RowStates | RowStates_Updated; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException) { updateValue(columnIndex, static_cast<bool>(x)); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateLong( sal_Int32 /*columnIndex*/, sal_Int64 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateLong", *this ); } -// ----------------------------------------------------------------------- + void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { @@ -1773,12 +1773,12 @@ void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Refer x->readBytes(aSeq,length); updateValue(columnIndex,aSeq); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { updateBinaryStream(columnIndex,x,length); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException) { if (!::dbtools::implUpdateObject(this, columnIndex, x)) @@ -1790,7 +1790,7 @@ void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) th ::dbtools::throwGenericSQLException(sError,*this); } // if (!::dbtools::implUpdateObject(this, columnIndex, x)) } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { @@ -1805,7 +1805,7 @@ void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& } // XResultSetUpdate -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -1817,27 +1817,27 @@ void SAL_CALL OResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQLExcepti //m_aQueryHelper.setRowStates(getCurrentCardNumber(),m_RowStates); OSL_TRACE("insertRow out, m_nRowPos = %u", m_nRowPos ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { OSL_FAIL( "OResultSet::updateRow( ) not implemented" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::deleteRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { OSL_FAIL( "OResultSet::deleteRow( ) not implemented" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancelRowUpdates( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { OSL_FAIL( "OResultSet::cancelRowUpdates( ) not implemented" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { OSL_FAIL( "OResultSet::moveToInsertRow( ) not implemented" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ResultSetEntryGuard aGuard( *this ); diff --git a/connectivity/source/drivers/mork/MResultSetMetaData.cxx b/connectivity/source/drivers/mork/MResultSetMetaData.cxx index 2e7763227c12..4aa8faec1542 100644 --- a/connectivity/source/drivers/mork/MResultSetMetaData.cxx +++ b/connectivity/source/drivers/mork/MResultSetMetaData.cxx @@ -34,48 +34,48 @@ using namespace com::sun::star::beans; using namespace ::dbtools; using namespace ::comphelper; -// ------------------------------------------------------------------------- + OResultSetMetaData::~OResultSetMetaData() { m_xColumns = NULL; } -// ----------------------------------------------------------------------------- + void OResultSetMetaData::checkColumnIndex(sal_Int32 column) throw(SQLException, RuntimeException) { if(column <= 0 || column > (sal_Int32)(sal_Int32)m_xColumns->get().size()) throwInvalidIndexException(*this); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException) { return getPrecision(column); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return DataType::VARCHAR; // at the moment there exists only this type } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { return static_cast<sal_Int32>((m_xColumns->get()).size()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -93,70 +93,70 @@ OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQ } return sColumnName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return m_aTableName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); return getString((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { return getColumnName(column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); return getBOOL((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY))); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { @@ -168,7 +168,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 /*column*/ ) throw return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -178,17 +178,17 @@ sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLEx return m_bReadOnly || bReadOnly || m_pTable->isReadOnly(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { return !isReadOnly(column); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { return !isReadOnly(column); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx index 0d719b591efb..403ae0b648b7 100644 --- a/connectivity/source/drivers/mork/MStatement.cxx +++ b/connectivity/source/drivers/mork/MStatement.cxx @@ -59,7 +59,7 @@ static ::osl::Mutex m_ThreadMutex; using namespace ::comphelper; using namespace connectivity::mork; using namespace connectivity; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; @@ -67,7 +67,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -//------------------------------------------------------------------------------ + OStatement::OStatement( OConnection* _pConnection) : OCommonStatement( _pConnection) { @@ -90,12 +90,12 @@ OCommonStatement::OCommonStatement(OConnection* _pConnection ) m_pConnection->acquire(); } -// ----------------------------------------------------------------------------- + OCommonStatement::~OCommonStatement() { } -//------------------------------------------------------------------------------ + void OCommonStatement::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -112,7 +112,7 @@ void OCommonStatement::disposing() dispose_ChildImpl(); OCommonStatement_IBASE::disposing(); } -//----------------------------------------------------------------------------- + Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OCommonStatement_IBASE::queryInterface(rType); @@ -120,7 +120,7 @@ Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(Runtim aRet = OPropertySetHelper::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), @@ -129,7 +129,7 @@ Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) return ::comphelper::concatSequences(aTypes.getTypes(),OCommonStatement_IBASE::getTypes()); } -// ------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::close( ) throw(SQLException, RuntimeException) { { @@ -140,7 +140,7 @@ void SAL_CALL OCommonStatement::close( ) throw(SQLException, RuntimeException) } -// ------------------------------------------------------------------------- + void OCommonStatement::createTable( ) throw ( SQLException, RuntimeException ) { SAL_INFO("connectivity.mork", "=> OCommonStatement::createTable()" ); @@ -189,7 +189,7 @@ void OCommonStatement::createTable( ) throw ( SQLException, RuntimeException ) getOwnConnection()->throwSQLException( STR_QUERY_TOO_COMPLEX, *this ); */ } -// ------------------------------------------------------------------------- + OCommonStatement::StatementType OCommonStatement::parseSql( const OUString& sql , sal_Bool bAdjusted) throw ( SQLException, RuntimeException ) { @@ -266,7 +266,7 @@ OCommonStatement::StatementType OCommonStatement::parseSql( const OUString& sql return eSelect; } -// ------------------------------------------------------------------------- + Reference< XResultSet > OCommonStatement::impl_executeCurrentQuery() { SAL_INFO("connectivity.mork", "=> OCommonStatement::impl_executeCurrentQuery()" ); @@ -283,7 +283,7 @@ Reference< XResultSet > OCommonStatement::impl_executeCurrentQuery() } -// ------------------------------------------------------------------------- + void OCommonStatement::initializeResultSet( OResultSet* _pResult ) { SAL_INFO("connectivity.mork", "=> OCommonStatement::initializeResultSet()" ); @@ -297,7 +297,7 @@ void OCommonStatement::initializeResultSet( OResultSet* _pResult ) _pResult->setTable(m_pTable); } -// ------------------------------------------------------------------------- + void OCommonStatement::clearCachedResultSet() { SAL_INFO("connectivity.mork", "=> OCommonStatement::clearCachedResultSet()" ); @@ -311,14 +311,14 @@ void OCommonStatement::clearCachedResultSet() m_xResultSet.clear(); } -// ------------------------------------------------------------------------- + void OCommonStatement::cacheResultSet( const ::rtl::Reference< OResultSet >& _pResult ) { ENSURE_OR_THROW( _pResult.is(), "invalid result set" ); m_xResultSet = Reference< XResultSet >( _pResult.get() ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OCommonStatement::execute( const OUString& sql ) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OCommonStatement::execute()" ); @@ -332,7 +332,7 @@ sal_Bool SAL_CALL OCommonStatement::execute( const OUString& sql ) throw(SQLExce // returns true when a resultset is available return xRS.is(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OCommonStatement::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -350,7 +350,7 @@ Reference< XResultSet > SAL_CALL OCommonStatement::executeQuery( const OUString& return impl_executeCurrentQuery(); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OCommonStatement::getConnection( ) throw(SQLException, RuntimeException) { @@ -362,7 +362,7 @@ Reference< XConnection > SAL_CALL OCommonStatement::getConnection( ) throw(SQLE // just return our connection here return (Reference< XConnection >)m_pConnection; } -// ----------------------------------------------------------------------------- + Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException) { SAL_INFO("connectivity.mork", "=> OCommonStatement::queryInterface()" ); @@ -372,14 +372,14 @@ Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeExcep aRet = OCommonStatement::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCommonStatement::executeUpdate( const OUString& /*sql*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XStatement::executeUpdate", *this ); return 0; } -// ------------------------------------------------------------------------- + Any SAL_CALL OCommonStatement::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -387,9 +387,9 @@ Any SAL_CALL OCommonStatement::getWarnings( ) throw(SQLException, RuntimeExcept return makeAny(m_aLastWarning); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -398,7 +398,7 @@ void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeExc m_aLastWarning = SQLWarning(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OCommonStatement::createArrayHelper( ) const { // this properties are define by the service resultset @@ -419,12 +419,12 @@ void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeExc return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OCommonStatement::getInfoHelper() { return *const_cast<OCommonStatement*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OCommonStatement::convertFastPropertyValue( Any & /*rConvertedValue*/, Any & /*rOldValue*/, @@ -436,7 +436,7 @@ sal_Bool OCommonStatement::convertFastPropertyValue( // here we have to try to convert return bConverted; } -// ------------------------------------------------------------------------- + void OCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& /*rValue*/) throw (Exception) { // set the value to whatever is necessary @@ -454,7 +454,7 @@ void OCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ; } } -// ------------------------------------------------------------------------- + void OCommonStatement::getFastPropertyValue(Any& /*rValue*/,sal_Int32 nHandle) const { switch(nHandle) @@ -471,34 +471,34 @@ void OCommonStatement::getFastPropertyValue(Any& /*rValue*/,sal_Int32 nHandle) c ; } } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.OStatement","com.sun.star.sdbc.Statement"); -// ----------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::acquire() throw() { OCommonStatement_IBASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::release() throw() { relase_ChildImpl(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::acquire() throw() { OCommonStatement::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::release() throw() { OCommonStatement::release(); } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OCommonStatement::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + void OCommonStatement::createColumnMapping() { SAL_INFO("connectivity.mork", "=> OCommonStatement::createColumnMapping()" ); @@ -523,7 +523,7 @@ void OCommonStatement::createColumnMapping() OSL_TRACE("AFTER Mapped: %d -> %d", i, m_aColMapping[i] ); #endif } -// ----------------------------------------------------------------------------- + void OCommonStatement::analyseSQL() { @@ -549,7 +549,7 @@ void OCommonStatement::analyseSQL() } } } -//------------------------------------------------------------------ + void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef, OSQLParseNode* pAscendingDescending) { @@ -576,6 +576,6 @@ void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef, // Ascending or Descending? m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? SQL_DESC : SQL_ASC); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mork/MTable.cxx b/connectivity/source/drivers/mork/MTable.cxx index e90dc3cd0b85..c28d25346fc6 100644 --- a/connectivity/source/drivers/mork/MTable.cxx +++ b/connectivity/source/drivers/mork/MTable.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OTable::OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection, const OUString& _Name, const OUString& _Type, const OUString& _Description ) :OTable_Base(_pTables, _pConnection, sal_True, _Name, _Type, _Description ) @@ -55,25 +55,25 @@ OTable::OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection, construct(); } -//-------------------------------------------------------------------------- + sdbcx::OCollection* OTable::createColumns( const TStringVector& _rNames ) { return new OColumns( this, m_aMutex, _rNames ); } -//-------------------------------------------------------------------------- + sdbcx::OCollection* OTable::createKeys(const TStringVector& _rNames) { return new OKeysHelper( this, m_aMutex, _rNames ); } -//-------------------------------------------------------------------------- + sdbcx::OCollection* OTable::createIndexes(const TStringVector& _rNames) { return new OIndexesHelper( this, m_aMutex, _rNames ); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/mork/MTables.cxx b/connectivity/source/drivers/mork/MTables.cxx index 546103ec4c40..19a3f1e25260 100644 --- a/connectivity/source/drivers/mork/MTables.cxx +++ b/connectivity/source/drivers/mork/MTables.cxx @@ -70,17 +70,17 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OTables::impl_refresh( ) throw(RuntimeException) { static_cast<OCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void OTables::disposing(void) { m_xMetaData.clear(); OCollection::disposing(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mozab/MCatalog.cxx b/connectivity/source/drivers/mozab/MCatalog.cxx index a4a288d1a70c..8fae349bfe70 100644 --- a/connectivity/source/drivers/mozab/MCatalog.cxx +++ b/connectivity/source/drivers/mozab/MCatalog.cxx @@ -24,7 +24,7 @@ #include <com/sun/star/sdbc/XResultSet.hpp> #include <cppuhelper/interfacecontainer.h> -// ------------------------------------------------------------------------- + using namespace connectivity::mozab; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -34,7 +34,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::cppu; -// ------------------------------------------------------------------------- + OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon) ,m_pConnection(_pCon) ,m_xMetaData(m_pConnection->getMetaData( )) @@ -46,7 +46,7 @@ OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon) // refreshUsers(); // osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + void OCatalog::refreshTables() { TStringVector aVector; @@ -70,19 +70,19 @@ void OCatalog::refreshTables() else m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void OCatalog::refreshViews() { } -// ------------------------------------------------------------------------- + void OCatalog::refreshGroups() { } -// ------------------------------------------------------------------------- + void OCatalog::refreshUsers() { } -// ----------------------------------------------------------------------------- + // XTablesSupplier Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) throw(RuntimeException) diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx b/connectivity/source/drivers/mozab/MColumnAlias.cxx index df9254b3d6fc..18aa6ca90020 100644 --- a/connectivity/source/drivers/mozab/MColumnAlias.cxx +++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -//------------------------------------------------------------------------------ + OColumnAlias::OColumnAlias( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB ) { static const sal_Char* s_pProgrammaticNames[] = @@ -87,7 +87,7 @@ OColumnAlias::OColumnAlias( const ::com::sun::star::uno::Reference< ::com::sun:: initialize( _rxORB ); } -//------------------------------------------------------------------------------ + void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB ) { // open our driver settings config node @@ -157,7 +157,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su } } -//------------------------------------------------------------------ + OString OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias( const OUString& _rAlias ) const { AliasMap::const_iterator pos = m_aAliasMap.find( _rAlias ); @@ -169,7 +169,7 @@ OString OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias( const OUString& return pos->second.programmaticAsciiName; } -//------------------------------------------------------------------ + bool OColumnAlias::isColumnSearchable( const OUString _alias ) const { OString sProgrammatic = getProgrammaticNameOrFallbackToUTF8Alias( _alias ); diff --git a/connectivity/source/drivers/mozab/MColumns.cxx b/connectivity/source/drivers/mozab/MColumns.cxx index a7c3b96c5758..452a34bece0a 100644 --- a/connectivity/source/drivers/mozab/MColumns.cxx +++ b/connectivity/source/drivers/mozab/MColumns.cxx @@ -83,12 +83,12 @@ sdbcx::ObjectType OColumns::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OColumns::impl_refresh() throw(RuntimeException) { m_pTable->refreshColumns(); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/mozab/MConfigAccess.cxx b/connectivity/source/drivers/mozab/MConfigAccess.cxx index dd4281a81bb5..53083fb4893b 100644 --- a/connectivity/source/drivers/mozab/MConfigAccess.cxx +++ b/connectivity/source/drivers/mozab/MConfigAccess.cxx @@ -34,7 +34,7 @@ namespace connectivity { namespace mozab { - //----------------------------------------------------------------- + Reference< XPropertySet > createDriverConfigNode( Reference< XMultiServiceFactory > _rxORB ) { Reference< XPropertySet > xNode; @@ -86,7 +86,7 @@ namespace connectivity return xNode; } - //----------------------------------------------------------------- + namespace { // a private helper to accessing the point where we store the reference @@ -98,19 +98,19 @@ namespace connectivity } } - //----------------------------------------------------------------- + void setMozabServiceFactory( const Reference< XMultiServiceFactory >& _rxFactory ) { accessFactoryStorage( ) = _rxFactory; } - //----------------------------------------------------------------- + const Reference< XMultiServiceFactory >& getMozabServiceFactory( ) { return accessFactoryStorage( ); } - //----------------------------------------------------------------- + OUString getDescription(const sal_Char* sNode,const OUString & sDefault) { OUString sPreferredName; @@ -143,7 +143,7 @@ namespace connectivity sDescription = sDefault; return sDescription; } - //----------------------------------------------------------------- + OUString getPreferredProfileName( ) { OUString sPreferredName; @@ -174,7 +174,7 @@ namespace connectivity //......................................................................... -//------------------------------------------------------------------------- + extern "C" const sal_Unicode* SAL_CALL getUserProfile( void ) { static sal_Bool bReadConfig = sal_False; @@ -187,7 +187,7 @@ extern "C" const sal_Unicode* SAL_CALL getUserProfile( void ) return sUserProfile.getStr(); } -//------------------------------------------------------------------------ + extern "C" const sal_Char* SAL_CALL getPabDescription( void ) { static sal_Bool bReadConfig = sal_False; @@ -207,7 +207,7 @@ extern "C" const sal_Char* SAL_CALL getPabDescription( void ) return sPabDescription.getStr(); } -//------------------------------------------------------------------------- + extern "C" const sal_Char* SAL_CALL getHisDescription( void ) { static sal_Bool bReadConfig = sal_False; @@ -227,7 +227,7 @@ extern "C" const sal_Char* SAL_CALL getHisDescription( void ) return sHisDescription.getStr(); } -//------------------------------------------------------------------------- + // MConfigAccess was invented to allow non-UNO parts access to the configuration. // Unfortunately, configuration access requires a XMultiServiceFactory - which the // mozilla side does not have. diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx index 8440d50d9770..708438f67612 100644 --- a/connectivity/source/drivers/mozab/MConnection.cxx +++ b/connectivity/source/drivers/mozab/MConnection.cxx @@ -54,13 +54,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL OMozabConnection_CreateInstance( using namespace dbtools; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -// -------------------------------------------------------------------------------- + namespace connectivity { namespace mozab { @@ -72,7 +72,7 @@ struct ConnectionImplData ::boost::shared_ptr< ::comphelper::OfficeResourceBundle > pResourceBundle; }; -// ----------------------------------------------------------------------------- + #ifdef __MINGW32__ extern "C" #endif @@ -88,13 +88,13 @@ const sal_Char* getSdbcScheme( SdbcScheme _eScheme ) } return NULL; } -// ----------------------------------------------------------------------------- + OUString OConnection::getDriverImplementationName() { return OUString(MOZAB_DRIVER_IMPL_NAME); } -// ----------------------------------------------------------------------------- + const sal_Char* getSchemeURI( MozillaScheme _eScheme ) { switch ( _eScheme ) @@ -108,7 +108,7 @@ const sal_Char* getSchemeURI( MozillaScheme _eScheme ) return NULL; } -// ----------------------------------------------------------------------------- + OConnection::OConnection(MozabDriver* _pDriver) :OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this) @@ -123,7 +123,7 @@ OConnection::OConnection(MozabDriver* _pDriver) m_pDriver->acquire(); } -//----------------------------------------------------------------------------- + OConnection::~OConnection() { acquire(); @@ -132,13 +132,13 @@ OConnection::~OConnection() m_pDriver->release(); m_pDriver = NULL; } -//----------------------------------------------------------------------------- + void SAL_CALL OConnection::release() throw() { relase_ChildImpl(); } -// ----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- + + void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& info) throw(SQLException) { OSL_TRACE("IN OConnection::construct()" ); @@ -340,10 +340,10 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OConnection, "com.sun.star.sdbc.drivers.mozab.OConnection", "com.sun.star.sdbc.Connection") -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -355,7 +355,7 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLExcep m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OUString& _sSql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -372,7 +372,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& _sSql ) throw(SQLException, RuntimeException) { OSL_UNUSED( _sSql ); @@ -380,7 +380,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUStrin OSL_TRACE("OConnection::prepareCall( %s )", OUtoCStr( _sSql ) ); return NULL; } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::nativeSQL( const OUString& _sSql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -389,12 +389,12 @@ OUString SAL_CALL OConnection::nativeSQL( const OUString& _sSql ) throw(SQLExcep return _sSql; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setAutoCommit( sal_Bool /*autoCommit*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setAutoCommit", *this ); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeException) { // you have to distinguish which if you are in autocommit mode or not @@ -402,17 +402,17 @@ sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeExce return sal_True; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException) { // when you database does support transactions you should commit here } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException) { // same as commit but for the other case } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -420,7 +420,7 @@ sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException // just simple -> we are close when we are disposed that means someone called dispose(); (XComponent) return OConnection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -437,51 +437,51 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx return xMetaData; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setReadOnly( sal_Bool /*readOnly*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setReadOnly", *this ); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeException) { // return if your connection to readonly return sal_False; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setCatalog( const OUString& /*catalog*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setCatalog", *this ); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeException) { // return your current catalog return OUString(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 /*level*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setTransactionIsolation", *this ); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { // please have a look at @see com.sun.star.sdbc.TransactionIsolation return TransactionIsolation::NONE; } -// -------------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException) { // if your driver has special database types you can return it here return NULL; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setTypeMap", *this ); } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) { @@ -493,19 +493,19 @@ void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL OConnection::getWarnings( ) throw(SQLException, RuntimeException) { // when you collected some warnings -> return it return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException) { // you should clear your collected warnings here } -//------------------------------------------------------------------------------ + void OConnection::disposing() { // we noticed that we should be destroied in near future so we have to dispose our statements @@ -521,7 +521,7 @@ void OConnection::disposing() dispose_ChildImpl(); } -// ----------------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL OConnection::createCatalog() { @@ -537,7 +537,7 @@ Reference< XTablesSupplier > SAL_CALL OConnection::createCatalog() OSL_TRACE( "\tOUT OConnection::createCatalog()" ); return xTab; } -// ----------------------------------------------------------------------------- + MNameMapper* OConnection::getNameMapper () { @@ -547,7 +547,7 @@ MNameMapper* OConnection::getNameMapper () return m_aNameMapper; } -// ----------------------------------------------------------------------------- + void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Reference< XInterface >& _rxContext ) { if ( _rError.getResId() != 0 ) @@ -584,7 +584,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer throwGenericSQLException( STR_UNSPECIFIED_ERROR, _rxContext ); } -// ----------------------------------------------------------------------------- + void OConnection::throwSQLException( const sal_uInt16 _nErrorResourceId, const Reference< XInterface >& _rxContext ) { ErrorDescriptor aError; diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx index 34c640b6d5e4..ef3b63bf8801 100644 --- a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx +++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx @@ -64,13 +64,13 @@ ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!"); m_pDbMetaDataHelper = new MDatabaseMetaDataHelper(); } -// ------------------------------------------------------------------------- + ODatabaseMetaData::~ODatabaseMetaData() { delete m_pDbMetaDataHelper; } -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows( const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException) @@ -152,317 +152,317 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows( } return( aRows ); } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( ) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 65535; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 254; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 20; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( ) { return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { // We only support a single table return 1; } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { // normally this is " return OUString("\""); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { OUString aVal; return aVal; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { //We support create table return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 /*level*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { return sal_True; // should be supported at least } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { return 0;// 0 means no limit } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { // We allow you to select from any table. return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { //we support insert/update/delete now @@ -470,382 +470,382 @@ sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeE //entry to the popup menu. We should avoid them. return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { // Support added for this. return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 /*fromType*/, sal_Int32 /*toType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { // Any case may be used return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_pConnection->getURL(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { return OUString( "1" ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { return OUString( "0" ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { return 1; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { return TransactionIsolation::NONE; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { OUString aValue; return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { sal_Int32 nValue = 0; // 0 means no limit return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 /*setType*/, sal_Int32 /*concurrency*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + // here follow all methods which return a resultset // the first methods is an example implementation how to use this resultset // of course you could implement it on your and you should do this because // the general way is more memory expensive -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { // there exists no possibility to get table types so we have to check @@ -879,7 +879,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLE pResult->setRows(aRows); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) { // this returns an empty resultset where the column-names are already set @@ -919,7 +919,7 @@ Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) pResultSet->setRows(aRows); return xResultSet; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -931,7 +931,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( pResultSet->setRows( getColumnRows( tableNamePattern, columnNamePattern )); return xResultSet; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern, const Sequence< OUString >& types ) throw(SQLException, RuntimeException) @@ -952,7 +952,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( return xResultSet; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& tableNamePattern ) throw(SQLException, RuntimeException) { @@ -1007,12 +1007,12 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index 0f945dc05beb..a30fae3b3d88 100644 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -36,14 +36,14 @@ namespace connectivity { namespace mozab { - //------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL MozabDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { return *(new MozabDriver( _rxFactory )); } } } -// -------------------------------------------------------------------------------- + MozabDriver::MozabDriver( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) : ODriver_BASE(m_aMutex), m_xMSFactory( _rxFactory ) @@ -51,11 +51,11 @@ MozabDriver::MozabDriver( ,m_pCreationFunc(NULL) { } -// ----------------------------------------------------------------------------- + MozabDriver::~MozabDriver() { } -// -------------------------------------------------------------------------------- + void MozabDriver::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -80,14 +80,14 @@ void MozabDriver::disposing() } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString MozabDriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString(MOZAB_DRIVER_IMPL_NAME); // this name is referenced in the configuration and in the mozab.xml // Please take care when changing it. } -//------------------------------------------------------------------------------ + Sequence< OUString > MozabDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { // which service is supported @@ -97,7 +97,7 @@ Sequence< OUString > MozabDriver::getSupportedServiceNames_Static( ) throw (Run return aSNS; } -//------------------------------------------------------------------ + OUString SAL_CALL MozabDriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -108,13 +108,13 @@ sal_Bool SAL_CALL MozabDriver::supportsService( const OUString& _rServiceName ) return cppu::supportsService(this, _rServiceName); } -//------------------------------------------------------------------ + Sequence< OUString > SAL_CALL MozabDriver::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL MozabDriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { if ( !ensureInit() ) @@ -150,7 +150,7 @@ Reference< XConnection > SAL_CALL MozabDriver::connect( const OUString& url, con return xCon; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL MozabDriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { @@ -160,7 +160,7 @@ sal_Bool SAL_CALL MozabDriver::acceptsURL( const OUString& url ) // here we have to look if we support this url format return impl_classifyURL(url) != Unknown; } -// -------------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL MozabDriver::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) { if ( !ensureInit() ) @@ -194,17 +194,17 @@ Sequence< DriverPropertyInfo > SAL_CALL MozabDriver::getPropertyInfo( const OUSt // if you have something special to say return it here :-) return Sequence< DriverPropertyInfo >(); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL MozabDriver::getMajorVersion( ) throw(RuntimeException) { return 1; // depends on you } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL MozabDriver::getMinorVersion( ) throw(RuntimeException) { return 0; // depends on you } -// -------------------------------------------------------------------------------- + EDriverType MozabDriver::impl_classifyURL( const OUString& url ) { // Skip 'sdbc:mozab: part of URL @@ -252,7 +252,7 @@ EDriverType MozabDriver::impl_classifyURL( const OUString& url ) return Unknown; } -// -------------------------------------------------------------------------------- + namespace { template< typename FUNCTION > @@ -277,7 +277,7 @@ namespace } } -// ----------------------------------------------------------------------------- + extern "C" { static void SAL_CALL thisModule() {} } bool MozabDriver::ensureInit() @@ -314,6 +314,6 @@ bool MozabDriver::ensureInit() return true; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx index 346c6bda8ff1..e8ace7cf11ce 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx @@ -61,17 +61,17 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString ,m_pResultSet() { } -// ----------------------------------------------------------------------------- + OPreparedStatement::~OPreparedStatement() { } -// ----------------------------------------------------------------------------- + void OPreparedStatement::lateInit() { if ( eSelect != parseSql( m_sSqlStatement ) ) throw SQLException(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -86,7 +86,7 @@ void SAL_CALL OPreparedStatement::disposing() } m_xParamColumns = NULL; } -// ----------------------------------------------------------------------------- + OCommonStatement::StatementType OPreparedStatement::parseSql( const OUString& sql , sal_Bool bAdjusted ) throw ( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) @@ -106,7 +106,7 @@ OCommonStatement::StatementType OPreparedStatement::parseSql( const OUString& sq return eStatementType; } -// ----------------------------------------------------------------------------- + void OPreparedStatement::initializeResultSet( OResultSet* _pResult ) { OCommonStatement::initializeResultSet( _pResult ); @@ -114,14 +114,14 @@ void OPreparedStatement::initializeResultSet( OResultSet* _pResult ) _pResult->setParameterRow( m_aParameterRow ); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::clearCachedResultSet() { OCommonStatement::clearCachedResultSet(); m_pResultSet.clear(); m_xMetaData.clear(); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::cacheResultSet( const ::rtl::Reference< OResultSet >& _pResult ) { OCommonStatement::cacheResultSet( _pResult ); @@ -129,17 +129,17 @@ void OPreparedStatement::cacheResultSet( const ::rtl::Reference< OResultSet >& _ m_pResultSet = _pResult; } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::acquire() throw() { OCommonStatement::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::release() throw() { OCommonStatement::release(); } -// ----------------------------------------------------------------------------- + Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OCommonStatement::queryInterface(rType); @@ -147,12 +147,12 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt aRet = OPreparedStatement_BASE::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { return ::comphelper::concatSequences(OPreparedStatement_BASE::getTypes(),OCommonStatement::getTypes()); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) throw(SQLException, RuntimeException) { @@ -171,7 +171,7 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr return m_xMetaData; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -180,14 +180,14 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc Reference< XResultSet> xResult = executeQuery(); return xResult.is(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XStatement::executeUpdate", *this ); return 0; } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const OUString& x ) throw(SQLException, RuntimeException) { @@ -197,7 +197,7 @@ void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const OUS OSL_TRACE("prepStmt::setString( %s )", OUtoCStr( x ) ); setParameter( parameterIndex, x ); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQLException, RuntimeException) { @@ -206,7 +206,7 @@ Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQ return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLException, RuntimeException) { @@ -218,62 +218,62 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE // stuff again. Just execute. return impl_executeCurrentQuery(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 /*parameterIndex*/, sal_Bool /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBoolean", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setByte( sal_Int32 /*parameterIndex*/, sal_Int8 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setByte", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const Date& /*aData*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setDate", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setTime", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 /*parameterIndex*/, const DateTime& /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setTimestamp", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setDouble( sal_Int32 /*parameterIndex*/, double /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setDouble", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setFloat( sal_Int32 /*parameterIndex*/, float /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setFloat", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setInt( sal_Int32 /*parameterIndex*/, sal_Int32 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setInt", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setLong( sal_Int32 /*parameterIndex*/, sal_Int64 /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setLong", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/ ) throw(SQLException, RuntimeException) { @@ -284,79 +284,79 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 / (m_aParameterRow->get())[parameterIndex].setNull(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setClob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBlob", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setArray", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setRef", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 /*parameterIndex*/, const Any& /*x*/, sal_Int32 /*sqlType*/, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setObjectWithInfo", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& /*typeName*/ ) throw(SQLException, RuntimeException) { setNull(parameterIndex,sqlType); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException) { ::dbtools::implSetObject(this,parameterIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setShort( sal_Int32 /*parameterIndex*/, sal_Int16 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setShort", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBytes( sal_Int32 /*parameterIndex*/, const Sequence< sal_Int8 >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBytes", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 /*parameterIndex*/, const Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setCharacterStream", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 /*parameterIndex*/, const Reference< ::com::sun::star::io::XInputStream >& /*x*/, sal_Int32 /*length*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XParameters::setBinaryStream", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { switch(nHandle) @@ -374,7 +374,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex) { ::connectivity::checkDisposed(OCommonStatement_IBASE::rBHelper.bDisposed); @@ -387,7 +387,7 @@ void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex) if ((sal_Int32)(m_aParameterRow->get()).size() <= parameterIndex) (m_aParameterRow->get()).resize(parameterIndex+1); } -// ----------------------------------------------------------------------------- + void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetValue& x) { @@ -398,7 +398,7 @@ ORowSetValue& x) (m_aParameterRow->get())[parameterIndex] = x; } -//------------------------------------------------------------------ + size_t OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol) { OSL_UNUSED( pParameter ); @@ -450,7 +450,7 @@ size_t OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere m_xParamColumns->get().push_back(xParaColumn); return nParameter; } -// ----------------------------------------------------------------------------- + void OPreparedStatement::describeColumn(OSQLParseNode* _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable) { @@ -470,7 +470,7 @@ _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable) // else // AddParameter(_pParameter,xProp); } -// ------------------------------------------------------------------------- + void OPreparedStatement::describeParameter() { ::std::vector< OSQLParseNode*> aParseNodes; @@ -492,7 +492,7 @@ aParseNodes.begin(); } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes) { OSL_ENSURE(pParseNode != NULL,"OResultSet: internal error: invalid ParseNode"); @@ -512,22 +512,22 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< for (sal_uInt32 i = 0; i < pParseNode->count(); i++) scanParameter(pParseNode->getChild(i),_rParaNodes); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL OPreparedStatement::getResultSet( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return NULL; } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OPreparedStatement::getUpdateCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return 0; } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL OPreparedStatement::getMoreResults( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return sal_False; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index aeb5bea51dd0..49c9ff05f76e 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -60,13 +60,13 @@ using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -//------------------------------------------------------------------------------ + // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) \ { return OUString("com.sun.star.sdbcx.mozab.ResultSet"); } -// ------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(2); @@ -80,7 +80,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) t return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< connectivity::OSQLParseTreeIterator >& _pSQLIterator ) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) @@ -109,12 +109,12 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< conne m_aQuery.setMaxNrOfReturns(pStmt->getOwnConnection()->getMaxResultRecords()); } -// ------------------------------------------------------------------------- + OResultSet::~OResultSet() { } -// ------------------------------------------------------------------------- + void OResultSet::disposing(void) { OPropertySetHelper::disposing(); @@ -133,7 +133,7 @@ void OResultSet::disposing(void) m_pTable = NULL; } } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); @@ -141,7 +141,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep aRet = OResultSet_BASE::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException) { OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), @@ -150,7 +150,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void OResultSet::methodEntry() { checkDisposed(OResultSet_BASE::rBHelper.bDisposed); @@ -161,7 +161,7 @@ void OResultSet::methodEntry() } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -181,60 +181,60 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQ assert(false); return 0; // Never reached } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); m_bWasNull = sal_True; return sal_False; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return 0; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return Sequence< sal_Int8 >(); } -// ------------------------------------------------------------------------- + Date SAL_CALL OResultSet::getDate( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return Date(); } -// ------------------------------------------------------------------------- + double SAL_CALL OResultSet::getDouble( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return 0.0; } -// ------------------------------------------------------------------------- + float SAL_CALL OResultSet::getFloat( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { @@ -242,7 +242,7 @@ sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 /*columnIndex*/ ) throw(SQLExce return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -250,14 +250,14 @@ sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) OSL_TRACE("In/Out: OResultSet::getRow, return = %u", m_nRowPos ); return m_nRowPos; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return sal_Int64(); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException) { @@ -268,49 +268,49 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx m_pSQLIterator->getSelectColumns(), m_pSQLIterator->getTables().begin()->first ,m_pTable,determineReadOnly()); return m_xMetaData; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getObject( sal_Int32 /*columnIndex*/, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { return Any(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + void OResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException) { if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->get().size()) ::dbtools::throwInvalidIndexException(*this); } -// ------------------------------------------------------------------------- + sal_uInt32 OResultSet::currentRowCount() { if ( m_bIsAlwaysFalseQuery ) @@ -318,7 +318,7 @@ sal_uInt32 OResultSet::currentRowCount() return m_aQuery.getRealRowCount() - deletedCount(); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::fetchCurrentRow( ) throw(SQLException, RuntimeException) { @@ -326,7 +326,7 @@ sal_Bool OResultSet::fetchCurrentRow( ) throw(SQLException, RuntimeException) return fetchRow(getCurrentCardNumber()); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::pushCard(sal_uInt32 cardNumber) throw(SQLException, RuntimeException) { if (cardNumber == 0) @@ -353,7 +353,7 @@ sal_Bool OResultSet::pushCard(sal_uInt32 cardNumber) throw(SQLException, Runtime return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw(SQLException, RuntimeException) { OSL_TRACE("fetchRow, cardNumber = %u", cardNumber ); @@ -394,7 +394,7 @@ sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw( } return sal_True; } -// ------------------------------------------------------------------------- + const ORowSetValue& OResultSet::getValue(sal_Int32 cardNumber, sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -409,7 +409,7 @@ const ORowSetValue& OResultSet::getValue(sal_Int32 cardNumber, sal_Int32 columnI return (m_aRow->get())[columnIndex]; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -424,14 +424,14 @@ OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLExcept return getValue(getCurrentCardNumber(), mapColumn( columnIndex ) ); } -// ------------------------------------------------------------------------- + Time SAL_CALL OResultSet::getTime( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); return Time(); } -// ------------------------------------------------------------------------- + DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) @@ -439,7 +439,7 @@ DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 /*columnIndex*/ ) throw(SQ ResultSetEntryGuard aGuard( *this ); return DateTime(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { @@ -450,7 +450,7 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeExcep OSL_TRACE("In/Out: OResultSet::isBeforeFirst" ); return( m_nRowPos < 1 ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -458,7 +458,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeExcepti OSL_TRACE("In/Out: OResultSet::isAfterLast" ); return m_nRowPos > currentRowCount() && m_aQuery.queryComplete(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -466,7 +466,7 @@ sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) OSL_TRACE("In/Out: OResultSet::isFirst" ); return m_nRowPos == 1; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -474,7 +474,7 @@ sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) OSL_TRACE("In/Out: OResultSet::isLast" ); return m_nRowPos == currentRowCount() && m_aQuery.queryComplete(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -484,7 +484,7 @@ void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) if ( first() ) previous(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -493,7 +493,7 @@ void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) if(last()) next(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException) { @@ -501,40 +501,40 @@ void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException) OSL_TRACE("In/Out: OResultSet::close" ); dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::first" ); return seekRow( FIRST_POS ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::last" ); return seekRow( LAST_POS ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::absolute" ); return seekRow( ABSOLUTE_POS, row ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::relative" ); return seekRow( RELATIVE_POS, row ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); OSL_TRACE("In/Out: OResultSet::previous" ); return seekRow( PRIOR_POS ); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -542,7 +542,7 @@ Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException OSL_TRACE("In/Out: OResultSet::getStatement" ); return m_xStatement; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeException) { @@ -550,27 +550,27 @@ sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeExceptio OSL_TRACE("In/Out: OResultSet::rowDeleted, m_RowStates=%u",m_RowStates ); return ((m_RowStates & RowStates_Deleted) == RowStates_Deleted) ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); OSL_TRACE("In/Out: OResultSet::rowInserted,m_RowStates=%u",m_RowStates ); return ((m_RowStates & RowStates_Inserted) == RowStates_Inserted); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { ResultSetEntryGuard aGuard( *this ); OSL_TRACE("In/Out: OResultSet::rowUpdated,m_RowStates=%u",m_RowStates ); return ((m_RowStates & RowStates_Updated) == RowStates_Updated) ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException) { return seekRow( NEXT_POS ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -578,7 +578,7 @@ sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) return m_bWasNull; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) { @@ -586,25 +586,25 @@ void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) OSL_TRACE("In/Out: OResultSet::cancel" ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::clearWarnings" ); } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::getWarnings" ); return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) { OSL_TRACE("In/Out: OResultSet::refreshRow" ); if (fetchRow(getCurrentCardNumber(),sal_True)) //force fetch current row will cause we lose all change to the current row m_pStatement->getOwnConnection()->throwSQLException( STR_ERROR_REFRESH_ROW, *this ); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper* OResultSet::createArrayHelper( ) const { Sequence< Property > aProps(5); @@ -618,12 +618,12 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const return new OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper & OResultSet::getInfoHelper() { return *const_cast<OResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::convertFastPropertyValue( Any & /*rConvertedValue*/, Any & /*rOldValue*/, @@ -645,7 +645,7 @@ sal_Bool OResultSet::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& /*rValue*/ @@ -667,7 +667,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast( ; } } -// ------------------------------------------------------------------------- + void OResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle @@ -693,23 +693,23 @@ void OResultSet::getFastPropertyValue( break; } } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::acquire() throw() { OResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::release() throw() { OResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ------------------------------------------------------------------------- + void OResultSet::parseParameter( const OSQLParseNode* pNode, OUString& rMatchString ) { OSL_ENSURE(pNode->count() > 0,"Error parsing parameter in Parse Tree"); @@ -1032,7 +1032,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT } -// ----------------------------------------------------------------------------- + void OResultSet::fillRowData() throw( ::com::sun::star::sdbc::SQLException ) @@ -1122,7 +1122,7 @@ void OResultSet::fillRowData() #endif } -// ----------------------------------------------------------------------------- + static sal_Bool matchRow( OValueRow& row1, OValueRow& row2 ) { OValueVector::Vector::iterator row1Iter = row1->get().begin(); @@ -1162,7 +1162,7 @@ sal_Int32 OResultSet::getRowForCardNumber(sal_Int32 nCardNum) return 0; } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -1337,7 +1337,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep } } -// ----------------------------------------------------------------------------- + void OResultSet::setBoundedColumns(const OValueRow& _rRow, const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns, @@ -1419,7 +1419,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::isCount() const { return (m_pParseTree && @@ -1431,7 +1431,7 @@ sal_Bool OResultSet::isCount() const ); } -// ----------------------------------------------------------------------------- + // // Check for valid row in m_aQuery // @@ -1483,7 +1483,7 @@ sal_Int32 OResultSet::deletedCount() return m_CurrentRowCount - static_cast<sal_Int32>(m_pKeySet->get().size()); } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) { ResultSetEntryGuard aGuard( *this ); @@ -1560,7 +1560,7 @@ sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) fetchCurrentRow(); return sal_True; } -// ----------------------------------------------------------------------------- + void OResultSet::setColumnMapping(const ::std::vector<sal_Int32>& _aColumnMapping) { m_aColMapping = _aColumnMapping; @@ -1569,7 +1569,7 @@ void OResultSet::setColumnMapping(const ::std::vector<sal_Int32>& _aColumnMappin OSL_TRACE("Set Mapped: %d -> %d", i, m_aColMapping[i] ); #endif } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Any OResultSet::getBookmark( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { @@ -1673,7 +1673,7 @@ void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x) throw m_nUpdatedRow = getCurrentCardNumber(); m_RowStates = m_RowStates | RowStates_Updated; } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -1691,72 +1691,72 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException m_nUpdatedRow = getCurrentCardNumber(); m_RowStates = m_RowStates | RowStates_Updated; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException) { updateValue(columnIndex, static_cast<bool>(x)); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateLong( sal_Int32 /*columnIndex*/, sal_Int64 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateLong", *this ); } -// ----------------------------------------------------------------------- + void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { @@ -1769,12 +1769,12 @@ void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Refer x->readBytes(aSeq,length); updateValue(columnIndex,aSeq); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { updateBinaryStream(columnIndex,x,length); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException) { if (!::dbtools::implUpdateObject(this, columnIndex, x)) @@ -1786,7 +1786,7 @@ void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) th ::dbtools::throwGenericSQLException(sError,*this); } // if (!::dbtools::implUpdateObject(this, columnIndex, x)) } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { @@ -1801,7 +1801,7 @@ void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& } // XResultSetUpdate -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -1813,7 +1813,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQLExcepti m_aQuery.setRowStates(getCurrentCardNumber(),m_RowStates); OSL_TRACE("insertRow out, m_nRowPos = %u", m_nRowPos ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { OSL_TRACE("updateRow in, m_nRowPos = %u", m_nRowPos ); @@ -1842,7 +1842,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(::com::sun::star::sdbc::SQLExcepti fetchCurrentRow(); OSL_TRACE("updateRow out, m_nRowPos = %u", m_nRowPos ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::deleteRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { OSL_TRACE("deleteRow, m_nRowPos = %u", m_nRowPos ); @@ -1864,7 +1864,7 @@ void SAL_CALL OResultSet::deleteRow( ) throw(::com::sun::star::sdbc::SQLExcepti m_RowStates = RowStates_Deleted; OSL_TRACE("deleteRow out, m_nRowPos = %u", m_nRowPos ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancelRowUpdates( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ResultSetEntryGuard aGuard( *this ); @@ -1872,7 +1872,7 @@ void SAL_CALL OResultSet::cancelRowUpdates( ) throw(::com::sun::star::sdbc::SQL if (fetchRow(getCurrentCardNumber(),sal_True)) //force fetch current row will cause we lose all change to the current row m_pStatement->getOwnConnection()->throwSQLException( STR_CAN_NOT_CANCEL_ROW_UPDATE, *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { OSL_TRACE("moveToInsertRow in, m_nRowPos = %u", m_nRowPos ); @@ -1902,7 +1902,7 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLE fetchCurrentRow(); OSL_TRACE("moveToInsertRow out, m_nRowPos = %u", m_nRowPos ); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ResultSetEntryGuard aGuard( *this ); diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx index 48a888d4316a..d43eda83a0c8 100644 --- a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx +++ b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx @@ -34,48 +34,48 @@ using namespace com::sun::star::beans; using namespace ::dbtools; using namespace ::comphelper; -// ------------------------------------------------------------------------- + OResultSetMetaData::~OResultSetMetaData() { m_xColumns = NULL; } -// ----------------------------------------------------------------------------- + void OResultSetMetaData::checkColumnIndex(sal_Int32 column) throw(SQLException, RuntimeException) { if(column <= 0 || column > (sal_Int32)(sal_Int32)m_xColumns->get().size()) throwInvalidIndexException(*this); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException) { return getPrecision(column); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return DataType::VARCHAR; // at the moment there exists only this type } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { return static_cast<sal_Int32>((m_xColumns->get()).size()); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -93,70 +93,70 @@ OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQ } return sColumnName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return m_aTableName; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); return getString((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { return getColumnName(column); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); return getBOOL((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY))); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -177,7 +177,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQL return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -187,17 +187,17 @@ sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLEx return m_bReadOnly || bReadOnly || m_pTable->isReadOnly(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { return !isReadOnly(column); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { return !isReadOnly(column); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mozab/MServices.cxx b/connectivity/source/drivers/mozab/MServices.cxx index 3469a62b75a0..cbe2f70fee1c 100644 --- a/connectivity/source/drivers/mozab/MServices.cxx +++ b/connectivity/source/drivers/mozab/MServices.cxx @@ -41,7 +41,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -79,7 +79,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + typedef void* (SAL_CALL * OMozillaBootstrap_CreateInstanceFunction)(const Reference< XMultiServiceFactory >& _rxFactory ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createMozillaBootstrap(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { @@ -109,7 +109,7 @@ typedef void* (SAL_CALL * OMozillaBootstrap_CreateInstanceFunction)(const Refere } return NULL; } -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mozab_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx index 14d154ebf1ae..2632bf8b5737 100644 --- a/connectivity/source/drivers/mozab/MStatement.cxx +++ b/connectivity/source/drivers/mozab/MStatement.cxx @@ -58,7 +58,7 @@ static ::osl::Mutex m_ThreadMutex; using namespace ::comphelper; using namespace connectivity::mozab; using namespace connectivity; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; @@ -66,7 +66,7 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -//------------------------------------------------------------------------------ + OCommonStatement::OCommonStatement(OConnection* _pConnection ) :OCommonStatement_IBASE(m_aMutex) ,OPropertySetHelper(OCommonStatement_IBASE::rBHelper) @@ -83,12 +83,12 @@ OCommonStatement::OCommonStatement(OConnection* _pConnection ) m_pConnection->acquire(); OSL_TRACE("In/Out: OCommonStatement::OCommonStatement" ); } -// ----------------------------------------------------------------------------- + OCommonStatement::~OCommonStatement() { } -//------------------------------------------------------------------------------ + void OCommonStatement::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -105,7 +105,7 @@ void OCommonStatement::disposing() dispose_ChildImpl(); OCommonStatement_IBASE::disposing(); } -//----------------------------------------------------------------------------- + Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OCommonStatement_IBASE::queryInterface(rType); @@ -113,7 +113,7 @@ Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(Runtim aRet = OPropertySetHelper::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), @@ -122,7 +122,7 @@ Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) return ::comphelper::concatSequences(aTypes.getTypes(),OCommonStatement_IBASE::getTypes()); } -// ------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::close( ) throw(SQLException, RuntimeException) { { @@ -133,7 +133,7 @@ void SAL_CALL OCommonStatement::close( ) throw(SQLException, RuntimeException) } -// ------------------------------------------------------------------------- + void OCommonStatement::createTable( ) throw ( SQLException, RuntimeException ) { if(m_pParseTree) @@ -178,7 +178,7 @@ void OCommonStatement::createTable( ) throw ( SQLException, RuntimeException ) else getOwnConnection()->throwSQLException( STR_QUERY_TOO_COMPLEX, *this ); } -// ------------------------------------------------------------------------- + OCommonStatement::StatementType OCommonStatement::parseSql( const OUString& sql , sal_Bool bAdjusted) throw ( SQLException, RuntimeException ) { @@ -250,7 +250,7 @@ OCommonStatement::StatementType OCommonStatement::parseSql( const OUString& sql return eSelect; } -// ------------------------------------------------------------------------- + Reference< XResultSet > OCommonStatement::impl_executeCurrentQuery() { clearCachedResultSet(); @@ -265,7 +265,7 @@ Reference< XResultSet > OCommonStatement::impl_executeCurrentQuery() } -// ------------------------------------------------------------------------- + void OCommonStatement::initializeResultSet( OResultSet* _pResult ) { ENSURE_OR_THROW( _pResult, "invalid result set" ); @@ -277,7 +277,7 @@ void OCommonStatement::initializeResultSet( OResultSet* _pResult ) _pResult->setTable(m_pTable); } -// ------------------------------------------------------------------------- + void OCommonStatement::clearCachedResultSet() { Reference< XResultSet > xResultSet( m_xResultSet.get(), UNO_QUERY ); @@ -297,14 +297,14 @@ void OCommonStatement::clearCachedResultSet() m_xResultSet.clear(); } -// ------------------------------------------------------------------------- + void OCommonStatement::cacheResultSet( const ::rtl::Reference< OResultSet >& _pResult ) { ENSURE_OR_THROW( _pResult.is(), "invalid result set" ); m_xResultSet = Reference< XResultSet >( _pResult.get() ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OCommonStatement::execute( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -316,7 +316,7 @@ sal_Bool SAL_CALL OCommonStatement::execute( const OUString& sql ) throw(SQLExce // returns true when a resultset is available return xRS.is(); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OCommonStatement::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -332,7 +332,7 @@ Reference< XResultSet > SAL_CALL OCommonStatement::executeQuery( const OUString& return impl_executeCurrentQuery(); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OCommonStatement::getConnection( ) throw(SQLException, RuntimeException) { @@ -342,7 +342,7 @@ Reference< XConnection > SAL_CALL OCommonStatement::getConnection( ) throw(SQLE // just return our connection here return (Reference< XConnection >)m_pConnection; } -// ----------------------------------------------------------------------------- + Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ::cppu::queryInterface(rType,static_cast< XServiceInfo*> (this)); @@ -350,14 +350,14 @@ Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeExcep aRet = OCommonStatement::queryInterface(rType); return aRet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCommonStatement::executeUpdate( const OUString& /*sql*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XStatement::executeUpdate", *this ); return 0; } -// ------------------------------------------------------------------------- + Any SAL_CALL OCommonStatement::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -365,9 +365,9 @@ Any SAL_CALL OCommonStatement::getWarnings( ) throw(SQLException, RuntimeExcept return makeAny(m_aLastWarning); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -376,7 +376,7 @@ void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeExc m_aLastWarning = SQLWarning(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OCommonStatement::createArrayHelper( ) const { // this properties are define by the service resultset @@ -397,12 +397,12 @@ void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeExc return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OCommonStatement::getInfoHelper() { return *const_cast<OCommonStatement*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OCommonStatement::convertFastPropertyValue( Any & /*rConvertedValue*/, Any & /*rOldValue*/, @@ -414,7 +414,7 @@ sal_Bool OCommonStatement::convertFastPropertyValue( // here we have to try to convert return bConverted; } -// ------------------------------------------------------------------------- + void OCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& /*rValue*/) throw (Exception) { // set the value to whatever is necessary @@ -432,7 +432,7 @@ void OCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ; } } -// ------------------------------------------------------------------------- + void OCommonStatement::getFastPropertyValue(Any& /*rValue*/,sal_Int32 nHandle) const { switch(nHandle) @@ -449,34 +449,34 @@ void OCommonStatement::getFastPropertyValue(Any& /*rValue*/,sal_Int32 nHandle) c ; } } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.OStatement","com.sun.star.sdbc.Statement"); -// ----------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::acquire() throw() { OCommonStatement_IBASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCommonStatement::release() throw() { relase_ChildImpl(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::acquire() throw() { OCommonStatement::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::release() throw() { OCommonStatement::release(); } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OCommonStatement::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + void OCommonStatement::createColumnMapping() { size_t i; @@ -499,7 +499,7 @@ void OCommonStatement::createColumnMapping() OSL_TRACE("AFTER Mapped: %d -> %d", i, m_aColMapping[i] ); #endif } -// ----------------------------------------------------------------------------- + void OCommonStatement::analyseSQL() { @@ -525,7 +525,7 @@ void OCommonStatement::analyseSQL() } } } -//------------------------------------------------------------------ + void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef, OSQLParseNode* pAscendingDescending) { @@ -550,6 +550,6 @@ void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef, // Ascending or Descending? m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? SQL_DESC : SQL_ASC); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mozab/MTable.cxx b/connectivity/source/drivers/mozab/MTable.cxx index 4abecfa5ba64..e0939535352d 100644 --- a/connectivity/source/drivers/mozab/MTable.cxx +++ b/connectivity/source/drivers/mozab/MTable.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OTable::OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection, const OUString& _Name, const OUString& _Type, const OUString& _Description ) :OTable_Base(_pTables, _pConnection, sal_True, _Name, _Type, _Description ) @@ -55,25 +55,25 @@ OTable::OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection, construct(); } -//-------------------------------------------------------------------------- + sdbcx::OCollection* OTable::createColumns( const TStringVector& _rNames ) { return new OColumns( this, m_aMutex, _rNames ); } -//-------------------------------------------------------------------------- + sdbcx::OCollection* OTable::createKeys(const TStringVector& _rNames) { return new OKeysHelper( this, m_aMutex, _rNames ); } -//-------------------------------------------------------------------------- + sdbcx::OCollection* OTable::createIndexes(const TStringVector& _rNames) { return new OIndexesHelper( this, m_aMutex, _rNames ); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/mozab/MTables.cxx b/connectivity/source/drivers/mozab/MTables.cxx index 91bd7da14abe..7a3ee5b9451a 100644 --- a/connectivity/source/drivers/mozab/MTables.cxx +++ b/connectivity/source/drivers/mozab/MTables.cxx @@ -70,17 +70,17 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OTables::impl_refresh( ) throw(RuntimeException) { static_cast<OCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void OTables::disposing(void) { m_xMetaData.clear(); OCollection::disposing(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index d97e4a6ef157..a59240723db4 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx @@ -51,11 +51,11 @@ MozillaBootstrap::MozillaBootstrap( m_ProfileAccess(NULL), m_ProfileManager(NULL) { } -// ----------------------------------------------------------------------------- + MozillaBootstrap::~MozillaBootstrap() { } -// ----------------------------------------------------------------------------- + void MozillaBootstrap::Init() { sal_Bool aProfileExists=sal_False; @@ -72,7 +72,7 @@ void MozillaBootstrap::Init() bootupProfile(::com::sun::star::mozilla::MozillaProductType_Mozilla,OUString()); } -// -------------------------------------------------------------------------------- + void MozillaBootstrap::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -80,12 +80,12 @@ void MozillaBootstrap::disposing() } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString MozillaBootstrap::getImplementationName_Static( ) throw(RuntimeException) { return OUString(MOZAB_MozillaBootstrap_IMPL_NAME); } -//------------------------------------------------------------------------------ + Sequence< OUString > MozillaBootstrap::getSupportedServiceNames_Static( ) throw (RuntimeException) { // which service is supported @@ -95,7 +95,7 @@ Sequence< OUString > MozillaBootstrap::getSupportedServiceNames_Static( ) throw return aSNS; } -//------------------------------------------------------------------ + OUString SAL_CALL MozillaBootstrap::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -106,7 +106,7 @@ sal_Bool SAL_CALL MozillaBootstrap::supportsService( const OUString& _rServiceNa return cppu::supportsService(this, _rServiceName); } -//------------------------------------------------------------------ + Sequence< OUString > SAL_CALL MozillaBootstrap::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx index 71a01493d659..5237a9304f23 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::mozilla; namespace { - // ------------------------------------------------------------------- + static OUString lcl_getUserDataDirectory() { ::osl::Security aSecurity; @@ -59,7 +59,7 @@ namespace return aConfigPath + "/"; } - // ------------------------------------------------------------------- + const size_t NB_PRODUCTS = 3; const size_t NB_CANDIDATES = 4; @@ -87,7 +87,7 @@ namespace "MOZILLA_THUNDERBIRD_PROFILE_ROOT", }; - // ------------------------------------------------------------------- + static OUString lcl_guessProfileRoot( MozillaProductType _product ) { size_t productIndex = _product - 1; @@ -144,7 +144,7 @@ namespace } } -// ----------------------------------------------------------------------- + OUString getRegistryDir(MozillaProductType product) { if (product == MozillaProductType_Default) diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx index 77a9020a7207..e71d28ba965a 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx @@ -87,7 +87,7 @@ namespace connectivity extern sal_Bool MNS_Init(sal_Bool& aProfileExists); -// ------------------------------------------------------------------------- + MDatabaseMetaDataHelper::MDatabaseMetaDataHelper() :m_bProfileExists(sal_False) { @@ -96,7 +96,7 @@ MDatabaseMetaDataHelper::MDatabaseMetaDataHelper() OSL_TRACE( "\tOUT MDatabaseMetaDataHelper::MDatabaseMetaDataHelper()" ); } -// ------------------------------------------------------------------------- + MDatabaseMetaDataHelper::~MDatabaseMetaDataHelper() { m_aTableNames.clear(); @@ -198,7 +198,7 @@ static nsresult insertPABDescription() {0xa2, 0xda, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \ } -// ------------------------------------------------------------------------- + // Case where we get a parent uri, and need to list its children. static nsresult getSubsFromParent(const OString& aParent, nsIEnumerator **aSubs) { diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx index add19e6852ba..1324d7822a97 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx @@ -141,21 +141,21 @@ namespace connectivity { namespace mozab { //==================================================================== //= MLdapAttributeMap //==================================================================== - // ------------------------------------------------------------------- + MLdapAttributeMap::MLdapAttributeMap() :m_pData( new AttributeMap_Data ) { } - // ------------------------------------------------------------------- + MLdapAttributeMap::~MLdapAttributeMap() { } - // ------------------------------------------------------------------- + NS_IMPL_THREADSAFE_ISUPPORTS1( MLdapAttributeMap, nsIAbLDAPAttributeMap ) - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::GetAttributeList(const nsACString & aProperty, nsACString & _retval) { OString sProperty( MTypeConverter::nsACStringToOString( aProperty ) ); @@ -175,7 +175,7 @@ namespace connectivity { namespace mozab { return NS_OK; } - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::GetAttributes(const nsACString & aProperty, PRUint32* aCount, char*** aAttrs) { OSL_FAIL( "MLdapAttributeMap::GetAttributes: not implemented!" ); @@ -185,7 +185,7 @@ namespace connectivity { namespace mozab { return NS_ERROR_NOT_IMPLEMENTED; } - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::GetFirstAttribute(const nsACString & aProperty, nsACString & _retval) { OString sProperty( MTypeConverter::nsACStringToOString( aProperty ) ); @@ -207,7 +207,7 @@ namespace connectivity { namespace mozab { return NS_OK; } - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::SetAttributeList(const nsACString & aProperty, const nsACString & aAttributeList, PRBool allowInconsistencies) { OSL_FAIL( "MLdapAttributeMap::SetAttributeList: not implemented!" ); @@ -217,7 +217,7 @@ namespace connectivity { namespace mozab { return NS_ERROR_NOT_IMPLEMENTED; } - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::GetProperty(const nsACString & aAttribute, nsACString & _retval) { OSL_FAIL( "MLdapAttributeMap::GetProperty: not implemented!" ); @@ -226,7 +226,7 @@ namespace connectivity { namespace mozab { return NS_ERROR_NOT_IMPLEMENTED; } - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::GetAllCardAttributes(nsACString & _retval) { const MapPropertiesToAttributes& rPropertyMap( lcl_getPropertyMap() ); @@ -246,14 +246,14 @@ namespace connectivity { namespace mozab { return NS_OK; } - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::CheckState(void) { // we do not allow modifying the map, so we're always in a valid state return NS_OK; } - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::SetFromPrefs(const nsACString & aPrefBranchName) { OSL_FAIL( "MLdapAttributeMap::SetFromPrefs: not implemented!" ); @@ -261,7 +261,7 @@ namespace connectivity { namespace mozab { return NS_ERROR_NOT_IMPLEMENTED; } - // ------------------------------------------------------------------- + NS_IMETHODIMP MLdapAttributeMap::SetCardPropertiesFromLDAPMessage(nsILDAPMessage* aMessage, nsIAbCard* aCard) { NS_ENSURE_ARG_POINTER( aMessage ); @@ -313,7 +313,7 @@ namespace connectivity { namespace mozab { return NS_OK; } - // ------------------------------------------------------------------- + namespace { struct PreferMailFormatType @@ -347,7 +347,7 @@ namespace connectivity { namespace mozab { } } - // ------------------------------------------------------------------- + void MLdapAttributeMap::fillCardFromResult( nsIAbCard& _card, const MQueryHelperResultEntry& _result ) { _card.SetPreferMailFormat( nsIAbPreferMailFormat::unknown ); @@ -391,7 +391,7 @@ namespace connectivity { namespace mozab { } } - // ------------------------------------------------------------------- + void MLdapAttributeMap::fillResultFromCard( MQueryHelperResultEntry& _result, nsIAbCard& _card ) { nsXPIDLString value; diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx index 039db52576f5..9cd96b40acdc 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx @@ -191,7 +191,7 @@ nsresult MNSMozabProxy::QueryHelperStub() } return rv; } -//------------------------------------------------------------------- + #define NS_LDAPCONNECTION_CONTRACTID "@mozilla.org/network/ldap-connection;1" #define NS_LDAPOPERATION_CONTRACTID "@mozilla.org/network/ldap-operation;1" @@ -287,7 +287,7 @@ NS_IMETHODIMP MLDAPMessageListener::OnLDAPMessage( nsILDAPMessage* aMessage ) return NS_OK; } -//------------------------------------------------------------------- + nsresult MNSMozabProxy::testLDAPConnection( ) diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx index be8d8e637ae2..4325f4e31892 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx @@ -28,33 +28,33 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTerminateListener> MNSTerminateListener::mxTerminateListener = new MNSTerminateListener(); -// ----------------------------------------- + // - MNSTerminateListener - -// ----------------------------------------- + MNSTerminateListener::MNSTerminateListener( ) { } -// ----------------------------------------------------------------------------- + MNSTerminateListener::~MNSTerminateListener() { } -// ----------------------------------------------------------------------------- + void SAL_CALL MNSTerminateListener::disposing( const EventObject& /*Source*/ ) throw( RuntimeException ) { } -// ----------------------------------------------------------------------------- + void SAL_CALL MNSTerminateListener::queryTermination( const EventObject& /*aEvent*/ ) throw( TerminationVetoException, RuntimeException ) { } -// ----------------------------------------------------------------------------- + void SAL_CALL MNSTerminateListener::notifyTermination( const EventObject& /*aEvent*/ ) throw( RuntimeException ) { diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx index 3a618fa8c62a..2395bd0009b0 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx @@ -50,7 +50,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbc; using namespace connectivity; -// ------------------------------------------------------------------------- + // Used to store an nsIAbDirectoryQuery member without the need to use Mozilla // types in the MQuery.hxx file. // @@ -65,7 +65,7 @@ namespace connectivity { } } -// ------------------------------------------------------------------------- + MQuery::MQuery( const OColumnAlias& _ca ) :m_rColumnAlias( _ca ) { @@ -79,7 +79,7 @@ MQuery::MQuery( const OColumnAlias& _ca ) OSL_TRACE( "\tOUT MQuery::MQuery( ca )" ); } -// ------------------------------------------------------------------------- + MQuery::~MQuery() { OSL_TRACE("IN MQuery::~MQuery()"); @@ -98,7 +98,7 @@ MQuery::~MQuery() OSL_TRACE("\tOUT MQuery::~MQuery()"); } -// ----------------------------------------------------------------------------- + void MQuery::construct() { // Set default values. (For now just as a reminder). @@ -113,7 +113,7 @@ void MQuery::construct() m_aQueryHelper = new MQueryHelper(); NS_IF_ADDREF( m_aQueryHelper); } -// ------------------------------------------------------------------------- + void MQuery::setAddressbook(OUString &ab) { OSL_TRACE("IN MQuery::setAddressbook()"); @@ -123,7 +123,7 @@ void MQuery::setAddressbook(OUString &ab) OSL_TRACE("\tOUT MQuery::setAddressbook()"); } -// ------------------------------------------------------------------------- + void MQuery::setMaxNrOfReturns(const sal_Int32 mnr) { OSL_TRACE( "IN MQuery::setMaxNrOfReturns()" ); @@ -132,7 +132,7 @@ void MQuery::setMaxNrOfReturns(const sal_Int32 mnr) m_nMaxNrOfReturns = mnr; OSL_TRACE("\tOUT MQuery::setMaxNrOfReturns()" ); } -// ------------------------------------------------------------------------- + void MQuery::setExpression( MQueryExpression &_expr ) { OSL_TRACE("IN MQuery::setExpression()"); @@ -142,7 +142,7 @@ void MQuery::setExpression( MQueryExpression &_expr ) OSL_TRACE("\tOUT MQuery::setExpression()"); } -// ------------------------------------------------------------------------- + static sal_Int32 generateExpression( MQuery* _aQuery, MQueryExpression* _aExpr, nsIAbBooleanExpression* queryExpression ) { @@ -312,7 +312,7 @@ sal_Bool isProfileLocked(OConnection* _pCon) } -// ------------------------------------------------------------------------- + sal_Int32 getDirectoryType(const nsIAbDirectory* directory) { nsresult retCode; @@ -349,7 +349,7 @@ sal_Int32 getDirectoryType(const nsIAbDirectory* directory) return SDBCAddress::Unknown; } -// ------------------------------------------------------------------------- + sal_Bool isForceQueryProxyUsed(const nsIAbDirectory* directory) { sal_Int32 nType = getDirectoryType(directory); @@ -357,7 +357,7 @@ sal_Bool isForceQueryProxyUsed(const nsIAbDirectory* directory) return sal_True; return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 MQuery::commitRow(const sal_Int32 rowIndex) { if (!m_aQueryHelper || !m_aQueryDirectory || !m_aQueryDirectory->directoryQuery) @@ -374,7 +374,7 @@ sal_Int32 MQuery::commitRow(const sal_Int32 rowIndex) return rv; } -// ------------------------------------------------------------------------- + sal_Int32 MQuery::deleteRow(const sal_Int32 rowIndex) { if (!m_aQueryHelper || !m_aQueryDirectory || !m_aQueryDirectory->directoryQuery) @@ -392,7 +392,7 @@ sal_Int32 MQuery::deleteRow(const sal_Int32 rowIndex) } -// ------------------------------------------------------------------------- + sal_Int32 MQuery::executeQuery(OConnection* _pCon) { ::osl::MutexGuard aGuard(m_aMutex); @@ -410,7 +410,7 @@ sal_Int32 MQuery::executeQuery(OConnection* _pCon) rv = xMProxy.StartProxy(&args,m_Product,m_Profile); return rv; } -// ------------------------------------------------------------------------- + sal_Int32 MQuery::executeQueryProxied(OConnection* _pCon) { #if OSL_DEBUG_LEVEL > 0 @@ -563,7 +563,7 @@ sal_Int32 MQuery::executeQueryProxied(OConnection* _pCon) return(0); } -// ------------------------------------------------------------------------- + // // // If the query executed is being done asynchronously then this may return @@ -575,7 +575,7 @@ MQuery::getRowCount() return( m_aQueryHelper->getResultCount() ); } -// ------------------------------------------------------------------------- + // // // As opposed to getRowCount() this returns the actual number of rows fetched @@ -606,7 +606,7 @@ MQuery::waitForQueryComplete( void ) return( sal_False ); } -// ------------------------------------------------------------------------- + sal_Bool MQuery::checkRowAvailable( sal_Int32 nDBRow ) @@ -619,7 +619,7 @@ MQuery::checkRowAvailable( sal_Int32 nDBRow ) return( getRowCount() > nDBRow ); } -// ------------------------------------------------------------------------- + sal_Bool MQuery::setRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType ) const { @@ -644,7 +644,7 @@ MQuery::setRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBC return sal_True; } -// ------------------------------------------------------------------------- + sal_Bool MQuery::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType ) const { @@ -670,7 +670,7 @@ MQuery::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBC return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 MQuery::getRowStates(sal_Int32 nDBRow) { @@ -728,7 +728,7 @@ MQuery::createNewCard() NS_ENSURE_SUCCESS(rv,0); return nNumber; } -// ------------------------------------------------------------------------- + MNameMapper* MQuery::CreateNameMapper() @@ -736,13 +736,13 @@ MQuery::CreateNameMapper() return( new MNameMapper() ); } -// ------------------------------------------------------------------------- + void MQuery::FreeNameMapper( MNameMapper* _ptr ) { delete _ptr; } -// ------------------------------------------------------------------------- + sal_Bool MQuery::isWritable(OConnection* _pCon) { if ( !m_aQueryDirectory ) diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx index 6ef6759e2bbb..0e9264a39fad 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx @@ -290,7 +290,7 @@ MQueryHelper::waitForRow( sal_Int32 rowNum ) return( sal_True ); } -// ------------------------------------------------------------------------- + sal_Int32 MQueryHelper::getResultCount() const @@ -308,7 +308,7 @@ MQueryHelper::getResultCount() const } } -// ------------------------------------------------------------------------- + sal_uInt32 MQueryHelper::getRealCount() const @@ -317,7 +317,7 @@ MQueryHelper::getRealCount() const return static_cast<sal_Int32>(m_aResults.size()); } -// ------------------------------------------------------------------------- + NS_IMETHODIMP MQueryHelper::OnQueryItem(nsIAbDirectoryQueryResult *result) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -398,7 +398,7 @@ NS_IMETHODIMP MQueryHelper::OnQueryItem(nsIAbDirectoryQueryResult *result) return(NS_OK); } -// ----------------------------------------------------------------------------- + void MQueryHelper::notifyQueryError() { m_bQueryComplete = sal_True ; @@ -591,7 +591,7 @@ sal_Bool MQueryHelper::resyncRow(sal_uInt32 rowIndex) getCardValues(card,rowIndex); return sal_True; } -// ------------------------------------------------------------------------- + sal_Int32 MQueryHelper::createNewCard() { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx index 813d67b09179..5272a6b61cab 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx @@ -24,7 +24,7 @@ using namespace connectivity::mozab; -// ------------------------------------------------------------------------- + void MTypeConverter::ouStringToNsString(OUString const &ous, nsString &nss) { // Convert to OString (utf-8 encoding). @@ -37,20 +37,20 @@ void MTypeConverter::ouStringToNsString(OUString const &ous, nsString &nss) //const PRUnichar* uniMozString = (const PRUnichar*) mozString; nss = mozString; // temp. } -// ------------------------------------------------------------------------- + OString MTypeConverter::nsACStringToOString( const nsACString& _source ) { const char* buffer = _source.BeginReading(); const char* bufferEnd = _source.EndReading(); return OString( buffer, static_cast<sal_Int32>(bufferEnd - buffer) ); } -// ------------------------------------------------------------------------- + void MTypeConverter::asciiToNsACString( const sal_Char* _asciiString, nsACString& _dest ) { _dest.Truncate(); _dest.AppendASCII( _asciiString ); } -// ------------------------------------------------------------------------- + void MTypeConverter::nsStringToOUString(nsString const &nss, OUString &ous) { // Get clone of buffer. @@ -64,7 +64,7 @@ void MTypeConverter::nsStringToOUString(nsString const &nss, OUString &ous) nsMemory::Free(uc); } -// ------------------------------------------------------------------------- + void MTypeConverter::prUnicharToOUString(PRUnichar const *pru, OUString &ous) { // TODO, specify length. @@ -72,7 +72,7 @@ void MTypeConverter::prUnicharToOUString(PRUnichar const *pru, OUString &ous) OUString _ous(reinterpret_cast_mingw_only<const sal_Unicode *>(pru)); ous = _ous; } -// ------------------------------------------------------------------------- + char *MTypeConverter::ouStringToCCharStringAscii(OUString const &ous) { // Convert OUString to OString, @@ -80,6 +80,6 @@ char *MTypeConverter::ouStringToCCharStringAscii(OUString const &ous) return(strdup(os.getStr())); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index df97f2db4fcc..d70c750ecbea 100644 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx @@ -26,7 +26,7 @@ #include <comphelper/types.hxx> -// ------------------------------------------------------------------------- + using namespace connectivity; using namespace connectivity::mysql; using namespace connectivity::sdbcx; @@ -36,12 +36,12 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OMySQLCatalog::OMySQLCatalog(const Reference< XConnection >& _xConnection) : OCatalog(_xConnection) ,m_xConnection(_xConnection) { } -// ----------------------------------------------------------------------------- + void OMySQLCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStringVector& _rNames) { Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), @@ -50,7 +50,7 @@ void OMySQLCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TS _sKindOfObject); fillNames(xResult,_rNames); } -// ------------------------------------------------------------------------- + void OMySQLCatalog::refreshTables() { TStringVector aVector; @@ -70,7 +70,7 @@ void OMySQLCatalog::refreshTables() else m_pTables = new OTables(m_xMetaData,*this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void OMySQLCatalog::refreshViews() { Sequence< OUString > aTypes(1); @@ -91,11 +91,11 @@ void OMySQLCatalog::refreshViews() else m_pViews = new OViews(m_xMetaData,*this,m_aMutex,aVector); } -// ------------------------------------------------------------------------- + void OMySQLCatalog::refreshGroups() { } -// ------------------------------------------------------------------------- + void OMySQLCatalog::refreshUsers() { TStringVector aVector; @@ -116,7 +116,7 @@ void OMySQLCatalog::refreshUsers() else m_pUsers = new OUsers(*this,m_aMutex,aVector,m_xConnection,this); } -// ----------------------------------------------------------------------------- + Any SAL_CALL OMySQLCatalog::queryInterface( const Type & rType ) throw(RuntimeException) { if ( rType == ::getCppuType((const Reference<XGroupsSupplier>*)0) ) @@ -125,7 +125,7 @@ Any SAL_CALL OMySQLCatalog::queryInterface( const Type & rType ) throw(RuntimeEx return OCatalog::queryInterface(rType); } -// ----------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OMySQLCatalog::getTypes( ) throw(RuntimeException) { Sequence< Type > aTypes = OCatalog::getTypes(); @@ -143,7 +143,7 @@ Sequence< Type > SAL_CALL OMySQLCatalog::getTypes( ) throw(RuntimeException) const Type* pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0]; return Sequence< Type >(pTypes, aOwnTypes.size()); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql/YColumns.cxx b/connectivity/source/drivers/mysql/YColumns.cxx index f936432e76e7..d0dba8c9ca4e 100644 --- a/connectivity/source/drivers/mysql/YColumns.cxx +++ b/connectivity/source/drivers/mysql/YColumns.cxx @@ -40,35 +40,35 @@ OMySQLColumns::OMySQLColumns( ::cppu::OWeakObject& _rParent ) : OColumnsHelper(_rParent,_bCase,_rMutex,_rVector,_bUseHardRef) { } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OMySQLColumns::createDescriptor() { return new OMySQLColumn(sal_True); } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + + OMySQLColumn::OMySQLColumn( sal_Bool _bCase) : connectivity::sdbcx::OColumn( _bCase ) { construct(); } -// ------------------------------------------------------------------------- + void OMySQLColumn::construct() { m_sAutoIncrement = "auto_increment"; registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OMySQLColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & SAL_CALL OMySQLColumn::getInfoHelper() { return *OMySQLColumn_PROP::getArrayHelper(isNew() ? 1 : 0); } -// ----------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { Sequence< OUString > aSupported(1); @@ -76,6 +76,6 @@ Sequence< OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(R return aSupported; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index 10af859d0dcd..f99166b1a641 100644 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx @@ -63,14 +63,14 @@ namespace connectivity //==================================================================== //= ODriverDelegator //==================================================================== - //-------------------------------------------------------------------- + ODriverDelegator::ODriverDelegator(const Reference< XComponentContext >& _rxContext) : ODriverDelegator_BASE(m_aMutex) ,m_xContext(_rxContext) { } - //-------------------------------------------------------------------- + ODriverDelegator::~ODriverDelegator() { try @@ -87,7 +87,7 @@ namespace connectivity } } - // -------------------------------------------------------------------------------- + void ODriverDelegator::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -117,12 +117,12 @@ namespace connectivity { return _sUrl.copy(0,16) == "sdbc:mysql:odbc:"; } - //-------------------------------------------------------------------- + sal_Bool isNativeUrl(const OUString& _sUrl) { return (!_sUrl.compareTo(OUString("sdbc:mysql:mysqlc:"), sizeof("sdbc:mysql:mysqlc:")-1)); } - //-------------------------------------------------------------------- + T_DRIVERTYPE lcl_getDriverType(const OUString& _sUrl) { T_DRIVERTYPE eRet = D_JDBC; @@ -132,7 +132,7 @@ namespace connectivity eRet = D_NATIVE; return eRet; } - //-------------------------------------------------------------------- + OUString transformUrl(const OUString& _sUrl) { OUString sNewUrl = _sUrl.copy(11); @@ -146,14 +146,14 @@ namespace connectivity } return sNewUrl; } - //-------------------------------------------------------------------- + Reference< XDriver > lcl_loadDriver(const Reference< XComponentContext >& _rxContext,const OUString& _sUrl) { Reference<XDriverManager2> xDriverAccess = DriverManager::create(_rxContext); Reference< XDriver > xDriver = xDriverAccess->getDriverByURL(_sUrl); return xDriver; } - //-------------------------------------------------------------------- + Sequence< PropertyValue > lcl_convertProperties(T_DRIVERTYPE _eType,const Sequence< PropertyValue >& info,const OUString& _sUrl) { ::std::vector<PropertyValue> aProps; @@ -222,7 +222,7 @@ namespace connectivity return Sequence< PropertyValue >(pProps, aProps.size()); } } - //-------------------------------------------------------------------- + Reference< XDriver > ODriverDelegator::loadDriver( const OUString& url, const Sequence< PropertyValue >& info ) { Reference< XDriver > xDriver; @@ -252,7 +252,7 @@ namespace connectivity return xDriver; } - //-------------------------------------------------------------------- + Reference< XConnection > SAL_CALL ODriverDelegator::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { Reference< XConnection > xConnection; @@ -314,7 +314,7 @@ namespace connectivity return xConnection; } - //-------------------------------------------------------------------- + sal_Bool SAL_CALL ODriverDelegator::acceptsURL( const OUString& url ) throw (SQLException, RuntimeException) { Sequence< PropertyValue > info; @@ -327,7 +327,7 @@ namespace connectivity return bOK; } - //-------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL ODriverDelegator::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { ::std::vector< DriverPropertyInfo > aDriverInfo; @@ -385,19 +385,19 @@ namespace connectivity return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL ODriverDelegator::getMajorVersion( ) throw (RuntimeException) { return 1; } - //-------------------------------------------------------------------- + sal_Int32 SAL_CALL ODriverDelegator::getMinorVersion( ) throw (RuntimeException) { return 0; } - //-------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL ODriverDelegator::getDataDefinitionByConnection( const Reference< XConnection >& connection ) throw (SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -447,7 +447,7 @@ namespace connectivity return xTab; } - //-------------------------------------------------------------------- + Reference< XTablesSupplier > SAL_CALL ODriverDelegator::getDataDefinitionByURL( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { if ( ! acceptsURL(url) ) @@ -461,13 +461,13 @@ namespace connectivity } // XServiceInfo - // -------------------------------------------------------------------------------- - //------------------------------------------------------------------------------ + + OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { return OUString("org.openoffice.comp.drivers.MySQL.Driver"); } - //------------------------------------------------------------------------------ + Sequence< OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 2 ); @@ -475,7 +475,7 @@ namespace connectivity aSNS[1] = "com.sun.star.sdbcx.Driver"; return aSNS; } - //------------------------------------------------------------------ + OUString SAL_CALL ODriverDelegator::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -485,12 +485,12 @@ namespace connectivity { return cppu::supportsService(this, _rServiceName); } - //------------------------------------------------------------------ + Sequence< OUString > SAL_CALL ODriverDelegator::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } - //------------------------------------------------------------------ + //........................................................................ } // namespace connectivity //........................................................................ diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index aabd1517ac5b..ba17a0993aac 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -58,7 +58,7 @@ namespace connectivity class OMySQLKeysHelper : public OKeysHelper { protected: - // ----------------------------------------------------------------------------- + virtual OUString getDropForeignKey() const { return OUString(" DROP FOREIGN KEY "); @@ -89,7 +89,7 @@ OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, Privilege::SELECT; construct(); } -// ------------------------------------------------------------------------- + OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, const Reference< XConnection >& _xConnection, const OUString& _Name, @@ -110,41 +110,41 @@ OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, { construct(); } -// ------------------------------------------------------------------------- + void OMySQLTable::construct() { OTableHelper::construct(); if ( !isNew() ) registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRIVILEGES), PROPERTY_ID_PRIVILEGES,PropertyAttribute::READONLY,&m_nPrivileges, ::getCppuType(&m_nPrivileges)); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OMySQLTable::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OMySQLTable::getInfoHelper() { return *static_cast<OMySQLTable_PROP*>(const_cast<OMySQLTable*>(this))->getArrayHelper(isNew() ? 1 : 0); } -// ----------------------------------------------------------------------------- + sdbcx::OCollection* OMySQLTable::createColumns(const TStringVector& _rNames) { OMySQLColumns* pColumns = new OMySQLColumns(*this,sal_True,m_aMutex,_rNames); pColumns->setParent(this); return pColumns; } -// ----------------------------------------------------------------------------- + sdbcx::OCollection* OMySQLTable::createKeys(const TStringVector& _rNames) { return new OMySQLKeysHelper(this,m_aMutex,_rNames); } -// ----------------------------------------------------------------------------- + sdbcx::OCollection* OMySQLTable::createIndexes(const TStringVector& _rNames) { return new OIndexesHelper(this,m_aMutex,_rNames); } -//-------------------------------------------------------------------------- + Sequence< sal_Int8 > OMySQLTable::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -161,14 +161,14 @@ Sequence< sal_Int8 > OMySQLTable::getUnoTunnelImplementationId() } // com::sun::star::lang::XUnoTunnel -//------------------------------------------------------------------ + sal_Int64 OMySQLTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : OTable_TYPEDEF::getSomething(rId); } -// ------------------------------------------------------------------------- + // XAlterTable void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException) { @@ -289,7 +289,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref } } -// ----------------------------------------------------------------------------- + void OMySQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, const Reference<XPropertySet>& _xDescriptor) { const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); @@ -305,13 +305,13 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(xProp,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern())); executeStatement(sSql); } -// ----------------------------------------------------------------------------- + OUString OMySQLTable::getTypeCreatePattern() const { static const OUString s_sCreatePattern("(M,D)"); return s_sCreatePattern; } -// ----------------------------------------------------------------------------- + void OMySQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName) { const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); @@ -321,7 +321,7 @@ void OMySQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& executeStatement(sSql); } -// ----------------------------------------------------------------------------- + void OMySQLTable::dropDefaultValue(const OUString& _rColName) { const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); @@ -331,7 +331,7 @@ void OMySQLTable::dropDefaultValue(const OUString& _rColName) executeStatement(sSql); } -// ----------------------------------------------------------------------------- + OUString OMySQLTable::getAlterTableColumnPart() { OUString sSql( "ALTER TABLE " ); @@ -342,7 +342,7 @@ OUString OMySQLTable::getAlterTableColumnPart() return sSql; } -// ----------------------------------------------------------------------------- + void OMySQLTable::executeStatement(const OUString& _rStatement ) { OUString sSQL = _rStatement; @@ -356,7 +356,7 @@ void OMySQLTable::executeStatement(const OUString& _rStatement ) ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + OUString OMySQLTable::getRenameStart() const { return OUString("RENAME TABLE "); diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index 08957989a178..eb9156aab7d2 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -96,30 +96,30 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) return xRet; } -// ------------------------------------------------------------------------- + void OTables::impl_refresh( ) throw(RuntimeException) { static_cast<OMySQLCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void OTables::disposing(void) { m_xMetaData.clear(); OCollection::disposing(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OTables::createDescriptor() { return new OMySQLTable(this,static_cast<OMySQLCatalog&>(m_rParent).getConnection()); } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { createTable(descriptor); return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) { @@ -160,7 +160,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) } } } -// ------------------------------------------------------------------------- + OUString OTables::adjustSQL(const OUString& _sSql) { OUString sSQL = _sSql; @@ -176,7 +176,7 @@ OUString OTables::adjustSQL(const OUString& _sSql) } return sSQL; } -// ------------------------------------------------------------------------- + void OTables::createTable( const Reference< XPropertySet >& descriptor ) { const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); @@ -189,7 +189,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + void OTables::appendNew(const OUString& _rsNewTable) { insertElement(_rsNewTable,NULL); @@ -200,13 +200,13 @@ void OTables::appendNew(const OUString& _rsNewTable) while (aListenerLoop.hasMoreElements()) static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); } -// ----------------------------------------------------------------------------- + OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) { OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!"); return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false ); } -// ----------------------------------------------------------------------------- + void OTables::addComment(const Reference< XPropertySet >& descriptor,OUStringBuffer& _rOut) { OUString sDesc; diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index aff9841f8dee..e3f760b76208 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -35,13 +35,13 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ------------------------------------------------------------------------- + OMySQLUser::OMySQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : connectivity::sdbcx::OUser(sal_True) ,m_xConnection(_xConnection) { construct(); } -// ------------------------------------------------------------------------- + OMySQLUser::OMySQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, const OUString& _Name ) : connectivity::sdbcx::OUser(_Name,sal_True) @@ -49,34 +49,34 @@ OMySQLUser::OMySQLUser( const ::com::sun::star::uno::Reference< ::com::sun::st { construct(); } -// ------------------------------------------------------------------------- + void OMySQLUser::refreshGroups() { } -// ------------------------------------------------------------------------- + OUserExtend::OUserExtend( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : OMySQLUser(_xConnection) { construct(); } -// ------------------------------------------------------------------------- + void OUserExtend::construct() { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(static_cast< OUString*>(0))); } -// ----------------------------------------------------------------------------- + cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const { Sequence< Property > aProps; describeProperties(aProps); return new cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + cppu::IPropertyArrayHelper & OUserExtend::getInfoHelper() { return *OUserExtend_PROP::getArrayHelper(); } typedef connectivity::sdbcx::OUser_BASE OUser_BASE_RBHELPER; -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OMySQLUser::getPrivileges( const OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -86,7 +86,7 @@ sal_Int32 SAL_CALL OMySQLUser::getPrivileges( const OUString& objName, sal_Int32 findPrivilegesAndGrantPrivileges(objName,objType,nRights,nRightsWithGrant); return nRights; } -// ----------------------------------------------------------------------------- + void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_Int32 objType,sal_Int32& nRights,sal_Int32& nRightsWithGrant) throw(SQLException, RuntimeException) { nRightsWithGrant = nRights = 0; @@ -200,7 +200,7 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I ::comphelper::disposeComponent(xRes); } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OMySQLUser::getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -210,7 +210,7 @@ sal_Int32 SAL_CALL OMySQLUser::getGrantablePrivileges( const OUString& objName, findPrivilegesAndGrantPrivileges(objName,objType,nRights,nRightsWithGrant); return nRightsWithGrant; } -// ------------------------------------------------------------------------- + void SAL_CALL OMySQLUser::grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) @@ -236,7 +236,7 @@ void SAL_CALL OMySQLUser::grantPrivileges( const OUString& objName, sal_Int32 ob ::comphelper::disposeComponent(xStmt); } } -// ------------------------------------------------------------------------- + void SAL_CALL OMySQLUser::revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) @@ -262,7 +262,7 @@ void SAL_CALL OMySQLUser::revokePrivileges( const OUString& objName, sal_Int32 o ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + // XUser void SAL_CALL OMySQLUser::changePassword( const OUString& /*oldPassword*/, const OUString& newPassword ) throw(SQLException, RuntimeException) { @@ -280,7 +280,7 @@ void SAL_CALL OMySQLUser::changePassword( const OUString& /*oldPassword*/, const ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + OUString OMySQLUser::getPrivilegeString(sal_Int32 nRights) const { OUString sPrivs; @@ -324,6 +324,6 @@ OUString OMySQLUser::getPrivilegeString(sal_Int32 nRights) const return sPrivs; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx index f71549ddcf0e..6791435eaac0 100644 --- a/connectivity/source/drivers/mysql/YUsers.cxx +++ b/connectivity/source/drivers/mysql/YUsers.cxx @@ -47,24 +47,24 @@ OUsers::OUsers( ::cppu::OWeakObject& _rParent, ,m_pParent(_pParent) { } -// ----------------------------------------------------------------------------- + sdbcx::ObjectType OUsers::createObject(const OUString& _rName) { return new OMySQLUser(m_xConnection,_rName); } -// ------------------------------------------------------------------------- + void OUsers::impl_refresh() throw(RuntimeException) { m_pParent->refreshUsers(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OUsers::createDescriptor() { OUserExtend* pNew = new OUserExtend(m_xConnection); return pNew; } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { @@ -89,7 +89,7 @@ sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Referen return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OUsers::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { @@ -103,6 +103,6 @@ void OUsers::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) ::comphelper::disposeComponent(xStmt); } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index a2378d1382cb..12fa1daad23f 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -66,32 +66,32 @@ sdbcx::ObjectType OViews::createObject(const OUString& _rName) sCatalog ); } -// ------------------------------------------------------------------------- + void OViews::impl_refresh( ) throw(RuntimeException) { static_cast<OMySQLCatalog&>(m_rParent).refreshTables(); } -// ------------------------------------------------------------------------- + void OViews::disposing(void) { m_xMetaData.clear(); OCollection::disposing(); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > OViews::createDescriptor() { Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); connectivity::sdbcx::OView* pNew = new connectivity::sdbcx::OView(sal_True,xConnection->getMetaData()); return pNew; } -// ------------------------------------------------------------------------- + // XAppend sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { createView(descriptor); return createObject( _rForName ); } -// ------------------------------------------------------------------------- + // XDrop void OViews::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/) { @@ -113,14 +113,14 @@ void OViews::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/) ::comphelper::disposeComponent(xStmt); } } -// ----------------------------------------------------------------------------- + void OViews::dropByNameImpl(const OUString& elementName) { m_bInDrop = sal_True; OCollection_TYPE::dropByName(elementName); m_bInDrop = sal_False; } -// ----------------------------------------------------------------------------- + void OViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx index 136a74019f58..950418751a66 100644 --- a/connectivity/source/drivers/mysql/Yservices.cxx +++ b/connectivity/source/drivers/mysql/Yservices.cxx @@ -35,7 +35,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -75,7 +75,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mysql_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index 03942e561bd3..4ada11bb59f1 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -39,12 +39,12 @@ using namespace connectivity::odbc; using namespace connectivity; using namespace dbtools; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// -------------------------------------------------------------------------------- + OConnection::OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver) : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this) ,m_pDriver(_pDriver) @@ -61,7 +61,7 @@ OConnection::OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver) { m_pDriver->acquire(); } -//----------------------------------------------------------------------------- + OConnection::~OConnection() { if(!isClosed( )) @@ -84,18 +84,18 @@ OConnection::~OConnection() m_pDriver->release(); m_pDriver = NULL; } -//----------------------------------------------------------------------------- + void SAL_CALL OConnection::release() throw() { relase_ChildImpl(); } -// ----------------------------------------------------------------------------- + oslGenericFunction OConnection::getOdbcFunction(sal_Int32 _nIndex) const { OSL_ENSURE(m_pDriver,"OConnection::getOdbcFunction: m_pDriver is null!"); return m_pDriver->getOdbcFunction(_nIndex); } -//----------------------------------------------------------------------------- + SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr,sal_Int32 nTimeOut, sal_Bool bSilent) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -176,7 +176,7 @@ SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr,sal_Int32 nTim return nSQLRETURN; } -//----------------------------------------------------------------------------- + SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyValue >& info) throw(SQLException) { m_aConnectionHandle = SQL_NULL_HANDLE; @@ -278,10 +278,10 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal return nSQLRETURN; } // XServiceInfo -// -------------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OConnection, "com.sun.star.sdbc.drivers.odbc.OConnection", "com.sun.star.sdbc.Connection") -// -------------------------------------------------------------------------------- + Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -291,7 +291,7 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLExcep m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -301,13 +301,13 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const OU m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } -// -------------------------------------------------------------------------------- + Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const OUString& /*sql*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::prepareCall", *this ); return NULL; } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::nativeSQL( const OUString& sql ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -318,7 +318,7 @@ OUString SAL_CALL OConnection::nativeSQL( const OUString& sql ) throw(SQLExcepti OTools::ThrowException(this,N3SQLNativeSql(m_aConnectionHandle,(SDB_ODBC_CHAR*)aSql.getStr(),aSql.getLength(),(SDB_ODBC_CHAR*)pOut,sizeof pOut - 1,&nOutLen),m_aConnectionHandle,SQL_HANDLE_DBC,*this); return OUString(pOut,nOutLen,getTextEncoding()); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -330,7 +330,7 @@ void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLExcepti (SQLPOINTER)((autoCommit) ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF) ,SQL_IS_INTEGER), m_aConnectionHandle,SQL_HANDLE_DBC,*this); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -342,7 +342,7 @@ sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeExce SQL_ATTR_AUTOCOMMIT, &nOption,0,0),m_aConnectionHandle,SQL_HANDLE_DBC,*this); return nOption == SQL_AUTOCOMMIT_ON ; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -351,7 +351,7 @@ void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException) OTools::ThrowException(this,N3SQLEndTran(SQL_HANDLE_DBC,m_aConnectionHandle,SQL_COMMIT),m_aConnectionHandle,SQL_HANDLE_DBC,*this); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -360,14 +360,14 @@ void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException) OTools::ThrowException(this,N3SQLEndTran(SQL_HANDLE_DBC,m_aConnectionHandle,SQL_ROLLBACK),m_aConnectionHandle,SQL_HANDLE_DBC,*this); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return OConnection_BASE::rBHelper.bDisposed; } -// -------------------------------------------------------------------------------- + Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -382,7 +382,7 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx return xMetaData; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -393,13 +393,13 @@ void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, N3SQLSetConnectAttr(m_aConnectionHandle,SQL_ATTR_ACCESS_MODE,reinterpret_cast< SQLPOINTER >( readOnly ),SQL_IS_INTEGER), m_aConnectionHandle,SQL_HANDLE_DBC,*this); } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL OConnection::isReadOnly() throw(SQLException, RuntimeException) { // const member which will initialized only once return m_bReadOnly; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setCatalog( const OUString& catalog ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -411,7 +411,7 @@ void SAL_CALL OConnection::setCatalog( const OUString& catalog ) throw(SQLExcept N3SQLSetConnectAttr(m_aConnectionHandle,SQL_ATTR_CURRENT_CATALOG,(SDB_ODBC_CHAR*)aCat.getStr(),SQL_NTS), m_aConnectionHandle,SQL_HANDLE_DBC,*this); } -// -------------------------------------------------------------------------------- + OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -426,7 +426,7 @@ OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeExcepti return OUString(pCat,nValueLen,getTextEncoding()); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -438,7 +438,7 @@ void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLE (SQLPOINTER)(sal_IntPtr)level,SQL_IS_INTEGER), m_aConnectionHandle,SQL_HANDLE_DBC,*this); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -452,7 +452,7 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, m_aConnectionHandle,SQL_HANDLE_DBC,*this); return nTxn; } -// -------------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -461,12 +461,12 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getT return NULL; } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::setTypeMap( const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedException( "XConnection::setTypeMap", *this ); } -// -------------------------------------------------------------------------------- + // XCloseable void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) { @@ -477,17 +477,17 @@ void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException) } dispose(); } -// -------------------------------------------------------------------------------- + // XWarningsSupplier Any SAL_CALL OConnection::getWarnings( ) throw(SQLException, RuntimeException) { return Any(); } -// -------------------------------------------------------------------------------- + void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException) { } -//------------------------------------------------------------------------------ + void OConnection::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -505,12 +505,12 @@ void OConnection::disposing() dispose_ChildImpl(); } -// ----------------------------------------------------------------------------- + OConnection* OConnection::cloneConnection() { return new OConnection(m_pDriverHandleCopy,m_pDriver); } -// ----------------------------------------------------------------------------- + SQLHANDLE OConnection::createStatementHandle() { OConnection* pConnectionTemp = this; @@ -541,7 +541,7 @@ SQLHANDLE OConnection::createStatementHandle() return aStatementHandle; } -// ----------------------------------------------------------------------------- + void OConnection::freeStatementHandle(SQLHANDLE& _pHandle) { if( SQL_NULL_HANDLE == _pHandle ) @@ -563,7 +563,7 @@ void OConnection::freeStatementHandle(SQLHANDLE& _pHandle) } --m_nStatementCount; } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx index 63f20e2ee020..0a9888d67ae9 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx @@ -59,11 +59,11 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon osl_atomic_decrement( &m_refCount ); } } -// ------------------------------------------------------------------------- + ODatabaseMetaData::~ODatabaseMetaData() { } -// ------------------------------------------------------------------------- + Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) { Reference< XResultSet > xRef; @@ -80,7 +80,7 @@ Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs( ) throw(SQLException, RuntimeException) { Reference< XResultSet > xRef; @@ -104,7 +104,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs( ) throw(SQLExc return xRef; } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( ) { OUString aVal; @@ -113,7 +113,7 @@ OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( ) return aVal; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas( ) throw(SQLException, RuntimeException) { Reference< XResultSet > xRef; @@ -129,7 +129,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas( ) throw(SQLExce } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( const Any& catalog, const OUString& schema, const OUString& table, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -147,7 +147,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -165,7 +165,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const Sequence< OUString >& types ) throw(SQLException, RuntimeException) @@ -183,7 +183,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -201,7 +201,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ) throw(SQLException, RuntimeException) @@ -219,7 +219,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -246,91 +246,91 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( return xRef; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_BINARY_LITERAL_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxRowSize( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_ROW_SIZE,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_CATALOG_NAME_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_CHAR_LITERAL_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMN_NAME_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_INDEX,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCursorNameLength( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_CURSOR_NAME_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxConnections( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_DRIVER_CONNECTIONS/*SQL_ACTIVE_CONNECTIONS*/,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_TABLE,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatementLength( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_STATEMENT_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_TABLE_NAME_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_TABLES_IN_SELECT,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -347,7 +347,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -364,7 +364,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( const Any& catalog, const OUString& schema, const OUString& table ) throw(SQLException, RuntimeException) { @@ -381,7 +381,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( const Any& catalog, const OUString& schema, const OUString& table, sal_Bool unique, sal_Bool approximate ) throw(SQLException, RuntimeException) @@ -399,7 +399,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( const Any& catalog, const OUString& schema, const OUString& table, sal_Int32 scope, sal_Bool nullable ) throw(SQLException, RuntimeException) @@ -417,7 +417,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( } return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern ) throw(SQLException, RuntimeException) { @@ -430,7 +430,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( pResult->openTablePrivileges(m_bUseCatalog ? catalog : Any(),schemaPattern,tableNamePattern); return xRef; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( const Any& primaryCatalog, const OUString& primarySchema, const OUString& primaryTable, const Any& foreignCatalog, @@ -450,63 +450,63 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( } return xRef; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::doesMaxRowSizeIncludeBlobs( ) throw(SQLException, RuntimeException) { OUString aVal; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_ROW_SIZE_INCLUDES_LONG,aVal,*this,m_pConnection->getTextEncoding()); return aVal.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this); return nValue == SQL_IC_LOWER; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_CASE,nValue,*this); return nValue == SQL_IC_LOWER; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this); return nValue == SQL_IC_MIXED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_CASE,nValue,*this); return nValue == SQL_IC_MIXED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this); return nValue == SQL_IC_UPPER; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_CASE,nValue,*this); return nValue == SQL_IC_UPPER; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ALTER_TABLE,nValue,*this); return (nValue & SQL_AT_ADD_COLUMN) == SQL_AT_ADD_COLUMN; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { SQLUINTEGER nValue; @@ -515,21 +515,21 @@ sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) ((nValue & SQL_AT_DROP_COLUMN_CASCADE) == SQL_AT_DROP_COLUMN_CASCADE) || ((nValue & SQL_AT_DROP_COLUMN_RESTRICT) == SQL_AT_DROP_COLUMN_RESTRICT); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_INDEX_SIZE,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NON_NULLABLE_COLUMNS,nValue,*this); return nValue == SQL_NNC_NON_NULL; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, RuntimeException) { OUString aVal; @@ -537,28 +537,28 @@ OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, Runt OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_TERM,aVal,*this,m_pConnection->getTextEncoding()); return aVal; } -// ------------------------------------------------------------------------- + OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { OUString aVal; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_QUOTE_CHAR,aVal,*this,m_pConnection->getTextEncoding()); return aVal; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { OUString aVal; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SPECIAL_CHARACTERS,aVal,*this,m_pConnection->getTextEncoding()); return aVal; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); return nValue != SQL_CN_NONE; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { SQLUSMALLINT nValue=0; @@ -566,126 +566,126 @@ sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_LOCATION,nValue,*this); return nValue == SQL_CL_START; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this); return nValue == SQL_TC_DDL_IGNORE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionCausesTransactionCommit( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this); return nValue == SQL_TC_DDL_COMMIT; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataManipulationTransactionsOnly( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this); return nValue == SQL_TC_DML; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsDataDefinitionAndDataManipulationTransactions( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this); return nValue == SQL_TC_ALL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedDelete( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DYNAMIC_CURSOR_ATTRIBUTES1,nValue,*this); return (nValue & SQL_CA1_POS_DELETE) == SQL_CA1_POS_DELETE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsPositionedUpdate( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DYNAMIC_CURSOR_ATTRIBUTES1,nValue,*this); return (nValue & SQL_CA1_POS_UPDATE) == SQL_CA1_POS_UPDATE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossRollback( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_ROLLBACK_BEHAVIOR,nValue,*this); return nValue == SQL_CB_PRESERVE || nValue == SQL_CB_CLOSE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenStatementsAcrossCommit( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_COMMIT_BEHAVIOR,nValue,*this); return nValue == SQL_CB_PRESERVE || nValue == SQL_CB_CLOSE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossCommit( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_COMMIT_BEHAVIOR,nValue,*this); return nValue == SQL_CB_PRESERVE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_ROLLBACK_BEHAVIOR,nValue,*this); return nValue == SQL_CB_PRESERVE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_ISOLATION_OPTION,nValue,*this); return (nValue & static_cast<SQLUINTEGER>(level)) == static_cast<SQLUINTEGER>(level); } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this); return (nValue & SQL_SU_DML_STATEMENTS) == SQL_SU_DML_STATEMENTS; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SQL_CONFORMANCE,nValue,*this); return nValue == SQL_SC_SQL92_FULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92EntryLevelSQL( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SQL_CONFORMANCE,nValue,*this); return nValue == SQL_SC_SQL92_ENTRY; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { OUString aStr; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_INTEGRITY,aStr,*this,m_pConnection->getTextEncoding()); return aStr.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this); return (nValue & SQL_SU_INDEX_DEFINITION) == SQL_SU_INDEX_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this); return (nValue & SQL_SU_TABLE_DEFINITION) == SQL_SU_TABLE_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { SQLUINTEGER nValue=0; @@ -693,7 +693,7 @@ sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this); return (nValue & SQL_CU_TABLE_DEFINITION) == SQL_CU_TABLE_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue=0; @@ -701,7 +701,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) thro OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this); return (nValue & SQL_CU_INDEX_DEFINITION) == SQL_CU_INDEX_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { SQLUINTEGER nValue=0; @@ -709,14 +709,14 @@ sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this); return (nValue & SQL_CU_DML_STATEMENTS) == SQL_CU_DML_STATEMENTS; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_OJ_CAPABILITIES,nValue,*this); return ((nValue & (SQL_OJ_FULL|SQL_OJ_LEFT|SQL_OJ_RIGHT|SQL_OJ_NESTED|SQL_OJ_NOT_ORDERED|SQL_OJ_ALL_COMPARISON_OPS|SQL_OJ_INNER)) != 0); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { Reference< XResultSet > xRef; @@ -732,110 +732,110 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLE } return xRef; } -// ------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( ) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_CONCURRENT_ACTIVITIES,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxProcedureNameLength( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_PROCEDURE_NAME_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxSchemaNameLength( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_SCHEMA_NAME_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactions( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_TXN_CAPABLE,nValue,*this); return nValue != SQL_TC_NONE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allProceduresAreCallable( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ACCESSIBLE_PROCEDURES,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsStoredProcedures( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_PROCEDURES,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSelectForUpdate( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DYNAMIC_CURSOR_ATTRIBUTES1,nValue,*this); return (nValue & SQL_CA1_POSITIONED_UPDATE) == SQL_CA1_POSITIONED_UPDATE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::allTablesAreSelectable( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ACCESSIBLE_TABLES,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::isReadOnly( ) throw(SQLException, RuntimeException) { return m_pConnection->isReadOnly(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFiles( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_FILE_USAGE,nValue,*this); return nValue == SQL_FILE_CATALOG; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::usesLocalFilePerTable( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_FILE_USAGE,nValue,*this); return nValue == SQL_FILE_TABLE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTypeConversion( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_FUNCTIONS,nValue,*this); return (nValue & SQL_FN_CVT_CONVERT) == SQL_FN_CVT_CONVERT; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullPlusNonNullIsNull( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONCAT_NULL_BEHAVIOR,nValue,*this); return nValue == SQL_CB_NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsColumnAliasing( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_COLUMN_ALIAS,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); return nValue != SQL_CN_NONE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_Int32 toType ) throw(SQLException, RuntimeException) { if(fromType == toType) @@ -991,133 +991,133 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_In return bConvert; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExpressionsInOrderBy( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_EXPRESSIONS_IN_ORDERBY,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupBy( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_GROUP_BY,nValue,*this); return nValue != SQL_GB_NOT_SUPPORTED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByBeyondSelect( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_GROUP_BY,nValue,*this); return nValue != SQL_GB_GROUP_BY_CONTAINS_SELECT; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsGroupByUnrelated( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_GROUP_BY,nValue,*this); return nValue == SQL_GB_NO_RELATION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleTransactions( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MULTIPLE_ACTIVE_TXN,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMultipleResultSets( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MULT_RESULT_SETS,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLikeEscapeClause( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_LIKE_ESCAPE_CLAUSE,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'Y'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsOrderByUnrelated( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ORDER_BY_COLUMNS_IN_SELECT,aValue,*this,m_pConnection->getTextEncoding()); return aValue.toChar() == 'N'; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnion( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_UNION,nValue,*this); return (nValue & SQL_U_UNION) == SQL_U_UNION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsUnionAll( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_UNION,nValue,*this); return (nValue & SQL_U_UNION_ALL) == SQL_U_UNION_ALL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_IDENTIFIER_CASE,nValue,*this); return nValue == SQL_IC_MIXED; } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this); return nValue == SQL_IC_MIXED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NULL_COLLATION,nValue,*this); return nValue == SQL_NC_END; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtStart( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NULL_COLLATION,nValue,*this); return nValue == SQL_NC_START; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedHigh( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NULL_COLLATION,nValue,*this); return nValue == SQL_NC_HIGH; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedLow( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_NULL_COLLATION,nValue,*this); return nValue == SQL_NC_LOW; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInProcedureCalls( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this); return (nValue & SQL_SU_PROCEDURE_INVOCATION) == SQL_SU_PROCEDURE_INVOCATION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this); return (nValue & SQL_SU_PRIVILEGE_DEFINITION) == SQL_SU_PRIVILEGE_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue=0; @@ -1125,7 +1125,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw( OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this); return (nValue & SQL_CU_PROCEDURE_INVOCATION) == SQL_CU_PROCEDURE_INVOCATION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue=0; @@ -1133,56 +1133,56 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CATALOG_USAGE,nValue,*this); return (nValue & SQL_CU_PRIVILEGE_DEFINITION) == SQL_CU_PRIVILEGE_DEFINITION; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCorrelatedSubqueries( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this); return (nValue & SQL_SQ_CORRELATED_SUBQUERIES) == SQL_SQ_CORRELATED_SUBQUERIES; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInComparisons( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this); return (nValue & SQL_SQ_COMPARISON) == SQL_SQ_COMPARISON; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInExists( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this); return (nValue & SQL_SQ_EXISTS) == SQL_SQ_EXISTS; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInIns( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this); return (nValue & SQL_SQ_IN) == SQL_SQ_IN; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsSubqueriesInQuantifieds( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this); return (nValue & SQL_SQ_QUANTIFIED) == SQL_SQ_QUANTIFIED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SQL_CONFORMANCE,nValue,*this); return nValue == SQL_SC_SQL92_INTERMEDIATE; } -// ----------------------------------------------------------------------------- + OUString ODatabaseMetaData::getURLImpl() { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DATA_SOURCE_NAME,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) { OUString aValue = m_pConnection->getURL(); @@ -1192,91 +1192,91 @@ OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeExcep } return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_USER_NAME,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_NAME,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDriverVersion() throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_ODBC_VER,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DBMS_NAME,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getProcedureTerm( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_PROCEDURE_TERM,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSchemaTerm( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_TERM,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) throw(RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding()); return aValue.copy(0,aValue.indexOf('.')).toInt32(); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDefaultTransactionIsolation( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SUBQUERIES,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding()); return aValue.copy(0,aValue.lastIndexOf('.')).toInt32(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSQLKeywords( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_KEYWORDS,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape( ) throw(SQLException, RuntimeException) { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SEARCH_PATTERN_ESCAPE,aValue,*this,m_pConnection->getTextEncoding()); return aValue; } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1337,7 +1337,7 @@ OUString SAL_CALL ODatabaseMetaData::getStringFunctions( ) throw(SQLException, return aValue.makeStringAndClear(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1392,7 +1392,7 @@ OUString SAL_CALL ODatabaseMetaData::getTimeDateFunctions( ) throw(SQLException return aValue.makeStringAndClear(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1411,7 +1411,7 @@ OUString SAL_CALL ODatabaseMetaData::getSystemFunctions( ) throw(SQLException, return aValue.makeStringAndClear(); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1472,7 +1472,7 @@ OUString SAL_CALL ODatabaseMetaData::getNumericFunctions( ) throw(SQLException, return aValue.makeStringAndClear(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1487,7 +1487,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsExtendedSQLGrammar( ) throw(SQLExc return nValue == SQL_OAC_LEVEL2; } } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1502,7 +1502,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCoreSQLGrammar( ) throw(SQLExcepti return nValue == SQL_OSC_CORE || nValue == SQL_OAC_LEVEL1 || nValue == SQL_OAC_LEVEL2; } } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1517,54 +1517,54 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsMinimumSQLGrammar( ) throw(SQLExce return nValue == SQL_OAC_LEVEL1 || nValue == SQL_OAC_LEVEL2; } } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsFullOuterJoins( ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_OJ_CAPABILITIES,nValue,*this); return (nValue & SQL_OJ_FULL) == SQL_OJ_FULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsLimitedOuterJoins( ) throw(SQLException, RuntimeException) { return supportsFullOuterJoins( ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInGroupBy( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_GROUP_BY,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInOrderBy( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_ORDER_BY,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInSelect( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_COLUMNS_IN_SELECT,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLException, RuntimeException) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_USER_NAME_LEN,nValue,*this); return nValue; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CURSOR_SENSITIVITY,nValue,*this); return (nValue & static_cast<SQLUINTEGER>(setType)) == static_cast<SQLUINTEGER>(setType); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1596,7 +1596,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 set } return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1618,7 +1618,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) t OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this); return (nValue & SQL_CA2_SENSITIVITY_UPDATES) == SQL_CA2_SENSITIVITY_UPDATES; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1640,7 +1640,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) t OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this); return (nValue & SQL_CA2_SENSITIVITY_DELETIONS) != SQL_CA2_SENSITIVITY_DELETIONS; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { SQLUINTEGER nValue; @@ -1662,46 +1662,46 @@ sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) t OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this); return (nValue & SQL_CA2_SENSITIVITY_ADDITIONS) == SQL_CA2_SENSITIVITY_ADDITIONS; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ownUpdatesAreVisible(setType); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ownDeletesAreVisible(setType); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException) { return ownInsertsAreVisible(setType); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 /*setType*/ ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaData::supportsBatchUpdates( ) throw(SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& /*catalog*/, const OUString& /*schemaPattern*/, const OUString& /*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ ) throw(SQLException, RuntimeException) { return NULL; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index 5d944287f81c..e5b6535a6942 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -42,14 +42,14 @@ using namespace ::comphelper; using namespace connectivity::odbc; using namespace cppu; -//------------------------------------------------------------------------------ + using namespace ::com::sun::star::lang; using namespace com::sun::star::uno; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::util; -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(OConnection* _pConnection) :ODatabaseMetaDataResultSet_BASE(m_aMutex) ,OPropertySetHelper(ODatabaseMetaDataResultSet_BASE::rBHelper) @@ -77,7 +77,7 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(OConnection* _pConnection // allocBuffer(); } -// ------------------------------------------------------------------------- + ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet() { OSL_ENSURE(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed,"Object wasn't disposed!"); @@ -88,7 +88,7 @@ ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet() } delete [] m_pRowStatusArray; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::disposing(void) { OPropertySetHelper::disposing(); @@ -101,28 +101,28 @@ void ODatabaseMetaDataResultSet::disposing(void) m_xMetaData.clear(); m_pConnection->release(); } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); return aRet.hasValue() ? aRet : ODatabaseMetaDataResultSet_BASE::queryInterface(rType); } -// ----------------------------------------------------------------------------- + Reference< XPropertySetInfo > SAL_CALL ODatabaseMetaDataResultSet::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::acquire() throw() { ODatabaseMetaDataResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::release() throw() { ODatabaseMetaDataResultSet_BASE::release(); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), @@ -131,7 +131,7 @@ Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(Runtime return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } -// ----------------------------------------------------------------------------- + sal_Int32 ODatabaseMetaDataResultSet::mapColumn (sal_Int32 column) { sal_Int32 map = column; @@ -144,7 +144,7 @@ sal_Int32 ODatabaseMetaDataResultSet::mapColumn (sal_Int32 column) return map; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { @@ -192,20 +192,20 @@ template < typename T, SQLSMALLINT sqlTypeId > T ODatabaseMetaDataResultSet::get return nVal; } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getBinaryStream", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getCharacterStream", *this ); return NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -233,13 +233,13 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex } return bRet; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL ODatabaseMetaDataResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getInteger<sal_Int8, SQL_C_STINYINT>( columnIndex ); } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -268,7 +268,7 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co m_bWasNull = sal_True; return Sequence<sal_Int8>(); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL ODatabaseMetaDataResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -290,7 +290,7 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co m_bWasNull = sal_True; return Date(); } -// ------------------------------------------------------------------------- + double SAL_CALL ODatabaseMetaDataResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -307,7 +307,7 @@ double SAL_CALL ODatabaseMetaDataResultSet::getDouble( sal_Int32 columnIndex ) t m_bWasNull = sal_True; return nValue; } -// ------------------------------------------------------------------------- + float SAL_CALL ODatabaseMetaDataResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -324,25 +324,25 @@ float SAL_CALL ODatabaseMetaDataResultSet::getFloat( sal_Int32 columnIndex ) thr m_bWasNull = sal_True; return nVal; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getInteger<sal_Int32, SQL_C_SLONG>( columnIndex ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getRow( ) throw(SQLException, RuntimeException) { return 0; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL ODatabaseMetaDataResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getInteger<sal_Int64, SQL_C_SBIGINT>( columnIndex ); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData( ) throw(SQLException, RuntimeException) { @@ -350,45 +350,45 @@ Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData ::osl::MutexGuard aGuard( m_aMutex ); return m_xMetaData.is() ? m_xMetaData : (m_xMetaData = new OResultSetMetaData(m_pConnection,m_aStatementHandle)); } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getArray", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getClob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getBlob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getRef", *this ); return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 /*columnIndex*/, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getObject", *this ); return Any(); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getInteger<sal_Int16, SQL_C_SSHORT>( columnIndex ); } -// ------------------------------------------------------------------------- + OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -407,7 +407,7 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) return aVal; } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL ODatabaseMetaDataResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -425,7 +425,7 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) m_bWasNull = sal_True; return Time(0, aTime.second,aTime.minute,aTime.hour, false); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL ODatabaseMetaDataResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) @@ -444,7 +444,7 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) return DateTime(aTime.fraction, aTime.second, aTime.minute, aTime.hour, aTime.day, aTime.month, aTime.year, false); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { @@ -455,7 +455,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isAfterLast( ) throw(SQLException return m_nCurrentFetchState == SQL_NO_DATA; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, RuntimeException) { @@ -465,7 +465,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, Ru return m_nRowPos == 1; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, RuntimeException) { @@ -475,7 +475,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, Run return m_bEOF && m_nCurrentFetchState != SQL_NO_DATA; } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { @@ -487,7 +487,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, Ru previous(); m_nCurrentFetchState = SQL_SUCCESS; } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::afterLast( ) throw(SQLException, RuntimeException) { @@ -498,7 +498,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::afterLast( ) throw(SQLException, Runt if(last()) next(); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeException) { @@ -510,7 +510,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeE } dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, RuntimeException) { @@ -527,7 +527,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, Runt m_nRowPos = 1; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, RuntimeException) { @@ -543,7 +543,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, Runti m_bEOF = sal_True; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { @@ -559,7 +559,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 row ) throw(SQ m_nRowPos = row; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { @@ -575,7 +575,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 row ) throw(SQ m_nRowPos += row; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, RuntimeException) { @@ -593,12 +593,12 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, R m_nRowPos = 0; return bRet; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) throw(SQLException, RuntimeException) { return NULL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, RuntimeException) { @@ -609,7 +609,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, return m_pRowStatusArray[0] == SQL_ROW_DELETED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException, RuntimeException) { checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed); @@ -618,7 +618,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException return m_pRowStatusArray[0] == SQL_ROW_ADDED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { @@ -628,7 +628,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, return m_pRowStatusArray[0] == SQL_ROW_UPDATED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { @@ -639,7 +639,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst( ) throw(SQLExcepti return m_nRowPos == 0; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, RuntimeException) { @@ -658,7 +658,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, Runti ++m_nRowPos; return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -669,7 +669,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::wasNull( ) throw(SQLException, Ru return m_bWasNull; } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::refreshRow( ) throw(SQLException, RuntimeException) { @@ -677,7 +677,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::refreshRow( ) throw(SQLException, Run ::osl::MutexGuard aGuard( m_aMutex ); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::cancel( ) throw(RuntimeException) { @@ -688,43 +688,43 @@ void SAL_CALL ODatabaseMetaDataResultSet::cancel( ) throw(RuntimeException) OTools::ThrowException(m_pConnection,N3SQLCancel(m_aStatementHandle),m_aStatementHandle,SQL_HANDLE_STMT,*this); } -// ------------------------------------------------------------------------- + void SAL_CALL ODatabaseMetaDataResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + Any SAL_CALL ODatabaseMetaDataResultSet::getWarnings( ) throw(SQLException, RuntimeException) { return Any(); } -//------------------------------------------------------------------------------ + sal_Int32 ODatabaseMetaDataResultSet::getResultSetConcurrency() const throw(SQLException, RuntimeException) { return ResultSetConcurrency::READ_ONLY; } -//------------------------------------------------------------------------------ + sal_Int32 ODatabaseMetaDataResultSet::getResultSetType() const throw(SQLException, RuntimeException) { return ResultSetType::FORWARD_ONLY; } -//------------------------------------------------------------------------------ + sal_Int32 ODatabaseMetaDataResultSet::getFetchDirection() const throw(SQLException, RuntimeException) { return FetchDirection::FORWARD; } -//------------------------------------------------------------------------------ + sal_Int32 ODatabaseMetaDataResultSet::getFetchSize() const throw(SQLException, RuntimeException) { sal_Int32 nValue=1; return nValue; } -//------------------------------------------------------------------------------ + OUString ODatabaseMetaDataResultSet::getCursorName() const throw(SQLException, RuntimeException) { return OUString(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* ODatabaseMetaDataResultSet::createArrayHelper( ) const { @@ -739,12 +739,12 @@ OUString ODatabaseMetaDataResultSet::getCursorName() const throw(SQLException, R return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & ODatabaseMetaDataResultSet::getInfoHelper() { return *const_cast<ODatabaseMetaDataResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool ODatabaseMetaDataResultSet::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, @@ -767,7 +767,7 @@ sal_Bool ODatabaseMetaDataResultSet::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& /*rValue*/ ) throw (Exception) { switch(nHandle) @@ -782,7 +782,7 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHa OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!"); } } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const { switch(nHandle) @@ -804,7 +804,7 @@ void ODatabaseMetaDataResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nH break; } } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openTypeInfo() throw(SQLException, RuntimeException) { TInt2IntMap aMap; @@ -846,7 +846,7 @@ void ODatabaseMetaDataResultSet::openTypeInfo() throw(SQLException, RuntimeExcep OTools::ThrowException(m_pConnection,N3SQLGetTypeInfo(m_aStatementHandle, SQL_ALL_TYPES),m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } -//----------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const Sequence< OUString >& types ) throw(SQLException, RuntimeException) @@ -895,7 +895,7 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const OUString& checkColumnCount(); } -//----------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openTablesTypes( ) throw(SQLException, RuntimeException) { SQLRETURN nRetcode = N3SQLTables(m_aStatementHandle, @@ -911,7 +911,7 @@ void ODatabaseMetaDataResultSet::openTablesTypes( ) throw(SQLException, RuntimeE m_xMetaData = new OResultSetMetaData(m_pConnection,m_aStatementHandle,m_aColMapping); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openCatalogs() throw(SQLException, RuntimeException) { SQLRETURN nRetcode = N3SQLTables(m_aStatementHandle, @@ -928,7 +928,7 @@ void ODatabaseMetaDataResultSet::openCatalogs() throw(SQLException, RuntimeExcep m_xMetaData = new OResultSetMetaData(m_pConnection,m_aStatementHandle,m_aColMapping); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openSchemas() throw(SQLException, RuntimeException) { SQLRETURN nRetcode = N3SQLTables(m_aStatementHandle, @@ -944,7 +944,7 @@ void ODatabaseMetaDataResultSet::openSchemas() throw(SQLException, RuntimeExcept m_xMetaData = new OResultSetMetaData(m_pConnection,m_aStatementHandle,m_aColMapping); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, const OUString& schema, const OUString& table, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -979,7 +979,7 @@ void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, cons checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openColumns( const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -1047,7 +1047,7 @@ void ODatabaseMetaDataResultSet::openColumns( const Any& catalog, m_aValueRange[5] = aMap; checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern,const OUString& columnNamePattern ) throw(SQLException, RuntimeException) @@ -1081,7 +1081,7 @@ void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog, OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern) throw(SQLException, RuntimeException) @@ -1112,7 +1112,7 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const OUStri OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any& catalog, const OUString& schema, const OUString& table,sal_Int32 scope, sal_Bool nullable ) throw(SQLException, RuntimeException) @@ -1157,19 +1157,19 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any& OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openVersionColumns(const Any& catalog, const OUString& schema, const OUString& table) throw(SQLException, RuntimeException) { openSpecialColumns(sal_True,catalog,schema,table,SQL_SCOPE_TRANSACTION,sal_False); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openBestRowIdentifier( const Any& catalog, const OUString& schema, const OUString& table,sal_Int32 scope,sal_Bool nullable ) throw(SQLException, RuntimeException) { openSpecialColumns(sal_False,catalog,schema,table,scope,nullable); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openForeignKeys( const Any& catalog, const OUString* schema, const OUString* table, const Any& catalog2, const OUString* schema2, @@ -1200,20 +1200,20 @@ void ODatabaseMetaDataResultSet::openForeignKeys( const Any& catalog, const OUSt OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openImportedKeys(const Any& catalog, const OUString& schema, const OUString& table) throw(SQLException, RuntimeException) { openForeignKeys(Any(),NULL,NULL,catalog, schema.equalsAscii("%") ? &schema : NULL, &table); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openExportedKeys(const Any& catalog, const OUString& schema, const OUString& table) throw(SQLException, RuntimeException) { openForeignKeys(catalog, schema.equalsAscii("%") ? &schema : NULL, &table,Any(),NULL,NULL); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const OUString& schema, const OUString& table) throw(SQLException, RuntimeException) { @@ -1242,7 +1242,7 @@ void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const OUStr OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openTablePrivileges(const Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern) throw(SQLException, RuntimeException) { @@ -1271,7 +1271,7 @@ void ODatabaseMetaDataResultSet::openTablePrivileges(const Any& catalog, const O OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const OUString& schema, const OUString& table,sal_Bool unique,sal_Bool approximate ) throw(SQLException, RuntimeException) @@ -1303,14 +1303,14 @@ void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const OUStri OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } -// ------------------------------------------------------------------------- + void ODatabaseMetaDataResultSet::checkColumnCount() { sal_Int16 nNumResultCols=0; OTools::ThrowException(m_pConnection,N3SQLNumResultCols(m_aStatementHandle,&nNumResultCols),m_aStatementHandle,SQL_HANDLE_STMT,*this); m_nDriverColumnCount = nNumResultCols; } -// ----------------------------------------------------------------------------- + SWORD ODatabaseMetaDataResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex) { diff --git a/connectivity/source/drivers/odbc/ODriver.cxx b/connectivity/source/drivers/odbc/ODriver.cxx index 091efa9a696c..d82362129042 100644 --- a/connectivity/source/drivers/odbc/ODriver.cxx +++ b/connectivity/source/drivers/odbc/ODriver.cxx @@ -31,14 +31,14 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// -------------------------------------------------------------------------------- + ODBCDriver::ODBCDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) :ODriver_BASE(m_aMutex) ,m_xORB(_rxFactory) ,m_pDriverHandle(SQL_NULL_HANDLE) { } -// -------------------------------------------------------------------------------- + void ODBCDriver::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -56,7 +56,7 @@ void ODBCDriver::disposing() } // static ServiceInfo -//------------------------------------------------------------------------------ + OUString ODBCDriver::getImplementationName_Static( ) throw(RuntimeException) { return OUString("com.sun.star.comp.sdbc.ODBCDriver"); @@ -64,7 +64,7 @@ OUString ODBCDriver::getImplementationName_Static( ) throw(RuntimeException) // Please take care when changing it. } -//------------------------------------------------------------------------------ + Sequence< OUString > ODBCDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< OUString > aSNS( 1 ); @@ -72,7 +72,7 @@ Sequence< OUString > ODBCDriver::getSupportedServiceNames_Static( ) throw (Runt return aSNS; } -//------------------------------------------------------------------ + OUString SAL_CALL ODBCDriver::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); @@ -83,13 +83,13 @@ sal_Bool SAL_CALL ODBCDriver::supportsService( const OUString& _rServiceName ) t return cppu::supportsService(this, _rServiceName); } -//------------------------------------------------------------------ + Sequence< OUString > SAL_CALL ODBCDriver::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// -------------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL ODBCDriver::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { if ( ! acceptsURL(url) ) @@ -108,13 +108,13 @@ Reference< XConnection > SAL_CALL ODBCDriver::connect( const OUString& url, cons return xCon; } -// -------------------------------------------------------------------------------- + sal_Bool SAL_CALL ODBCDriver::acceptsURL( const OUString& url ) throw(SQLException, RuntimeException) { return url.startsWith("sdbc:odbc:"); } -// -------------------------------------------------------------------------------- + Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) { if ( acceptsURL(url) ) @@ -196,18 +196,18 @@ Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const OUStr ::dbtools::throwGenericSQLException(sMessage ,*this); return Sequence< DriverPropertyInfo >(); } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODBCDriver::getMajorVersion( ) throw(RuntimeException) { return 1; } -// -------------------------------------------------------------------------------- + sal_Int32 SAL_CALL ODBCDriver::getMinorVersion( ) throw(RuntimeException) { return 0; } -// -------------------------------------------------------------------------------- -//----------------------------------------------------------------------------- + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 6e6f6ce2de48..4dea825c7b4a 100644 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -80,7 +80,7 @@ T3SQLGetCursorName pODBC3SQLGetCursorName; T3SQLNativeSql pODBC3SQLNativeSql; sal_Bool LoadFunctions(oslModule pODBCso); -// ------------------------------------------------------------------------- + // Take care of Dynamicly loading of the DLL/shared lib and Addresses: // Returns sal_True at success sal_Bool LoadLibrary_ODBC3(OUString &_rPath) @@ -111,7 +111,7 @@ sal_Bool LoadLibrary_ODBC3(OUString &_rPath) return bLoaded = LoadFunctions(pODBCso); } -// ------------------------------------------------------------------------- + sal_Bool LoadFunctions(oslModule pODBCso) { @@ -227,7 +227,7 @@ sal_Bool LoadFunctions(oslModule pODBCso) return sal_True; } -// ------------------------------------------------------------------------- + } diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index c5a3bdf0bc74..49aa2fd2aa28 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -91,28 +91,28 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString { } } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::acquire() throw() { OStatement_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::release() throw() { OStatement_BASE2::release(); } -// ----------------------------------------------------------------------------- + Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OStatement_BASE2::queryInterface(rType); return aRet.hasValue() ? aRet : OPreparedStatement_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { return ::comphelper::concatSequences(OPreparedStatement_BASE::getTypes(),OStatement_BASE2::getTypes()); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) throw(SQLException, RuntimeException) { @@ -126,7 +126,7 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr m_xMetaData = new OResultSetMetaData(getOwnConnection(),m_aStatementHandle); return m_xMetaData; } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException) { @@ -151,7 +151,7 @@ void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException // Remove this Statement object from the Connection object's // list } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeException) { @@ -217,7 +217,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc return getColumnCount() > 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, RuntimeException) { @@ -240,13 +240,13 @@ sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, Run } return numRows; } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const OUString& x ) throw(SQLException, RuntimeException) { setParameter(parameterIndex, DataType::CHAR, invalid_scale, x); } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQLException, RuntimeException) { @@ -255,7 +255,7 @@ Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQ return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLException, RuntimeException) { @@ -275,14 +275,14 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE } return rs; } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException) { // Set the parameter as if it were an integer setInt (parameterIndex, x ? 1 : 0 ); } -// ------------------------------------------------------------------------- + // The MutexGuard must _already_ be taken! void OPreparedStatement::setParameterPre(sal_Int32 parameterIndex) { @@ -291,7 +291,7 @@ void OPreparedStatement::setParameterPre(sal_Int32 parameterIndex) checkParameterIndex(parameterIndex); OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); } -// ------------------------------------------------------------------------- + template <typename T> void OPreparedStatement::setScalarParameter(const sal_Int32 parameterIndex, const sal_Int32 i_nType, const SQLULEN i_nColSize, const T i_Value) { @@ -305,7 +305,7 @@ template <typename T> void OPreparedStatement::setScalarParameter(const sal_Int3 setParameter(parameterIndex, i_nType, i_nColSize, invalid_scale, bindBuf, sizeof(i_Value), sizeof(i_Value)); } -// ------------------------------------------------------------------------- + void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_Int32 _nType, const sal_Int16 _nScale, const OUString &_sData) { @@ -352,7 +352,7 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_ setParameter( parameterIndex, _nType, nCharLen, _nScale, pData, nByteLen, nByteLen ); } -// ------------------------------------------------------------------------- + void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_Int32 _nType, const Sequence< sal_Int8 > &x) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -367,7 +367,7 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_ setParameter( parameterIndex, _nType, x.getLength(), invalid_scale, x.getConstArray(), x.getLength(), x.getLength() ); } -// ------------------------------------------------------------------------- + void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_Int32 _nType, const SQLULEN _nColumnSize, const sal_Int32 _nScale, const void* const _pData, const SQLULEN _nDataLen, const SQLLEN _nDataAllocLen) { SQLSMALLINT fCType, fSqlType; @@ -393,12 +393,12 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_ OTools::ThrowException(m_pConnection, nRetcode, m_aStatementHandle, SQL_HANDLE_STMT, *this); } -// ----------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setByte( const sal_Int32 parameterIndex, const sal_Int8 x ) throw(SQLException, RuntimeException) { setScalarParameter(parameterIndex, DataType::TINYINT, 3, x); } -// ------------------------------------------------------------------------- + // For older compilers (that do not support partial specialisation of class templates) // uncomment if necessary (safe also on compilers that *do* support partial specialisation) //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(DATE_STRUCT); @@ -408,7 +408,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& DATE_STRUCT x(OTools::DateToOdbcDate(aData)); setScalarParameter<DATE_STRUCT&>(parameterIndex, DataType::DATE, 10, x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException) { @@ -436,7 +436,7 @@ void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& TIME_STRUCT x(OTools::TimeToOdbcTime(aVal)); setScalarParameter<TIME_STRUCT&>(parameterIndex, DataType::TIME, nColSize, x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const DateTime& aVal ) throw(SQLException, RuntimeException) { @@ -470,26 +470,26 @@ void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const TIMESTAMP_STRUCT x(OTools::DateTimeToTimestamp(aVal)); setScalarParameter<TIMESTAMP_STRUCT&>(parameterIndex, DataType::TIMESTAMP, nColSize, x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException) { setScalarParameter(parameterIndex, DataType::DOUBLE, 15, x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException) { setScalarParameter(parameterIndex, DataType::FLOAT, 15, x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException) { setScalarParameter(parameterIndex, DataType::INTEGER, 10, x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 x ) throw(SQLException, RuntimeException) { @@ -502,7 +502,7 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 x setString(parameterIndex, ORowSetValue(x)); } } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, const sal_Int32 _nType ) throw(SQLException, RuntimeException) { @@ -536,33 +536,33 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, const sal_I ); OTools::ThrowException(m_pConnection,nReturn,m_aStatementHandle,SQL_HANDLE_STMT,*this); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException) { if ( x.is() ) setStream(parameterIndex, x->getCharacterStream(), x->length(), DataType::LONGVARCHAR); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException) { if ( x.is() ) setStream(parameterIndex, x->getBinaryStream(), x->length(), DataType::LONGVARBINARY); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setArray", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XParameters::setRef", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException) { checkDisposed(OStatement_BASE::rBHelper.bDisposed); @@ -602,13 +602,13 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c ::dbtools::setObjectWithInfo(this,parameterIndex,x,sqlType,scale); } } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& /*typeName*/ ) throw(SQLException, RuntimeException) { setNull(parameterIndex,sqlType); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException) { @@ -617,19 +617,19 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any throw SQLException(); } } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException) { setScalarParameter(parameterIndex, DataType::SMALLINT, 5, x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException) { setParameter(parameterIndex, DataType::BINARY, x); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) @@ -638,13 +638,13 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, // The XInputStream provides *bytes*, not characters. setStream(parameterIndex, x, length, DataType::LONGVARCHAR); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { setStream(parameterIndex, x, length, DataType::LONGVARBINARY); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException) { @@ -655,20 +655,20 @@ void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, Runtim nRet = N3SQLFreeStmt (m_aStatementHandle, SQL_UNBIND); OSL_UNUSED(nRet); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::clearBatch( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XPreparedBatchExecution::clearBatch", *this ); // clearParameters( ); // m_aBatchList.erase(); } -// ------------------------------------------------------------------------- + void SAL_CALL OPreparedStatement::addBatch( ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XPreparedBatchExecution::addBatch", *this ); } -// ------------------------------------------------------------------------- + Sequence< sal_Int32 > SAL_CALL OPreparedStatement::executeBatch( ) throw(SQLException, RuntimeException) { @@ -676,16 +676,16 @@ Sequence< sal_Int32 > SAL_CALL OPreparedStatement::executeBatch( ) throw(SQLExc // not reached, but keep -Werror happy return Sequence< sal_Int32 > (); } -// ------------------------------------------------------------------------- + //==================================================================== // methods //==================================================================== -//-------------------------------------------------------------------- + // initBoundParam // Initialize the bound parameter objects -//-------------------------------------------------------------------- + void OPreparedStatement::initBoundParam () throw(SQLException) { @@ -705,13 +705,13 @@ void OPreparedStatement::initBoundParam () throw(SQLException) } } -// ------------------------------------------------------------------------- -//-------------------------------------------------------------------- + + // allocBindBuf // Allocate storage for the permanent data buffer for the bound // parameter. -//-------------------------------------------------------------------- + void* OPreparedStatement::allocBindBuf( sal_Int32 index,sal_Int32 bufLen) { @@ -726,12 +726,12 @@ void* OPreparedStatement::allocBindBuf( sal_Int32 index,sal_Int32 bufLen) return b; } -// ------------------------------------------------------------------------- -//-------------------------------------------------------------------- + + // getLengthBuf // Gets the length buffer for the given parameter index -//-------------------------------------------------------------------- + SQLLEN* OPreparedStatement::getLengthBuf (sal_Int32 index) { @@ -747,13 +747,13 @@ SQLLEN* OPreparedStatement::getLengthBuf (sal_Int32 index) return b; } -// ------------------------------------------------------------------------- -//-------------------------------------------------------------------- + + // putParamData // Puts parameter data from a previously bound input stream. The // input stream was bound using SQL_LEN_DATA_AT_EXEC. -//-------------------------------------------------------------------- + void OPreparedStatement::putParamData (sal_Int32 index) throw(SQLException) { @@ -815,12 +815,12 @@ void OPreparedStatement::putParamData (sal_Int32 index) throw(SQLException) throw SQLException(ex.Message,*this,OUString(),0,Any()); } } -// ------------------------------------------------------------------------- -//-------------------------------------------------------------------- + + // setStream // Sets an input stream as a parameter, using the given SQL type -//-------------------------------------------------------------------- + void OPreparedStatement::setStream( sal_Int32 ParameterIndex, @@ -869,9 +869,9 @@ void OPreparedStatement::setStream( // Save the input stream boundParams[ParameterIndex - 1].setInputStream (x, length); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + void OPreparedStatement::FreeParams() { @@ -879,7 +879,7 @@ void OPreparedStatement::FreeParams() delete [] boundParams; boundParams = NULL; } -// ------------------------------------------------------------------------- + void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { try @@ -911,7 +911,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons // throw Exception(e.Message,*this); } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::prepareStatement() { if(!isPrepared()) @@ -924,7 +924,7 @@ void OPreparedStatement::prepareStatement() initBoundParam(); } } -// ----------------------------------------------------------------------------- + void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex) { if( _parameterIndex > numParams || @@ -941,13 +941,13 @@ void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex) ::dbtools::throwInvalidIndexException(*this,makeAny(aNext)); } } -// ----------------------------------------------------------------------------- + OResultSet* OPreparedStatement::createResulSet() { OResultSet* pReturn = new OResultSet(m_aStatementHandle,this); pReturn->setMetaData(getMetaData()); return pReturn; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx index c1c2ceec58a3..e2d586967678 100644 --- a/connectivity/source/drivers/odbc/ORealDriver.cxx +++ b/connectivity/source/drivers/odbc/ORealDriver.cxx @@ -102,7 +102,7 @@ namespace connectivity ORealObdcDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) : ODBCDriver(_rxFactory) {} }; - //------------------------------------------------------------------ + oslGenericFunction ORealObdcDriver::getOdbcFunction(sal_Int32 _nIndex) const { oslGenericFunction pFunction = NULL; @@ -324,12 +324,12 @@ oslGenericFunction ORealObdcDriver::getOdbcFunction(sal_Int32 _nIndex) const return pFunction; } -//------------------------------------------------------------------ + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ODBCDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { return *(new ORealObdcDriver(_rxFactory)); } -// ----------------------------------------------------------------------------- + // ODBC Environment (common for all Connections): SQLHANDLE ORealObdcDriver::EnvironmentHandle(OUString &_rPath) { @@ -352,7 +352,7 @@ SQLHANDLE ORealObdcDriver::EnvironmentHandle(OUString &_rPath) return m_pDriverHandle; } -// ----------------------------------------------------------------------------- + } } diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index 1812e8722765..cc59ed22e704 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -65,13 +65,13 @@ namespace const SQLLEN nMaxBookmarkLen = 20; } -//------------------------------------------------------------------------------ + // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) { return OUString("com.sun.star.sdbcx.odbc.ResultSet"); } -// ------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException) { Sequence< OUString > aSupported(2); @@ -85,7 +85,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) t return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_bFetchDataInOrder(sal_True) @@ -169,20 +169,20 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + OResultSet::~OResultSet() { delete [] m_pRowStatusArray; delete m_pSkipDeletedSet; } -// ----------------------------------------------------------------------------- + void OResultSet::construct() { osl_atomic_increment( &m_refCount ); allocBuffer(); osl_atomic_decrement( &m_refCount ); } -// ------------------------------------------------------------------------- + void OResultSet::disposing(void) { SQLRETURN nRet = N3SQLCloseCursor(m_aStatementHandle); @@ -197,7 +197,7 @@ void OResultSet::disposing(void) m_xStatement.clear(); m_xMetaData.clear(); } -// ------------------------------------------------------------------------- + SQLRETURN OResultSet::unbind(sal_Bool _bUnbindHandle) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::unbind" ); @@ -268,7 +268,7 @@ SQLRETURN OResultSet::unbind(sal_Bool _bUnbindHandle) } return nRet; } -// ------------------------------------------------------------------------- + TVoidPtr OResultSet::allocBindColumn(sal_Int32 _nType,sal_Int32 _nColumnIndex) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::allocBindColumn" ); @@ -330,7 +330,7 @@ TVoidPtr OResultSet::allocBindColumn(sal_Int32 _nType,sal_Int32 _nColumnIndex) } return aPair; } -// ------------------------------------------------------------------------- + void OResultSet::allocBuffer() { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::allocBuffer" ); @@ -351,20 +351,20 @@ void OResultSet::allocBuffer() } m_aLengthVector.resize(nLen + 1); } -// ------------------------------------------------------------------------- + void OResultSet::releaseBuffer() { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::releaseBuffer" ); unbind(sal_False); m_aLengthVector.clear(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OPropertySetHelper::queryInterface(rType); return aRet.hasValue() ? aRet : OResultSet_BASE::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException) { OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), @@ -373,7 +373,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { @@ -397,7 +397,7 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName ) throw(SQ assert(false); return 0; // Never reached } -// ------------------------------------------------------------------------- + void OResultSet::ensureCacheForColumn(sal_Int32 columnIndex) { SAL_INFO( "connectivity.drivers", "odbc lionel@mamane.lu OResultSet::ensureCacheForColumn" ); @@ -427,7 +427,7 @@ void OResultSet::invalidateCache() i->setBound(false); } } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -437,7 +437,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 /*colu return NULL; } -// ------------------------------------------------------------------------- + Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -447,7 +447,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*c return NULL; } -// ----------------------------------------------------------------------------- + template < typename T > T OResultSet::impl_getValue( const sal_Int32 _nColumnIndex, SQLSMALLINT nType ) { T val; @@ -456,13 +456,13 @@ template < typename T > T OResultSet::impl_getValue( const sal_Int32 _nColumnInd return val; } -// ------------------------------------------------------------------------- + // this function exists for the implicit conversion to sal_Bool (compared to a direct call to impl_getValue) sal_Bool OResultSet::impl_getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return impl_getValue<sal_Int8>(columnIndex, SQL_C_BIT); } -// ------------------------------------------------------------------------- + template < typename T > T OResultSet::getValue( sal_Int32 columnIndex ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -475,12 +475,12 @@ sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLExcep { return getValue<sal_Bool>( columnIndex ); } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue<sal_Int8>( columnIndex ); } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { @@ -526,7 +526,7 @@ Sequence< sal_Int8 > OResultSet::impl_getBytes( sal_Int32 columnIndex ) throw(SQ return OTools::getBytesValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_C_BINARY,m_bWasNull,**this); } } -// ------------------------------------------------------------------------- + Date OResultSet::impl_getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { DATE_STRUCT aDate = impl_getValue< DATE_STRUCT> ( columnIndex, @@ -534,34 +534,34 @@ Date OResultSet::impl_getDate( sal_Int32 columnIndex ) throw(SQLException, Runti return Date(aDate.day, aDate.month, aDate.year); } -// ------------------------------------------------------------------------- + Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue<Date>( columnIndex ); } -// ------------------------------------------------------------------------- + double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue<double>( columnIndex ); } -// ------------------------------------------------------------------------- + float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue<float>( columnIndex ); } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue<sal_Int16>( columnIndex ); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue<sal_Int32>( columnIndex ); } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue<sal_Int64>( columnIndex ); @@ -577,7 +577,7 @@ sal_Int64 OResultSet::impl_getLong( sal_Int32 columnIndex ) throw(SQLException, return getString(columnIndex).toInt64(); } } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -585,7 +585,7 @@ sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException) return m_pSkipDeletedSet ? m_pSkipDeletedSet->getMappedPosition(getDriverPos()) : getDriverPos(); } -// ------------------------------------------------------------------------- + Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::getMetaData" ); @@ -597,40 +597,40 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx m_xMetaData = new OResultSetMetaData(m_pStatement->getOwnConnection(),m_aStatementHandle); return m_xMetaData; } -// ------------------------------------------------------------------------- + Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getArray", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getClob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getBlob", *this ); return NULL; } -// ------------------------------------------------------------------------- + Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRow::getRef", *this ); return NULL; } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException) { return getValue<ORowSetValue>( columnIndex ).makeAny(); } -// ------------------------------------------------------------------------- + OUString OResultSet::impl_getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { checkDisposed(OResultSet_BASE::rBHelper.bDisposed); @@ -641,7 +641,7 @@ OUString OResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, Runt { return getValue<OUString>( columnIndex ); } -// ------------------------------------------------------------------------- + Time OResultSet::impl_getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { TIME_STRUCT aTime = impl_getValue< TIME_STRUCT > ( columnIndex, @@ -653,7 +653,7 @@ Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, R { return getValue<Time>( columnIndex ); } -// ------------------------------------------------------------------------- + DateTime OResultSet::impl_getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { TIMESTAMP_STRUCT aTime = impl_getValue< TIMESTAMP_STRUCT > ( columnIndex, @@ -672,14 +672,14 @@ DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLExc { return getValue<DateTime>( columnIndex ); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); return m_nRowPos == 0; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -687,7 +687,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeExcepti return m_nRowPos != 0 && m_nCurrentFetchState == SQL_NO_DATA; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -695,7 +695,7 @@ sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException) return m_nRowPos == 1; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -704,7 +704,7 @@ sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException) return m_bEOF && m_nCurrentFetchState != SQL_NO_DATA; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::beforeFirst" ); @@ -716,7 +716,7 @@ void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException) previous(); m_nCurrentFetchState = SQL_SUCCESS; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::afterLast" ); @@ -727,7 +727,7 @@ void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException) next(); m_bEOF = sal_True; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException) { @@ -738,46 +738,46 @@ void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException) } dispose(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::first" ); return moveImpl(IResultSetHelper::FIRST,0,sal_True); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::last" ); return moveImpl(IResultSetHelper::LAST,0,sal_True); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::absolute" ); return moveImpl(IResultSetHelper::ABSOLUTE,row,sal_True); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::relative" ); return moveImpl(IResultSetHelper::RELATIVE,row,sal_True); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::previous" ); return moveImpl(IResultSetHelper::PRIOR,0,sal_True); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); return m_xStatement; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowDeleted() throw(SQLException, RuntimeException) { @@ -790,7 +790,7 @@ sal_Bool SAL_CALL OResultSet::rowDeleted() throw(SQLException, RuntimeException) return bRet; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::rowInserted" ); @@ -802,7 +802,7 @@ sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeExcepti return bInserted; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::rowUpdated" ); @@ -812,14 +812,14 @@ sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeExceptio return m_pRowStatusArray[0] == SQL_ROW_UPDATED; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::next" ); return moveImpl(IResultSetHelper::NEXT,1,sal_True); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) { @@ -829,7 +829,7 @@ sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException) return m_bWasNull; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) { @@ -839,16 +839,16 @@ void SAL_CALL OResultSet::cancel( ) throw(RuntimeException) OTools::ThrowException(m_pStatement->getOwnConnection(),N3SQLCancel(m_aStatementHandle),m_aStatementHandle,SQL_HANDLE_STMT,*this); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::clearWarnings( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException) { return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::insertRow" ); @@ -925,7 +925,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) m_bRowInserted = sal_True; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::updateRow" ); @@ -976,7 +976,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException) throw; } } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::deleteRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::deleteRow" ); @@ -1002,12 +1002,12 @@ void SAL_CALL OResultSet::deleteRow( ) throw(SQLException, RuntimeException) if ( m_pSkipDeletedSet ) m_pSkipDeletedSet->deletePosition(nPos); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException) { @@ -1022,13 +1022,13 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeExcepti // SQLRETURN nRet = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE ,(SQLPOINTER)1,SQL_IS_INTEGER); m_bInserting = sal_True; } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeException) { invalidateCache(); } -// ------------------------------------------------------------------------- + void OResultSet::updateValue(sal_Int32 columnIndex,SQLSMALLINT _nType,void* _pValue) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::updateValue" ); @@ -1050,7 +1050,7 @@ void OResultSet::updateValue(sal_Int32 columnIndex,SQLSMALLINT _nType,void* _pVa m_nTextEncoding, m_pStatement->getOwnConnection()->useOldDateFormat()); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1060,45 +1060,45 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException void* pData = reinterpret_cast<void*>(m_aBindVector.rbegin()->first); OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_CHAR,0,(sal_Int8*)NULL,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding,m_pStatement->getOwnConnection()->useOldDateFormat()); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,SQL_BIT,&x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,SQL_CHAR,&x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,SQL_TINYINT,&x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,SQL_INTEGER,&x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateLong( sal_Int32 /*columnIndex*/, sal_Int64 /*x*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRowUpdate::updateLong", *this ); } -// ----------------------------------------------------------------------- + void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,SQL_REAL,&x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException) { updateValue(columnIndex,SQL_DOUBLE,&x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw(SQLException, RuntimeException) { sal_Int32 nType = m_aRow[columnIndex].getTypeKind(); @@ -1108,7 +1108,7 @@ void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x m_aRow[columnIndex].setBound(true); updateValue(columnIndex,nOdbcType,(void*)&x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException) { sal_Int32 nType = m_aRow[columnIndex].getTypeKind(); @@ -1118,27 +1118,27 @@ void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sa m_aRow[columnIndex].setBound(true); updateValue(columnIndex,nOdbcType,(void*)&x); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) throw(SQLException, RuntimeException) { DATE_STRUCT aVal = OTools::DateToOdbcDate(x); updateValue(columnIndex,SQL_DATE,&aVal); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) throw(SQLException, RuntimeException) { TIME_STRUCT aVal = OTools::TimeToOdbcTime(x); updateValue(columnIndex,SQL_TIME,&aVal); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const DateTime& x ) throw(SQLException, RuntimeException) { TIMESTAMP_STRUCT aVal = OTools::DateTimeToTimestamp(x); updateValue(columnIndex,SQL_TIMESTAMP,&aVal); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { @@ -1149,12 +1149,12 @@ void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Refer x->readBytes(aSeq,length); updateBytes(columnIndex,aSeq); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException) { updateBinaryStream(columnIndex,x,length); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::refreshRow" ); @@ -1166,20 +1166,20 @@ void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_RELATIVE,0); OTools::ThrowException(m_pStatement->getOwnConnection(),m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException) { if (!::dbtools::implUpdateObject(this, columnIndex, x)) throw SQLException(); } -// ------------------------------------------------------------------------- + void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { if (!::dbtools::implUpdateObject(this, columnIndex, x)) throw SQLException(); } -// ------------------------------------------------------------------------- + // XRowLocate Any SAL_CALL OResultSet::getBookmark( ) throw( SQLException, RuntimeException) { @@ -1215,7 +1215,7 @@ Sequence<sal_Int8> OResultSet::impl_getBookmark( ) throw( SQLException, Runtim return aFind->first; } } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::moveToBookmark" ); @@ -1244,7 +1244,7 @@ sal_Bool SAL_CALL OResultSet::moveToBookmark( const Any& bookmark ) throw( SQLE } return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::moveRelativeToBookmark" ); @@ -1262,7 +1262,7 @@ sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark( const Any& bookmark, sal_ OTools::ThrowException(m_pStatement->getOwnConnection(),m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); return m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::compareBookmarks( const Any& lhs, const Any& rhs ) throw( SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::compareBookmarks" ); @@ -1271,18 +1271,18 @@ sal_Int32 SAL_CALL OResultSet::compareBookmarks( const Any& lhs, const Any& rhs return (lhs == rhs) ? CompareBookmark::EQUAL : CompareBookmark::NOT_EQUAL; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks( ) throw( SQLException, RuntimeException) { return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSet::hashBookmark( const Any& /*bookmark*/ ) throw( SQLException, RuntimeException) { ::dbtools::throwFunctionNotSupportedException( "XRowLocate::hashBookmark", *this ); return 0; } -// ------------------------------------------------------------------------- + // XDeleteRows Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >& rows ) throw( SQLException, RuntimeException) { @@ -1309,7 +1309,7 @@ Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >& } return aRet; } -//------------------------------------------------------------------------------ + template < typename T, SQLINTEGER BufferLength > T OResultSet::getStmtOption (SQLINTEGER fOption, T dflt) const { T result (dflt); @@ -1323,7 +1323,7 @@ template < typename T, SQLINTEGER BufferLength > SQLRETURN OResultSet::setStmtOp SQLPOINTER sv = reinterpret_cast<SQLPOINTER>(value); return N3SQLSetStmtAttr(m_aStatementHandle, fOption, sv, BufferLength); } -//------------------------------------------------------------------------------ + sal_Int32 OResultSet::getResultSetConcurrency() const { sal_uInt32 nValue = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CONCURRENCY); @@ -1334,7 +1334,7 @@ sal_Int32 OResultSet::getResultSetConcurrency() const return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OResultSet::getResultSetType() const { sal_uInt32 nValue = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_SENSITIVITY); @@ -1356,17 +1356,17 @@ sal_Int32 OResultSet::getResultSetType() const } return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OResultSet::getFetchDirection() const { return FetchDirection::FORWARD; } -//------------------------------------------------------------------------------ + sal_Int32 OResultSet::getFetchSize() const { return getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_ROW_ARRAY_SIZE); } -//------------------------------------------------------------------------------ + OUString OResultSet::getCursorName() const { SQLCHAR pName[258]; @@ -1374,7 +1374,7 @@ OUString OResultSet::getCursorName() const N3SQLGetCursorName(m_aStatementHandle,(SQLCHAR*)pName,256,&nRealLen); return OUString::createFromAscii((const char*)pName); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::isBookmarkable() const { if(!m_aConnectionHandle) @@ -1412,7 +1412,7 @@ sal_Bool OResultSet::isBookmarkable() const return (m_nUseBookmarks != SQL_UB_OFF) && (nAttr & SQL_CA1_BOOKMARK) == SQL_CA1_BOOKMARK; } -//------------------------------------------------------------------------------ + void OResultSet::setFetchDirection(sal_Int32 _par0) { ::dbtools::throwFunctionNotSupportedException( "setFetchDirection", *this ); @@ -1423,7 +1423,7 @@ void OResultSet::setFetchDirection(sal_Int32 _par0) setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_TYPE, _par0); } } -//------------------------------------------------------------------------------ + void OResultSet::setFetchSize(sal_Int32 _par0) { OSL_ENSURE(_par0>0,"Illegal fetch size!"); @@ -1440,7 +1440,7 @@ void OResultSet::setFetchSize(sal_Int32 _par0) setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR, m_pRowStatusArray); } } -// ------------------------------------------------------------------------- + IPropertyArrayHelper* OResultSet::createArrayHelper( ) const { Sequence< Property > aProps(6); @@ -1455,12 +1455,12 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const return new OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + IPropertyArrayHelper & OResultSet::getInfoHelper() { return *const_cast<OResultSet*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OResultSet::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, @@ -1484,7 +1484,7 @@ sal_Bool OResultSet::convertFastPropertyValue( } return sal_False; } -// ------------------------------------------------------------------------- + void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue @@ -1508,7 +1508,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast( ; } } -// ------------------------------------------------------------------------- + void OResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle @@ -1536,7 +1536,7 @@ void OResultSet::getFastPropertyValue( break; } } -// ------------------------------------------------------------------------- + void OResultSet::fillColumn(const sal_Int32 _nColumn) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::fillColumn" ); @@ -1656,22 +1656,22 @@ void OResultSet::fillColumn(const sal_Int32 _nColumn) } } } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::acquire() throw() { OResultSet_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OResultSet::release() throw() { OResultSet_BASE::release(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool /*_bRetrieveData*/) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::move" ); @@ -1777,24 +1777,24 @@ sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 return bSuccess; } -// ----------------------------------------------------------------------------- + sal_Int32 OResultSet::getDriverPos() const { sal_Int32 nValue = getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_ROW_NUMBER); OSL_TRACE( __FILE__": OResultSet::getDriverPos() = RowNum = %d, RowPos = %d", nValue, m_nRowPos); return nValue ? nValue : m_nRowPos; } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::deletedVisible() const { return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::isRowDeleted() const { return m_pRowStatusArray[0] == SQL_ROW_DELETED; } -// ----------------------------------------------------------------------------- + sal_Bool OResultSet::moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1803,7 +1803,7 @@ sal_Bool OResultSet::moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_I ? m_pSkipDeletedSet->skipDeleted(_eCursorPosition,_nOffset,_bRetrieveData) : move(_eCursorPosition,_nOffset,_bRetrieveData); } -// ----------------------------------------------------------------------------- + void OResultSet::fillNeededData(SQLRETURN _nRet) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::fillNeededData" ); @@ -1853,7 +1853,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet) while (nRet == SQL_NEED_DATA); } } -// ----------------------------------------------------------------------------- + SWORD OResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex) { ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex); diff --git a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx index 15ab4e63584f..5ef770f4a3c1 100644 --- a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx +++ b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx @@ -25,11 +25,11 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::sdbc; -// ------------------------------------------------------------------------- + OResultSetMetaData::~OResultSetMetaData() { } -// ------------------------------------------------------------------------- + OUString OResultSetMetaData::getCharColAttrib(sal_Int32 _column,sal_Int32 ident) throw(SQLException, RuntimeException) { sal_Int32 column = _column; @@ -75,7 +75,7 @@ OUString OResultSetMetaData::getCharColAttrib(sal_Int32 _column,sal_Int32 ident) return sValue; } -// ------------------------------------------------------------------------- + SQLLEN OResultSetMetaData::getNumColAttrib(OConnection* _pConnection ,SQLHANDLE _aStatementHandle ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface @@ -92,7 +92,7 @@ SQLLEN OResultSetMetaData::getNumColAttrib(OConnection* _pConnection &nValue),_aStatementHandle,SQL_HANDLE_STMT,_xInterface); return nValue; } -// ------------------------------------------------------------------------- + sal_Int32 OResultSetMetaData::getNumColAttrib(sal_Int32 _column,sal_Int32 ident) throw(SQLException, RuntimeException) { sal_Int32 column = _column; @@ -101,12 +101,12 @@ sal_Int32 OResultSetMetaData::getNumColAttrib(sal_Int32 _column,sal_Int32 ident) return getNumColAttrib(m_pConnection,m_aStatementHandle,*this,column,ident); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException) { return getNumColAttrib(column,SQL_DESC_DISPLAY_SIZE); } -// ------------------------------------------------------------------------- + SQLSMALLINT OResultSetMetaData::getColumnODBCType(OConnection* _pConnection ,SQLHANDLE _aStatementHandle ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface @@ -127,7 +127,7 @@ SQLSMALLINT OResultSetMetaData::getColumnODBCType(OConnection* _pConnection return nType; } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException) { ::std::map<sal_Int32,sal_Int32>::iterator aFind = m_aColumnTypes.find(column); @@ -157,7 +157,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(S return aFind->second; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException) { @@ -168,65 +168,65 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, Ru OTools::ThrowException(m_pConnection,N3SQLNumResultCols(m_aStatementHandle,&nNumResultCols),m_aStatementHandle,SQL_HANDLE_STMT,*this); return m_nColCount = nNumResultCols; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException) { return getNumColAttrib(column,SQL_DESC_CASE_SENSITIVE) == SQL_TRUE; } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException) { return getCharColAttrib(column,SQL_DESC_SCHEMA_NAME); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { return getCharColAttrib(column,SQL_DESC_NAME); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException) { return getCharColAttrib(column,SQL_DESC_TABLE_NAME); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException) { return getCharColAttrib(column,SQL_DESC_CATALOG_NAME); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::getColumnTypeName" ); return getCharColAttrib(column,SQL_DESC_TYPE_NAME); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::getColumnLabel" ); return getCharColAttrib(column,SQL_DESC_LABEL); } -// ------------------------------------------------------------------------- + OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::getColumnServiceName" ); return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) { return getNumColAttrib(column,SQL_DESC_FIXED_PREC_SCALE) == SQL_TRUE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException) { return getNumColAttrib(column,SQL_DESC_AUTO_UNIQUE_VALUE) == SQL_TRUE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException) @@ -234,7 +234,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLExce SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::isSigned" ); return getNumColAttrib(column,SQL_DESC_UNSIGNED) == SQL_FALSE; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::getPrecision" ); @@ -250,7 +250,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQ } return nType; } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::getScale" ); @@ -266,28 +266,28 @@ sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com: } return nType; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::isNullable" ); return getNumColAttrib(column,SQL_DESC_NULLABLE); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::isSearchable" ); return getNumColAttrib(column,SQL_DESC_SEARCHABLE) != SQL_PRED_NONE; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::isReadOnly" ); return getNumColAttrib(column,SQL_DESC_UPDATABLE) == SQL_ATTR_READONLY; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { @@ -295,12 +295,12 @@ sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) t return getNumColAttrib(column,SQL_DESC_UPDATABLE) == SQL_ATTR_WRITE; ; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSetMetaData::isWritable" ); return getNumColAttrib(column,SQL_DESC_UPDATABLE) == SQL_ATTR_WRITE; } -// ------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx index bd55cc168c90..26cd84a81721 100644 --- a/connectivity/source/drivers/odbc/OStatement.cxx +++ b/connectivity/source/drivers/odbc/OStatement.cxx @@ -48,7 +48,7 @@ using namespace ::comphelper; using namespace connectivity::odbc; -//------------------------------------------------------------------------------ + using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; @@ -57,7 +57,7 @@ using namespace com::sun::star::sdbcx; using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -//------------------------------------------------------------------------------ + OStatement_Base::OStatement_Base(OConnection* _pConnection ) :OStatement_BASE(m_aMutex) ,OPropertySetHelper(OStatement_BASE::rBHelper) @@ -82,12 +82,12 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) osl_atomic_decrement( &m_refCount ); } -// ----------------------------------------------------------------------------- + OStatement_Base::~OStatement_Base() { OSL_ENSURE(!m_aStatementHandle,"Sohould ne null here!"); } -//------------------------------------------------------------------------------ + void OStatement_Base::disposeResultSet() { // free the cursor if alive @@ -96,7 +96,7 @@ void OStatement_Base::disposeResultSet() xComp->dispose(); m_xResultSet.clear(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::disposing(void) { ::osl::MutexGuard aGuard(m_aMutex); @@ -115,7 +115,7 @@ void SAL_CALL OStatement_Base::disposing(void) OStatement_BASE::disposing(); } -//------------------------------------------------------------------------------ + void OStatement_BASE2::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -123,12 +123,12 @@ void OStatement_BASE2::disposing() dispose_ChildImpl(); OStatement_Base::disposing(); } -//----------------------------------------------------------------------------- + void SAL_CALL OStatement_BASE2::release() throw() { relase_ChildImpl(); } -//----------------------------------------------------------------------------- + Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(RuntimeException) { if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() && rType == ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ) ) @@ -136,7 +136,7 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime Any aRet = OStatement_BASE::queryInterface(rType); return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), @@ -152,7 +152,7 @@ Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException) return ::comphelper::concatSequences(aTypes.getTypes(),aOldTypes); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OStatement_Base::getGeneratedValues( ) throw (SQLException, RuntimeException) { OSL_ENSURE( m_pConnection && m_pConnection->isAutoRetrievingEnabled(),"Illegal call here. isAutoRetrievingEnabled is false!"); @@ -169,7 +169,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::getGeneratedValues( ) throw ( } return xRes; } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -178,7 +178,7 @@ void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException) OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); OTools::ThrowException(m_pConnection,N3SQLCancel(m_aStatementHandle),m_aStatementHandle,SQL_HANDLE_STMT,*this); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException) { @@ -189,13 +189,13 @@ void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException) } dispose(); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement::clearBatch( ) throw(SQLException, RuntimeException) { } -// ------------------------------------------------------------------------- + void OStatement_Base::reset() throw (SQLException) { @@ -214,10 +214,10 @@ void OStatement_Base::reset() throw (SQLException) THROW_SQL(N3SQLFreeStmt(m_aStatementHandle, SQL_CLOSE)); } } -//-------------------------------------------------------------------- + // clearMyResultSet // If a ResultSet was created for this Statement, close it -//-------------------------------------------------------------------- + void OStatement_Base::clearMyResultSet () throw (SQLException) { @@ -234,7 +234,7 @@ void OStatement_Base::clearMyResultSet () throw (SQLException) m_xResultSet.clear(); } -//-------------------------------------------------------------------- + SQLLEN OStatement_Base::getRowCount () throw( SQLException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -251,12 +251,12 @@ SQLLEN OStatement_Base::getRowCount () throw( SQLException) } return numRows; } -//-------------------------------------------------------------------- + // lockIfNecessary // If the given SQL statement contains a 'FOR UPDATE' clause, change // the concurrency to lock so that the row can then be updated. Returns // true if the concurrency has been changed -//-------------------------------------------------------------------- + sal_Bool OStatement_Base::lockIfNecessary (const OUString& sql) throw( SQLException) { @@ -291,10 +291,10 @@ sal_Bool OStatement_Base::lockIfNecessary (const OUString& sql) throw( SQLExcept return rc; } -//-------------------------------------------------------------------- + // setWarning // Sets the warning -//-------------------------------------------------------------------- + void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) { @@ -305,10 +305,10 @@ void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) m_aLastWarning = ex; } -//-------------------------------------------------------------------- + // getColumnCount // Return the number of columns in the ResultSet -//-------------------------------------------------------------------- + sal_Int32 OStatement_Base::getColumnCount () throw( SQLException) { @@ -327,7 +327,7 @@ sal_Int32 OStatement_Base::getColumnCount () throw( SQLException) } return numCols; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -375,11 +375,11 @@ sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql ) throw(SQLExcep return hasResultSet; } -//-------------------------------------------------------------------- + // getResultSet // getResultSet returns the current result as a ResultSet. It // returns NULL if the current result is not a ResultSet. -//-------------------------------------------------------------------- + Reference< XResultSet > OStatement_Base::getResultSet (sal_Bool checkCount) throw( SQLException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -419,10 +419,10 @@ Reference< XResultSet > OStatement_Base::getResultSet (sal_Bool checkCount) thro return pRs; } -//-------------------------------------------------------------------- + // getStmtOption // Invoke SQLGetStmtOption with the given option. -//-------------------------------------------------------------------- + template < typename T, SQLINTEGER BufferLength > T OStatement_Base::getStmtOption (SQLINTEGER fOption, T dflt) const { @@ -437,7 +437,7 @@ template < typename T, SQLINTEGER BufferLength > SQLRETURN OStatement_Base::setS SQLPOINTER sv = reinterpret_cast<SQLPOINTER>(value); return N3SQLSetStmtAttr(m_aStatementHandle, fOption, sv, BufferLength); } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -462,7 +462,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const OUString& } return xRS; } -// ------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OStatement_Base::getConnection( ) throw(SQLException, RuntimeException) { @@ -471,14 +471,14 @@ Reference< XConnection > SAL_CALL OStatement_Base::getConnection( ) throw(SQLEx return (Reference< XConnection >)m_pConnection; } -// ------------------------------------------------------------------------- + Any SAL_CALL OStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ::cppu::queryInterface(rType,static_cast< XBatchExecution*> (this)); return aRet.hasValue() ? aRet : OStatement_Base::queryInterface(rType); } -// ------------------------------------------------------------------------- + void SAL_CALL OStatement::addBatch( const OUString& sql ) throw(SQLException, RuntimeException) { @@ -488,7 +488,7 @@ void SAL_CALL OStatement::addBatch( const OUString& sql ) throw(SQLException, Ru m_aBatchList.push_back(sql); } -// ------------------------------------------------------------------------- + Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -520,7 +520,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException, } return aRet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const OUString& sql ) throw(SQLException, RuntimeException) @@ -549,7 +549,7 @@ sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const OUString& sql ) throw(S return numRows; } -// ------------------------------------------------------------------------- + Reference< XResultSet > SAL_CALL OStatement_Base::getResultSet( ) throw(SQLException, RuntimeException) { @@ -560,7 +560,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::getResultSet( ) throw(SQLExce m_xResultSet = getResultSet(sal_True); return m_xResultSet; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OStatement_Base::getUpdateCount( ) throw(SQLException, RuntimeException) { @@ -578,7 +578,7 @@ sal_Int32 SAL_CALL OStatement_Base::getUpdateCount( ) throw(SQLException, Runti return rowCount; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, RuntimeException) { @@ -629,9 +629,9 @@ sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, Runtim return hasResultSet; } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -640,9 +640,9 @@ Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeExcepti return makeAny(m_aLastWarning); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + + void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -651,18 +651,18 @@ void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeExce m_aLastWarning = SQLWarning(); } -// ------------------------------------------------------------------------- -//------------------------------------------------------------------------------ + + sal_Int64 OStatement_Base::getQueryTimeOut() const { return getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_QUERY_TIMEOUT); } -//------------------------------------------------------------------------------ + sal_Int64 OStatement_Base::getMaxRows() const { return getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_MAX_ROWS); } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getResultSetConcurrency() const { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); @@ -673,7 +673,7 @@ sal_Int32 OStatement_Base::getResultSetConcurrency() const nValue = ResultSetConcurrency::UPDATABLE; return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getResultSetType() const { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); @@ -696,7 +696,7 @@ sal_Int32 OStatement_Base::getResultSetType() const return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getFetchDirection() const { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); @@ -713,18 +713,18 @@ sal_Int32 OStatement_Base::getFetchDirection() const return nValue; } -//------------------------------------------------------------------------------ + sal_Int32 OStatement_Base::getFetchSize() const { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); return getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_ROW_ARRAY_SIZE); } -//------------------------------------------------------------------------------ + sal_Int64 OStatement_Base::getMaxFieldSize() const { return getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_MAX_LENGTH); } -//------------------------------------------------------------------------------ + OUString OStatement_Base::getCursorName() const { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); @@ -734,19 +734,19 @@ OUString OStatement_Base::getCursorName() const OSL_UNUSED( nRetCode ); return OUString::createFromAscii((const char*)pName); } -//------------------------------------------------------------------------------ + void OStatement_Base::setQueryTimeOut(sal_Int64 seconds) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_QUERY_TIMEOUT,seconds); } -//------------------------------------------------------------------------------ + void OStatement_Base::setMaxRows(sal_Int64 _par0) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_MAX_ROWS, _par0); } -//------------------------------------------------------------------------------ + void OStatement_Base::setResultSetConcurrency(sal_Int32 _par0) { SQLULEN nSet; @@ -758,7 +758,7 @@ void OStatement_Base::setResultSetConcurrency(sal_Int32 _par0) OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CONCURRENCY, nSet); } -//------------------------------------------------------------------------------ + void OStatement_Base::setResultSetType(sal_Int32 _par0) { @@ -814,7 +814,7 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_SENSITIVITY, nSet); } -//------------------------------------------------------------------------------ + void OStatement_Base::setEscapeProcessing( const sal_Bool _bEscapeProc ) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); @@ -822,7 +822,7 @@ void OStatement_Base::setEscapeProcessing( const sal_Bool _bEscapeProc ) setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_NOSCAN, nEscapeProc); } -//------------------------------------------------------------------------------ + void OStatement_Base::setFetchDirection(sal_Int32 _par0) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); @@ -835,7 +835,7 @@ void OStatement_Base::setFetchDirection(sal_Int32 _par0) setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_SCROLLABLE, SQL_SCROLLABLE); } } -//------------------------------------------------------------------------------ + void OStatement_Base::setFetchSize(sal_Int32 _par0) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); @@ -850,39 +850,39 @@ void OStatement_Base::setFetchSize(sal_Int32 _par0) setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR, m_pRowStatusArray); } } -//------------------------------------------------------------------------------ + void OStatement_Base::setMaxFieldSize(sal_Int64 _par0) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_MAX_LENGTH, _par0); } -//------------------------------------------------------------------------------ + void OStatement_Base::setCursorName(const OUString &_par0) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); OString aName(OUStringToOString(_par0,getOwnConnection()->getTextEncoding())); N3SQLSetCursorName(m_aStatementHandle,(SDB_ODBC_CHAR*)aName.getStr(),(SQLSMALLINT)aName.getLength()); } -// ------------------------------------------------------------------------- + sal_Bool OStatement_Base::isUsingBookmarks() const { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); return SQL_UB_OFF != getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_USE_BOOKMARKS, SQL_UB_OFF); } -// ------------------------------------------------------------------------- + sal_Bool OStatement_Base::getEscapeProcessing() const { OSL_ENSURE( m_aStatementHandle, "StatementHandle is null!" ); return SQL_NOSCAN_OFF == getStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_USE_BOOKMARKS, SQL_NOSCAN_OFF);; } -// ------------------------------------------------------------------------- + void OStatement_Base::setUsingBookmarks(sal_Bool _bUseBookmark) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); SQLULEN nValue = _bUseBookmark ? SQL_UB_VARIABLE : SQL_UB_OFF; setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_USE_BOOKMARKS, nValue); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OStatement_Base::createArrayHelper( ) const { Sequence< Property > aProps(10); @@ -902,12 +902,12 @@ void OStatement_Base::setUsingBookmarks(sal_Bool _bUseBookmark) return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OStatement_Base::getInfoHelper() { return *const_cast<OStatement_Base*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + sal_Bool OStatement_Base::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, @@ -968,7 +968,7 @@ sal_Bool OStatement_Base::convertFastPropertyValue( } return bConverted; } -// ------------------------------------------------------------------------- + void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) { try @@ -1015,7 +1015,7 @@ void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A // throw Exception(e.Message,*this); } } -// ------------------------------------------------------------------------- + void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const { switch(nHandle) @@ -1055,39 +1055,39 @@ void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const break; } } -// ------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO(OStatement,"com.sun.star.sdbcx.OStatement","com.sun.star.sdbc.Statement"); -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::acquire() throw() { OStatement_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement_Base::release() throw() { OStatement_BASE::release(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::acquire() throw() { OStatement_BASE2::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OStatement::release() throw() { OStatement_BASE2::release(); } -// ----------------------------------------------------------------------------- + OResultSet* OStatement_Base::createResulSet() { return new OResultSet(m_aStatementHandle,this); } -// ----------------------------------------------------------------------------- + Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OStatement_Base::getPropertySetInfo( ) throw(RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + SQLUINTEGER OStatement_Base::getCursorProperties(SQLINTEGER _nCursorType,sal_Bool bFirst) { SQLUINTEGER nValueLen = 0; @@ -1112,6 +1112,6 @@ SQLUINTEGER OStatement_Base::getCursorProperties(SQLINTEGER _nCursorType,sal_Boo } return nValueLen; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx index 4c7ad027c576..03663f77aeb8 100644 --- a/connectivity/source/drivers/odbc/OTools.cxx +++ b/connectivity/source/drivers/odbc/OTools.cxx @@ -149,7 +149,7 @@ void OTools::getValue( OConnection* _pConnection, _aStatementHandle,SQL_HANDLE_STMT,_xInterface,sal_False); _bWasNull = pcbValue == SQL_NULL_DATA; } -// ------------------------------------------------------------------------- + void OTools::bindValue( OConnection* _pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, @@ -289,7 +289,7 @@ void OTools::bindValue( OConnection* _pConnection, OTools::ThrowException(_pConnection,nRetcode,_aStatementHandle,SQL_HANDLE_STMT,_xInterface); } -// ----------------------------------------------------------------------------- + void OTools::ThrowException(const OConnection* _pConnection, const SQLRETURN _rRetCode, const SQLHANDLE _pContext, @@ -349,7 +349,7 @@ void OTools::ThrowException(const OConnection* _pConnection, ); } -// ------------------------------------------------------------------------- + Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection, const SQLHANDLE _aStatementHandle, const sal_Int32 columnIndex, @@ -402,7 +402,7 @@ Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection, } return aData; } -// ------------------------------------------------------------------------- + OUString OTools::getStringValue(OConnection* _pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, @@ -516,7 +516,7 @@ OUString OTools::getStringValue(OConnection* _pConnection, return aData.makeStringAndClear(); } -// ------------------------------------------------------------------------- + void OTools::GetInfo(OConnection* _pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, @@ -532,7 +532,7 @@ void OTools::GetInfo(OConnection* _pConnection, _rValue = OUString(aValue,nValueLen,_nTextEncoding); } -// ------------------------------------------------------------------------- + void OTools::GetInfo(OConnection* _pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, @@ -545,7 +545,7 @@ void OTools::GetInfo(OConnection* _pConnection, (*(T3SQLGetInfo)_pConnection->getOdbcFunction(ODBC3SQLGetInfo))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen), _aConnectionHandle,SQL_HANDLE_DBC,_xInterface); } -// ------------------------------------------------------------------------- + void OTools::GetInfo(OConnection* _pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, @@ -558,7 +558,7 @@ void OTools::GetInfo(OConnection* _pConnection, (*(T3SQLGetInfo)_pConnection->getOdbcFunction(ODBC3SQLGetInfo))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen), _aConnectionHandle,SQL_HANDLE_DBC,_xInterface); } -// ------------------------------------------------------------------------- + void OTools::GetInfo(OConnection* _pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, @@ -571,7 +571,7 @@ void OTools::GetInfo(OConnection* _pConnection, (*(T3SQLGetInfo)_pConnection->getOdbcFunction(ODBC3SQLGetInfo))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen), _aConnectionHandle,SQL_HANDLE_DBC,_xInterface); } -// ------------------------------------------------------------------------- + void OTools::GetInfo(OConnection* _pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, @@ -583,7 +583,7 @@ void OTools::GetInfo(OConnection* _pConnection, (*(T3SQLGetInfo)_pConnection->getOdbcFunction(ODBC3SQLGetInfo))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen), _aConnectionHandle,SQL_HANDLE_DBC,_xInterface); } -// ------------------------------------------------------------------------- + sal_Int32 OTools::MapOdbcType2Jdbc(SQLSMALLINT _nType) { sal_Int32 nValue = DataType::VARCHAR; @@ -658,10 +658,10 @@ sal_Int32 OTools::MapOdbcType2Jdbc(SQLSMALLINT _nType) } return nValue; } -//-------------------------------------------------------------------- + // jdbcTypeToOdbc // Convert the JDBC SQL type to the correct ODBC type -//-------------------------------------------------------------------- + SQLSMALLINT OTools::jdbcTypeToOdbc(sal_Int32 jdbcType) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::jdbcTypeToOdbc" ); @@ -692,7 +692,7 @@ SQLSMALLINT OTools::jdbcTypeToOdbc(sal_Int32 jdbcType) return odbcType; } -//----------------------------------------------------------------------------- + void OTools::getBindTypes(sal_Bool _bUseWChar, sal_Bool _bUseOldTimeDate, SQLSMALLINT _nOdbcType, diff --git a/connectivity/source/drivers/odbc/oservices.cxx b/connectivity/source/drivers/odbc/oservices.cxx index 423a11065057..aa19997fc71a 100644 --- a/connectivity/source/drivers/odbc/oservices.cxx +++ b/connectivity/source/drivers/odbc/oservices.cxx @@ -36,7 +36,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* ); -//--------------------------------------------------------------------------------------- + struct ProviderRequest { Reference< XSingleServiceFactory > xRet; @@ -76,7 +76,7 @@ struct ProviderRequest void* getProvider() const { return xRet.get(); } }; -//--------------------------------------------------------------------------------------- + extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL odbc_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index d62583e3ec53..17120f36771b 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -569,7 +569,7 @@ Reference< com::sun::star::container::XNameAccess > Columns::create( } -//_____________________________________________________________________________________ + ColumnDescriptors::ColumnDescriptors( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xindex.cxx b/connectivity/source/drivers/postgresql/pq_xindex.cxx index 779157fee0b1..3788a4a3d0a1 100644 --- a/connectivity/source/drivers/postgresql/pq_xindex.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindex.cxx @@ -160,7 +160,7 @@ Any Index::queryInterface( const Type & reqType ) throw (RuntimeException) } -//___________________________________________________________________________________ + IndexDescriptor::IndexDescriptor( const ::rtl::Reference< RefCountedMutex > & refMutex, const Reference< com::sun::star::sdbc::XConnection > & connection, diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index 55e9e3d9007e..4cc2eb1971ab 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -269,7 +269,7 @@ Reference< com::sun::star::container::XNameAccess > IndexColumns::create( return ret; } -//_________________________________________________________________________________________ + IndexColumnDescriptors::IndexColumnDescriptors( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx index 18a2d7b3ec18..7aa98928b98d 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx @@ -301,7 +301,7 @@ Reference< com::sun::star::container::XNameAccess > Indexes::create( } -//_________________________________________________________________________________________ + IndexDescriptors::IndexDescriptors( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xkey.cxx b/connectivity/source/drivers/postgresql/pq_xkey.cxx index 3e36d498de81..3d2c5f40def0 100644 --- a/connectivity/source/drivers/postgresql/pq_xkey.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkey.cxx @@ -162,7 +162,7 @@ Any Key::queryInterface( const Type & reqType ) throw (RuntimeException) } -//_____________________________________________________________________________ + KeyDescriptor::KeyDescriptor( const ::rtl::Reference< RefCountedMutex > & refMutex, const Reference< com::sun::star::sdbc::XConnection > & connection, ConnectionSettings *pSettings ) diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx index b7f05970ac6c..8e9d19d26520 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx @@ -369,7 +369,7 @@ Reference< com::sun::star::container::XNameAccess > KeyColumns::create( return ret; } -//_______________________________________________________________________________________ + KeyColumnDescriptors::KeyColumnDescriptors( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx index e6f60b9c5973..40e82b67bf5c 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx @@ -285,7 +285,7 @@ Reference< com::sun::star::container::XIndexAccess > Keys::create( return ret; } -//_________________________________________________________________________________________ + KeyDescriptors::KeyDescriptors( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx index a76d90db04f8..d802ac9634b3 100644 --- a/connectivity/source/drivers/postgresql/pq_xtable.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx @@ -347,7 +347,7 @@ void Table::setName( const OUString& aName ) throw (::com::sun::star::uno::Runti -//________________________________________________________________________ + TableDescriptor::TableDescriptor( const ::rtl::Reference< RefCountedMutex > & refMutex, const Reference< com::sun::star::sdbc::XConnection > & connection, diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx index b32fb9721365..01ebaea86335 100644 --- a/connectivity/source/drivers/postgresql/pq_xuser.cxx +++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx @@ -198,7 +198,7 @@ void User::revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int *this, OUString(), 1, Any() ); } -//______________________________________________________________________________________ + UserDescriptor::UserDescriptor( const ::rtl::Reference< RefCountedMutex > & refMutex, const Reference< com::sun::star::sdbc::XConnection > & connection, diff --git a/connectivity/source/drivers/postgresql/pq_xview.cxx b/connectivity/source/drivers/postgresql/pq_xview.cxx index b71f36f5c963..a40846702468 100644 --- a/connectivity/source/drivers/postgresql/pq_xview.cxx +++ b/connectivity/source/drivers/postgresql/pq_xview.cxx @@ -226,7 +226,7 @@ void View::setName( const OUString& aName ) throw (::com::sun::star::uno::Runtim rename( aName ); } -//____________________________________________________________________________________________ + ViewDescriptor::ViewDescriptor( const ::rtl::Reference< RefCountedMutex > & refMutex, diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index 02f3a9ce4001..484af4a08106 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -81,25 +81,25 @@ public: virtual Any SAL_CALL nextElement( ) throw(NoSuchElementException, WrappedTargetException, RuntimeException); }; -//-------------------------------------------------------------------------- + ODriverEnumeration::ODriverEnumeration(const DriverArray& _rDriverSequence) :m_aDrivers( _rDriverSequence ) ,m_aPos( m_aDrivers.begin() ) { } -//-------------------------------------------------------------------------- + ODriverEnumeration::~ODriverEnumeration() { } -//-------------------------------------------------------------------------- + sal_Bool SAL_CALL ODriverEnumeration::hasMoreElements( ) throw(RuntimeException) { return m_aPos != m_aDrivers.end(); } -//-------------------------------------------------------------------------- + Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { if ( !hasMoreElements() ) @@ -247,7 +247,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W //========================================================================== //= OSDBCDriverManager //========================================================================== -//-------------------------------------------------------------------------- + OSDBCDriverManager::OSDBCDriverManager( const Reference< XComponentContext >& _rxContext ) :m_xContext( _rxContext ) ,m_aEventLogger( _rxContext, "org.openoffice.logging.sdbc.DriverManager" ) @@ -261,7 +261,7 @@ OSDBCDriverManager::OSDBCDriverManager( const Reference< XComponentContext >& _r initializeDriverPrecedence(); } -//--------------------------------------------------------------------- + OSDBCDriverManager::~OSDBCDriverManager() { } @@ -336,7 +336,7 @@ void OSDBCDriverManager::bootstrapDrivers() } } -//-------------------------------------------------------------------------- + void OSDBCDriverManager::initializeDriverPrecedence() { if ( m_aDriversBS.empty() ) @@ -408,7 +408,7 @@ void OSDBCDriverManager::initializeDriverPrecedence() } } -//-------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OSDBCDriverManager::getConnection( const OUString& _rURL ) throw(SQLException, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -434,7 +434,7 @@ Reference< XConnection > SAL_CALL OSDBCDriverManager::getConnection( const OUStr return xConnection; } -//-------------------------------------------------------------------------- + Reference< XConnection > SAL_CALL OSDBCDriverManager::getConnectionWithInfo( const OUString& _rURL, const Sequence< PropertyValue >& _rInfo ) throw(SQLException, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -460,21 +460,21 @@ Reference< XConnection > SAL_CALL OSDBCDriverManager::getConnectionWithInfo( con return xConnection; } -//-------------------------------------------------------------------------- + void SAL_CALL OSDBCDriverManager::setLoginTimeout( sal_Int32 seconds ) throw(RuntimeException) { MutexGuard aGuard(m_aMutex); m_nLoginTimeout = seconds; } -//-------------------------------------------------------------------------- + sal_Int32 SAL_CALL OSDBCDriverManager::getLoginTimeout( ) throw(RuntimeException) { MutexGuard aGuard(m_aMutex); return m_nLoginTimeout; } -//-------------------------------------------------------------------------- + Reference< XEnumeration > SAL_CALL OSDBCDriverManager::createEnumeration( ) throw(RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -503,20 +503,20 @@ Reference< XEnumeration > SAL_CALL OSDBCDriverManager::createEnumeration( ) thr return new ODriverEnumeration( aDrivers ); } -//-------------------------------------------------------------------------- + ::com::sun::star::uno::Type SAL_CALL OSDBCDriverManager::getElementType( ) throw(::com::sun::star::uno::RuntimeException) { return ::getCppuType(static_cast< Reference< XDriver >* >(NULL)); } -//-------------------------------------------------------------------------- + sal_Bool SAL_CALL OSDBCDriverManager::hasElements( ) throw(::com::sun::star::uno::RuntimeException) { MutexGuard aGuard(m_aMutex); return !(m_aDriversBS.empty() && m_aDriversRT.empty()); } -//-------------------------------------------------------------------------- + OUString SAL_CALL OSDBCDriverManager::getImplementationName( ) throw(RuntimeException) { return getImplementationName_static(); @@ -527,25 +527,25 @@ sal_Bool SAL_CALL OSDBCDriverManager::supportsService( const OUString& _rService return cppu::supportsService(this, _rServiceName); } -//-------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OSDBCDriverManager::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_static(); } -//-------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OSDBCDriverManager::Create( const Reference< XMultiServiceFactory >& _rxFactory ) { return *( new OSDBCDriverManager( comphelper::getComponentContext(_rxFactory) ) ); } -//-------------------------------------------------------------------------- + OUString SAL_CALL OSDBCDriverManager::getImplementationName_static( ) throw(RuntimeException) { return OUString("com.sun.star.comp.sdbc.OSDBCDriverManager"); } -//-------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OSDBCDriverManager::getSupportedServiceNames_static( ) throw(RuntimeException) { Sequence< OUString > aSupported(1); @@ -553,13 +553,13 @@ Sequence< OUString > SAL_CALL OSDBCDriverManager::getSupportedServiceNames_stati return aSupported; } -//-------------------------------------------------------------------------- + OUString SAL_CALL OSDBCDriverManager::getSingletonName_static( ) throw(RuntimeException) { return OUString( "com.sun.star.sdbc.DriverManager" ); } -//-------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OSDBCDriverManager::getRegisteredObject( const OUString& _rName ) throw(Exception, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -570,7 +570,7 @@ Reference< XInterface > SAL_CALL OSDBCDriverManager::getRegisteredObject( const return aSearch->second.get(); } -//-------------------------------------------------------------------------- + void SAL_CALL OSDBCDriverManager::registerObject( const OUString& _rName, const Reference< XInterface >& _rxObject ) throw(Exception, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -598,7 +598,7 @@ void SAL_CALL OSDBCDriverManager::registerObject( const OUString& _rName, const ); } -//-------------------------------------------------------------------------- + void SAL_CALL OSDBCDriverManager::revokeObject( const OUString& _rName ) throw(Exception, RuntimeException) { MutexGuard aGuard(m_aMutex); @@ -620,7 +620,7 @@ void SAL_CALL OSDBCDriverManager::revokeObject( const OUString& _rName ) throw(E ); } -//-------------------------------------------------------------------------- + Reference< XDriver > SAL_CALL OSDBCDriverManager::getDriverByURL( const OUString& _rURL ) throw(RuntimeException) { m_aEventLogger.log( LogLevel::INFO, @@ -639,7 +639,7 @@ Reference< XDriver > SAL_CALL OSDBCDriverManager::getDriverByURL( const OUString return xDriver; } -//-------------------------------------------------------------------------- + Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const OUString& _rURL) { Reference< XDriver > xReturn; diff --git a/connectivity/source/manager/mregistration.cxx b/connectivity/source/manager/mregistration.cxx index ce712f303eec..745ce6efb551 100644 --- a/connectivity/source/manager/mregistration.cxx +++ b/connectivity/source/manager/mregistration.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::lang; extern "C" { -//--------------------------------------------------------------------------------------- + SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdbc2_component_getFactory(const sal_Char* _pImplName, ::com::sun::star::lang::XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/) { void* pRet = NULL; diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx index 6e5cdb91f0cc..8cf17f19d19f 100644 --- a/connectivity/source/parse/PColumn.cxx +++ b/connectivity/source/parse/PColumn.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -// ------------------------------------------------------------------------- + OParseColumn::OParseColumn(const Reference<XPropertySet>& _xColumn,sal_Bool _bCase) : connectivity::sdbcx::OColumn( getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))) @@ -60,7 +60,7 @@ OParseColumn::OParseColumn(const Reference<XPropertySet>& _xColumn,sal_Bool construct(); } -// ------------------------------------------------------------------------- + OParseColumn::OParseColumn( const OUString& _Name, const OUString& _TypeName, const OUString& _DefaultValue, @@ -98,7 +98,7 @@ OParseColumn::OParseColumn( const OUString& _Name, construct(); } -// ------------------------------------------------------------------------- + ::rtl::Reference< OSQLColumns > OParseColumn::createColumnsForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData, const Reference< XDatabaseMetaData >& _rxDBMetaData,const Reference< XNameAccess>& i_xQueryColumns ) { @@ -123,7 +123,7 @@ OParseColumn::OParseColumn( const OUString& _Name, return aReturn; } -// ------------------------------------------------------------------------- + OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData, const Reference< XDatabaseMetaData >& _rxDBMetaData, sal_Int32 _nColumnPos, StringMap& _rColumns ) { @@ -163,11 +163,11 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe return pColumn; } -// ------------------------------------------------------------------------- + OParseColumn::~OParseColumn() { } -// ------------------------------------------------------------------------- + void OParseColumn::construct() { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION), PROPERTY_ID_FUNCTION, 0, &m_bFunction, ::getCppuType(&m_bFunction)); @@ -177,19 +177,19 @@ void OParseColumn::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSEARCHABLE), PROPERTY_ID_ISSEARCHABLE, 0, &m_bIsSearchable, ::getCppuType(&m_bIsSearchable)); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LABEL), PROPERTY_ID_LABEL, 0, &m_sLabel, ::getCppuType(&m_sLabel)); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OParseColumn::createArrayHelper() const { return doCreateArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & SAL_CALL OParseColumn::getInfoHelper() { OSL_ENSURE( !isNew(), "OParseColumn::getInfoHelper: a *new* ParseColumn?" ); return *OParseColumn_PROP::getArrayHelper(); } -// ----------------------------------------------------------------------------- + OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn, const OUString& i_rOriginatingTableName, sal_Bool _bCase, sal_Bool _bAscending ) : connectivity::sdbcx::OColumn( @@ -214,7 +214,7 @@ OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn, const OUStr construct(); } -// ----------------------------------------------------------------------------- + OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn, sal_Bool _bCase, sal_Bool _bAscending ) : connectivity::sdbcx::OColumn( getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))), @@ -238,29 +238,29 @@ OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn, sal_Bool _b construct(); } -// ------------------------------------------------------------------------- + OOrderColumn::~OOrderColumn() { } -// ------------------------------------------------------------------------- + void OOrderColumn::construct() { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING, PropertyAttribute::READONLY, const_cast< sal_Bool* >( &m_bAscending ), ::getCppuType( &m_bAscending ) ); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OOrderColumn::createArrayHelper() const { return doCreateArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & SAL_CALL OOrderColumn::getInfoHelper() { OSL_ENSURE( !isNew(), "OOrderColumn::getInfoHelper: a *new* OrderColumn?" ); return *OOrderColumn_PROP::getArrayHelper(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OOrderColumn::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(1); @@ -268,6 +268,6 @@ void OOrderColumn::construct() return aSupported; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/parse/internalnode.cxx b/connectivity/source/parse/internalnode.cxx index 19caebb8cf0e..e6ea846b7cfe 100644 --- a/connectivity/source/parse/internalnode.cxx +++ b/connectivity/source/parse/internalnode.cxx @@ -24,7 +24,7 @@ using namespace connectivity; -//----------------------------------------------------------------------------- + OSQLInternalNode::OSQLInternalNode(const sal_Char* pNewValue, SQLNodeType eNodeType, sal_uInt32 nNodeID) @@ -34,7 +34,7 @@ OSQLInternalNode::OSQLInternalNode(const sal_Char* pNewValue, (*OSQLParser::s_pGarbageCollector)->push_back(this); } -//----------------------------------------------------------------------------- + OSQLInternalNode::OSQLInternalNode(const OString &_NewValue, SQLNodeType eNodeType, sal_uInt32 nNodeID) @@ -44,7 +44,7 @@ OSQLInternalNode::OSQLInternalNode(const OString &_NewValue, (*OSQLParser::s_pGarbageCollector)->push_back(this); } -//----------------------------------------------------------------------------- + OSQLInternalNode::OSQLInternalNode(const OUString &_NewValue, SQLNodeType eNodeType, sal_uInt32 nNodeID) @@ -55,7 +55,7 @@ OSQLInternalNode::OSQLInternalNode(const OUString &_NewValue, } -//----------------------------------------------------------------------------- + OSQLInternalNode::~OSQLInternalNode() { // remove the node from the garbage list diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index f896a1ec10df..506f51eac32b 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -110,7 +110,7 @@ namespace connectivity } }; - //------------------------------------------------------------------------- + /** helper class for temporarily adding a query name to a list of forbidden query names */ class ForbidQueryName @@ -134,7 +134,7 @@ namespace connectivity } }; } -//----------------------------------------------------------------------------- + OSQLParseTreeIterator::OSQLParseTreeIterator(const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxTables, const OSQLParser& _rParser, @@ -146,7 +146,7 @@ OSQLParseTreeIterator::OSQLParseTreeIterator(const Reference< XConnection >& _rx setParseTree(pRoot); } -//----------------------------------------------------------------------------- + OSQLParseTreeIterator::OSQLParseTreeIterator( const OSQLParseTreeIterator& _rParentIterator, const OSQLParser& _rParser, const OSQLParseNode* pRoot ) :m_rParser( _rParser ) ,m_pImpl( new OSQLParseTreeIteratorImpl( _rParentIterator.m_pImpl->m_xConnection, _rParentIterator.m_pImpl->m_xTableContainer ) ) @@ -156,27 +156,27 @@ OSQLParseTreeIterator::OSQLParseTreeIterator( const OSQLParseTreeIterator& _rPar setParseTree( pRoot ); } -//----------------------------------------------------------------------------- + OSQLParseTreeIterator::~OSQLParseTreeIterator() { dispose(); } -// ----------------------------------------------------------------------------- + const OSQLTables& OSQLParseTreeIterator::getTables() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getTables" ); return *m_pImpl->m_pTables; } -// ----------------------------------------------------------------------------- + bool OSQLParseTreeIterator::isCaseSensitive() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::isCaseSensitive" ); return m_pImpl->m_bIsCaseSensitive; } -// ----------------------------------------------------------------------------- + void OSQLParseTreeIterator::dispose() { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::dispose" ); @@ -190,7 +190,7 @@ void OSQLParseTreeIterator::dispose() m_pImpl->m_pTables->clear(); m_pImpl->m_pSubTables->clear(); } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::setParseTree(const OSQLParseNode * pNewParseTree) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::setParseTree" ); @@ -251,7 +251,7 @@ void OSQLParseTreeIterator::setParseTree(const OSQLParseNode * pNewParseTree) } } -//----------------------------------------------------------------------------- + namespace { //......................................................................... @@ -309,7 +309,7 @@ namespace } } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::impl_getQueryParameterColumns( const OSQLTable& _rQuery ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::impl_getQueryParameterColumns" ); @@ -358,7 +358,7 @@ void OSQLParseTreeIterator::impl_getQueryParameterColumns( const OSQLTable& _rQu ::std::insert_iterator< OSQLColumns::Vector >( m_aParameters->get(), m_aParameters->get().end() ) ); } -//----------------------------------------------------------------------------- + OSQLTable OSQLParseTreeIterator::impl_locateRecordSource( const OUString& _rComposedName ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::impl_locateRecordSource" ); @@ -436,7 +436,7 @@ OSQLTable OSQLParseTreeIterator::impl_locateRecordSource( const OUString& _rComp return aReturn; } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQLParseNode * pTableName, const OUString & rTableRange ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseOneTableName" ); @@ -470,7 +470,7 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQ if ( aTable.is() ) _rTables[ aTableRange ] = aTable; } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoinCondition) { if (i_pJoinCondition->count() == 3 && // Expression with brackets @@ -501,12 +501,12 @@ void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoin } } } -//----------------------------------------------------------------------------- + ::std::vector< TNodePair >& OSQLParseTreeIterator::getJoinConditions() const { return m_pImpl->m_aJoinConditions; } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::getQualified_join( OSQLTables& _rTables, const OSQLParseNode *pTableRef, OUString& aTableRange ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getQualified_join" ); @@ -549,7 +549,7 @@ void OSQLParseTreeIterator::getQualified_join( OSQLTables& _rTables, const OSQLP if ( isTableNode( pNode ) ) traverseOneTableName( _rTables, pNode, aTableRange ); } -//----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables, const OSQLParseNode *pTableRef,OUString& rTableRange ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getTableNode" ); @@ -614,7 +614,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables, return pTableNameNode; } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::getSelect_statement(OSQLTables& _rTables,const OSQLParseNode* pSelect) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getSelect_statement" ); @@ -670,7 +670,7 @@ void OSQLParseTreeIterator::getSelect_statement(OSQLTables& _rTables,const OSQLP // if (! aIteratorStatus.IsSuccessful()) break; } } -//----------------------------------------------------------------------------- + bool OSQLParseTreeIterator::traverseTableNames(OSQLTables& _rTables) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseTableNames" ); @@ -706,7 +706,7 @@ bool OSQLParseTreeIterator::traverseTableNames(OSQLTables& _rTables) return !hasErrors(); } -//----------------------------------------------------------------------------- + OUString OSQLParseTreeIterator::getColumnAlias(const OSQLParseNode* _pDerivedColumn) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getColumnAlias" ); @@ -719,7 +719,7 @@ OUString OSQLParseTreeIterator::getColumnAlias(const OSQLParseNode* _pDerivedCol return sColumnAlias; } -// ----------------------------------------------------------------------------- + namespace { void lcl_getColumnRange( const OSQLParseNode* _pColumnRef, const Reference< XConnection >& _rxConnection, @@ -774,7 +774,7 @@ namespace } } -// ----------------------------------------------------------------------------- + void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef, OUString& _rColumnName, OUString& _rTableRange) const @@ -784,7 +784,7 @@ void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef, lcl_getColumnRange( _pColumnRef, m_pImpl->m_xConnection, _rColumnName, _rTableRange, NULL, sDummy ); } -// ----------------------------------------------------------------------------- + void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef, OUString& _rColumnName, OUString& _rTableRange, @@ -794,7 +794,7 @@ void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef, lcl_getColumnRange( _pColumnRef, m_pImpl->m_xConnection, _rColumnName, _rTableRange, &*m_aSelectColumns, _out_rColumnAliasIfPresent ); } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef, const Reference< XConnection >& _rxConnection, OUString& _out_rColumnName, OUString& _out_rTableRange ) { @@ -803,7 +803,7 @@ void OSQLParseTreeIterator::getColumnRange( const OSQLParseNode* _pColumnRef, lcl_getColumnRange( _pColumnRef, _rxConnection, _out_rColumnName, _out_rTableRange, NULL, sDummy ); } -//----------------------------------------------------------------------------- + bool OSQLParseTreeIterator::getColumnTableRange(const OSQLParseNode* pNode, OUString &rTableRange) const { OUString tmp; @@ -870,7 +870,7 @@ bool OSQLParseTreeIterator::impl_getColumnTableRange(const OSQLParseNode* pNode, return true; } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseCreateColumns" ); @@ -931,7 +931,7 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo } } -//----------------------------------------------------------------------------- + bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSelectNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseSelectColumnNames" ); @@ -1036,14 +1036,14 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele } -//----------------------------------------------------------------------------- + bool OSQLParseTreeIterator::traverseOrderByColumnNames(const OSQLParseNode* pSelectNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseOrderByColumnNames" ); traverseByColumnNames( pSelectNode, sal_True ); return !hasErrors(); } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNode,sal_Bool _bOrder) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseByColumnNames" ); @@ -1128,7 +1128,7 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNo setGroupByColumnName(sColumnName, aTableRange); } } -//----------------------------------------------------------------------------- + bool OSQLParseTreeIterator::traverseGroupByColumnNames(const OSQLParseNode* pSelectNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseGroupByColumnNames" ); @@ -1136,7 +1136,7 @@ bool OSQLParseTreeIterator::traverseGroupByColumnNames(const OSQLParseNode* pSel return !hasErrors(); } -// ----------------------------------------------------------------------------- + namespace { OUString lcl_generateParameterName( const OSQLParseNode& _rParentNode, const OSQLParseNode& _rParamNode ) @@ -1155,7 +1155,7 @@ namespace } } -// ----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseParameters" ); @@ -1209,7 +1209,7 @@ void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode) traverseParameters( pChild ); } } -//----------------------------------------------------------------------------- + bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSelectNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseSelectionCriteria" ); @@ -1272,7 +1272,7 @@ bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSele return !hasErrors(); } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode * pSearchCondition) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseSearchCondition" ); @@ -1401,7 +1401,7 @@ void OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode * pSearchCondi } // Just pass on the error } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode ,const OSQLParseNode* _pParentNode ,const OUString& _aColumnName @@ -1542,7 +1542,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode } } } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseOnePredicate( OSQLParseNode * pColumnRef, OUString& rValue, @@ -1569,21 +1569,21 @@ void OSQLParseTreeIterator::traverseOnePredicate( } } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseSome( sal_uInt32 _nIncludeMask ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseSome" ); impl_traverse( _nIncludeMask ); } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::traverseAll() { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::traverseAll" ); impl_traverse( All ); } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::impl_traverse( sal_uInt32 _nIncludeMask ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::impl_traverse" ); @@ -1624,7 +1624,7 @@ void OSQLParseTreeIterator::impl_traverse( sal_uInt32 _nIncludeMask ) // Dummy implementations -//----------------------------------------------------------------------------- + OSQLTable OSQLParseTreeIterator::impl_createTableObject( const OUString& rTableName, const OUString& rCatalogName, const OUString& rSchemaName ) { @@ -1645,7 +1645,7 @@ OSQLTable OSQLParseTreeIterator::impl_createTableObject( const OUString& rTableN ); return aReturnTable; } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::appendColumns(::rtl::Reference<OSQLColumns>& _rColumns,const OUString& _rTableAlias,const OSQLTable& _rTable) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::appendColumns" ); @@ -1692,7 +1692,7 @@ void OSQLParseTreeIterator::appendColumns(::rtl::Reference<OSQLColumns>& _rColum impl_appendError( IParseContext::ERROR_INVALID_COLUMN, pBegin, &_rTableAlias ); } } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _rColumns,const OUString & rColumnName,const OUString & rColumnAlias, const OUString & rTableRange,sal_Bool bFkt,sal_Int32 _nType,sal_Bool bAggFkt) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::setSelectColumnName" ); @@ -1848,7 +1848,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _ } } } -//----------------------------------------------------------------------------- + OUString OSQLParseTreeIterator::getUniqueColumnName(const OUString & rColumnName) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getUniqueColumnName" ); @@ -1873,7 +1873,7 @@ OUString OSQLParseTreeIterator::getUniqueColumnName(const OUString & rColumnName } return aAlias; } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::setOrderByColumnName(const OUString & rColumnName, OUString & rTableRange, sal_Bool bAscending) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::setOrderByColumnName" ); @@ -1897,7 +1897,7 @@ void OSQLParseTreeIterator::setOrderByColumnName(const OUString & rColumnName, O << "\n"; #endif } -//----------------------------------------------------------------------------- + void OSQLParseTreeIterator::setGroupByColumnName(const OUString & rColumnName, OUString & rTableRange) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::setGroupByColumnName" ); @@ -1920,7 +1920,7 @@ void OSQLParseTreeIterator::setGroupByColumnName(const OUString & rColumnName, O #endif } -//----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getWhereTree() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getWhereTree" ); @@ -1952,7 +1952,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getWhereTree() const return pWhereClause; } -//----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getOrderTree() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getOrderTree" ); @@ -1976,7 +1976,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getOrderTree() const pOrderClause = NULL; return pOrderClause; } -//----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getGroupByTree() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getGroupByTree" ); @@ -1998,7 +1998,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getGroupByTree() const pGroupClause = NULL; return pGroupClause; } -//----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getHavingTree() const { if (!m_pParseTree || getStatementType() != SQL_STATEMENT_SELECT) @@ -2019,7 +2019,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getHavingTree() const pHavingClause = NULL; return pHavingClause; } -// ----------------------------------------------------------------------------- + sal_Bool OSQLParseTreeIterator::isTableNode(const OSQLParseNode* _pTableNode) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::isTableNode" ); @@ -2027,28 +2027,28 @@ sal_Bool OSQLParseTreeIterator::isTableNode(const OSQLParseNode* _pTableNode) co SQL_ISRULE(_pTableNode,schema_name) || SQL_ISRULE(_pTableNode,table_name)); } -// ----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getSimpleWhereTree() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getSimpleWhereTree" ); const OSQLParseNode* pNode = getWhereTree(); return pNode ? pNode->getChild(1) : NULL; } -// ----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getSimpleOrderTree() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getSimpleOrderTree" ); const OSQLParseNode* pNode = getOrderTree(); return pNode ? pNode->getChild(2) : NULL; } -// ----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getSimpleGroupByTree() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getSimpleGroupByTree" ); const OSQLParseNode* pNode = getGroupByTree(); return pNode ? pNode->getChild(2) : NULL; } -// ----------------------------------------------------------------------------- + const OSQLParseNode* OSQLParseTreeIterator::getSimpleHavingTree() const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::getSimpleHavingTree" ); @@ -2056,7 +2056,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getSimpleHavingTree() const return pNode ? pNode->getChild(1) : NULL; } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OSQLParseTreeIterator::findSelectColumn( const OUString & rColumnName ) { SAL_INFO( "connectivity.parse", "parse lionel@mamane.lu OSQLParseTreeIterator::findSelectColumn" ); @@ -2080,7 +2080,7 @@ Reference< XPropertySet > OSQLParseTreeIterator::findSelectColumn( const OUStrin return NULL; } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OSQLParseTreeIterator::findColumn( const OUString & rColumnName, OUString & rTableRange, bool _bLookInSubTables ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::findColumn" ); @@ -2090,7 +2090,7 @@ Reference< XPropertySet > OSQLParseTreeIterator::findColumn( const OUString & rC return xColumn; } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OSQLParseTreeIterator::findColumn(const OSQLTables& _rTables, const OUString & rColumnName, OUString & rTableRange) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::findColumn" ); @@ -2127,7 +2127,7 @@ Reference< XPropertySet > OSQLParseTreeIterator::findColumn(const OSQLTables& _r return xColumn; } -// ----------------------------------------------------------------------------- + void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode _eError, const OUString* _pReplaceToken1, const OUString* _pReplaceToken2 ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::impl_appendError" ); @@ -2147,7 +2147,7 @@ void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode _eError, sErrorMessage, NULL, getStandardSQLState( SQL_GENERAL_ERROR ), 1000, Any() ) ); } -// ----------------------------------------------------------------------------- + void OSQLParseTreeIterator::impl_appendError( const SQLException& _rError ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseTreeIterator::impl_appendError" ); @@ -2161,7 +2161,7 @@ void OSQLParseTreeIterator::impl_appendError( const SQLException& _rError ) else m_aErrors = _rError; } -// ----------------------------------------------------------------------------- + sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNode ) { sal_Int32 nType = DataType::OTHER; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 5ac2712bed11..1456a8588b31 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -76,7 +76,7 @@ connectivity::OSQLParser* xxx_pGLOBAL_SQLPARSER; namespace { - // ----------------------------------------------------------------------------- + sal_Bool lcl_saveConvertToNumber(const Reference< XNumberFormatter > & _xFormatter,sal_Int32 _nKey,const OUString& _sValue,double& _nrValue) { sal_Bool bRet = sal_False; @@ -90,14 +90,14 @@ namespace } return bRet; } - // ----------------------------------------------------------------------------- + void replaceAndReset(connectivity::OSQLParseNode*& _pResetNode,connectivity::OSQLParseNode* _pNewNode) { _pResetNode->getParent()->replace(_pResetNode, _pNewNode); delete _pResetNode; _pResetNode = _pNewNode; } - // ----------------------------------------------------------------------------- + /** quotes a string and search for quotes inside the string and replace them with the new quote @param rValue The value to be quoted. @@ -195,7 +195,7 @@ namespace connectivity //============================================================================= //= SQLParseNodeParameter //============================================================================= -//----------------------------------------------------------------------------- + SQLParseNodeParameter::SQLParseNodeParameter( const Reference< XConnection >& _rxConnection, const Reference< XNumberFormatter >& _xFormatter, const Reference< XPropertySet >& _xField, const OUString &_sPredicateTableAlias, @@ -217,7 +217,7 @@ SQLParseNodeParameter::SQLParseNodeParameter( const Reference< XConnection >& _r { } -//----------------------------------------------------------------------------- + SQLParseNodeParameter::~SQLParseNodeParameter() { } @@ -225,7 +225,7 @@ SQLParseNodeParameter::~SQLParseNodeParameter() //============================================================================= //= OSQLParseNode //============================================================================= -//----------------------------------------------------------------------------- + OUString OSQLParseNode::convertDateString(const SQLParseNodeParameter& rParam, const OUString& rString) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::convertDateString" ); @@ -238,7 +238,7 @@ OUString OSQLParseNode::convertDateString(const SQLParseNodeParameter& rParam, c return rParam.xFormatter->convertNumberToString(nKey, fDate); } -//----------------------------------------------------------------------------- + OUString OSQLParseNode::convertDateTimeString(const SQLParseNodeParameter& rParam, const OUString& rString) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::convertDateTimeString" ); @@ -251,7 +251,7 @@ OUString OSQLParseNode::convertDateTimeString(const SQLParseNodeParameter& rPara return rParam.xFormatter->convertNumberToString(nKey, fDateTime); } -//----------------------------------------------------------------------------- + OUString OSQLParseNode::convertTimeString(const SQLParseNodeParameter& rParam, const OUString& rString) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::convertTimeString" ); @@ -265,7 +265,7 @@ OUString OSQLParseNode::convertTimeString(const SQLParseNodeParameter& rParam, c return rParam.xFormatter->convertNumberToString(nKey, fTime); } -//----------------------------------------------------------------------------- + void OSQLParseNode::parseNodeToStr(OUString& rString, const Reference< XConnection >& _rxConnection, const IParseContext* pContext, @@ -280,7 +280,7 @@ void OSQLParseNode::parseNodeToStr(OUString& rString, pContext, _bIntl, _bQuote, '.', false, false ); } -//----------------------------------------------------------------------------- + void OSQLParseNode::parseNodeToPredicateStr(OUString& rString, const Reference< XConnection >& _rxConnection, const Reference< XNumberFormatter > & xFormatter, @@ -296,7 +296,7 @@ void OSQLParseNode::parseNodeToPredicateStr(OUString& rString, parseNodeToStr(rString, _rxConnection, xFormatter, NULL, OUString(), rIntl, pContext, true, true, _cDec, true, false); } -//----------------------------------------------------------------------------- + void OSQLParseNode::parseNodeToPredicateStr(OUString& rString, const Reference< XConnection > & _rxConnection, const Reference< XNumberFormatter > & xFormatter, @@ -314,7 +314,7 @@ void OSQLParseNode::parseNodeToPredicateStr(OUString& rString, parseNodeToStr( rString, _rxConnection, xFormatter, _xField, _sPredicateTableAlias, rIntl, pContext, true, true, _cDec, true, false ); } -//----------------------------------------------------------------------------- + void OSQLParseNode::parseNodeToStr(OUString& rString, const Reference< XConnection > & _rxConnection, const Reference< XNumberFormatter > & xFormatter, @@ -354,7 +354,7 @@ void OSQLParseNode::parseNodeToStr(OUString& rString, rString = sBuffer.makeStringAndClear(); } } -//----------------------------------------------------------------------------- + bool OSQLParseNode::parseNodeToExecutableStatement( OUString& _out_rString, const Reference< XConnection >& _rxConnection, OSQLParser& _rParser, ::com::sun::star::sdbc::SQLException* _pErrorHolder ) const { @@ -390,7 +390,7 @@ bool OSQLParseNode::parseNodeToExecutableStatement( OUString& _out_rString, cons return bSuccess; } -//----------------------------------------------------------------------------- + namespace { bool lcl_isAliasNamePresent( const OSQLParseNode& _rTableNameNode ) @@ -399,7 +399,7 @@ namespace } } -//----------------------------------------------------------------------------- + void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const SQLParseNodeParameter& rParam, bool bSimple) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::impl_parseNodeToString_throw" ); @@ -633,7 +633,7 @@ void OSQLParseNode::impl_parseNodeToString_throw(OUStringBuffer& rString, const } } -//----------------------------------------------------------------------------- + bool OSQLParseNode::impl_parseTableNameNodeToString_throw( OUStringBuffer& rString, const SQLParseNodeParameter& rParam ) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::impl_parseTableNameNodeToString_throw" ); @@ -731,7 +731,7 @@ bool OSQLParseNode::impl_parseTableNameNodeToString_throw( OUStringBuffer& rStri return false; } -//----------------------------------------------------------------------------- + void OSQLParseNode::impl_parseTableRangeNodeToString_throw(OUStringBuffer& rString, const SQLParseNodeParameter& rParam) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::impl_parseTableRangeNodeToString_throw" ); @@ -742,7 +742,7 @@ void OSQLParseNode::impl_parseTableRangeNodeToString_throw(OUStringBuffer& rStri boost::bind( &OSQLParseNode::impl_parseNodeToString_throw, _1, boost::ref( rString ), boost::cref( rParam ), false )); } -//----------------------------------------------------------------------------- + void OSQLParseNode::impl_parseLikeNodeToString_throw( OUStringBuffer& rString, const SQLParseNodeParameter& rParam, bool bSimple ) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::impl_parseLikeNodeToString_throw" ); @@ -777,7 +777,7 @@ void OSQLParseNode::impl_parseLikeNodeToString_throw( OUStringBuffer& rString, c } -// ----------------------------------------------------------------------------- + sal_Bool OSQLParseNode::getTableComponents(const OSQLParseNode* _pTableNode, ::com::sun::star::uno::Any &_rCatalog, OUString &_rSchema, @@ -822,7 +822,7 @@ sal_Bool OSQLParseNode::getTableComponents(const OSQLParseNode* _pTableNode, } return !_rTable.isEmpty(); } -// ----------------------------------------------------------------------------- + void OSQLParser::killThousandSeparator(OSQLParseNode* pLiteral) { if ( pLiteral ) @@ -837,7 +837,7 @@ void OSQLParser::killThousandSeparator(OSQLParseNode* pLiteral) pLiteral->m_aNodeValue = pLiteral->m_aNodeValue.replace(',', sal_Unicode()); } } -// ----------------------------------------------------------------------------- + OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType,OSQLParseNode*const& pLiteral) { if ( !pLiteral ) @@ -955,7 +955,7 @@ OSQLParseNode* OSQLParser::convertNode(sal_Int32 nType,OSQLParseNode*const& pLit } return pReturn; } -// ----------------------------------------------------------------------------- + sal_Int16 OSQLParser::buildPredicateRule(OSQLParseNode*& pAppend,OSQLParseNode* const pLiteral,OSQLParseNode*const & pCompare,OSQLParseNode* pLiteral2) { OSL_ENSURE(inPredicateCheck(),"Only in predicate check allowed!"); @@ -984,7 +984,7 @@ sal_Int16 OSQLParser::buildPredicateRule(OSQLParseNode*& pAppend,OSQLParseNode* delete pCompare; return nErg; } -// ----------------------------------------------------------------------------- + sal_Int16 OSQLParser::buildLikeRule(OSQLParseNode* const& pAppend, OSQLParseNode*& pLiteral, const OSQLParseNode* pEscape) { sal_Int16 nErg = 0; @@ -1059,7 +1059,7 @@ sal_Int16 OSQLParser::buildLikeRule(OSQLParseNode* const& pAppend, OSQLParseNode } return nErg; } -//----------------------------------------------------------------------------- + OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType) { OUString aEmptyString; @@ -1108,7 +1108,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType) return pNewNode; } -// ----------------------------------------------------------------------------- + OSQLParseNode* OSQLParser::buildNode_STR_NUM(OSQLParseNode*& _pLiteral) { OSQLParseNode* pReturn = NULL; @@ -1136,7 +1136,7 @@ OSQLParseNode* OSQLParser::buildNode_STR_NUM(OSQLParseNode*& _pLiteral) } return pReturn; } -// ----------------------------------------------------------------------------- + OUString OSQLParser::stringToDouble(const OUString& _rValue,sal_Int16 _nScale) { OUString aValue; @@ -1163,7 +1163,7 @@ OUString OSQLParser::stringToDouble(const OUString& _rValue,sal_Int16 _nScale) } return aValue; } -// ----------------------------------------------------------------------------- + ::osl::Mutex& OSQLParser::getMutex() { @@ -1171,7 +1171,7 @@ OUString OSQLParser::stringToDouble(const OUString& _rValue,sal_Int16 _nScale) return aMutex; } -//----------------------------------------------------------------------------- + OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString& rStatement, const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter, const Reference< XPropertySet > & xField) @@ -1326,7 +1326,7 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString } //============================================================================= -//----------------------------------------------------------------------------- + OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const IParseContext* _pContext) :m_pContext(_pContext) ,m_pParseTree(NULL) @@ -1491,7 +1491,7 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star: m_pData->aLocale = m_pContext->getPreferredLocale(); } -//----------------------------------------------------------------------------- + OSQLParser::~OSQLParser() { { @@ -1514,7 +1514,7 @@ OSQLParser::~OSQLParser() m_pParseTree = NULL; } } -// ----------------------------------------------------------------------------- + void OSQLParseNode::substituteParameterNames(OSQLParseNode* _pNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::substituteParameterNames" ); @@ -1535,7 +1535,7 @@ void OSQLParseNode::substituteParameterNames(OSQLParseNode* _pNode) } } -// ----------------------------------------------------------------------------- + bool OSQLParser::extractDate(OSQLParseNode* pLiteral,double& _rfValue) { Reference< XNumberFormatsSupplier > xFormatSup = m_xFormatter->getNumberFormatsSupplier(); @@ -1584,7 +1584,7 @@ bool OSQLParser::extractDate(OSQLParseNode* pLiteral,double& _rfValue) } return bSuccess; } -// ----------------------------------------------------------------------------- + OSQLParseNode* OSQLParser::buildDate(sal_Int32 _nType,OSQLParseNode*& pLiteral) { // try converting the string into a date, according to our format key @@ -1602,8 +1602,8 @@ OSQLParseNode* OSQLParser::buildDate(sal_Int32 _nType,OSQLParseNode*& pLiteral) return pFCTNode; } -// ----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- + + OSQLParseNode::OSQLParseNode(const sal_Char * pNewValue, SQLNodeType eNewNodeType, sal_uInt32 nNewNodeID) @@ -1616,7 +1616,7 @@ OSQLParseNode::OSQLParseNode(const sal_Char * pNewValue, OSL_ENSURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_CONCAT,"OSQLParseNode: created with invalid NodeType"); } -//----------------------------------------------------------------------------- + OSQLParseNode::OSQLParseNode(const OString &_rNewValue, SQLNodeType eNewNodeType, sal_uInt32 nNewNodeID) @@ -1629,7 +1629,7 @@ OSQLParseNode::OSQLParseNode(const OString &_rNewValue, OSL_ENSURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_CONCAT,"OSQLParseNode: created with invalid NodeType"); } -//----------------------------------------------------------------------------- + OSQLParseNode::OSQLParseNode(const OUString &_rNewValue, SQLNodeType eNewNodeType, sal_uInt32 nNewNodeID) @@ -1642,7 +1642,7 @@ OSQLParseNode::OSQLParseNode(const OUString &_rNewValue, OSL_ENSURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_CONCAT,"OSQLParseNode: created with invalid NodeType"); } -//----------------------------------------------------------------------------- + OSQLParseNode::OSQLParseNode(const OSQLParseNode& rParseNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::OSQLParseNode" ); @@ -1666,8 +1666,8 @@ OSQLParseNode::OSQLParseNode(const OSQLParseNode& rParseNode) i != rParseNode.m_aChildren.end(); ++i) append(new OSQLParseNode(**i)); } -// ----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- + + OSQLParseNode& OSQLParseNode::operator=(const OSQLParseNode& rParseNode) { if (this != &rParseNode) @@ -1690,7 +1690,7 @@ OSQLParseNode& OSQLParseNode::operator=(const OSQLParseNode& rParseNode) return *this; } -//----------------------------------------------------------------------------- + sal_Bool OSQLParseNode::operator==(OSQLParseNode& rParseNode) const { // The members must be equal @@ -1709,7 +1709,7 @@ sal_Bool OSQLParseNode::operator==(OSQLParseNode& rParseNode) const return bResult; } -//----------------------------------------------------------------------------- + OSQLParseNode::~OSQLParseNode() { for (OSQLParseNodes::const_iterator i = m_aChildren.begin(); @@ -1718,7 +1718,7 @@ OSQLParseNode::~OSQLParseNode() m_aChildren.clear(); } -//----------------------------------------------------------------------------- + void OSQLParseNode::append(OSQLParseNode* pNewNode) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::append" ); @@ -1733,7 +1733,7 @@ void OSQLParseNode::append(OSQLParseNode* pNewNode) // and attach the SubTree at the end m_aChildren.push_back(pNewNode); } -// ----------------------------------------------------------------------------- + sal_Bool OSQLParseNode::addDateValue(OUStringBuffer& rString, const SQLParseNodeParameter& rParam) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::addDateValue" ); @@ -1787,7 +1787,7 @@ sal_Bool OSQLParseNode::addDateValue(OUStringBuffer& rString, const SQLParseNode } return sal_False; } -// ----------------------------------------------------------------------------- + void OSQLParseNode::replaceNodeValue(const OUString& rTableAlias, const OUString& rColumnName) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::replaceNodeValue" ); @@ -1804,7 +1804,7 @@ void OSQLParseNode::replaceNodeValue(const OUString& rTableAlias, const OUString getChild(i)->replaceNodeValue(rTableAlias,rColumnName); } } -//----------------------------------------------------------------------------- + OSQLParseNode* OSQLParseNode::getByRule(OSQLParseNode::Rule eRule) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::getByRule" ); @@ -1819,7 +1819,7 @@ OSQLParseNode* OSQLParseNode::getByRule(OSQLParseNode::Rule eRule) const } return pRetNode; } -//----------------------------------------------------------------------------- + OSQLParseNode* MakeANDNode(OSQLParseNode *pLeftLeaf,OSQLParseNode *pRightLeaf) { OSQLParseNode* pNewNode = new OSQLParseNode(OUString(),SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::boolean_term)); @@ -1828,7 +1828,7 @@ OSQLParseNode* MakeANDNode(OSQLParseNode *pLeftLeaf,OSQLParseNode *pRightLeaf) pNewNode->append(pRightLeaf); return pNewNode; } -//----------------------------------------------------------------------------- + OSQLParseNode* MakeORNode(OSQLParseNode *pLeftLeaf,OSQLParseNode *pRightLeaf) { OSQLParseNode* pNewNode = new OSQLParseNode(OUString(),SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::search_condition)); @@ -1837,7 +1837,7 @@ OSQLParseNode* MakeORNode(OSQLParseNode *pLeftLeaf,OSQLParseNode *pRightLeaf) pNewNode->append(pRightLeaf); return pNewNode; } -//----------------------------------------------------------------------------- + void OSQLParseNode::disjunctiveNormalForm(OSQLParseNode*& pSearchCondition) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::disjunctiveNormalForm" ); @@ -1914,7 +1914,7 @@ void OSQLParseNode::disjunctiveNormalForm(OSQLParseNode*& pSearchCondition) pSearchCondition->replace(pRight, pRight->removeAt(1)); } } -//----------------------------------------------------------------------------- + void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, sal_Bool bNegate) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::negateSearchCondition" ); @@ -2067,7 +2067,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition, sal_ delete pNot; } } -//----------------------------------------------------------------------------- + void OSQLParseNode::eraseBraces(OSQLParseNode*& pSearchCondition) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::eraseBraces" ); @@ -2086,7 +2086,7 @@ void OSQLParseNode::eraseBraces(OSQLParseNode*& pSearchCondition) } } } -//----------------------------------------------------------------------------- + void OSQLParseNode::absorptions(OSQLParseNode*& pSearchCondition) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::absorptions" ); @@ -2190,7 +2190,7 @@ void OSQLParseNode::absorptions(OSQLParseNode*& pSearchCondition) } eraseBraces(pSearchCondition); } -//----------------------------------------------------------------------------- + void OSQLParseNode::compress(OSQLParseNode *&pSearchCondition) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::compress" ); @@ -2296,7 +2296,7 @@ void OSQLParseNode::compress(OSQLParseNode *&pSearchCondition) } } #if OSL_DEBUG_LEVEL > 1 -// ----------------------------------------------------------------------------- + void OSQLParseNode::showParseTree( OUString& rString ) const { OUStringBuffer aBuf; @@ -2304,7 +2304,7 @@ void OSQLParseNode::showParseTree( OUString& rString ) const rString = aBuf.makeStringAndClear(); } -// ----------------------------------------------------------------------------- + void OSQLParseNode::showParseTree( OUStringBuffer& _inout_rBuffer, sal_uInt32 nLevel ) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::showParseTree" ); @@ -2421,9 +2421,9 @@ void OSQLParseNode::showParseTree( OUStringBuffer& _inout_rBuffer, sal_uInt32 nL } } #endif // OSL_DEBUG_LEVEL > 0 -// ----------------------------------------------------------------------------- + // Insert methods -//----------------------------------------------------------------------------- + void OSQLParseNode::insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::insert" ); @@ -2436,7 +2436,7 @@ void OSQLParseNode::insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree) } // removeAt methods -//----------------------------------------------------------------------------- + OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::removeAt" ); @@ -2452,7 +2452,7 @@ OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos) } // Replace methods -//----------------------------------------------------------------------------- + OSQLParseNode* OSQLParseNode::replace (OSQLParseNode* pOldSubNode, OSQLParseNode* pNewSubNode ) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::replace " ); @@ -2468,7 +2468,7 @@ OSQLParseNode* OSQLParseNode::replace (OSQLParseNode* pOldSubNode, OSQLParseNode ::std::replace(m_aChildren.begin(), m_aChildren.end(), pOldSubNode, pNewSubNode); return pOldSubNode; } -// ----------------------------------------------------------------------------- + void OSQLParseNode::parseLeaf(OUStringBuffer& rString, const SQLParseNodeParameter& rParam) const { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::parseLeaf" ); @@ -2563,7 +2563,7 @@ void OSQLParseNode::parseLeaf(OUStringBuffer& rString, const SQLParseNodeParamet } } -// ----------------------------------------------------------------------------- + sal_Int32 OSQLParser::getFunctionReturnType(const OUString& _sFunctionName, const IParseContext* pContext) { sal_Int32 nType = DataType::VARCHAR; @@ -2653,7 +2653,7 @@ sal_Int32 OSQLParser::getFunctionReturnType(const OUString& _sFunctionName, cons return nType; } -// ----------------------------------------------------------------------------- + sal_Int32 OSQLParser::getFunctionParameterType(sal_uInt32 _nTokenId, sal_uInt32 _nPos) { sal_Int32 nType = DataType::VARCHAR; @@ -2761,20 +2761,20 @@ sal_Int32 OSQLParser::getFunctionParameterType(sal_uInt32 _nTokenId, sal_uInt32 return nType; } -// ----------------------------------------------------------------------------- + const SQLError& OSQLParser::getErrorHelper() const { return m_pData->aErrors; } -// ----------------------------------------------------------------------------- + OSQLParseNode::Rule OSQLParseNode::getKnownRuleID() const { if ( !isRule() ) return UNKNOWN_RULE; return OSQLParser::RuleIDToRule( getRuleID() ); } -// ----------------------------------------------------------------------------- + OUString OSQLParseNode::getTableRange(const OSQLParseNode* _pTableRef) { SAL_INFO( "connectivity.parse", "parse Ocke.Janssen@sun.com OSQLParseNode::getTableRange" ); @@ -2793,21 +2793,21 @@ OUString OSQLParseNode::getTableRange(const OSQLParseNode* _pTableRef) return sTableRange; } -// ----------------------------------------------------------------------------- + OSQLParseNodesContainer::OSQLParseNodesContainer() { } -// ----------------------------------------------------------------------------- + OSQLParseNodesContainer::~OSQLParseNodesContainer() { } -// ----------------------------------------------------------------------------- + void OSQLParseNodesContainer::push_back(OSQLParseNode* _pNode) { ::osl::MutexGuard aGuard(m_aMutex); m_aNodes.push_back(_pNode); } -// ----------------------------------------------------------------------------- + void OSQLParseNodesContainer::erase(OSQLParseNode* _pNode) { ::osl::MutexGuard aGuard(m_aMutex); @@ -2818,13 +2818,13 @@ void OSQLParseNodesContainer::erase(OSQLParseNode* _pNode) m_aNodes.erase(aFind); } } -// ----------------------------------------------------------------------------- + void OSQLParseNodesContainer::clear() { ::osl::MutexGuard aGuard(m_aMutex); m_aNodes.clear(); } -// ----------------------------------------------------------------------------- + void OSQLParseNodesContainer::clearAndDelete() { ::osl::MutexGuard aGuard(m_aMutex); diff --git a/connectivity/source/resource/sharedresources.cxx b/connectivity/source/resource/sharedresources.cxx index 4de9d4c1d10a..7cd77737f165 100644 --- a/connectivity/source/resource/sharedresources.cxx +++ b/connectivity/source/resource/sharedresources.cxx @@ -68,11 +68,11 @@ namespace connectivity } }; - //-------------------------------------------------------------------- + SharedResources_Impl* SharedResources_Impl::s_pInstance( NULL ); oslInterlockedCount SharedResources_Impl::s_nClients( 0 ); - //-------------------------------------------------------------------- + SharedResources_Impl::SharedResources_Impl() { try @@ -87,7 +87,7 @@ namespace connectivity } } - //-------------------------------------------------------------------- + OUString SharedResources_Impl::getResourceString( ResourceId _nId ) { if ( m_pResourceBundle.get() == NULL ) @@ -98,13 +98,13 @@ namespace connectivity return m_pResourceBundle->loadString( _nId ); } - //-------------------------------------------------------------------- + void SharedResources_Impl::registerClient() { osl_atomic_increment( &s_nClients ); } - //-------------------------------------------------------------------- + void SharedResources_Impl::revokeClient() { ::osl::MutexGuard aGuard( getMutex() ); @@ -115,7 +115,7 @@ namespace connectivity } } - //-------------------------------------------------------------------- + SharedResources_Impl& SharedResources_Impl::getInstance() { ::osl::MutexGuard aGuard( getMutex() ); @@ -152,25 +152,25 @@ namespace connectivity //==================================================================== //= SharedResources //==================================================================== - //-------------------------------------------------------------------- + SharedResources::SharedResources() { SharedResources_Impl::registerClient(); } - //-------------------------------------------------------------------- + SharedResources::~SharedResources() { SharedResources_Impl::revokeClient(); } - //-------------------------------------------------------------------- + OUString SharedResources::getResourceString( ResourceId _nResId ) const { return SharedResources_Impl::getInstance().getResourceString( _nResId ); } - //-------------------------------------------------------------------- + OUString SharedResources::getResourceStringWithSubstitution( ResourceId _nResId, const sal_Char* _pAsciiPatternToReplace, const OUString& _rStringToSubstitute ) const { @@ -179,7 +179,7 @@ namespace connectivity return sString; } - //-------------------------------------------------------------------- + OUString SharedResources::getResourceStringWithSubstitution( ResourceId _nResId, const sal_Char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1, const sal_Char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2 ) const @@ -190,7 +190,7 @@ namespace connectivity return sString; } - //-------------------------------------------------------------------- + OUString SharedResources::getResourceStringWithSubstitution( ResourceId _nResId, const sal_Char* _pAsciiPatternToReplace1, const OUString& _rStringToSubstitute1, const sal_Char* _pAsciiPatternToReplace2, const OUString& _rStringToSubstitute2, @@ -202,7 +202,7 @@ namespace connectivity OSL_VERIFY( lcl_substitute( sString, _pAsciiPatternToReplace3, _rStringToSubstitute3 ) ); return sString; } - //-------------------------------------------------------------------- + OUString SharedResources::getResourceStringWithSubstitution( ResourceId _nResId, const ::std::list< ::std::pair<const sal_Char* , OUString > > _aStringToSubstitutes) const { diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx index cf5ffb284bb5..0721300bf87b 100644 --- a/connectivity/source/sdbcx/VCatalog.cxx +++ b/connectivity/source/sdbcx/VCatalog.cxx @@ -33,9 +33,9 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -//------------------------------------------------------------------------------ + IMPLEMENT_SERVICE_INFO(OCatalog,"com.sun.star.comp.connectivity.OCatalog","com.sun.star.sdbcx.DatabaseDefinition") -//------------------------------------------------------------------------------ + OCatalog::OCatalog(const Reference< XConnection> &_xConnection) : OCatalog_BASE(m_aMutex) ,connectivity::OSubComponent<OCatalog, OCatalog_BASE>(_xConnection, this) ,m_pTables(NULL) @@ -52,7 +52,7 @@ OCatalog::OCatalog(const Reference< XConnection> &_xConnection) : OCatalog_BASE( OSL_FAIL("No Metadata available!"); } } -//----------------------------------------------------------------------------- + OCatalog::~OCatalog() { delete m_pTables; @@ -60,18 +60,18 @@ OCatalog::~OCatalog() delete m_pGroups; delete m_pUsers; } -//----------------------------------------------------------------------------- + void SAL_CALL OCatalog::acquire() throw() { OCatalog_BASE::acquire(); } -//------------------------------------------------------------------------------ + void SAL_CALL OCatalog::release() throw() { relase_ChildImpl(); } -//------------------------------------------------------------------------------ + void SAL_CALL OCatalog::disposing() { ::osl::MutexGuard aGuard(m_aMutex); @@ -88,7 +88,7 @@ void SAL_CALL OCatalog::disposing() dispose_ChildImpl(); OCatalog_BASE::disposing(); } -//------------------------------------------------------------------------------ + // XTablesSupplier Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) throw(RuntimeException) { @@ -112,7 +112,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) throw(RuntimeException return m_pTables; } -// ------------------------------------------------------------------------- + // XViewsSupplier Reference< XNameAccess > SAL_CALL OCatalog::getViews( ) throw(RuntimeException) { @@ -136,7 +136,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getViews( ) throw(RuntimeException) return m_pViews; } -// ------------------------------------------------------------------------- + // XUsersSupplier Reference< XNameAccess > SAL_CALL OCatalog::getUsers( ) throw(RuntimeException) { @@ -160,7 +160,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getUsers( ) throw(RuntimeException) return m_pUsers; } -// ------------------------------------------------------------------------- + // XGroupsSupplier Reference< XNameAccess > SAL_CALL OCatalog::getGroups( ) throw(RuntimeException) { @@ -184,7 +184,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getGroups( ) throw(RuntimeException return m_pGroups; } -// ----------------------------------------------------------------------------- + OUString OCatalog::buildName(const Reference< XRow >& _xRow) { OUString sCatalog = _xRow->getString(1); @@ -201,7 +201,7 @@ OUString OCatalog::buildName(const Reference< XRow >& _xRow) ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation ) ); return sComposedName; } -// ----------------------------------------------------------------------------- + void OCatalog::fillNames(Reference< XResultSet >& _xResult,TStringVector& _rNames) { if ( _xResult.is() ) @@ -216,16 +216,16 @@ void OCatalog::fillNames(Reference< XResultSet >& _xResult,TStringVector& _rName ::comphelper::disposeComponent(_xResult); } } -// ------------------------------------------------------------------------- + void ODescriptor::construct() { sal_Int32 nAttrib = isNew() ? 0 : ::com::sun::star::beans::PropertyAttribute::READONLY; registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME), PROPERTY_ID_NAME ,nAttrib,&m_Name,::getCppuType(static_cast< OUString*>(0))); } -// ------------------------------------------------------------------------- + ODescriptor::~ODescriptor() { } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index 694a2727ff15..1924675c2d6a 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -68,23 +68,23 @@ namespace { m_aElements.reserve(nLength); } - // ----------------------------------------------------------------------------- + virtual bool exists(const OUString& _sName ) { return m_aNameMap.find(_sName) != m_aNameMap.end(); } - // ----------------------------------------------------------------------------- + virtual bool empty() { return m_aNameMap.empty(); } - // ----------------------------------------------------------------------------- + virtual void swapAll() { ::std::vector< ObjectIter >(m_aElements).swap(m_aElements); ObjectMap(m_aNameMap).swap(m_aNameMap); } - // ----------------------------------------------------------------------------- + virtual void swap() { ::std::vector< ObjectIter >().swap(m_aElements); @@ -97,18 +97,18 @@ namespace // default constructed (instead of being constructed from the same instance in m_aNameMap), and // it's case-sensitive flag would have an unpredictable value. } - // ----------------------------------------------------------------------------- + virtual void clear() { m_aElements.clear(); m_aNameMap.clear(); } - // ----------------------------------------------------------------------------- + virtual void insert(const OUString& _sName,const ObjectType& _xObject) { m_aElements.push_back(m_aNameMap.insert(m_aNameMap.begin(), ObjectEntry(_sName,_xObject))); } - // ----------------------------------------------------------------------------- + virtual void reFill(const TStringVector &_rVector) { OSL_ENSURE(!m_aNameMap.size(),"OCollection::reFill: collection isn't empty"); @@ -117,7 +117,7 @@ namespace for(TStringVector::const_iterator i=_rVector.begin(); i != _rVector.end();++i) m_aElements.push_back(m_aNameMap.insert(m_aNameMap.begin(), ObjectEntry(*i,ObjectType()))); } - // ----------------------------------------------------------------------------- + virtual bool rename(const OUString _sOldName,const OUString _sNewName) { bool bRet = false; @@ -135,12 +135,12 @@ namespace } return bRet; } - // ----------------------------------------------------------------------------- + virtual sal_Int32 size() { return static_cast<sal_Int32>(m_aNameMap.size()); } - // ----------------------------------------------------------------------------- + virtual Sequence< OUString > getElementNames() { Sequence< OUString > aNameList(m_aElements.size()); @@ -152,12 +152,12 @@ namespace return aNameList; } - // ----------------------------------------------------------------------------- + virtual OUString getName(sal_Int32 _nIndex) { return m_aElements[_nIndex]->first; } - // ----------------------------------------------------------------------------- + virtual void disposeAndErase(sal_Int32 _nIndex) { OSL_ENSURE(_nIndex >= 0 && _nIndex < static_cast<sal_Int32>(m_aElements.size()),"Illegal argument!"); @@ -169,7 +169,7 @@ namespace m_aElements.erase(m_aElements.begin()+_nIndex); m_aNameMap.erase(sName); } - // ----------------------------------------------------------------------------- + virtual void disposeElements() { for( ObjectIter aIter = m_aNameMap.begin(); aIter != m_aNameMap.end(); ++aIter) @@ -184,42 +184,42 @@ namespace m_aElements.clear(); m_aNameMap.clear(); } - // ----------------------------------------------------------------------------- + virtual sal_Int32 findColumn( const OUString& columnName ) { ObjectIter aIter = m_aNameMap.find(columnName); OSL_ENSURE(aIter != m_aNameMap.end(),"findColumn:: Illegal name!"); return m_aElements.size() - (m_aElements.end() - ::std::find(m_aElements.begin(),m_aElements.end(),aIter)); } - // ----------------------------------------------------------------------------- + virtual OUString findColumnAtIndex( sal_Int32 _nIndex) { OSL_ENSURE(_nIndex >= 0 && _nIndex < static_cast<sal_Int32>(m_aElements.size()),"Illegal argument!"); return m_aElements[_nIndex]->first; } - // ----------------------------------------------------------------------------- + virtual ObjectType getObject(sal_Int32 _nIndex) { OSL_ENSURE(_nIndex >= 0 && _nIndex < static_cast<sal_Int32>(m_aElements.size()),"Illegal argument!"); return m_aElements[_nIndex]->second; } - // ----------------------------------------------------------------------------- + virtual ObjectType getObject(const OUString& columnName) { return m_aNameMap.find(columnName)->second; } - // ----------------------------------------------------------------------------- + virtual void setObject(sal_Int32 _nIndex,const ObjectType& _xObject) { OSL_ENSURE(_nIndex >= 0 && _nIndex < static_cast<sal_Int32>(m_aElements.size()),"Illegal argument!"); m_aElements[_nIndex]->second = _xObject; } - // ----------------------------------------------------------------------------- + sal_Bool isCaseSensitive() const { return m_aNameMap.key_comp().isCaseSensitive(); } - // ----------------------------------------------------------------------------- + }; } @@ -249,11 +249,11 @@ OCollection::OCollection(::cppu::OWeakObject& _rParent } m_pElements->reFill(_rVector); } -// ------------------------------------------------------------------------- + OCollection::~OCollection() { } -// ----------------------------------------------------------------------------- + Any SAL_CALL OCollection::queryInterface( const Type & rType ) throw (RuntimeException) { if ( m_bUseIndexOnly && rType == ::getCppuType(static_cast< Reference< XNameAccess > *> (NULL)) ) @@ -262,7 +262,7 @@ Any SAL_CALL OCollection::queryInterface( const Type & rType ) throw (RuntimeExc } return OCollectionBase::queryInterface( rType ); } -// ----------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OCollection::getTypes() throw (RuntimeException) { if ( m_bUseIndexOnly ) @@ -284,7 +284,7 @@ Sequence< Type > SAL_CALL OCollection::getTypes() throw (RuntimeException) } return OCollectionBase::getTypes( ); } -// ------------------------------------------------------------------------- + void OCollection::clear_NoDispose() { ::osl::MutexGuard aGuard(m_rMutex); @@ -293,7 +293,7 @@ void OCollection::clear_NoDispose() m_pElements->swapAll(); } -// ------------------------------------------------------------------------- + void OCollection::disposing(void) { m_aContainerListeners.disposeAndClear(EventObject(static_cast<XTypeProvider*>(this))); @@ -305,7 +305,7 @@ void OCollection::disposing(void) m_pElements->swap(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OCollection::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); @@ -314,7 +314,7 @@ Any SAL_CALL OCollection::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsEx return makeAny(getObject(Index)); } -// ------------------------------------------------------------------------- + Any SAL_CALL OCollection::getByName( const OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); @@ -331,13 +331,13 @@ Any SAL_CALL OCollection::getByName( const OUString& aName ) throw(NoSuchElement return makeAny(getObject(m_pElements->findColumn(aName))); } -// ------------------------------------------------------------------------- + Sequence< OUString > SAL_CALL OCollection::getElementNames( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); return m_pElements->getElementNames(); } -// ------------------------------------------------------------------------- + void SAL_CALL OCollection::refresh( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); @@ -348,12 +348,12 @@ void SAL_CALL OCollection::refresh( ) throw(RuntimeException) EventObject aEvt(static_cast<XTypeProvider*>(this)); m_aRefreshListeners.notifyEach( &XRefreshListener::refreshed, aEvt ); } -// ----------------------------------------------------------------------------- + void OCollection::reFill(const TStringVector &_rVector) { m_pElements->reFill(_rVector); } -// ------------------------------------------------------------------------- + // XDataDescriptorFactory Reference< XPropertySet > SAL_CALL OCollection::createDataDescriptor( ) throw(RuntimeException) { @@ -361,7 +361,7 @@ Reference< XPropertySet > SAL_CALL OCollection::createDataDescriptor( ) throw(R return createDescriptor(); } -// ----------------------------------------------------------------------------- + OUString OCollection::getNameForObject(const ObjectType& _xObject) { OSL_ENSURE(_xObject.is(),"OCollection::getNameForObject: Object is NULL!"); @@ -369,7 +369,7 @@ OUString OCollection::getNameForObject(const ObjectType& _xObject) _xObject->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= sName; return sName; } -// ------------------------------------------------------------------------- + // XAppend void SAL_CALL OCollection::appendByDescriptor( const Reference< XPropertySet >& descriptor ) throw(SQLException, ElementExistException, RuntimeException) { @@ -397,7 +397,7 @@ void SAL_CALL OCollection::appendByDescriptor( const Reference< XPropertySet >& aGuard.clear(); m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, aEvent ); } -// ------------------------------------------------------------------------- + // XDrop void SAL_CALL OCollection::dropByName( const OUString& elementName ) throw(SQLException, NoSuchElementException, RuntimeException) { @@ -408,7 +408,7 @@ void SAL_CALL OCollection::dropByName( const OUString& elementName ) throw(SQLEx dropImpl(m_pElements->findColumn(elementName)); } -// ------------------------------------------------------------------------- + void SAL_CALL OCollection::dropByIndex( sal_Int32 index ) throw(SQLException, IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); @@ -417,7 +417,7 @@ void SAL_CALL OCollection::dropByIndex( sal_Int32 index ) throw(SQLException, In dropImpl(index); } -// ----------------------------------------------------------------------------- + void OCollection::dropImpl(sal_Int32 _nIndex,sal_Bool _bReallyDrop) { OUString elementName = m_pElements->getName(_nIndex); @@ -430,7 +430,7 @@ void OCollection::dropImpl(sal_Int32 _nIndex,sal_Bool _bReallyDrop) // notify our container listeners notifyElementRemoved(elementName); } -// ----------------------------------------------------------------------------- + void OCollection::notifyElementRemoved(const OUString& _sName) { ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_sName), Any(), Any()); @@ -439,7 +439,7 @@ void OCollection::notifyElementRemoved(const OUString& _sName) while (aListenerLoop.hasMoreElements()) static_cast<XContainerListener*>(aListenerLoop.next())->elementRemoved(aEvent); } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCollection::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { if ( !m_pElements->exists(columnName) ) @@ -450,74 +450,74 @@ sal_Int32 SAL_CALL OCollection::findColumn( const OUString& columnName ) throw(S return m_pElements->findColumn(columnName) + 1; // because columns start at one } -// ------------------------------------------------------------------------- + Reference< XEnumeration > SAL_CALL OCollection::createEnumeration( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); return new OEnumerationByIndex( static_cast< XIndexAccess*>(this)); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCollection::addContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException) { m_aContainerListeners.addInterface(_rxListener); } -//------------------------------------------------------------------------------ + void SAL_CALL OCollection::removeContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException) { m_aContainerListeners.removeInterface(_rxListener); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCollection::acquire() throw() { m_rParent.acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCollection::release() throw() { m_rParent.release(); } -// ----------------------------------------------------------------------------- + Type SAL_CALL OCollection::getElementType( ) throw(RuntimeException) { return::getCppuType(static_cast< Reference< XPropertySet>*>(NULL)); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL OCollection::hasElements( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); return !m_pElements->empty(); } -// ----------------------------------------------------------------------------- + sal_Int32 SAL_CALL OCollection::getCount( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); return m_pElements->size(); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL OCollection::hasByName( const OUString& aName ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_rMutex); return m_pElements->exists(aName); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCollection::addRefreshListener( const Reference< XRefreshListener >& l ) throw(RuntimeException) { m_aRefreshListeners.addInterface(l); } -// ----------------------------------------------------------------------------- + void SAL_CALL OCollection::removeRefreshListener( const Reference< XRefreshListener >& l ) throw(RuntimeException) { m_aRefreshListeners.removeInterface(l); } -// ----------------------------------------------------------------------------- + void OCollection::insertElement(const OUString& _sElementName,const ObjectType& _xElement) { OSL_ENSURE(!m_pElements->exists(_sElementName),"Element already exists"); if ( !m_pElements->exists(_sElementName) ) m_pElements->insert(_sElementName,_xElement); } -// ----------------------------------------------------------------------------- + void OCollection::renameObject(const OUString _sOldName,const OUString _sNewName) { OSL_ENSURE(m_pElements->exists(_sOldName),"Element doesn't exist"); @@ -534,7 +534,7 @@ void OCollection::renameObject(const OUString _sOldName,const OUString _sNewName static_cast<XContainerListener*>(aListenerLoop.next())->elementReplaced(aEvent); } } -// ----------------------------------------------------------------------------- + ObjectType OCollection::getObject(sal_Int32 _nIndex) { ObjectType xName = m_pElements->getObject(_nIndex); @@ -559,33 +559,33 @@ ObjectType OCollection::getObject(sal_Int32 _nIndex) } return xName; } -// ----------------------------------------------------------------------------- + void OCollection::disposeElements() { m_pElements->disposeElements(); } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OCollection::createDescriptor() { OSL_FAIL("Need to be overloaded when used!"); throw SQLException(); } -// ----------------------------------------------------------------------------- + ObjectType OCollection::cloneDescriptor( const ObjectType& _descriptor ) { ObjectType xNewDescriptor( createDescriptor() ); ::comphelper::copyProperties( _descriptor, xNewDescriptor ); return xNewDescriptor; } -// ----------------------------------------------------------------------------- + ObjectType OCollection::appendObject( const OUString& /*_rForName*/, const Reference< XPropertySet >& descriptor ) { return cloneDescriptor( descriptor ); } -// ----------------------------------------------------------------------------- + void OCollection::dropObject(sal_Int32 /*_nPos*/,const OUString /*_sElementName*/) { } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx index c3058d033a89..59cf69a87e09 100644 --- a/connectivity/source/sdbcx/VColumn.cxx +++ b/connectivity/source/sdbcx/VColumn.cxx @@ -23,7 +23,7 @@ #include <cppuhelper/supportsservice.hxx> #include "TConnection.hxx" #include <com/sun/star/sdbc/ColumnValue.hpp> -// ------------------------------------------------------------------------- + using namespace connectivity; using namespace connectivity::sdbcx; using namespace cppu; @@ -32,14 +32,14 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; -// ----------------------------------------------------------------------------- + OUString SAL_CALL OColumn::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { if(isNew()) return OUString("com.sun.star.sdbcx.VColumnDescription"); return OUString("com.sun.star.sdbcx.VColumn"); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OColumn::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(1); @@ -55,7 +55,7 @@ sal_Bool SAL_CALL OColumn::supportsService( const OUString& _rServiceName ) thro { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OColumn::OColumn(sal_Bool _bCase) :OColumnDescriptor_BASE(m_aMutex) ,ODescriptor(OColumnDescriptor_BASE::rBHelper,_bCase,sal_True) @@ -69,7 +69,7 @@ OColumn::OColumn(sal_Bool _bCase) { construct(); } -// ------------------------------------------------------------------------- + OColumn::OColumn( const OUString& _Name, const OUString& _TypeName, const OUString& _DefaultValue, @@ -105,31 +105,31 @@ OColumn::OColumn( const OUString& _Name, construct(); } -// ------------------------------------------------------------------------- + OColumn::~OColumn() { } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper& SAL_CALL OColumn::getInfoHelper() { return *OColumn_PROP::getArrayHelper(isNew() ? 1 : 0); } -// ----------------------------------------------------------------------------- + void SAL_CALL OColumn::acquire() throw() { OColumnDescriptor_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OColumn::release() throw() { OColumnDescriptor_BASE::release(); } -// ----------------------------------------------------------------------------- + Any SAL_CALL OColumn::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ODescriptor::queryInterface( rType); @@ -142,7 +142,7 @@ Any SAL_CALL OColumn::queryInterface( const Type & rType ) throw(RuntimeExceptio } return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OColumn::getTypes( ) throw(RuntimeException) { if(isNew()) @@ -150,7 +150,7 @@ Sequence< Type > SAL_CALL OColumn::getTypes( ) throw(RuntimeException) return ::comphelper::concatSequences(ODescriptor::getTypes(),OColumn_BASE::getTypes(),OColumnDescriptor_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void OColumn::construct() { ODescriptor::construct(); @@ -171,7 +171,7 @@ void OColumn::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME), PROPERTY_ID_SCHEMANAME, nAttrib, &m_SchemaName, ::getCppuType(&m_SchemaName)); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME), PROPERTY_ID_TABLENAME, nAttrib, &m_TableName, ::getCppuType(&m_TableName)); } -// ------------------------------------------------------------------------- + void OColumn::disposing(void) { OPropertySetHelper::disposing(); @@ -180,7 +180,7 @@ void OColumn::disposing(void) checkDisposed(OColumnDescriptor_BASE::rBHelper.bDisposed); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -205,22 +205,22 @@ Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor( ) throw(Runti pNewColumn->setNew(sal_True); return pNewColumn; } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OColumn::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + // XNamed OUString SAL_CALL OColumn::getName( ) throw(::com::sun::star::uno::RuntimeException) { return m_Name; } -// ----------------------------------------------------------------------------- + void SAL_CALL OColumn::setName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException) { m_Name = aName; } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx index 9993dd6f3020..153a14401b03 100644 --- a/connectivity/source/sdbcx/VDescriptor.cxx +++ b/connectivity/source/sdbcx/VDescriptor.cxx @@ -35,7 +35,7 @@ namespace connectivity // ========================================================================= // = ODescriptor // ========================================================================= - // ------------------------------------------------------------------------- + ODescriptor::ODescriptor(::cppu::OBroadcastHelper& _rBHelper,sal_Bool _bCase, sal_Bool _bNew) :ODescriptor_PBASE(_rBHelper) ,m_aCase(_bCase) @@ -43,7 +43,7 @@ namespace connectivity { } - // ------------------------------------------------------------------------- + // com::sun::star::lang::XUnoTunnel sal_Int64 SAL_CALL ODescriptor::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException) { @@ -52,7 +52,7 @@ namespace connectivity : 0; } - // ----------------------------------------------------------------------------- + ODescriptor* ODescriptor::getImplementation( const Reference< XInterface >& _rxSomeComp ) { Reference< XUnoTunnel > xTunnel( _rxSomeComp, UNO_QUERY ); @@ -61,7 +61,7 @@ namespace connectivity return NULL; } - // ----------------------------------------------------------------------------- + namespace { struct ResetROAttribute : public ::std::unary_function< Property, void > @@ -80,7 +80,7 @@ namespace connectivity }; } - // ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* ODescriptor::doCreateArrayHelper() const { Sequence< Property > aProperties; @@ -94,14 +94,14 @@ namespace connectivity return new ::cppu::OPropertyArrayHelper( aProperties ); } - // ----------------------------------------------------------------------------- + sal_Bool ODescriptor::isNew( const Reference< XInterface >& _rxDescriptor ) { ODescriptor* pImplementation = getImplementation( _rxDescriptor ); return pImplementation != NULL ? pImplementation->isNew() : sal_False; } - // ----------------------------------------------------------------------------- + Sequence< sal_Int8 > ODescriptor::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -117,20 +117,20 @@ namespace connectivity return pId->getImplementationId(); } - // ----------------------------------------------------------------------------- + Any SAL_CALL ODescriptor::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ::cppu::queryInterface(rType,static_cast< XUnoTunnel*> (this)); return aRet.hasValue() ? aRet : ODescriptor_PBASE::queryInterface(rType); } - // ----------------------------------------------------------------------------- + void ODescriptor::setNew(sal_Bool _bNew) { m_bNew = _bNew; } - // ----------------------------------------------------------------------------- + Sequence< Type > SAL_CALL ODescriptor::getTypes( ) throw(RuntimeException) { ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), diff --git a/connectivity/source/sdbcx/VGroup.cxx b/connectivity/source/sdbcx/VGroup.cxx index 72a2be7ddb19..140a298782e1 100644 --- a/connectivity/source/sdbcx/VGroup.cxx +++ b/connectivity/source/sdbcx/VGroup.cxx @@ -26,7 +26,7 @@ #include <comphelper/sequence.hxx> #include <connectivity/dbexception.hxx> -// ------------------------------------------------------------------------- + using namespace ::connectivity::sdbcx; using namespace ::connectivity; using namespace ::dbtools; @@ -37,36 +37,36 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; IMPLEMENT_SERVICE_INFO(OGroup,"com.sun.star.sdbcx.VGroup","com.sun.star.sdbcx.Group"); -// ------------------------------------------------------------------------- + OGroup::OGroup(sal_Bool _bCase) : OGroup_BASE(m_aMutex) , ODescriptor(OGroup_BASE::rBHelper,_bCase) , m_pUsers(NULL) { } -// ------------------------------------------------------------------------- + OGroup::OGroup(const OUString& _Name,sal_Bool _bCase) : OGroup_BASE(m_aMutex) ,ODescriptor(OGroup_BASE::rBHelper,_bCase) ,m_pUsers(NULL) { m_Name = _Name; } -// ------------------------------------------------------------------------- + OGroup::~OGroup() { delete m_pUsers; } -// ------------------------------------------------------------------------- + Any SAL_CALL OGroup::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ODescriptor::queryInterface( rType); return aRet.hasValue() ? aRet : OGroup_BASE::queryInterface( rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OGroup::getTypes( ) throw(RuntimeException) { return ::comphelper::concatSequences(ODescriptor::getTypes(),OGroup_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void OGroup::disposing(void) { OPropertySetHelper::disposing(); @@ -76,19 +76,19 @@ void OGroup::disposing(void) if(m_pUsers) m_pUsers->disposing(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OGroup::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OGroup::getInfoHelper() { return *const_cast<OGroup*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + Reference< XNameAccess > SAL_CALL OGroup::getUsers( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -111,7 +111,7 @@ Reference< XNameAccess > SAL_CALL OGroup::getUsers( ) throw(RuntimeException) return const_cast<OGroup*>(this)->m_pUsers; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OGroup::getPrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/ ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -120,7 +120,7 @@ sal_Int32 SAL_CALL OGroup::getPrivileges( const OUString& /*objName*/, sal_Int32 return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OGroup::getGrantablePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/ ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -128,47 +128,47 @@ sal_Int32 SAL_CALL OGroup::getGrantablePrivileges( const OUString& /*objName*/, return 0; } -// ------------------------------------------------------------------------- + void SAL_CALL OGroup::grantPrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/, sal_Int32 /*objPrivileges*/ ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OGroup_BASE::rBHelper.bDisposed); throwFeatureNotImplementedException( "XAuthorizable::grantPrivileges", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OGroup::revokePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/, sal_Int32 /*objPrivileges*/ ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OGroup_BASE::rBHelper.bDisposed); throwFeatureNotImplementedException( "XAuthorizable::revokePrivileges", *this ); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OGroup::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL OGroup::getName( ) throw(::com::sun::star::uno::RuntimeException) { return m_Name; } -// ----------------------------------------------------------------------------- + void SAL_CALL OGroup::setName( const OUString& /*aName*/ ) throw(::com::sun::star::uno::RuntimeException) { throwFeatureNotImplementedException( "XNamed::setName", *this ); } -// ----------------------------------------------------------------------------- + // XInterface void SAL_CALL OGroup::acquire() throw() { OGroup_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OGroup::release() throw() { OGroup_BASE::release(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx index 23f662c74aac..7c5d9c0369fc 100644 --- a/connectivity/source/sdbcx/VIndex.cxx +++ b/connectivity/source/sdbcx/VIndex.cxx @@ -37,14 +37,14 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ----------------------------------------------------------------------------- + OUString SAL_CALL OIndex::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { if(isNew()) return OUString("com.sun.star.sdbcx.VIndexDescriptor"); return OUString("com.sun.star.sdbcx.VIndex"); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OIndex::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(1); @@ -60,7 +60,7 @@ sal_Bool SAL_CALL OIndex::supportsService( const OUString& _rServiceName ) throw { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OIndex::OIndex(sal_Bool _bCase) : ODescriptor_BASE(m_aMutex) , ODescriptor(ODescriptor_BASE::rBHelper,_bCase,sal_True) ,m_IsUnique(sal_False) @@ -69,7 +69,7 @@ OIndex::OIndex(sal_Bool _bCase) : ODescriptor_BASE(m_aMutex) ,m_pColumns(NULL) { } -// ------------------------------------------------------------------------- + OIndex::OIndex( const OUString& _Name, const OUString& _Catalog, sal_Bool _isUnique, @@ -85,22 +85,22 @@ OIndex::OIndex( const OUString& _Name, { m_Name = _Name; } -// ------------------------------------------------------------------------- + OIndex::~OIndex( ) { delete m_pColumns; } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OIndex::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper& SAL_CALL OIndex::getInfoHelper() { return *OIndex_PROP::getArrayHelper(isNew() ? 1 : 0); } -// ------------------------------------------------------------------------- + Any SAL_CALL OIndex::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ODescriptor::queryInterface( rType); @@ -113,14 +113,14 @@ Any SAL_CALL OIndex::queryInterface( const Type & rType ) throw(RuntimeException } return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OIndex::getTypes( ) throw(RuntimeException) { if(isNew()) return ::comphelper::concatSequences(ODescriptor::getTypes(),ODescriptor_BASE::getTypes()); return ::comphelper::concatSequences(ODescriptor::getTypes(),ODescriptor_BASE::getTypes(),OIndex_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void OIndex::construct() { ODescriptor::construct(); @@ -132,7 +132,7 @@ void OIndex::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISPRIMARYKEYINDEX),PROPERTY_ID_ISPRIMARYKEYINDEX, nAttrib,&m_IsPrimaryKeyIndex, ::getBooleanCppuType()); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCLUSTERED), PROPERTY_ID_ISCLUSTERED, nAttrib,&m_IsClustered, ::getBooleanCppuType()); } -// ------------------------------------------------------------------------- + void OIndex::disposing(void) { OPropertySetHelper::disposing(); @@ -142,7 +142,7 @@ void OIndex::disposing(void) if(m_pColumns) m_pColumns->disposing(); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OIndex::getColumns( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -165,7 +165,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OIndex::getColumn return const_cast<OIndex*>(this)->m_pColumns; } -// ------------------------------------------------------------------------- + Reference< XPropertySet > SAL_CALL OIndex::createDataDescriptor( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -174,35 +174,35 @@ Reference< XPropertySet > SAL_CALL OIndex::createDataDescriptor( ) throw(Runtim return this; } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OIndex::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL OIndex::getName( ) throw(::com::sun::star::uno::RuntimeException) { return m_Name; } -// ----------------------------------------------------------------------------- + void SAL_CALL OIndex::setName( const OUString& /*aName*/ ) throw(::com::sun::star::uno::RuntimeException) { } -// ----------------------------------------------------------------------------- + // XInterface void SAL_CALL OIndex::acquire() throw() { ODescriptor_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OIndex::release() throw() { ODescriptor_BASE::release(); } -// ----------------------------------------------------------------------------- + void OIndex::refreshColumns() { } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/sdbcx/VIndexColumn.cxx b/connectivity/source/sdbcx/VIndexColumn.cxx index ebb83ba0188e..9bdc3215ceeb 100644 --- a/connectivity/source/sdbcx/VIndexColumn.cxx +++ b/connectivity/source/sdbcx/VIndexColumn.cxx @@ -25,14 +25,14 @@ using namespace connectivity; using namespace connectivity::sdbcx; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; -// ----------------------------------------------------------------------------- + OUString SAL_CALL OIndexColumn::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { if(isNew()) return OUString("com.sun.star.sdbcx.VIndexColumnDescription"); return OUString("com.sun.star.sdbcx.VIndex"); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OIndexColumn::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(1); @@ -48,13 +48,13 @@ sal_Bool SAL_CALL OIndexColumn::supportsService( const OUString& _rServiceName ) { return cppu::supportsService(this, _rServiceName); } -// ----------------------------------------------------------------------------- + OIndexColumn::OIndexColumn(sal_Bool _bCase) : OColumn(_bCase), m_IsAscending(sal_True) { construct(); } -// ------------------------------------------------------------------------- + OIndexColumn::OIndexColumn( sal_Bool _IsAscending, const OUString& _Name, const OUString& _TypeName, @@ -89,23 +89,23 @@ OIndexColumn::OIndexColumn( sal_Bool _IsAscending, { construct(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OIndexColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper& SAL_CALL OIndexColumn::getInfoHelper() { return *OIndexColumn_PROP::getArrayHelper(isNew() ? 1 : 0); } -// ------------------------------------------------------------------------- + void OIndexColumn::construct() { sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY; registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING, nAttrib,&m_IsAscending, ::getBooleanCppuType()); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx index 61da3eb3375e..e5117a07d543 100644 --- a/connectivity/source/sdbcx/VKey.cxx +++ b/connectivity/source/sdbcx/VKey.cxx @@ -35,14 +35,14 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ----------------------------------------------------------------------------- + OUString SAL_CALL OKey::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { if(isNew()) return OUString("com.sun.star.sdbcx.VKeyDescription"); return OUString("com.sun.star.sdbcx.VKey"); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OKey::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(1); @@ -58,14 +58,14 @@ sal_Bool SAL_CALL OKey::supportsService( const OUString& _rServiceName ) throw(: { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OKey::OKey(sal_Bool _bCase) : ODescriptor_BASE(m_aMutex) , ODescriptor(ODescriptor_BASE::rBHelper,_bCase,sal_True) , m_aProps(new KeyProperties()) , m_pColumns(NULL) { } -// ------------------------------------------------------------------------- + OKey::OKey(const OUString& _Name,const TKeyProperties& _rProps,sal_Bool _bCase) : ODescriptor_BASE(m_aMutex) ,ODescriptor(ODescriptor_BASE::rBHelper,_bCase) @@ -89,12 +89,12 @@ OKey::OKey(const OUString& _Name,const TKeyProperties& _rProps,sal_Bool _bCase) //{ // m_Name = _Name; //} -// ------------------------------------------------------------------------- + OKey::~OKey( ) { delete m_pColumns; } -// ------------------------------------------------------------------------- + Any SAL_CALL OKey::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ODescriptor::queryInterface( rType); @@ -108,7 +108,7 @@ Any SAL_CALL OKey::queryInterface( const Type & rType ) throw(RuntimeException) return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OKey::getTypes( ) throw(RuntimeException) { if(isNew()) @@ -116,7 +116,7 @@ Sequence< Type > SAL_CALL OKey::getTypes( ) throw(RuntimeException) return ::comphelper::concatSequences(ODescriptor::getTypes(),ODescriptor_BASE::getTypes(),OKey_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void OKey::construct() { ODescriptor::construct(); @@ -128,7 +128,7 @@ void OKey::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_UPDATERULE), PROPERTY_ID_UPDATERULE, nAttrib,&m_aProps->m_UpdateRule, ::getCppuType(static_cast<sal_Int32*>(0))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE), PROPERTY_ID_DELETERULE, nAttrib,&m_aProps->m_DeleteRule, ::getCppuType(static_cast<sal_Int32*>(0))); } -// ------------------------------------------------------------------------- + void SAL_CALL OKey::disposing() { OPropertySetHelper::disposing(); @@ -140,17 +140,17 @@ void SAL_CALL OKey::disposing() ODescriptor_BASE::disposing(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OKey::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OKey::getInfoHelper() { return *const_cast<OKey*>(this)->getArrayHelper(isNew() ? 1 : 0); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OKey::getColumns( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -173,7 +173,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OKey::getColumns( return const_cast<OKey*>(this)->m_pColumns; } -// ------------------------------------------------------------------------- + Reference< XPropertySet > SAL_CALL OKey::createDataDescriptor( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -182,31 +182,31 @@ Reference< XPropertySet > SAL_CALL OKey::createDataDescriptor( ) throw(RuntimeE return this; } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OKey::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL OKey::getName( ) throw(::com::sun::star::uno::RuntimeException) { return m_Name; } -// ----------------------------------------------------------------------------- + void SAL_CALL OKey::setName( const OUString& /*aName*/ ) throw(::com::sun::star::uno::RuntimeException) { } -// ----------------------------------------------------------------------------- + // XInterface void SAL_CALL OKey::acquire() throw() { ODescriptor_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OKey::release() throw() { ODescriptor_BASE::release(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx index db8929dcaaed..3935f128f2cb 100644 --- a/connectivity/source/sdbcx/VKeyColumn.cxx +++ b/connectivity/source/sdbcx/VKeyColumn.cxx @@ -26,14 +26,14 @@ using namespace connectivity::sdbcx; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; using namespace cppu; -// ----------------------------------------------------------------------------- + OUString SAL_CALL OKeyColumn::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { if(isNew()) return OUString("com.sun.star.sdbcx.VKeyColumnDescription"); return OUString("com.sun.star.sdbcx.VKeyColumn"); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OKeyColumn::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(1); @@ -49,12 +49,12 @@ sal_Bool SAL_CALL OKeyColumn::supportsService( const OUString& _rServiceName ) t { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OKeyColumn::OKeyColumn(sal_Bool _bCase) : OColumn(_bCase) { construct(); } -// ------------------------------------------------------------------------- + OKeyColumn::OKeyColumn( const OUString& _ReferencedColumn, const OUString& _Name, const OUString& _TypeName, @@ -89,27 +89,27 @@ OKeyColumn::OKeyColumn( const OUString& _ReferencedColumn, { construct(); } -// ------------------------------------------------------------------------- + OKeyColumn::~OKeyColumn() { } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OKeyColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ----------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper& SAL_CALL OKeyColumn::getInfoHelper() { return *OKeyColumn_PROP::getArrayHelper(isNew() ? 1 : 0); } -// ------------------------------------------------------------------------- + void OKeyColumn::construct() { sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY; registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN), PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(static_cast< OUString*>(0))); } -// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx index b4f1338ce670..95e15dc7a9dd 100644 --- a/connectivity/source/sdbcx/VTable.cxx +++ b/connectivity/source/sdbcx/VTable.cxx @@ -39,7 +39,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -// ----------------------------------------------------------------------------- + OUString SAL_CALL OTable::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { if(isNew()) @@ -47,7 +47,7 @@ OUString SAL_CALL OTable::getImplementationName( ) throw (::com::sun::star::uno return OUString("com.sun.star.sdbcx.Table"); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Sequence< OUString > SAL_CALL OTable::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Sequence< OUString > aSupported(1); @@ -63,7 +63,7 @@ sal_Bool SAL_CALL OTable::supportsService( const OUString& _rServiceName ) throw { return cppu::supportsService(this, _rServiceName); } -// ------------------------------------------------------------------------- + OTable::OTable(OCollection* _pTables, sal_Bool _bCase) : OTableDescriptor_BASE(m_aMutex) @@ -74,7 +74,7 @@ OTable::OTable(OCollection* _pTables, ,m_pTables(_pTables) { } -// ----------------------------------------------------------------------------- + OTable::OTable( OCollection* _pTables, sal_Bool _bCase, const OUString& _Name, const OUString& _Type, @@ -92,14 +92,14 @@ OTable::OTable( OCollection* _pTables, { m_Name = _Name; } -// ------------------------------------------------------------------------- + OTable::~OTable() { delete m_pKeys; delete m_pColumns; delete m_pIndexes; } -// ------------------------------------------------------------------------- + void OTable::construct() { ODescriptor::construct(); @@ -111,18 +111,18 @@ void OTable::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION,nAttrib,&m_Description, ::getCppuType(static_cast< OUString*>(0))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(static_cast< OUString*>(0))); } -// ----------------------------------------------------------------------------- + void SAL_CALL OTable::acquire() throw() { OTableDescriptor_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OTable::release() throw() { OTableDescriptor_BASE::release(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OTable::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ODescriptor::queryInterface( rType); @@ -137,14 +137,14 @@ Any SAL_CALL OTable::queryInterface( const Type & rType ) throw(RuntimeException } return aRet; } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OTable::getTypes( ) throw(RuntimeException) { if(isNew()) return ::comphelper::concatSequences(ODescriptor::getTypes(),OTableDescriptor_BASE::getTypes()); return ::comphelper::concatSequences(ODescriptor::getTypes(),OTableDescriptor_BASE::getTypes(),OTable_BASE::getTypes()); } -// ------------------------------------------------------------------------- + void SAL_CALL OTable::disposing(void) { ODescriptor::disposing(); @@ -160,7 +160,7 @@ void SAL_CALL OTable::disposing(void) m_pTables = NULL; } -// ----------------------------------------------------------------------------- + // XColumnsSupplier Reference< XNameAccess > SAL_CALL OTable::getColumns( ) throw(RuntimeException) { @@ -185,7 +185,7 @@ Reference< XNameAccess > SAL_CALL OTable::getColumns( ) throw(RuntimeException) return m_pColumns; } -// ------------------------------------------------------------------------- + // XKeysSupplier Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) throw(RuntimeException) { @@ -212,17 +212,17 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) throw(RuntimeException) return xKeys; } -// ----------------------------------------------------------------------------- + cppu::IPropertyArrayHelper* OTable::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ------------------------------------------------------------------------- + cppu::IPropertyArrayHelper & OTable::getInfoHelper() { return *const_cast<OTable*>(this)->getArrayHelper(isNew() ? 1 : 0); } -// ------------------------------------------------------------------------- + Reference< XPropertySet > SAL_CALL OTable::createDataDescriptor( ) throw(RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -232,7 +232,7 @@ Reference< XPropertySet > SAL_CALL OTable::createDataDescriptor( ) throw(Runtim pTable->setNew(sal_True); return pTable; } -// ------------------------------------------------------------------------- + // XIndexesSupplier Reference< XNameAccess > SAL_CALL OTable::getIndexes( ) throw(RuntimeException) { @@ -256,7 +256,7 @@ Reference< XNameAccess > SAL_CALL OTable::getIndexes( ) throw(RuntimeException) return m_pIndexes; } -// ------------------------------------------------------------------------- + // XRename void SAL_CALL OTable::rename( const OUString& newName ) throw(SQLException, ElementExistException, RuntimeException) { @@ -272,28 +272,28 @@ void SAL_CALL OTable::rename( const OUString& newName ) throw(SQLException, Elem m_pTables->renameObject(sOldComposedName,newName); } -// ----------------------------------------------------------------------------- + Reference< XDatabaseMetaData> OTable::getMetaData() const { return NULL; } -// ------------------------------------------------------------------------- + // XAlterTable void SAL_CALL OTable::alterColumnByName( const OUString& /*colName*/, const Reference< XPropertySet >& /*descriptor*/ ) throw(SQLException, NoSuchElementException, RuntimeException) { throwFeatureNotImplementedException( "XAlterTable::alterColumnByName", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OTable::alterColumnByIndex( sal_Int32 /*index*/, const Reference< XPropertySet >& /*descriptor*/ ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException) { throwFeatureNotImplementedException( "XAlterTable::alterColumnByIndex", *this ); } -// ------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OTable::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL OTable::getName() throw(::com::sun::star::uno::RuntimeException) { // this is only correct for tables who haven't a schema or catalog name @@ -301,22 +301,22 @@ OUString SAL_CALL OTable::getName() throw(::com::sun::star::uno::RuntimeExceptio OSL_ENSURE(m_SchemaName.isEmpty(),"getName(): forgot to overload getName()!"); return m_Name; } -// ----------------------------------------------------------------------------- + void SAL_CALL OTable::setName( const OUString& /*aName*/ ) throw(::com::sun::star::uno::RuntimeException) { } -// ----------------------------------------------------------------------------- + void OTable::refreshColumns() { } -// ----------------------------------------------------------------------------- + void OTable::refreshKeys() { } -// ----------------------------------------------------------------------------- + void OTable::refreshIndexes() { } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx index f7f8176e34cc..c4b5e05ee84d 100644 --- a/connectivity/source/sdbcx/VUser.cxx +++ b/connectivity/source/sdbcx/VUser.cxx @@ -28,7 +28,7 @@ #include <connectivity/dbexception.hxx> #include <comphelper/sequence.hxx> -// ------------------------------------------------------------------------- + using namespace connectivity; using namespace connectivity::sdbcx; using namespace ::com::sun::star::sdbc; @@ -38,25 +38,25 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; IMPLEMENT_SERVICE_INFO(OUser,"com.sun.star.sdbcx.VUser","com.sun.star.sdbcx.User"); -// ------------------------------------------------------------------------- + OUser::OUser(sal_Bool _bCase) : OUser_BASE(m_aMutex) , ODescriptor(OUser_BASE::rBHelper,_bCase,sal_True) , m_pGroups(NULL) { } -// ------------------------------------------------------------------------- + OUser::OUser(const OUString& _Name,sal_Bool _bCase) : OUser_BASE(m_aMutex) ,ODescriptor(OUser_BASE::rBHelper,_bCase) ,m_pGroups(NULL) { m_Name = _Name; } -// ------------------------------------------------------------------------- + OUser::~OUser( ) { delete m_pGroups; } -// ------------------------------------------------------------------------- + void OUser::disposing(void) { OPropertySetHelper::disposing(); @@ -64,18 +64,18 @@ void OUser::disposing(void) if(m_pGroups) m_pGroups->disposing(); } -// ------------------------------------------------------------------------- + Any SAL_CALL OUser::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = ODescriptor::queryInterface( rType); return aRet.hasValue() ? aRet : OUser_BASE::queryInterface( rType); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OUser::getTypes( ) throw(RuntimeException) { return ::comphelper::concatSequences(ODescriptor::getTypes(),OUser_BASE::getTypes()); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OUser::createArrayHelper( ) const { Sequence< Property > aProps; @@ -83,12 +83,12 @@ Sequence< Type > SAL_CALL OUser::getTypes( ) throw(RuntimeException) return new ::cppu::OPropertyArrayHelper(aProps); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OUser::getInfoHelper() { return *const_cast<OUser*>(this)->getArrayHelper(); } -// ------------------------------------------------------------------------- + // XUser void SAL_CALL OUser::changePassword( const OUString& /*objPassword*/, const OUString& /*newPassword*/ ) throw(::com::sun::star::sdbc::SQLException, RuntimeException) { @@ -96,7 +96,7 @@ void SAL_CALL OUser::changePassword( const OUString& /*objPassword*/, const OUSt checkDisposed(OUser_BASE::rBHelper.bDisposed); ::dbtools::throwFeatureNotImplementedException( "XUser::changePassword", *this ); } -// ------------------------------------------------------------------------- + // XGroupsSupplier Reference< XNameAccess > SAL_CALL OUser::getGroups( ) throw(RuntimeException) { @@ -120,7 +120,7 @@ Reference< XNameAccess > SAL_CALL OUser::getGroups( ) throw(RuntimeException) return const_cast<OUser*>(this)->m_pGroups; } -// ------------------------------------------------------------------------- + SAL_WNOUNREACHABLE_CODE_PUSH @@ -131,7 +131,7 @@ sal_Int32 SAL_CALL OUser::getPrivileges( const OUString& /*objName*/, sal_Int32 ::dbtools::throwFeatureNotImplementedException( "XAuthorizable::changePassword", *this ); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -142,48 +142,48 @@ sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const OUString& /*objName*/, s SAL_WNOUNREACHABLE_CODE_POP -// ------------------------------------------------------------------------- + void SAL_CALL OUser::grantPrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/, sal_Int32 /*objPrivileges*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE::rBHelper.bDisposed); ::dbtools::throwFeatureNotImplementedException( "XAuthorizable::grantPrivileges", *this ); } -// ------------------------------------------------------------------------- + void SAL_CALL OUser::revokePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/, sal_Int32 /*objPrivileges*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE::rBHelper.bDisposed); ::dbtools::throwFeatureNotImplementedException( "XAuthorizable::revokePrivileges", *this ); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OUser::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL OUser::getName( ) throw(::com::sun::star::uno::RuntimeException) { return m_Name; } -// ----------------------------------------------------------------------------- + void SAL_CALL OUser::setName( const OUString& /*aName*/ ) throw(::com::sun::star::uno::RuntimeException) { OSL_FAIL( "OUser::setName: not implemented!" ); // not allowed to throw an SQLException here ... } -// ----------------------------------------------------------------------------- + // XInterface void SAL_CALL OUser::acquire() throw() { OUser_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OUser::release() throw() { OUser_BASE::release(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index 28aeb4aa03be..d4a5c18cd2b9 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -23,7 +23,7 @@ #include "connectivity/dbtools.hxx" #include "TConnection.hxx" -// ------------------------------------------------------------------------- + using namespace connectivity; using namespace connectivity::sdbcx; using namespace ::com::sun::star::beans; @@ -33,7 +33,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; IMPLEMENT_SERVICE_INFO(OView,"com.sun.star.sdbcx.VView","com.sun.star.sdbcx.View"); -// ------------------------------------------------------------------------- + OView::OView(sal_Bool _bCase, const OUString& _Name, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _xMetaData, @@ -51,18 +51,18 @@ OView::OView(sal_Bool _bCase, m_Name = _Name; construct(); } -// ------------------------------------------------------------------------- + OView::OView(sal_Bool _bCase,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _xMetaData) : ODescriptor(::comphelper::OMutexAndBroadcastHelper::m_aBHelper,_bCase,sal_True) ,m_xMetaData(_xMetaData) { construct(); } -// ------------------------------------------------------------------------- + OView::~OView() { } -// ------------------------------------------------------------------------- + void OView::construct() { ODescriptor::construct(); @@ -74,35 +74,35 @@ void OView::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND), PROPERTY_ID_COMMAND, nAttrib,&m_Command, ::getCppuType(static_cast< OUString*>(0))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CHECKOPTION), PROPERTY_ID_CHECKOPTION,nAttrib,&m_CheckOption, ::getCppuType(static_cast< sal_Int32*>(0))); } -// ------------------------------------------------------------------------- + void OView::disposing(void) { OPropertySetHelper::disposing(); ::osl::MutexGuard aGuard(m_aMutex); } -// ------------------------------------------------------------------------- + Sequence< Type > SAL_CALL OView::getTypes( ) throw(RuntimeException) { return ::comphelper::concatSequences(ODescriptor::getTypes(),OView_BASE::getTypes()); } -// ------------------------------------------------------------------------- + Any SAL_CALL OView::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OView_BASE::queryInterface( rType); return aRet.hasValue() ? aRet : ODescriptor::queryInterface( rType); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* OView::createArrayHelper( sal_Int32 /*_nId*/ ) const { return doCreateArrayHelper(); } -// ------------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper & OView::getInfoHelper() { return *const_cast<OView*>(this)->getArrayHelper(isNew() ? 1 : 0); } -// ----------------------------------------------------------------------------- + OUString SAL_CALL OView::getName() throw(::com::sun::star::uno::RuntimeException) { OUString sComposedName; @@ -116,26 +116,26 @@ OUString SAL_CALL OView::getName() throw(::com::sun::star::uno::RuntimeException } return sComposedName; } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OView::getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException) { return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -// ----------------------------------------------------------------------------- + void SAL_CALL OView::setName( const OUString& ) throw(::com::sun::star::uno::RuntimeException) { } -// ----------------------------------------------------------------------------- + void SAL_CALL OView::acquire() throw() { OView_BASE::acquire(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OView::release() throw() { OView_BASE::release(); } -// ----------------------------------------------------------------------------- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/simpledbt/charset_s.cxx b/connectivity/source/simpledbt/charset_s.cxx index 64afb1c4870a..58365a98db8a 100644 --- a/connectivity/source/simpledbt/charset_s.cxx +++ b/connectivity/source/simpledbt/charset_s.cxx @@ -29,19 +29,19 @@ namespace connectivity //==================================================================== //= ODataAccessCharSet //==================================================================== - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL ODataAccessCharSet::acquire() { return ORefBase::acquire(); } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL ODataAccessCharSet::release() { return ORefBase::release(); } - //-------------------------------------------------------------------- + sal_Int32 ODataAccessCharSet::getSupportedTextEncodings( ::std::vector< rtl_TextEncoding >& _rEncs ) const { _rEncs.clear(); diff --git a/connectivity/source/simpledbt/dbtfactory.cxx b/connectivity/source/simpledbt/dbtfactory.cxx index acaa5a934754..12dcb8bfdfdf 100644 --- a/connectivity/source/simpledbt/dbtfactory.cxx +++ b/connectivity/source/simpledbt/dbtfactory.cxx @@ -45,7 +45,7 @@ namespace connectivity //================================================================ //= ODataAccessToolsFactory //================================================================ - //---------------------------------------------------------------- + ODataAccessToolsFactory::ODataAccessToolsFactory() { ODataAccessStaticTools* pStaticTools = new ODataAccessStaticTools; @@ -53,37 +53,37 @@ namespace connectivity m_xToolsHelper = pStaticTools; } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL ODataAccessToolsFactory::acquire() { return ORefBase::acquire(); } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL ODataAccessToolsFactory::release() { return ORefBase::release(); } - //---------------------------------------------------------------- + ::rtl::Reference< simple::IDataAccessTypeConversion > ODataAccessToolsFactory::getTypeConversionHelper() { return m_xTypeConversionHelper; } - //---------------------------------------------------------------- + ::rtl::Reference< simple::IDataAccessCharSet > ODataAccessToolsFactory::createCharsetHelper( ) const { return new ODataAccessCharSet; } - //---------------------------------------------------------------- + ::rtl::Reference< simple::IDataAccessTools > ODataAccessToolsFactory::getDataAccessTools() { return m_xToolsHelper; } - //---------------------------------------------------------------- + SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr< ::dbtools::FormattedColumnValue > ODataAccessToolsFactory::createFormattedColumnValue( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, @@ -94,7 +94,7 @@ namespace connectivity } SAL_WNODEPRECATED_DECLARATIONS_POP - //---------------------------------------------------------------- + ::rtl::Reference< simple::ISQLParser > ODataAccessToolsFactory::createSQLParser(const Reference< XComponentContext >& rxContext, const IParseContext* _pContext) const { return new OSimpleSQLParser(rxContext, _pContext); diff --git a/connectivity/source/simpledbt/parsenode_s.cxx b/connectivity/source/simpledbt/parsenode_s.cxx index 92cd3a23c212..8539f0524f59 100644 --- a/connectivity/source/simpledbt/parsenode_s.cxx +++ b/connectivity/source/simpledbt/parsenode_s.cxx @@ -35,7 +35,7 @@ namespace connectivity //================================================================ //= OSimpleParseNode //================================================================ - //---------------------------------------------------------------- + OSimpleParseNode::OSimpleParseNode(const OSQLParseNode* _pNode, sal_Bool _bTakeOwnership) :m_pFullNode(_pNode) ,m_bOwner(_bTakeOwnership) @@ -43,32 +43,32 @@ namespace connectivity OSL_ENSURE(m_pFullNode, "OSimpleParseNode::OSimpleParseNode: invalid node given!"); } - //---------------------------------------------------------------- + OSimpleParseNode::~OSimpleParseNode() { if (m_bOwner) delete m_pFullNode; } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL OSimpleParseNode::acquire() { return ORefBase::acquire(); } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL OSimpleParseNode::release() { return ORefBase::release(); } - //---------------------------------------------------------------- + void OSimpleParseNode::parseNodeToStr(OUString& _rString, const Reference< XConnection >& _rxConnection,const IParseContext* _pContext) const { m_pFullNode->parseNodeToStr( _rString, _rxConnection, _pContext ); } - //---------------------------------------------------------------- + void OSimpleParseNode::parseNodeToPredicateStr(OUString& _rString, const Reference< XConnection >& _rxConnection, const Reference< XNumberFormatter >& _rxFormatter, const Reference< XPropertySet >& _rxField, const OUString &_sPredicateTableAlias, diff --git a/connectivity/source/simpledbt/parser_s.cxx b/connectivity/source/simpledbt/parser_s.cxx index b8168c7c4841..fcd25251fbb3 100644 --- a/connectivity/source/simpledbt/parser_s.cxx +++ b/connectivity/source/simpledbt/parser_s.cxx @@ -34,31 +34,31 @@ namespace connectivity //================================================================ //= OSimpleSQLParser //================================================================ - //---------------------------------------------------------------- + OSimpleSQLParser::OSimpleSQLParser(const Reference< XComponentContext >& rxContext, const IParseContext* _pContext) :m_aFullParser(rxContext, _pContext) { } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL OSimpleSQLParser::acquire() { return ORefBase::acquire(); } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL OSimpleSQLParser::release() { return ORefBase::release(); } - //---------------------------------------------------------------- + const IParseContext& OSimpleSQLParser::getContext() const { return m_aFullParser.getContext(); } - //---------------------------------------------------------------- + ::rtl::Reference< simple::ISQLParseNode > OSimpleSQLParser::predicateTree(OUString& rErrorMessage, const OUString& rStatement, const Reference< XNumberFormatter >& _rxFormatter, const Reference< XPropertySet >& _rxField) const { diff --git a/connectivity/source/simpledbt/refbase.cxx b/connectivity/source/simpledbt/refbase.cxx index 7c9fe5e6b550..5ece9c208508 100644 --- a/connectivity/source/simpledbt/refbase.cxx +++ b/connectivity/source/simpledbt/refbase.cxx @@ -27,18 +27,18 @@ namespace connectivity //================================================================ //= ORefBase //================================================================ - //---------------------------------------------------------------- + ORefBase::~ORefBase() { } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL ORefBase::acquire() { return osl_atomic_increment(&m_refCount); } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL ORefBase::release() { oslInterlockedCount nNewRefCount = osl_atomic_decrement(&m_refCount); diff --git a/connectivity/source/simpledbt/staticdbtools_s.cxx b/connectivity/source/simpledbt/staticdbtools_s.cxx index 9a7485ce9a6f..2a06624f6033 100644 --- a/connectivity/source/simpledbt/staticdbtools_s.cxx +++ b/connectivity/source/simpledbt/staticdbtools_s.cxx @@ -39,64 +39,64 @@ namespace connectivity //================================================================ //= ODataAccessStaticTools //================================================================ - //---------------------------------------------------------------- + ODataAccessStaticTools::ODataAccessStaticTools() { } - //---------------------------------------------------------------- + Date ODataAccessStaticTools::getStandardDate() const { return ::dbtools::DBTypeConversion::getStandardDate(); } - //---------------------------------------------------------------- + double ODataAccessStaticTools::getValue(const Reference< XColumn>& _rxVariant, const Date& rNullDate ) const { return ::dbtools::DBTypeConversion::getValue( _rxVariant, rNullDate ); } - //---------------------------------------------------------------- + OUString ODataAccessStaticTools::getFormattedValue(const Reference< XColumn >& _rxColumn, const Reference< XNumberFormatter >& _rxFormatter, const Date& _rNullDate, sal_Int32 _nKey, sal_Int16 _nKeyType) const { return ::dbtools::DBTypeConversion::getFormattedValue(_rxColumn, _rxFormatter, _rNullDate, _nKey, _nKeyType); } - //---------------------------------------------------------------- + OUString ODataAccessStaticTools::getFormattedValue( const Reference< XPropertySet>& _rxColumn, const Reference< XNumberFormatter>& _rxFormatter, const Locale& _rLocale, const Date& _rNullDate ) const { return ::dbtools::DBTypeConversion::getFormattedValue( _rxColumn, _rxFormatter, _rLocale, _rNullDate ); } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL ODataAccessStaticTools::acquire() { return ORefBase::acquire(); } - //---------------------------------------------------------------- + oslInterlockedCount SAL_CALL ODataAccessStaticTools::release() { return ORefBase::release(); } - //---------------------------------------------------------------- + Reference< XConnection> ODataAccessStaticTools::getConnection_withFeedback(const OUString& _rDataSourceName, const OUString& _rUser, const OUString& _rPwd, const Reference< XComponentContext>& _rxContext) const SAL_THROW ( (SQLException) ) { return ::dbtools::getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxContext); } - //---------------------------------------------------------------- + Reference< XConnection> ODataAccessStaticTools::connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext >& _rxContext, sal_Bool _bSetAsActiveConnection) const SAL_THROW ( (SQLException, WrappedTargetException, RuntimeException) ) { return ::dbtools::connectRowset( _rxRowSet, _rxContext, _bSetAsActiveConnection); } - // ------------------------------------------------ + Reference< XConnection> ODataAccessStaticTools::getRowSetConnection( const Reference< XRowSet>& _rxRowSet) const SAL_THROW ( (RuntimeException) ) @@ -104,75 +104,75 @@ namespace connectivity return ::dbtools::getConnection(_rxRowSet); } - //---------------------------------------------------------------- + Reference< XNumberFormatsSupplier> ODataAccessStaticTools::getNumberFormats(const Reference< XConnection>& _rxConn, sal_Bool _bAllowDefault) const { return ::dbtools::getNumberFormats(_rxConn, _bAllowDefault); } - //---------------------------------------------------------------- + sal_Int32 ODataAccessStaticTools::getDefaultNumberFormat( const Reference< XPropertySet >& _rxColumn, const Reference< XNumberFormatTypes >& _rxTypes, const Locale& _rLocale ) const { return ::dbtools::getDefaultNumberFormat( _rxColumn, _rxTypes, _rLocale ); } - //---------------------------------------------------------------- + void ODataAccessStaticTools::TransferFormComponentProperties(const Reference< XPropertySet>& _rxOld, const Reference< XPropertySet>& _rxNew, const Locale& _rLocale) const { ::dbtools::TransferFormComponentProperties(_rxOld, _rxNew, _rLocale); } - //---------------------------------------------------------------- + OUString ODataAccessStaticTools::quoteName(const OUString& _rQuote, const OUString& _rName) const { return ::dbtools::quoteName(_rQuote, _rName); } - //---------------------------------------------------------------- + OUString ODataAccessStaticTools::composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName ) const { return ::dbtools::composeTableNameForSelect( _rxConnection, _rCatalog, _rSchema, _rName ); } - //---------------------------------------------------------------- + OUString ODataAccessStaticTools::composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const Reference< XPropertySet>& _xTable ) const { return ::dbtools::composeTableNameForSelect( _rxConnection, _xTable ); } - //---------------------------------------------------------------- + SQLContext ODataAccessStaticTools::prependContextInfo(SQLException& _rException, const Reference< XInterface >& _rxContext, const OUString& _rContextDescription, const OUString& _rContextDetails) const { return ::dbtools::prependContextInfo(_rException, _rxContext, _rContextDescription, _rContextDetails); } - //---------------------------------------------------------------- + Reference< XDataSource > ODataAccessStaticTools::getDataSource( const OUString& _rsRegisteredName, const Reference< XComponentContext>& _rxContext ) const { return ::dbtools::getDataSource( _rsRegisteredName, _rxContext ); } - //---------------------------------------------------------------- + sal_Bool ODataAccessStaticTools::canInsert(const Reference< XPropertySet>& _rxCursorSet) const { return ::dbtools::canInsert( _rxCursorSet ); } - //---------------------------------------------------------------- + sal_Bool ODataAccessStaticTools::canUpdate(const Reference< XPropertySet>& _rxCursorSet) const { return ::dbtools::canUpdate( _rxCursorSet ); } - //---------------------------------------------------------------- + sal_Bool ODataAccessStaticTools::canDelete(const Reference< XPropertySet>& _rxCursorSet) const { return ::dbtools::canDelete( _rxCursorSet ); } - //---------------------------------------------------------------- + Reference< XNameAccess > ODataAccessStaticTools::getFieldsByCommandDescriptor( const Reference< XConnection >& _rxConnection, const sal_Int32 _nCommandType, const OUString& _rCommand, Reference< XComponent >& _rxKeepFieldsAlive, ::dbtools::SQLExceptionInfo* _pErrorInfo ) SAL_THROW( ( ) ) @@ -181,7 +181,7 @@ namespace connectivity _rxKeepFieldsAlive, _pErrorInfo ); } - //---------------------------------------------------------------- + Sequence< OUString > ODataAccessStaticTools::getFieldNamesByCommandDescriptor( const Reference< XConnection >& _rxConnection, const sal_Int32 _nCommandType, const OUString& _rCommand, ::dbtools::SQLExceptionInfo* _pErrorInfo ) SAL_THROW( ( ) ) @@ -190,7 +190,7 @@ namespace connectivity _rCommand, _pErrorInfo ); } - // ------------------------------------------------ + bool ODataAccessStaticTools::isEmbeddedInDatabase( const Reference< XInterface >& _rxComponent, Reference< XConnection >& _rxActualConnection ) { return ::dbtools::isEmbeddedInDatabase( _rxComponent, _rxActualConnection ); |