Tag: cws_src680_dba24b User: fs Date: 2007-08-28 13:26:35+0000 Modified: dba/dbaccess/source/ui/dlg/ConnectionPage.cxx
Log: 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.19&r2=1.19.26.1 Delta lines: +15 -10 --------------------- --- ConnectionPage.cxx 2007-07-06 08:10:08+0000 1.19 +++ ConnectionPage.cxx 2007-08-28 13:26:32+0000 1.19.26.1 @@ -4,9 +4,9 @@ * * $RCSfile: ConnectionPage.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.19.26.1 $ * - * last change: $Author: rt $ $Date: 2007/07/06 08:10:08 $ + * last change: $Author: fs $ $Date: 2007/08/28 13:26:32 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -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))); @@ -319,12 +320,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]
