Tag: cws_src680_dba201d
User: fs      
Date: 05/09/27 04:57:44

Modified:
 /dba/dbaccess/source/ui/dlg/
  dbadmin.src, generalpage.cxx
 /dba/dbaccess/source/ui/inc/
  dsntypes.hxx

Log:
 #i55125# don't sort the 'types' list box alphabetically, but have a fixed order

File Changes:

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

File [changed]: dbadmin.src
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/dbadmin.src?r1=1.147&r2=1.147.10.1
Delta lines:  +4 -4
-------------------
--- dbadmin.src 8 Sep 2005 14:54:42 -0000       1.147
+++ dbadmin.src 27 Sep 2005 11:57:36 -0000      1.147.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbadmin.src,v $
  *
- *  $Revision: 1.147 $
+ *  $Revision: 1.147.10.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 14:54:42 $
+ *  last change: $Author: fs $ $Date: 2005/09/27 11:57:36 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -578,7 +578,7 @@
                Border = TRUE ;
                TabStop = TRUE ;
                DropDown = TRUE ;
-               Sort = TRUE;
+               Sort = FALSE;
        };
 
        FixedText FT_DATATYPEAPPENDIX

File [changed]: generalpage.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/generalpage.cxx?r1=1.44&r2=1.44.8.1
Delta lines:  +34 -5
--------------------
--- generalpage.cxx     8 Sep 2005 15:04:29 -0000       1.44
+++ generalpage.cxx     27 Sep 2005 11:57:37 -0000      1.44.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: generalpage.cxx,v $
  *
- *  $Revision: 1.44 $
+ *  $Revision: 1.44.8.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 15:04:29 $
+ *  last change: $Author: fs $ $Date: 2005/09/27 11:57:37 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -162,6 +162,27 @@
     }
 
     //-------------------------------------------------------------------------
+    namespace
+    {
+        struct DisplayedType
+        {
+            DATASOURCE_TYPE eType;
+            String          sDisplayName;
+
+            DisplayedType( DATASOURCE_TYPE _eType, const String& _rDisplayName 
) : eType( _eType ), sDisplayName( _rDisplayName ) { }
+        };
+        typedef ::std::vector< DisplayedType > DisplayedTypes;
+
+        struct DisplayedTypeLess : ::std::binary_function< DisplayedType, 
DisplayedType, bool >
+        {
+            bool operator() ( const DisplayedType& _rLHS, const DisplayedType& 
_rRHS )
+            {
+                return _rLHS.eType < _rRHS.eType;
+            }
+        };
+    }
+
+    //-------------------------------------------------------------------------
        void OGeneralPage::initializeTypeList()
        {
         m_pDatasourceType->Clear();
@@ -186,6 +207,8 @@
 
                if ( m_pCollection )
                {
+            DisplayedTypes aDisplayedTypes;
+
                        for (   ODsnTypeCollection::TypeIterator aTypeLoop =  
m_pCollection->begin();
                                        aTypeLoop != m_pCollection->end();
                                        ++aTypeLoop
@@ -205,10 +228,16 @@
                                if ( m_pDatasourceType->GetEntryPos( 
sDisplayName ) == LISTBOX_ENTRY_NOTFOUND )
                                {
                                        sDisplayName = VerifyDisplayName(eType, 
sDisplayName);
-                                       if (sDisplayName.Len() > 0)
-                                               
insertDatasourceTypeEntryData(eType, sDisplayName);
+                                       if ( sDisplayName.Len() > 0 )
+                        aDisplayedTypes.push_back( DisplayedTypes::value_type( 
eType, sDisplayName ) );
                                }
                        }
+            ::std::sort( aDisplayedTypes.begin(), aDisplayedTypes.end(), 
DisplayedTypeLess() );
+            for (   DisplayedTypes::const_iterator loop = 
aDisplayedTypes.begin();
+                    loop != aDisplayedTypes.end();
+                    ++loop
+                )
+                insertDatasourceTypeEntryData( loop->eType, loop->sDisplayName 
);
                }
        }
 

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

File [changed]: dsntypes.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/dsntypes.hxx?r1=1.18&r2=1.18.8.1
Delta lines:  +21 -19
---------------------
--- dsntypes.hxx        8 Sep 2005 15:54:00 -0000       1.18
+++ dsntypes.hxx        27 Sep 2005 11:57:39 -0000      1.18.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dsntypes.hxx,v $
  *
- *  $Revision: 1.18 $
+ *  $Revision: 1.18.8.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 15:54:00 $
+ *  last change: $Author: fs $ $Date: 2005/09/27 11:57:39 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -57,24 +57,26 @@
 /// known datasource types
 enum DATASOURCE_TYPE
 {
-       DST_MYSQL_ODBC  =       1,      
-       DST_MYSQL_JDBC  =       2,      
-       DST_ADABAS              =       3,      
+       DST_MSACCESS    =       1,      
+    DST_MYSQL_ODBC     =       2,      
+       DST_MYSQL_JDBC  =       3,      
        DST_ORACLE_JDBC =       4,      
-       DST_JDBC                =       5,
-       DST_ODBC                =       6,      
+       DST_ADABAS              =       5,      
+       DST_CALC                =       6,      
        DST_DBASE               =       7,      
-       DST_MSACCESS    =       8,      
-       DST_ADO                 =       9,      
-       DST_FLAT                =       10,
-       DST_CALC                =       11,     
+       DST_FLAT                =       8,
+
+    DST_JDBC           =       9,
+       DST_ODBC                =       10,     
+       DST_ADO                 =       11,     
+
        DST_MOZILLA             =       12,     
-       DST_LDAP                =       13,     
-       DST_OUTLOOK             =       14,     
-       DST_OUTLOOKEXP  =       15,     
-       DST_EVOLUTION   =       16,
-       DST_EMBEDDED    =       17,
-       DST_THUNDERBIRD =       18,     
+       DST_THUNDERBIRD =       13,     
+       DST_LDAP                =       14,     
+       DST_OUTLOOK             =       15,     
+       DST_OUTLOOKEXP  =       16,     
+       DST_EVOLUTION   =       17,
+       DST_EMBEDDED    =       18,
 
        DST_USERDEFINE1,        /// first user defined driver
        DST_USERDEFINE2,




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

Reply via email to