Tag: cws_src680_dba24d
User: fs      
Date: 2007-12-05 14:37:06+0000
Modified:
   dba/dbaccess/source/ui/misc/WCopyTable.cxx

Log:
 #i81658# m_aColumnInfo should not be sorted by name

File Changes:

Directory: /dba/dbaccess/source/ui/misc/
========================================

File [changed]: WCopyTable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/WCopyTable.cxx?r1=1.53.28.9&r2=1.53.28.10
Delta lines:  +15 -13
---------------------
--- WCopyTable.cxx      2007-12-05 13:42:17+0000        1.53.28.9
+++ WCopyTable.cxx      2007-12-05 14:37:03+0000        1.53.28.10
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCopyTable.cxx,v $
  *
- *  $Revision: 1.53.28.9 $
+ *  $Revision: 1.53.28.10 $
  *
- *  last change: $Author: fs $ $Date: 2007/12/05 13:42:17 $
+ *  last change: $Author: fs $ $Date: 2007/12/05 14:37:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -372,7 +372,7 @@
         aDesc.SetCurrency(      xStatementMeta->isCurrency(         i ) );
         aDesc.SetAutoIncrement( xStatementMeta->isAutoIncrement(    i ) );
 
-        m_aColumnInfo[ aDesc.GetName() ] = aDesc;
+        m_aColumnInfo.push_back( aDesc );
     }
 }
 
@@ -388,12 +388,11 @@
 Sequence< ::rtl::OUString > NamedTableCopySource::getColumnNames() const
 {
     Sequence< ::rtl::OUString > aNames( m_aColumnInfo.size() );
-    ::std::transform(
-        m_aColumnInfo.begin(),
-        m_aColumnInfo.end(),
-        aNames.getArray(),
-        ::std::select1st< ::std::map< ::rtl::OUString, OFieldDescription 
>::value_type >()
-    );
+    for (   ::std::vector< OFieldDescription >::const_iterator col = 
m_aColumnInfo.begin();
+            col != m_aColumnInfo.end();
+            ++col
+        )
+        aNames[ col - m_aColumnInfo.begin() ] = col->GetName();
 
     return aNames;
 }
@@ -425,11 +424,14 @@
 //------------------------------------------------------------------------
 OFieldDescription* NamedTableCopySource::createFieldDescription( const 
::rtl::OUString& _rColumnName ) const
 {
-    ::std::map< ::rtl::OUString, OFieldDescription >::const_iterator pos = 
m_aColumnInfo.find( _rColumnName );
-    if ( pos == m_aColumnInfo.end() )
-        return NULL;
+    for (   ::std::vector< OFieldDescription >::const_iterator col = 
m_aColumnInfo.begin();
+            col != m_aColumnInfo.end();
+            ++col
+        )
+        if ( col->GetName() == _rColumnName )
+            return new OFieldDescription( *col );
 
-    return new OFieldDescription( pos->second );
+    return NULL;
 }
 //------------------------------------------------------------------------
 ::rtl::OUString NamedTableCopySource::getSelectStatement() const




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to