User: ihi Date: 2006/10/18 06:08:30 Modified: dba/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
Log: INTEGRATION: CWS dba205b (1.12.38); FILE MERGED 2006/08/09 19:52:36 fs 1.12.38.1: refactored the OColumnAlias class, in preparation of fixing #b6248060# File Changes: Directory: /dba/connectivity/source/drivers/mozab/ ================================================== File [changed]: MDatabaseMetaData.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx?r1=1.13&r2=1.14 Delta lines: +12 -6 -------------------- --- MDatabaseMetaData.cxx 17 Sep 2006 02:56:24 -0000 1.13 +++ MDatabaseMetaData.cxx 18 Oct 2006 13:08:28 -0000 1.14 @@ -115,7 +115,6 @@ ODatabaseMetaDataResultSet::ORow aRow(19); aRows.clear(); - const ::std::vector< ::rtl::OUString >& colNames = m_pConnection->getColumnAlias().getAlias(); ::osl::MutexGuard aGuard( m_aMutex ); ::std::vector< ::rtl::OUString > tables; @@ -159,6 +158,8 @@ // IS_NULLABLE aRow[18] = new ORowSetValueDecorator(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("YES"))); + const OColumnAlias& colNames = m_pConnection->getColumnAlias(); + // Iterate over all tables for(size_t j = 0; j < tables.size(); j++ ) { if(match(tableNamePattern, tables[j],'\0')) { @@ -168,13 +169,18 @@ OSL_TRACE( "\t\tTableName = %s;\n",OUtoCStr( tables[j] )); // Iterate over all collumns in the table. - for ( size_t i = 0; i < colNames.size(); i++ ) { - if(match(columnNamePattern, colNames[i],'\0')) { - OSL_TRACE( "\t\t\tColumnName = %s;\n",OUtoCStr( colNames[i] )); + for ( OColumnAlias::AliasMap::const_iterator compare = colNames.begin(); + compare != colNames.end(); + ++compare + ) + { + if ( match( columnNamePattern, compare->first, '\0' ) ) + { + OSL_TRACE( "\t\t\tColumnName = %s;\n", OUtoCStr( compare->first ) ); // COLUMN_NAME - aRow[4] = new ORowSetValueDecorator( colNames[i] ); + aRow[4] = new ORowSetValueDecorator( compare->first ); // ORDINAL_POSITION - aRow[17] = new ORowSetValueDecorator(sal_Int32(i+1)); + aRow[17] = new ORowSetValueDecorator( static_cast< sal_Int32 >( compare->second.eProgrammaticNameIndex ) + 1 ); aRows.push_back(aRow); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
