User: hr      
Date: 2007-11-01 15:05:21+0000
Modified:
   dba/dbaccess/source/ui/dlg/ConnectionPage.cxx

Log:
 INTEGRATION: CWS dba24b (1.19.26); FILE MERGED
 2007/09/28 11:54:44 oj 1.19.26.2: RESYNC: (1.19-1.20); FILE MERGED
 2007/08/28 13:26:32 fs 1.19.26.1: authentication information now available at 
the data source meta data

File Changes:

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

File [changed]: ConnectionPage.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/ConnectionPage.cxx?r1=1.20&r2=1.21
Delta lines:  +12 -7
--------------------
--- ConnectionPage.cxx  2007-09-13 17:58:18+0000        1.20
+++ ConnectionPage.cxx  2007-11-01 15:05:18+0000        1.21
@@ -45,6 +45,9 @@
 #ifndef _DBU_DLG_HRC_
 #include "dbu_dlg.hrc"
 #endif
+#ifndef DBACCESS_DSMETA_HXX
+#include "dsmeta.hxx"
+#endif
 #ifndef _SFXITEMSET_HXX 
 #include <svtools/itemset.hxx>
 #endif
@@ -244,7 +247,6 @@
         m_eType = m_pAdminDialog->getDatasourceType(_rSet);
         OConnectionHelper::implInitControls( _rSet, _bSaveValue);
 
-        sal_Bool bShowUser = sal_True;
                LocalResourceAccess aLocRes( PAGE_CONNECTION, RSC_TABPAGE );
                switch( m_eType )
                {
@@ -259,7 +261,6 @@
                        case DST_CALC:
                 
m_aFT_Connection.SetText(String(ModuleRes(STR_CALC_PATH_OR_FILE)));
                                
m_aET_Connection.SetHelpId(HID_DSADMIN_CALC_PATH);
-                bShowUser = sal_False;
                                break;
                        case DST_ADABAS:
                 
m_aFT_Connection.SetText(String(ModuleRes(STR_ADABAS_DATABASE_NAME)));
@@ -320,12 +321,16 @@
                                break;
                }
 
+        ;
+        AuthenticationMode eAuthMode( DataSourceMetaData::getAuthentication( 
m_eType ) );
+        bool bShowUserAuthenfication = ( eAuthMode != AuthNone );
+        bool bShowUser = ( eAuthMode == AuthUserPwd );
+
         m_aPB_Connection.SetHelpId(HID_DSADMIN_BROWSECONN);
-        BOOL bShowUserAuthenfication = 
m_pCollection->hasAuthentication(m_eType);
-               m_aFL2.Show(bShowUserAuthenfication);
-               m_aUserNameLabel.Show(bShowUser && bShowUserAuthenfication);
-               m_aUserName.Show(bShowUser && bShowUserAuthenfication);
-               m_aPasswordRequired.Show(bShowUserAuthenfication);
+               m_aFL2.Show( bShowUserAuthenfication );
+               m_aUserNameLabel.Show( bShowUser && bShowUserAuthenfication );
+               m_aUserName.Show( bShowUser && bShowUserAuthenfication );
+               m_aPasswordRequired.Show( bShowUserAuthenfication );
         if ( !bShowUser && bShowUserAuthenfication )
             m_aPasswordRequired.SetPosPixel(m_aUserNameLabel.GetPosPixel());
 




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

Reply via email to