Tag: cws_src680_dba24b
User: fs      
Date: 2007-08-27 20:29:12+0000
Modified:
   dba/dbaccess/source/ui/dlg/advancedsettings.cxx
   dba/dbaccess/source/ui/dlg/advancedsettings.hxx

Log:
 #i80930# mapping from DSID to support flag now done by dedicated class 
(DataSourceUI)

File Changes:

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

File [changed]: advancedsettings.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/advancedsettings.cxx?r1=1.1.2.2&r2=1.1.2.3
Delta lines:  +21 -20
---------------------
--- advancedsettings.cxx        2007-08-27 13:35:28+0000        1.1.2.2
+++ advancedsettings.cxx        2007-08-27 20:29:09+0000        1.1.2.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: advancedsettings.cxx,v $
  *
- *  $Revision: 1.1.2.2 $
+ *  $Revision: 1.1.2.3 $
  *
- *  last change: $Author: fs $ $Date: 2007/08/27 13:35:28 $
+ *  last change: $Author: fs $ $Date: 2007/08/27 20:29:09 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -42,6 +42,7 @@
 #include "dsitems.hxx"
 #include "DbAdminImpl.hxx"
 #include "DriverSettings.hxx"
+#include "datasourceui.hxx"
 
 #include "dbu_resource.hrc"
 #include "dbu_dlg.hrc"
@@ -76,7 +77,6 @@
     //========================================================================
     struct BooleanSettingDesc
     {
-        bool*       pSupportFlag;       // the member within 
AdvancedSettingsSupport which controls the support of this setting
         CheckBox**  ppControl;          // the dialog's control which displays 
this setting
         USHORT      nControlResId;      // the resource ID to load the control 
from
         USHORT      nItemId;            // the ID of the item (in an 
SfxItemSet) which corresponds to this setting
@@ -86,7 +86,7 @@
     //========================================================================
     //= SpecialSettingsPage
     //========================================================================
-    SpecialSettingsPage::SpecialSettingsPage( Window* pParent, const 
SfxItemSet& _rCoreAttrs, const AdvancedSettingsSupport& _rSupportedItems )
+    SpecialSettingsPage::SpecialSettingsPage( Window* pParent, const 
SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta )
         :OGenericAdministrationPage( pParent, ModuleRes( 
PAGE_ADVANCED_SETTINGS_SPECIAL ), _rCoreAttrs )
         ,m_aTopLine( this, ModuleRes( FL_DATAHANDLING ) )
         ,m_pIsSQL92Check( NULL )
@@ -104,18 +104,19 @@
         ,m_pBooleanComparisonModeLabel( NULL )
         ,m_pBooleanComparisonMode( NULL )
         ,m_aControlDependencies()
-        ,m_aSupported( _rSupportedItems )
+        ,m_aSupported( _rDSMeta.getAdvancedSettingsSupport() )
         ,m_aBooleanSettings()
     {
         impl_initBooleanSettings();
 
+        DataSourceUI aDSUI( _rDSMeta );
         // create all the check boxes for the boolean settings
         for (   BooleanSettingDescs::const_iterator setting = 
m_aBooleanSettings.begin();
                 setting != m_aBooleanSettings.end();
                 ++setting
              )
         {
-            if ( *setting->pSupportFlag )
+            if ( aDSUI.hasSetting( setting->nItemId ) )
             {
                 (*setting->ppControl) = new CheckBox( this, ModuleRes( 
setting->nControlResId ) );
                 (*setting->ppControl)->SetClickHdl( getControlModifiedLink() );
@@ -194,22 +195,22 @@
 
         // for easier maintainance, write the table in this form, then copy it 
to m_aBooleanSettings
         BooleanSettingDesc aSettings[] = {
-            { &m_aSupported.bUseSQL92NamingConstraints, &m_pIsSQL92Check,      
     CB_SQL92CHECK,          DSID_SQL92CHECK,         false },
-            { &m_aSupported.bAppendTableAliasInSelect,  &m_pAppendTableAlias,  
     CB_APPENDTABLEALIAS,    DSID_APPEND_TABLE_ALIAS, false },
-            { &m_aSupported.bUseKeywordAsBeforeAlias,   
&m_pAsBeforeCorrelationName,CB_AS_BEFORE_CORR_NAME, DSID_AS_BEFORE_CORRNAME, 
false },
-            { &m_aSupported.bUseBracketedOuterJoinSyntax, &m_pEnableOuterJoin, 
     CB_ENABLEOUTERJOIN,     DSID_ENABLEOUTERJOIN,    false },
-            { &m_aSupported.bIgnoreDriverPrivileges,    
&m_pIgnoreDriverPrivileges, CB_IGNOREDRIVER_PRIV,   DSID_IGNOREDRIVER_PRIV,  
false },
-            { &m_aSupported.bParameterNameSubstitution, 
&m_pParameterSubstitution,  CB_PARAMETERNAMESUBST,  DSID_PARAMETERNAMESUBST, 
false },
-            { &m_aSupported.bDisplayVersionColumns,     
&m_pSuppressVersionColumn,  CB_SUPPRESVERSIONCL,    DSID_SUPPRESSVERSIONCL,  
true },
-            { &m_aSupported.bUseCatalogInSelect,        &m_pCatalog,           
     CB_CATALOG,             DSID_CATALOG,            false },
-            { &m_aSupported.bUseSchemaInSelect,         &m_pSchema,            
     CB_SCHEMA,              DSID_SCHEMA,             false },
-            { &m_aSupported.bUseIndexDirectionKeyword,  &m_pIndexAppendix,     
     CB_IGNOREINDEXAPPENDIX, DSID_INDEXAPPENDIX,      false },
-            { &m_aSupported.bUseDOSLineEnds,            &m_pDosLineEnds,       
     CB_DOSLINEENDS,         DSID_DOSLINEENDS,        false },
-            { &m_aSupported.bFormsCheckRequiredFields,  
&m_pCheckRequiredFields,    CB_CHECK_REQUIRED,      DSID_CHECK_REQUIRED_FIELDS, 
false },
-            { NULL,                                     NULL,                  
     0,                      0 }
+            { &m_pIsSQL92Check,             CB_SQL92CHECK,          
DSID_SQL92CHECK,            false },
+            { &m_pAppendTableAlias,         CB_APPENDTABLEALIAS,    
DSID_APPEND_TABLE_ALIAS,    false },
+            { &m_pAsBeforeCorrelationName,  CB_AS_BEFORE_CORR_NAME, 
DSID_AS_BEFORE_CORRNAME,    false },
+            { &m_pEnableOuterJoin,          CB_ENABLEOUTERJOIN,     
DSID_ENABLEOUTERJOIN,       false },
+            { &m_pIgnoreDriverPrivileges,   CB_IGNOREDRIVER_PRIV,   
DSID_IGNOREDRIVER_PRIV,     false },
+            { &m_pParameterSubstitution,    CB_PARAMETERNAMESUBST,  
DSID_PARAMETERNAMESUBST,    false },
+            { &m_pSuppressVersionColumn,    CB_SUPPRESVERSIONCL,    
DSID_SUPPRESSVERSIONCL,     true },
+            { &m_pCatalog,                  CB_CATALOG,             
DSID_CATALOG,               false },
+            { &m_pSchema,                   CB_SCHEMA,              
DSID_SCHEMA,                false },
+            { &m_pIndexAppendix,            CB_IGNOREINDEXAPPENDIX, 
DSID_INDEXAPPENDIX,         false },
+            { &m_pDosLineEnds,              CB_DOSLINEENDS,         
DSID_DOSLINEENDS,           false },
+            { &m_pCheckRequiredFields,      CB_CHECK_REQUIRED,      
DSID_CHECK_REQUIRED_FIELDS, false },
+            { NULL,                         0,                      0,         
                 false }
         };
 
-        for ( BooleanSettingDesc* pCopy = aSettings; pCopy->pSupportFlag != 
NULL; ++pCopy )
+        for ( const BooleanSettingDesc* pCopy = aSettings; pCopy->nItemId != 
0; ++pCopy )
             m_aBooleanSettings.push_back( *pCopy );
     }
 

File [changed]: advancedsettings.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/advancedsettings.hxx?r1=1.1.2.2&r2=1.1.2.3
Delta lines:  +3 -3
-------------------
--- advancedsettings.hxx        2007-08-27 13:35:28+0000        1.1.2.2
+++ advancedsettings.hxx        2007-08-27 20:29:09+0000        1.1.2.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: advancedsettings.hxx,v $
  *
- *  $Revision: 1.1.2.2 $
+ *  $Revision: 1.1.2.3 $
  *
- *  last change: $Author: fs $ $Date: 2007/08/27 13:35:28 $
+ *  last change: $Author: fs $ $Date: 2007/08/27 20:29:09 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -92,7 +92,7 @@
     public:
         virtual BOOL        FillItemSet ( SfxItemSet& _rCoreAttrs );
 
-        SpecialSettingsPage(Window* pParent, const SfxItemSet& _rCoreAttrs, 
const AdvancedSettingsSupport& _rSupportedItems );
+        SpecialSettingsPage(Window* pParent, const SfxItemSet& _rCoreAttrs, 
const DataSourceMetaData& _rDSMeta );
 
     protected:
         virtual ~SpecialSettingsPage();




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

Reply via email to