Tag: cws_src680_oj14
User: oj      
Date: 2006/07/04 00:58:49

Modified:
   dba/dbaccess/source/ui/dlg/generalpage.cxx

Log:
 RESYNC: (1.46-1.48); 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.44.6.4&r2=1.44.6.5
Delta lines:  +30 -33
---------------------
--- generalpage.cxx     25 Apr 2006 13:02:59 -0000      1.44.6.4
+++ generalpage.cxx     4 Jul 2006 07:58:46 -0000       1.44.6.5
@@ -106,29 +106,30 @@
        
//-------------------------------------------------------------------------
        OGeneralPage::OGeneralPage(Window* pParent, const SfxItemSet& _rItems, 
sal_Bool _bDBWizardMode)
                :OGenericAdministrationPage(pParent, ModuleRes(PAGE_GENERAL), 
_rItems)
-               ,m_aTypePreLabel                        (this, 
ResId(FT_DATASOURCETYPE_PRE))
-               ,m_aTypePostLabel                       (this, 
ResId(FT_DATASOURCETYPE_POST))
-               ,m_aSpecialMessage                      (this, 
ResId(FT_SPECIAL_MESSAGE))
-               ,m_aDatasourceTypeLabel         (this, ResId(FT_DATATYPE))
-               ,m_pDatasourceType                      ( new ListBox(this, 
ResId(LB_DATATYPE)))
+        ,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_GetExistingDatabase      (this, ResId(RB_GETEXISTINGDATABASE))
         ,m_aRB_OpenDocument             (this, ResId(RB_OPENEXISTINGDOC))
-        ,m_aFTHeaderText                (this, ResId(FT_GENERALHEADERTEXT))
-        ,m_aFTHelpText                  (this, ResId(FT_GENERALHELPTEXT))
-        ,m_aFTDataSourceAppendix        (this, ResId(FT_DATATYPEAPPENDIX))
-        ,m_pLB_DocumentList             ( new OpenDocumentListBox( this, 
"com.sun.star.sdb.OfficeDatabaseDocument", ResId( LB_DOCUMENTLIST ) ) )
+        ,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_DBWizardMode                 (_bDBWizardMode)
                ,m_sMySQLEntry                                  
(ResId(STR_MYSQLENTRY))
+        ,m_eOriginalCreationMode        (eCreateNew)
                ,m_pCollection                  (NULL)
                ,m_eCurrentSelection            (DST_UNKNOWN)
                ,m_eNotSupportedKnownType       (DST_UNKNOWN)
+               ,m_eLastMessage                 (smNone)
                ,m_bDisplayingInvalid           (sal_False)
                ,m_bUserGrabFocus               (sal_True)
-               ,m_eLastMessage                 (smNone)
-        ,m_DBWizardMode                 (_bDBWizardMode)
        {
                // fill the listbox with the UI descriptions for the possible 
types
                // and remember the respective DSN prefixes
@@ -260,10 +261,9 @@
         if (!m_DBWizardMode)
         {
                    String sName = 
m_pCollection->getTypeDisplayName(_eSelectedType);
-                   Dialog* pDialog = reinterpret_cast<Dialog*>(m_pAdminDialog);
                    if ( m_pAdminDialog )
                    {
-                           OLocalResourceAccess aStringResAccess( 
PAGE_GENERAL, RSC_TABPAGE );
+                           LocalResourceAccess aStringResAccess( PAGE_GENERAL, 
RSC_TABPAGE );
                            String sMessage = String(ResId(STR_PARENTTITLE));
                            sMessage.SearchAndReplaceAscii("#",sName);
                            m_pAdminDialog->setTitle(sMessage);
@@ -292,7 +292,7 @@
        }
 
        
//-------------------------------------------------------------------------
-       void OGeneralPage::switchMessage(sal_Bool _bDeleted,const 
DATASOURCE_TYPE _eType)
+       void OGeneralPage::switchMessage(const DATASOURCE_TYPE _eType)
        {
                SPECIAL_MESSAGE eMessage = smNone;
                if ( _eType == m_eNotSupportedKnownType )
@@ -304,14 +304,12 @@
                if ( eMessage != m_eLastMessage )
                {
                        sal_uInt16 nResId = 0;
-                       switch (eMessage)
-                       {
-                               case smUnsupportedType:         nResId = 
STR_UNSUPPORTED_DATASOURCE_TYPE; break;
-                       }
+                       if ( smUnsupportedType == eMessage )
+                           nResId = STR_UNSUPPORTED_DATASOURCE_TYPE;
                        String sMessage;
                        if ( nResId )
                        {
-                               OLocalResourceAccess aStringResAccess( 
PAGE_GENERAL, RSC_TABPAGE );
+                               LocalResourceAccess aStringResAccess( 
PAGE_GENERAL, RSC_TABPAGE );
                                sMessage = String(ResId(nResId));
                        }
                        m_aSpecialMessage.SetText(sMessage);
@@ -326,7 +324,7 @@
                // the the new URL text as indicated by the selection history
                implSetCurrentType( _eType );
 
-               switchMessage(sal_False,_eType);
+               switchMessage(_eType);
 
                if ( m_aTypeSelectHandler.IsSet() )
                        m_aTypeSelectHandler.Call(this);
@@ -388,7 +386,6 @@
         }
                // if the selection is invalid, disable evrything
                String sName,sConnectURL;
-               sal_Bool bDeleted = sal_False;
                m_bDisplayingInvalid = !bValid;
                if ( bValid )
                {
@@ -439,7 +436,7 @@
                }
 
                // a special message for the current page state
-               switchMessage(bDeleted,m_eCurrentSelection);
+               switchMessage(m_eCurrentSelection);
 
                OGenericAdministrationPage::implInitControls(_rSet, 
_bSaveValue);
        }
@@ -596,7 +593,7 @@
     }
 
        
//-------------------------------------------------------------------------
-    IMPL_LINK(OGeneralPage, OnSetupModeSelected, RadioButton*, _pBox)
+    IMPL_LINK(OGeneralPage, OnSetupModeSelected, RadioButton*, /*_pBox*/)
     {
                if ( m_aCreationModeHandler.IsSet() )
                        m_aCreationModeHandler.Call(this);
@@ -604,14 +601,14 @@
     }
 
        
//-------------------------------------------------------------------------
-    IMPL_LINK(OGeneralPage, OnDocumentSelected, ListBox*, _pBox)
+    IMPL_LINK(OGeneralPage, OnDocumentSelected, ListBox*, /*_pBox*/)
     {
         m_aDocumentSelectionHandler.Call( this );
         return 0L;
     }
 
     //-------------------------------------------------------------------------
-    IMPL_LINK(OGeneralPage, OnOpenDocument, PushButton*, _pBox)
+    IMPL_LINK(OGeneralPage, OnOpenDocument, PushButton*, /*_pBox*/)
     {
         ::sfx2::FileDialogHelper aFileDlg( WB_OPEN, 
::String::CreateFromAscii("sdatabase") );
                if ( aFileDlg.Execute() == ERRCODE_NONE )




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

Reply via email to