diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2011-08-05 15:58:37 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2011-11-17 21:15:20 +0100 |
commit | 7d3a6de0ed12c3b0165a49131a307594e8c22d8e (patch) | |
tree | a23d5875d5d18ae92a774724fb107b00de79ca8a /connectivity | |
parent | c4fc6b22b3af76eb1ae1df8f2e739df46cc3e1a0 (diff) |
Janitorial clean-up
- fix a bunch of compiler warnings
- Copyright statement on files I modified
Diffstat (limited to 'connectivity')
25 files changed, 109 insertions, 57 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_array.cxx b/connectivity/source/drivers/postgresql/pq_array.cxx index b798d4016617..3e7d61fadca7 100644 --- a/connectivity/source/drivers/postgresql/pq_array.cxx +++ b/connectivity/source/drivers/postgresql/pq_array.cxx @@ -1,3 +1,5 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + #include <rtl/ustrbuf.hxx> #include <com/sun/star/sdbc/XArray.hpp> diff --git a/connectivity/source/drivers/postgresql/pq_array.hxx b/connectivity/source/drivers/postgresql/pq_array.hxx index d008ac29e4e8..b5d4b0467e7a 100644 --- a/connectivity/source/drivers/postgresql/pq_array.hxx +++ b/connectivity/source/drivers/postgresql/pq_array.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_array.hxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * @@ -82,10 +84,10 @@ public: const com::sun::star::uno::Sequence< com::sun::star::uno::Any > & data, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > & owner, const com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > &tc) : - m_refMutex( mutex ), m_data( data ), m_owner( owner ), - m_tc( tc ) + m_tc( tc ), + m_refMutex( mutex ) {} public: // XArray diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx index aca40d7655a8..20d3c655a49f 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_baseresultset.cxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * @@ -161,12 +163,12 @@ BaseResultSet::BaseResultSet( const Reference< com::sun::star::script::XTypeConverter > & tc ) : OComponentHelper( refMutex->mutex ), OPropertySetHelper( OComponentHelper::rBHelper ), - m_refMutex( refMutex ), m_owner( owner ), + m_tc( tc ), + m_refMutex( refMutex ), m_row( -1 ), m_rowCount( rowCount ), - m_fieldCount( colCount ), - m_tc( tc ) + m_fieldCount( colCount ) { POSTGRE_TRACE( "ctor BaseResultSet" ); } @@ -431,8 +433,6 @@ sal_Bool BaseResultSet::getBoolean( sal_Int32 columnIndex ) throw (SQLException, checkColumnIndex( columnIndex ); checkRowIndex( sal_True /* must be on row */ ); - sal_Bool b = sal_False; - OUString str = getString( columnIndex ); if( str.getLength() > 0 ) @@ -579,6 +579,7 @@ Sequence< sal_Int8 > BaseResultSet::getBytes( sal_Int32 columnIndex ) return string2DateTime( getString( columnIndex ) ); } + // LEM TODO: these look like they are missing an actual implementation Reference< ::com::sun::star::io::XInputStream > BaseResultSet::getBinaryStream( sal_Int32 columnIndex ) throw (SQLException, RuntimeException) { diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.hxx b/connectivity/source/drivers/postgresql/pq_baseresultset.hxx index d3a4f8b90ef3..b04f7a438450 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_baseresultset.hxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * @@ -250,7 +252,15 @@ public: // OPropertySetHelper const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); - virtual void SAL_CALL getFastPropertyValue( + ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException) + { + return ::cppu::OPropertySetHelper::getFastPropertyValue(nHandle); + } + + void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const; diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index f5455f06fb7e..00e212a4a110 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -162,7 +162,7 @@ public: } }; -OUString ConnectionGetImplementationName() +OUString ConnectionGetImplementationName() { return OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.connectivity.pq.Connection" ) ); } @@ -462,8 +462,7 @@ static OString properties2String( const OString initialString, if( initialString.getLength() ) ret.append( " " ); - bool initial = false; - for( int i = 0; i < args.getLength() ; i ++) + for( int i = 0; i < args.getLength() ; ++i ) { bool append = true; if( args[i].Name.matchIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "password" ) ) ) @@ -498,6 +497,7 @@ static OString properties2String( const OString initialString, { append = false; // ignore for now + OSL_TRACE("sdbc-postgresql: unknown argument '%s'", ::rtl::OUStringToOString( args[i].Name, RTL_TEXTENCODING_UTF8 ).getStr() ); } if( append ) { diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index 032b84a1fdb6..0f61e511cfa8 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_databasemetadata.cxx,v $ @@ -151,12 +152,10 @@ DatabaseMetaData::DatabaseMetaData( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings ) - : m_pSettings( pSettings ), - m_origin( origin ), - m_refMutex( refMutex ) - + : m_refMutex( refMutex ), + m_pSettings( pSettings ), + m_origin( origin ) { - } sal_Bool DatabaseMetaData::allProceduresAreCallable( ) throw (SQLException, RuntimeException) diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx index b5dea7d6b052..c0862b13423b 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_databasemetadata.hxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 5fadf16c093a..1c09141fda8a 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -196,10 +196,10 @@ PreparedStatement::PreparedStatement( const ::rtl::OString & stmt ) : OComponentHelper( refMutex->mutex ), OPropertySetHelper( OComponentHelper::rBHelper ), - m_refMutex( refMutex ), m_connection( conn ), m_pSettings( pSettings ), m_stmt( stmt ), + m_refMutex( refMutex ), m_lastOidInserted( InvalidOid ) { m_props[PREPARED_STATEMENT_QUERY_TIME_OUT] = makeAny( (sal_Int32)0 ); @@ -396,8 +396,8 @@ sal_Bool PreparedStatement::execute( ) OStringBuffer buf( m_stmt.getLength() *2 ); - int vars = 0; - for( int i = 0 ; i < m_splittedStatement.size() ; i ++ ) + OStringVector::size_type vars = 0; + for( OStringVector::size_type i = 0 ; i < m_splittedStatement.size() ; ++i ) { const OString &str = m_splittedStatement[i]; // printf( "Splitted %d %s\n" , i , str.getStr() ); diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx index 55f2a6f32ce7..41b8716d35cb 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx @@ -243,7 +243,15 @@ public: // OPropertySetHelper const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); - virtual void SAL_CALL getFastPropertyValue( + ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException) + { + return ::cppu::OPropertySetHelper::getFastPropertyValue(nHandle); + } + + void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const; diff --git a/connectivity/source/drivers/postgresql/pq_resultset.cxx b/connectivity/source/drivers/postgresql/pq_resultset.cxx index 07db70114926..d4ea38f51d8a 100644 --- a/connectivity/source/drivers/postgresql/pq_resultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultset.cxx @@ -49,10 +49,10 @@ ResultSet::ResultSet( const ::rtl::Reference< RefCountedMutex > & refMutex, : BaseResultSet( refMutex, owner, PQntuples( result ), PQnfields( result ),(*ppSettings)->tc ), - m_ppSettings( ppSettings ), m_result( result ), m_schema( schema ), - m_table( table ) + m_table( table ), + m_ppSettings( ppSettings ) { sal_Bool b = sal_True; // m_props[RESULTSET_IS_BOOKMARKABLE] = Any( &b, getBooleanCppuType() ); @@ -176,7 +176,6 @@ static bool isInteger( const char * data, sal_Int32 len ) static bool isDate( const char * data, sal_Int32 len ) { - bool ret = false; return 10 == len && '-' == data[4] && '-' == data[7] && @@ -187,7 +186,6 @@ static bool isDate( const char * data, sal_Int32 len ) static bool isTime( const char * data, sal_Int32 len ) { - bool ret = false; return 8 == len && ':' == data[2] && ':' == data[5] && diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx index 1c7b76844f40..3de685dec98c 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_resultsetmetadata.cxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * @@ -154,15 +156,15 @@ ResultSetMetaData::ResultSetMetaData( const rtl::OUString &schemaName, const rtl::OUString &tableName ) : m_refMutex( refMutex ), - m_origin( origin ), m_ppSettings( ppSettings ), - m_colCount( PQnfields( pResult ) ), + m_origin( origin ), m_tableName( tableName ), m_schemaName( schemaName ), + m_colDesc( PQnfields( pResult ) ), + m_pResultSet( pResultSet ), m_checkedForTable( false ), m_checkedForTypes( false ), - m_colDesc( PQnfields( pResult ) ), - m_pResultSet( pResultSet ) + m_colCount( PQnfields( pResult ) ) { // extract all needed information from the result object, so that we don't @@ -219,7 +221,7 @@ void ResultSetMetaData::checkForTypes() sal_Int32 type = typeNameToDataType( typeName, typType ); - for( int j = 0; j < m_colCount ; j ++ ) + for( sal_Int32 j = 0; j < m_colCount ; j ++ ) { if( m_colDesc[j].typeOid == oid ) { diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx index 1c2eb431fa33..156d53dbb873 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_resultsetmetadata.hxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx index d94a3be4e1cd..6775f4aa6bf9 100644 --- a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx @@ -18,8 +18,8 @@ SequenceResultSetMetaData::SequenceResultSetMetaData( const ColumnMetaDataVector &metaDataVector, int colCount ) : m_refMutex( refMutex ), - m_colCount( colCount ), - m_columnData( metaDataVector ) + m_columnData( metaDataVector ), + m_colCount( colCount ) { } diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 1d2bb896d00d..881c038bfad6 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -52,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * @@ -190,9 +191,9 @@ Statement::Statement( const ::rtl::Reference< RefCountedMutex > & refMutex, struct ConnectionSettings *pSettings ) : OComponentHelper( refMutex->mutex ), OPropertySetHelper( OComponentHelper::rBHelper ), - m_refMutex( refMutex ), m_connection( conn ), m_pSettings( pSettings ), + m_refMutex( refMutex ), m_lastOidInserted( InvalidOid ) { m_props[STATEMENT_QUERY_TIME_OUT] = makeAny( (sal_Int32)0 ); @@ -746,6 +747,8 @@ static void getAutoValues( "WHERE pg_attribute.attrelid = pg_class.oid AND " "pg_class.relnamespace = pg_namespace.oid AND " "pg_namespace.nspname = ? AND " + // LEM TODO: this is weird; why "LIKE" and not "="? + // Most probably gives problems if tableName contains '%' "pg_class.relname LIKE ? AND " "pg_attrdef.adsrc != ''" ) ); @@ -807,7 +810,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert( // buf.append( "," ); // } // buf.append( "]\n" ); -// printf( buf.makeStringAndClear() ); +// printf( "%s", buf.makeStringAndClear() ); // TODO: make also unqualified tables names work here. Have a look at 2.8.3. The Schema Search Path // in postgresql doc @@ -844,29 +847,29 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert( getAutoValues( autoValues, connection, schemaName, tableName ); } // this could mean, that the column is a default or auto value, check this ... - String2StringMap::iterator ii = autoValues.begin(); - for( ; ii != autoValues.end() ; ++ii ) + String2StringMap::iterator j = autoValues.begin(); + for( ; j != autoValues.end() ; ++j ) { - if( columnName.equalsIgnoreAsciiCase( ii->first ) ) + if( columnName.equalsIgnoreAsciiCase( j->first ) ) { // it is indeed an auto value. - value = OStringToOUString(ii->second, RTL_TEXTENCODING_ASCII_US ); + value = OStringToOUString(j->second, RTL_TEXTENCODING_ASCII_US ); // check, whether it is a sequence if( rtl_str_shortenedCompare_WithLength( - ii->second.getStr(), ii->second.getLength(), + j->second.getStr(), j->second.getLength(), RTL_CONSTASCII_STRINGPARAM( "nextval(" ), 8 ) == 0 ) { // retrieve current sequence value: OUStringBuffer myBuf(128 ); myBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SELECT currval(" ) ); - myBuf.appendAscii( &(ii->second.getStr()[8])); + myBuf.appendAscii( &(j->second.getStr()[8])); value = querySingleValue( connection, myBuf.makeStringAndClear() ); } break; } } - if( ii == autoValues.end() ) + if( j == autoValues.end() ) { // it even was no autovalue, no sense to continue as we can't query the // inserted row diff --git a/connectivity/source/drivers/postgresql/pq_statement.hxx b/connectivity/source/drivers/postgresql/pq_statement.hxx index ba64ac5c4310..10d63b24340a 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.hxx +++ b/connectivity/source/drivers/postgresql/pq_statement.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_statement.hxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * @@ -165,7 +167,15 @@ public: // OPropertySetHelper const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); - virtual void SAL_CALL getFastPropertyValue( + ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException) + { + return ::cppu::OPropertySetHelper::getFastPropertyValue(nHandle); + } + + void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const; diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index eeeb779b6da3..faabf3518445 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -1,3 +1,5 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> @@ -1110,7 +1112,7 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const rtl::OString { n +=2; // printf( "3\n" ); - for ( int i = 0 ; i < names.size() && nSize > n ; i ++ ) + for ( OStringVector::size_type i = 0 ; i < names.size() && nSize > n ; i ++ ) { map[names[i]] = vec[n]; if( nSize > n+1 && equalsIgnoreCase( vec[n+1] , RTL_CONSTASCII_STRINGPARAM(",") ) ) diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx index e532d8fcefc3..bc48e1e21bd6 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx @@ -206,9 +206,8 @@ void UpdateableResultSet::insertRow( ) throw (SQLException, RuntimeException) bufferQuoteQualifiedIdentifier( buf, m_schema, m_table ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ( " ) ); - int i; int columns = 0; - for( i = 0 ; i < m_updateableField.size() ; i++ ) + for( UpdateableFieldVector::size_type i = 0 ; i < m_updateableField.size() ; i++ ) { if( m_updateableField[i].isTouched ) { @@ -221,7 +220,7 @@ void UpdateableResultSet::insertRow( ) throw (SQLException, RuntimeException) buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ) VALUES ( " ) ); columns = 0; - for( i = 0 ; i < m_updateableField.size() ; i ++ ) + for( UpdateableFieldVector::size_type i = 0 ; i < m_updateableField.size() ; i ++ ) { if( m_updateableField[i].isTouched ) { @@ -256,7 +255,7 @@ void UpdateableResultSet::insertRow( ) throw (SQLException, RuntimeException) { Reference< XColumnLocate > columnLocate( rs, UNO_QUERY ); Reference< XRow> xRow ( rs, UNO_QUERY ); - for( i = 0 ; i < m_fieldCount ; i++ ) + for( int i = 0 ; i < m_fieldCount ; i++ ) { int field = columnLocate->findColumn( m_columnNames[i] ); if( field >= 1 ) @@ -301,8 +300,8 @@ void UpdateableResultSet::updateRow( ) throw (SQLException, RuntimeException) bufferQuoteQualifiedIdentifier( buf, m_schema, m_table ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SET " ) ); - int columns = 0,i; - for( i = 0; i < m_updateableField.size() ; i ++ ) + int columns = 0; + for( UpdateableFieldVector::size_type i = 0; i < m_updateableField.size() ; i ++ ) { if( m_updateableField[i].isTouched ) { @@ -326,7 +325,7 @@ void UpdateableResultSet::updateRow( ) throw (SQLException, RuntimeException) stmt->executeUpdate( buf.makeStringAndClear() ); // reflect the changes ! - for( i = 0 ; i < m_fieldCount ; i ++ ) + for( int i = 0 ; i < m_fieldCount ; i ++ ) { if( m_updateableField[i].isTouched ) m_data[m_row][i] = m_updateableField[i].value; diff --git a/connectivity/source/drivers/postgresql/pq_xbase.cxx b/connectivity/source/drivers/postgresql/pq_xbase.cxx index f1fbf4657413..713d15fe4ad7 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.cxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_xbase.cxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * diff --git a/connectivity/source/drivers/postgresql/pq_xbase.hxx b/connectivity/source/drivers/postgresql/pq_xbase.hxx index f05c352329ce..300de65a1d3b 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.hxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.hxx @@ -125,7 +125,15 @@ public: // OPropertySetHelper const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); - virtual void SAL_CALL getFastPropertyValue( + ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException) + { + return ::cppu::OPropertySetHelper::getFastPropertyValue(nHandle); + } + + void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const; diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index 4218cf5568ca..82db7a0f4c31 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_xindexcolumns.cxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * @@ -119,8 +121,8 @@ IndexColumns::IndexColumns( : Container( refMutex, origin, pSettings, ASCII_STR( "INDEX_COLUMN" ) ), m_schemaName( schemaName ), m_tableName( tableName ), - m_columns( columns ), - m_indexName( indexName ) + m_indexName( indexName ), + m_columns( columns ) {} IndexColumns::~IndexColumns() diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx index b4bec816bb11..8d15cff75e7c 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_xindexcolumns.hxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx index 1e83640eafc0..a7ee62cab6d0 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx @@ -61,7 +61,6 @@ ************************************************************************/ #include <vector> -#include <hash_map> #include <rtl/ustrbuf.hxx> #include <rtl/strbuf.hxx> diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx index d84a76cbb5dc..0fa8f166a743 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx @@ -62,7 +62,6 @@ ************************************************************************/ #include <vector> -#include <hash_map> #include <rtl/ustrbuf.hxx> #include <rtl/strbuf.hxx> diff --git a/connectivity/source/drivers/postgresql/pq_xtables.cxx b/connectivity/source/drivers/postgresql/pq_xtables.cxx index 90a57867b85a..d487b89085ba 100644 --- a/connectivity/source/drivers/postgresql/pq_xtables.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtables.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_xtables.cxx,v $ @@ -267,7 +268,6 @@ static void appendKeyList( Reference< XEnumerationAccess > keys( keySupplier->getKeys(), UNO_QUERY ); if(keys.is() ) { - Statics &st = getStatics(); Reference< XEnumeration > xEnum = keys->createEnumeration(); while( xEnum.is() && xEnum->hasMoreElements() ) { diff --git a/connectivity/source/drivers/postgresql/pq_xusers.cxx b/connectivity/source/drivers/postgresql/pq_xusers.cxx index 85da3e746449..31078a7ec47b 100644 --- a/connectivity/source/drivers/postgresql/pq_xusers.cxx +++ b/connectivity/source/drivers/postgresql/pq_xusers.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * $RCSfile: pq_xusers.cxx,v $ @@ -51,6 +52,7 @@ * The Initial Developer of the Original Code is: Joerg Budischewski * * Copyright: 2000 by Sun Microsystems, Inc. + * 2011 Lionel Elie Mamane <lionel@mamane.lu> * * All Rights Reserved. * @@ -165,7 +167,6 @@ void Users::appendByDescriptor( ::com::sun::star::uno::RuntimeException) { osl::MutexGuard guard( m_refMutex->mutex ); - Statics &st = getStatics(); OUStringBuffer update( 128 ); update.appendAscii( RTL_CONSTASCII_STRINGPARAM( "CREATE USER " ) ); @@ -217,7 +218,6 @@ void Users::dropByIndex( sal_Int32 index ) Reference< XPropertySet > set; m_values[index] >>= set; - Statics &st = getStatics(); OUString name; set->getPropertyValue( getStatics().NAME ) >>= name; |