Tag: cws_src680_hsqlcsv User: fs Date: 2008-01-17 02:37:10+0000 Modified: dba/dbaccess/source/ui/dlg/generalpage.cxx
Log: RESYNC: (1.49-1.53); FILE MERGED File Changes: Directory: /dba/dbaccess/source/ui/dlg/ ======================================= File [changed]: generalpage.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/generalpage.cxx?r1=1.49.16.1&r2=1.49.16.2 Delta lines: +31 -52 --------------------- --- generalpage.cxx 2006-10-19 10:17:15+0000 1.49.16.1 +++ generalpage.cxx 2008-01-17 02:37:07+0000 1.49.16.2 @@ -42,9 +42,6 @@ #ifndef _DBHELPER_DBEXCEPTION_HXX_ #include <connectivity/dbexception.hxx> #endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" -#endif #ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" #endif @@ -109,23 +106,23 @@ //------------------------------------------------------------------------- OGeneralPage::OGeneralPage(Window* pParent, const SfxItemSet& _rItems, sal_Bool _bDBWizardMode) :OGenericAdministrationPage(pParent, ModuleRes(PAGE_GENERAL), _rItems) - ,m_aFTHeaderText (this, ResId(FT_GENERALHEADERTEXT)) - ,m_aFTHelpText (this, ResId(FT_GENERALHELPTEXT)) - ,m_aFT_DatasourceTypeHeader (this, ResId(FT_DATASOURCEHEADER)) - ,m_aRB_CreateDatabase (this, ResId(RB_CREATEDBDATABASE)) - ,m_aRB_OpenDocument (this, ResId(RB_OPENEXISTINGDOC)) - ,m_aRB_GetExistingDatabase (this, ResId(RB_GETEXISTINGDATABASE)) - ,m_aFT_DocListLabel (this, ResId(FT_DOCLISTLABEL)) - ,m_pLB_DocumentList ( new OpenDocumentListBox( this, "com.sun.star.sdb.OfficeDatabaseDocument", ResId( LB_DOCUMENTLIST ) ) ) - ,m_aPB_OpenDocument (this, "com.sun.star.sdb.OfficeDatabaseDocument", ResId(PB_OPENDOCUMENT)) - ,m_aTypePreLabel (this, ResId(FT_DATASOURCETYPE_PRE)) - ,m_aDatasourceTypeLabel (this, ResId(FT_DATATYPE)) - ,m_pDatasourceType ( new ListBox(this, ResId(LB_DATATYPE))) - ,m_aFTDataSourceAppendix (this, ResId(FT_DATATYPEAPPENDIX)) - ,m_aTypePostLabel (this, ResId(FT_DATASOURCETYPE_POST)) - ,m_aSpecialMessage (this, ResId(FT_SPECIAL_MESSAGE)) + ,m_aFTHeaderText (this, ModuleRes(FT_GENERALHEADERTEXT)) + ,m_aFTHelpText (this, ModuleRes(FT_GENERALHELPTEXT)) + ,m_aFT_DatasourceTypeHeader (this, ModuleRes(FT_DATASOURCEHEADER)) + ,m_aRB_CreateDatabase (this, ModuleRes(RB_CREATEDBDATABASE)) + ,m_aRB_OpenDocument (this, ModuleRes(RB_OPENEXISTINGDOC)) + ,m_aRB_GetExistingDatabase (this, ModuleRes(RB_GETEXISTINGDATABASE)) + ,m_aFT_DocListLabel (this, ModuleRes(FT_DOCLISTLABEL)) + ,m_pLB_DocumentList ( new OpenDocumentListBox( this, "com.sun.star.sdb.OfficeDatabaseDocument", ModuleRes( LB_DOCUMENTLIST ) ) ) + ,m_aPB_OpenDocument (this, "com.sun.star.sdb.OfficeDatabaseDocument", ModuleRes(PB_OPENDOCUMENT)) + ,m_aTypePreLabel (this, ModuleRes(FT_DATASOURCETYPE_PRE)) + ,m_aDatasourceTypeLabel (this, ModuleRes(FT_DATATYPE)) + ,m_pDatasourceType ( new ListBox(this, ModuleRes(LB_DATATYPE))) + ,m_aFTDataSourceAppendix (this, ModuleRes(FT_DATATYPEAPPENDIX)) + ,m_aTypePostLabel (this, ModuleRes(FT_DATASOURCETYPE_POST)) + ,m_aSpecialMessage (this, ModuleRes(FT_SPECIAL_MESSAGE)) ,m_DBWizardMode (_bDBWizardMode) - ,m_sMySQLEntry (ResId(STR_MYSQLENTRY)) + ,m_sMySQLEntry (ModuleRes(STR_MYSQLENTRY)) ,m_eOriginalCreationMode (eCreateNew) ,m_pCollection (NULL) ,m_eCurrentSelection (DST_UNKNOWN) @@ -245,20 +242,6 @@ //------------------------------------------------------------------------- - void OGeneralPage::initializeHistory() - { - m_aSelectionHistory.clear(); - if (m_pCollection) - { - for ( ODsnTypeCollection::TypeIterator aTypeLoop = m_pCollection->begin(); - aTypeLoop != m_pCollection->end(); - ++aTypeLoop - ) - m_aSelectionHistory[aTypeLoop.getType()] = m_pCollection->getDatasourcePrefix(aTypeLoop.getType()); - } - - } - //------------------------------------------------------------------------- void OGeneralPage::setParentTitle(DATASOURCE_TYPE _eSelectedType) { if (!m_DBWizardMode) @@ -267,7 +250,7 @@ if ( m_pAdminDialog ) { LocalResourceAccess aStringResAccess( PAGE_GENERAL, RSC_TABPAGE ); - String sMessage = String(ResId(STR_PARENTTITLE)); + String sMessage = String(ModuleRes(STR_PARENTTITLE)); sMessage.SearchAndReplaceAscii("#",sName); m_pAdminDialog->setTitle(sMessage); } @@ -313,7 +296,7 @@ if ( nResId ) { LocalResourceAccess aStringResAccess( PAGE_GENERAL, RSC_TABPAGE ); - sMessage = String(ResId(nResId)); + sMessage = String(ModuleRes(nResId)); } m_aSpecialMessage.SetText(sMessage); @@ -336,7 +319,6 @@ //------------------------------------------------------------------------- void OGeneralPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { - initializeHistory(); initializeTypeList(); // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -352,21 +334,20 @@ m_pDatasourceType->SetPosPixel( MovePoint( m_aRB_GetExistingDatabase.GetPosPixel(), INDENT_BELOW_RADIO, 14 ) ); - m_aControlDepdencies.clear(); - bool bDisableAll = !bValid || bReadonly; - if ( bDisableAll ) - { - m_aDatasourceTypeLabel.Disable(); - m_pDatasourceType->Disable(); - m_aFTDataSourceAppendix.Disable(); - m_aPB_OpenDocument.Disable(); - m_aFT_DocListLabel.Disable(); - m_pLB_DocumentList->Disable(); + m_aControlDependencies.clear(); + if ( !bValid || bReadonly ) + { + m_aDatasourceTypeLabel.Enable( false ); + m_pDatasourceType->Enable( false ); + m_aFTDataSourceAppendix.Enable( false ); + m_aPB_OpenDocument.Enable( false ); + m_aFT_DocListLabel.Enable( false ); + m_pLB_DocumentList->Enable( false ); } else { - m_aControlDepdencies.enableOnRadioCheck( m_aRB_GetExistingDatabase, m_aDatasourceTypeLabel, *m_pDatasourceType, m_aFTDataSourceAppendix ); - m_aControlDepdencies.enableOnRadioCheck( m_aRB_OpenDocument, m_aPB_OpenDocument, m_aFT_DocListLabel, *m_pLB_DocumentList ); + m_aControlDependencies.enableOnRadioCheck( m_aRB_GetExistingDatabase, m_aDatasourceTypeLabel, *m_pDatasourceType, m_aFTDataSourceAppendix ); + m_aControlDependencies.enableOnRadioCheck( m_aRB_OpenDocument, m_aPB_OpenDocument, m_aFT_DocListLabel, *m_pLB_DocumentList ); } m_pLB_DocumentList->SetDropDownLineCount( 20 ); @@ -506,8 +487,6 @@ return; m_eCurrentSelection = _eType; - ::std::vector< sal_Int32> aDetailIds; - ODriversSettings::fillDetailIds(m_eCurrentSelection,aDetailIds); } //------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
