LCOV - code coverage report
Current view: top level - dbaccess/source/ui/dlg - advancedsettings.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 212 0.0 %
Date: 2014-04-14 Functions: 0 35 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "advancedsettings.hxx"
      21             : #include "advancedsettingsdlg.hxx"
      22             : #include "moduledbu.hxx"
      23             : #include "dsitems.hxx"
      24             : #include "DbAdminImpl.hxx"
      25             : #include "DriverSettings.hxx"
      26             : #include "optionalboolitem.hxx"
      27             : #include "dbu_resource.hrc"
      28             : #include "dbu_dlg.hrc"
      29             : #include "dbadmin.hrc"
      30             : 
      31             : #include <svl/eitem.hxx>
      32             : #include <svl/intitem.hxx>
      33             : #include <svl/stritem.hxx>
      34             : 
      35             : #include <vcl/msgbox.hxx>
      36             : 
      37             : namespace dbaui
      38             : {
      39             : 
      40             :     using ::com::sun::star::uno::Reference;
      41             :     using ::com::sun::star::lang::XMultiServiceFactory;
      42             :     using ::com::sun::star::uno::Any;
      43             :     using ::com::sun::star::uno::XComponentContext;
      44             :     using ::com::sun::star::uno::UNO_QUERY_THROW;
      45             :     using ::com::sun::star::beans::XPropertySet;
      46             :     using ::com::sun::star::sdbc::XConnection;
      47             :     using ::com::sun::star::sdbc::XDriver;
      48             : 
      49             :     // SpecialSettingsPage
      50           0 :     struct BooleanSettingDesc
      51             :     {
      52             :         CheckBox**  ppControl;          // the dialog's control which displays this setting
      53             :         OString     sControlId;         // the widget name of the control in the .ui
      54             :         sal_uInt16  nItemId;            // the ID of the item (in an SfxItemSet) which corresponds to this setting
      55             :         bool        bInvertedDisplay;   // true if and only if the checkbox is checked when the item is sal_False, and vice versa
      56             :     };
      57             : 
      58             :     // SpecialSettingsPage
      59           0 :     SpecialSettingsPage::SpecialSettingsPage( Window* pParent, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta )
      60             :         : OGenericAdministrationPage(pParent, "SpecialSettingsPage",
      61             :             "dbaccess/ui/specialsettingspage.ui", _rCoreAttrs)
      62             :         , m_pIsSQL92Check( NULL )
      63             :         , m_pAppendTableAlias( NULL )
      64             :         , m_pAsBeforeCorrelationName( NULL )
      65             :         , m_pEnableOuterJoin( NULL )
      66             :         , m_pIgnoreDriverPrivileges( NULL )
      67             :         , m_pParameterSubstitution( NULL )
      68             :         , m_pSuppressVersionColumn( NULL )
      69             :         , m_pCatalog( NULL )
      70             :         , m_pSchema( NULL )
      71             :         , m_pIndexAppendix( NULL )
      72             :         , m_pDosLineEnds( NULL )
      73             :         , m_pCheckRequiredFields( NULL )
      74             :         , m_pIgnoreCurrency(NULL)
      75             :         , m_pEscapeDateTime(NULL)
      76             :         , m_pPrimaryKeySupport(NULL)
      77             :         , m_pRespectDriverResultSetType(NULL)
      78             :         , m_pBooleanComparisonModeLabel( NULL )
      79             :         , m_pBooleanComparisonMode( NULL )
      80             :         , m_pMaxRowScanLabel( NULL )
      81             :         , m_pMaxRowScan( NULL )
      82             :         , m_aControlDependencies()
      83             :         , m_aBooleanSettings()
      84           0 :         , m_bHasBooleanComparisonMode( _rDSMeta.getFeatureSet().has( DSID_BOOLEANCOMPARISON ) )
      85           0 :         , m_bHasMaxRowScan( _rDSMeta.getFeatureSet().has( DSID_MAX_ROW_SCAN ) )
      86             :     {
      87           0 :         impl_initBooleanSettings();
      88             : 
      89           0 :         const FeatureSet& rFeatures( _rDSMeta.getFeatureSet() );
      90             :         // create all the check boxes for the boolean settings
      91           0 :         for (   BooleanSettingDescs::const_iterator setting = m_aBooleanSettings.begin();
      92           0 :                 setting != m_aBooleanSettings.end();
      93             :                 ++setting
      94             :              )
      95             :         {
      96           0 :             sal_uInt16 nItemId = setting->nItemId;
      97           0 :             if ( rFeatures.has( nItemId ) )
      98             :             {
      99           0 :                 get((*setting->ppControl), setting->sControlId);
     100           0 :                 (*setting->ppControl)->SetClickHdl( getControlModifiedLink() );
     101             : 
     102             :                 // check whether this must be a tristate check box
     103           0 :                 const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId );
     104           0 :                 if ( rItem.ISA( OptionalBoolItem ) )
     105           0 :                     (*setting->ppControl)->EnableTriState( true );
     106             :             }
     107             :         }
     108             : 
     109           0 :         if ( m_pAsBeforeCorrelationName && m_pAppendTableAlias )
     110             :             // make m_pAsBeforeCorrelationName depend on m_pAppendTableAlias
     111           0 :             m_aControlDependencies.enableOnCheckMark( *m_pAppendTableAlias, *m_pAsBeforeCorrelationName );
     112             : 
     113             :         // create the controls for the boolean comparison mode
     114           0 :         if ( m_bHasBooleanComparisonMode )
     115             :         {
     116           0 :             get(m_pBooleanComparisonModeLabel, "comparisonft");
     117           0 :             get(m_pBooleanComparisonMode, "comparison");
     118           0 :             m_pBooleanComparisonMode->SetDropDownLineCount( 4 );
     119           0 :             m_pBooleanComparisonMode->SetSelectHdl( getControlModifiedLink() );
     120           0 :             m_pBooleanComparisonModeLabel->Show();
     121           0 :             m_pBooleanComparisonMode->Show();
     122             :         }
     123             :         // create the controls for the max row scan
     124           0 :         if ( m_bHasMaxRowScan )
     125             :         {
     126           0 :             get(m_pMaxRowScanLabel, "rowsft");
     127           0 :             get(m_pMaxRowScan, "rows");
     128           0 :             m_pMaxRowScan->SetModifyHdl(getControlModifiedLink());
     129           0 :             m_pMaxRowScan->SetUseThousandSep(false);
     130           0 :             m_pMaxRowScanLabel->Show();
     131           0 :             m_pMaxRowScan->Show();
     132             :         }
     133           0 :     }
     134             : 
     135           0 :     SpecialSettingsPage::~SpecialSettingsPage()
     136             :     {
     137           0 :         m_aControlDependencies.clear();
     138           0 :     }
     139             : 
     140           0 :     void SpecialSettingsPage::impl_initBooleanSettings()
     141             :     {
     142             :         OSL_PRECOND( m_aBooleanSettings.empty(), "SpecialSettingsPage::impl_initBooleanSettings: called twice!" );
     143             : 
     144             :         // for easier maintainance, write the table in this form, then copy it to m_aBooleanSettings
     145             :         BooleanSettingDesc aSettings[] = {
     146             :             { &m_pIsSQL92Check,                 "usesql92",        DSID_SQL92CHECK,            false },
     147             :             { &m_pAppendTableAlias,             "append",          DSID_APPEND_TABLE_ALIAS,    false },
     148             :             { &m_pAsBeforeCorrelationName,      "useas",           DSID_AS_BEFORE_CORRNAME,    false },
     149             :             { &m_pEnableOuterJoin,              "useoj",           DSID_ENABLEOUTERJOIN,       false },
     150             :             { &m_pIgnoreDriverPrivileges,       "ignoreprivs",     DSID_IGNOREDRIVER_PRIV,     false },
     151             :             { &m_pParameterSubstitution,        "replaceparams",   DSID_PARAMETERNAMESUBST,    false },
     152             :             { &m_pSuppressVersionColumn,        "displayver",      DSID_SUPPRESSVERSIONCL,     true },
     153             :             { &m_pCatalog,                      "usecatalogname",  DSID_CATALOG,               false },
     154             :             { &m_pSchema,                       "useschemaname",   DSID_SCHEMA,                false },
     155             :             { &m_pIndexAppendix,                "createindex",     DSID_INDEXAPPENDIX,         false },
     156             :             { &m_pDosLineEnds,                  "eol",             DSID_DOSLINEENDS,           false },
     157             :             { &m_pIgnoreCurrency,               "inputchecks",     DSID_IGNORECURRENCY,        false },
     158             :             { &m_pCheckRequiredFields,          "ignorecurrency",  DSID_CHECK_REQUIRED_FIELDS, false },
     159             :             { &m_pEscapeDateTime,               "useodbcliterals", DSID_ESCAPE_DATETIME,       false },
     160             :             { &m_pPrimaryKeySupport,            "primarykeys",     DSID_PRIMARY_KEY_SUPPORT,   false },
     161             :             { &m_pRespectDriverResultSetType,   "resulttype",      DSID_RESPECTRESULTSETTYPE,  false },
     162             :             { NULL,                             "",                0,                          false }
     163           0 :         };
     164             : 
     165           0 :         for ( const BooleanSettingDesc* pCopy = aSettings; pCopy->nItemId != 0; ++pCopy )
     166             :         {
     167           0 :             m_aBooleanSettings.push_back( *pCopy );
     168           0 :         }
     169           0 :     }
     170             : 
     171           0 :     void SpecialSettingsPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList )
     172             :     {
     173           0 :         if ( m_bHasBooleanComparisonMode )
     174             :         {
     175           0 :             _rControlList.push_back( new ODisableWrapper< FixedText >( m_pBooleanComparisonModeLabel ) );
     176             :         }
     177           0 :         if ( m_bHasMaxRowScan )
     178             :         {
     179           0 :             _rControlList.push_back( new ODisableWrapper< FixedText >( m_pMaxRowScanLabel ) );
     180             :         }
     181           0 :     }
     182             : 
     183           0 :     void SpecialSettingsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
     184             :     {
     185           0 :         for (   BooleanSettingDescs::const_iterator setting = m_aBooleanSettings.begin();
     186           0 :                 setting != m_aBooleanSettings.end();
     187             :                 ++setting
     188             :              )
     189             :         {
     190           0 :             if ( *setting->ppControl )
     191             :             {
     192           0 :                 _rControlList.push_back( new OSaveValueWrapper< CheckBox >( *setting->ppControl ) );
     193             :             }
     194             :         }
     195             : 
     196           0 :         if ( m_bHasBooleanComparisonMode )
     197           0 :             _rControlList.push_back( new OSaveValueWrapper< ListBox >( m_pBooleanComparisonMode ) );
     198           0 :         if ( m_bHasMaxRowScan )
     199           0 :             _rControlList.push_back(new OSaveValueWrapper<NumericField>(m_pMaxRowScan));
     200           0 :     }
     201             : 
     202           0 :     void SpecialSettingsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
     203             :     {
     204             :         // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
     205             :         sal_Bool bValid, bReadonly;
     206           0 :         getFlags( _rSet, bValid, bReadonly );
     207             : 
     208           0 :         if ( !bValid )
     209             :         {
     210           0 :             OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
     211           0 :             return;
     212             :         }
     213             : 
     214             :         // the boolean items
     215           0 :         for (   BooleanSettingDescs::const_iterator setting = m_aBooleanSettings.begin();
     216           0 :                 setting != m_aBooleanSettings.end();
     217             :                 ++setting
     218             :              )
     219             :         {
     220           0 :             if ( !*setting->ppControl )
     221           0 :                 continue;
     222             : 
     223           0 :             ::boost::optional< bool > aValue(false);
     224           0 :             aValue.reset();
     225             : 
     226           0 :             SFX_ITEMSET_GET( _rSet, pItem, SfxPoolItem, setting->nItemId, true );
     227           0 :             if ( pItem->ISA( SfxBoolItem ) )
     228             :             {
     229           0 :                 aValue.reset( PTR_CAST( SfxBoolItem, pItem )->GetValue() );
     230             :             }
     231           0 :             else if ( pItem->ISA( OptionalBoolItem ) )
     232             :             {
     233           0 :                 aValue = PTR_CAST( OptionalBoolItem, pItem )->GetFullValue();
     234             :             }
     235             :             else
     236             :                 OSL_FAIL( "SpecialSettingsPage::implInitControls: unknown boolean item type!" );
     237             : 
     238           0 :             if ( !aValue )
     239             :             {
     240           0 :                 (*setting->ppControl)->SetState( TRISTATE_INDET );
     241             :             }
     242             :             else
     243             :             {
     244           0 :                 bool bValue = *aValue;
     245           0 :                 if ( setting->bInvertedDisplay )
     246           0 :                     bValue = !bValue;
     247           0 :                 (*setting->ppControl)->Check( bValue );
     248             :             }
     249           0 :         }
     250             : 
     251             :         // the non-boolean items
     252           0 :         if ( m_bHasBooleanComparisonMode )
     253             :         {
     254           0 :             SFX_ITEMSET_GET( _rSet, pBooleanComparison, SfxInt32Item, DSID_BOOLEANCOMPARISON, true );
     255           0 :             m_pBooleanComparisonMode->SelectEntryPos( static_cast< sal_uInt16 >( pBooleanComparison->GetValue() ) );
     256             :         }
     257             : 
     258           0 :         if ( m_bHasMaxRowScan )
     259             :         {
     260           0 :             SFX_ITEMSET_GET(_rSet, pMaxRowScan, SfxInt32Item, DSID_MAX_ROW_SCAN, true);
     261           0 :             m_pMaxRowScan->SetValue(pMaxRowScan->GetValue());
     262             :         }
     263             : 
     264           0 :         OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
     265             :     }
     266             : 
     267           0 :     bool SpecialSettingsPage::FillItemSet( SfxItemSet& _rSet )
     268             :     {
     269           0 :         sal_Bool bChangedSomething = sal_False;
     270             : 
     271             :         // the boolean items
     272           0 :         for (   BooleanSettingDescs::const_iterator setting = m_aBooleanSettings.begin();
     273           0 :                 setting != m_aBooleanSettings.end();
     274             :                 ++setting
     275             :              )
     276             :         {
     277           0 :             if ( !*setting->ppControl )
     278           0 :                 continue;
     279           0 :             fillBool( _rSet, *setting->ppControl, setting->nItemId, bChangedSomething, setting->bInvertedDisplay );
     280             :         }
     281             : 
     282             :         // the non-boolean items
     283           0 :         if ( m_bHasBooleanComparisonMode )
     284             :         {
     285           0 :             if ( m_pBooleanComparisonMode->GetSelectEntryPos() != m_pBooleanComparisonMode->GetSavedValue() )
     286             :             {
     287           0 :                 _rSet.Put( SfxInt32Item( DSID_BOOLEANCOMPARISON, m_pBooleanComparisonMode->GetSelectEntryPos() ) );
     288           0 :                 bChangedSomething = sal_True;
     289             :             }
     290             :         }
     291           0 :         if ( m_bHasMaxRowScan )
     292             :         {
     293           0 :             fillInt32(_rSet,m_pMaxRowScan,DSID_MAX_ROW_SCAN,bChangedSomething);
     294             :         }
     295           0 :         return bChangedSomething;
     296             :     }
     297             : 
     298             :     // GeneratedValuesPage
     299           0 :     GeneratedValuesPage::GeneratedValuesPage( Window* pParent, const SfxItemSet& _rCoreAttrs )
     300             :         : OGenericAdministrationPage(pParent, "GeneratedValuesPage",
     301           0 :             "dbaccess/ui/generatedvaluespage.ui", _rCoreAttrs)
     302             :     {
     303           0 :         get(m_pAutoFrame, "GeneratedValuesPage");
     304           0 :         get(m_pAutoRetrievingEnabled, "autoretrieve");
     305           0 :         get(m_pAutoIncrementLabel, "statementft");
     306           0 :         get(m_pAutoIncrement, "statement");
     307           0 :         get(m_pAutoRetrievingLabel, "queryft");
     308           0 :         get(m_pAutoRetrieving, "query");
     309             : 
     310           0 :         m_pAutoRetrievingEnabled->SetClickHdl( getControlModifiedLink() );
     311           0 :         m_pAutoIncrement->SetModifyHdl( getControlModifiedLink() );
     312           0 :         m_pAutoRetrieving->SetModifyHdl( getControlModifiedLink() );
     313             : 
     314             :         m_aControlDependencies.enableOnCheckMark( *m_pAutoRetrievingEnabled,
     315           0 :             *m_pAutoIncrementLabel, *m_pAutoIncrement, *m_pAutoRetrievingLabel, *m_pAutoRetrieving );
     316           0 :     }
     317             : 
     318           0 :     GeneratedValuesPage::~GeneratedValuesPage()
     319             :     {
     320           0 :         m_aControlDependencies.clear();
     321           0 :     }
     322             : 
     323           0 :     void GeneratedValuesPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList )
     324             :     {
     325           0 :         _rControlList.push_back( new ODisableWrapper< VclFrame >( m_pAutoFrame ) );
     326           0 :     }
     327             : 
     328           0 :     void GeneratedValuesPage::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList )
     329             :     {
     330           0 :         _rControlList.push_back( new OSaveValueWrapper< CheckBox >( m_pAutoRetrievingEnabled ) );
     331           0 :         _rControlList.push_back( new OSaveValueWrapper< Edit >( m_pAutoIncrement ) );
     332           0 :         _rControlList.push_back( new OSaveValueWrapper< Edit >( m_pAutoRetrieving ) );
     333           0 :     }
     334             : 
     335           0 :     void GeneratedValuesPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue )
     336             :     {
     337             :         // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
     338             :         sal_Bool bValid, bReadonly;
     339           0 :         getFlags(_rSet, bValid, bReadonly);
     340             : 
     341             :         // collect the items
     342           0 :         SFX_ITEMSET_GET(_rSet, pAutoIncrementItem, SfxStringItem, DSID_AUTOINCREMENTVALUE, true);
     343           0 :         SFX_ITEMSET_GET(_rSet, pAutoRetrieveValueItem, SfxStringItem, DSID_AUTORETRIEVEVALUE, true);
     344           0 :         SFX_ITEMSET_GET(_rSet, pAutoRetrieveEnabledItem, SfxBoolItem, DSID_AUTORETRIEVEENABLED, true);
     345             : 
     346             :         // forward the values to the controls
     347           0 :         if (bValid)
     348             :         {
     349           0 :             sal_Bool bEnabled = pAutoRetrieveEnabledItem->GetValue();
     350           0 :             m_pAutoRetrievingEnabled->Check( bEnabled );
     351             : 
     352           0 :             m_pAutoIncrement->SetText( pAutoIncrementItem->GetValue() );
     353           0 :             m_pAutoIncrement->ClearModifyFlag();
     354           0 :             m_pAutoRetrieving->SetText( pAutoRetrieveValueItem->GetValue() );
     355           0 :             m_pAutoRetrieving->ClearModifyFlag();
     356             :         }
     357           0 :         OGenericAdministrationPage::implInitControls( _rSet, _bSaveValue );
     358           0 :     }
     359             : 
     360           0 :     bool GeneratedValuesPage::FillItemSet(SfxItemSet& _rSet)
     361             :     {
     362           0 :         sal_Bool bChangedSomething = sal_False;
     363             : 
     364           0 :         fillString( _rSet, m_pAutoIncrement, DSID_AUTOINCREMENTVALUE, bChangedSomething );
     365           0 :         fillBool( _rSet, m_pAutoRetrievingEnabled, DSID_AUTORETRIEVEENABLED, bChangedSomething );
     366           0 :         fillString( _rSet, m_pAutoRetrieving, DSID_AUTORETRIEVEVALUE, bChangedSomething );
     367             : 
     368           0 :         return bChangedSomething;
     369             :     }
     370             : 
     371             :     // AdvancedSettingsDialog
     372           0 :     AdvancedSettingsDialog::AdvancedSettingsDialog( Window* _pParent, SfxItemSet* _pItems,
     373             :         const Reference< XComponentContext >& _rxContext, const Any& _aDataSourceName )
     374             :         : SfxTabDialog(_pParent, "AdvancedSettingsDialog",
     375           0 :             "dbaccess/ui/advancedsettingsdialog.ui", _pItems)
     376             :     {
     377           0 :         m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext,_pParent,this));
     378           0 :         m_pImpl->setDataSourceOrName(_aDataSourceName);
     379           0 :         Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
     380           0 :         m_pImpl->translateProperties(xDatasource, *_pItems);
     381           0 :         SetInputSet(_pItems);
     382             :         // propagate this set as our new input set and reset the example set
     383           0 :         delete pExampleSet;
     384           0 :         pExampleSet = new SfxItemSet(*GetInputSetImpl());
     385             : 
     386           0 :         const OUString eType = m_pImpl->getDatasourceType(*_pItems);
     387             : 
     388           0 :         DataSourceMetaData aMeta( eType );
     389           0 :         const FeatureSet& rFeatures( aMeta.getFeatureSet() );
     390             : 
     391             :         // auto-generated values?
     392           0 :         if (rFeatures.supportsGeneratedValues())
     393           0 :             AddTabPage("generated", ODriversSettings::CreateGeneratedValuesPage, NULL);
     394             :         else
     395           0 :             RemoveTabPage("generated");
     396             : 
     397             :         // any "special settings"?
     398           0 :         if (rFeatures.supportsAnySpecialSetting())
     399           0 :             AddTabPage("special", ODriversSettings::CreateSpecialSettingsPage, NULL);
     400             :         else
     401           0 :             RemoveTabPage("special");
     402             : 
     403             :         // remove the reset button - it's meaning is much too ambiguous in this dialog
     404           0 :         RemoveResetButton();
     405           0 :     }
     406             : 
     407           0 :     AdvancedSettingsDialog::~AdvancedSettingsDialog()
     408             :     {
     409           0 :         SetInputSet(NULL);
     410           0 :         DELETEZ(pExampleSet);
     411           0 :     }
     412             : 
     413           0 :     bool AdvancedSettingsDialog::doesHaveAnyAdvancedSettings( const OUString& _sURL )
     414             :     {
     415           0 :         DataSourceMetaData aMeta( _sURL );
     416           0 :         const FeatureSet& rFeatures( aMeta.getFeatureSet() );
     417           0 :         if ( rFeatures.supportsGeneratedValues() || rFeatures.supportsAnySpecialSetting() )
     418           0 :             return true;
     419           0 :         return false;
     420             :     }
     421             : 
     422           0 :     short AdvancedSettingsDialog::Execute()
     423             :     {
     424           0 :         short nRet = SfxTabDialog::Execute();
     425           0 :         if ( nRet == RET_OK )
     426             :         {
     427           0 :             pExampleSet->Put(*GetOutputItemSet());
     428           0 :             m_pImpl->saveChanges(*pExampleSet);
     429             :         }
     430           0 :         return nRet;
     431             :     }
     432             : 
     433           0 :     void AdvancedSettingsDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage)
     434             :     {
     435             :         // register ourself as modified listener
     436           0 :         static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory( getORB() );
     437           0 :         static_cast<OGenericAdministrationPage&>(_rPage).SetAdminDialog(this,this);
     438             : 
     439           0 :         Window *pWin = GetViewWindow();
     440           0 :         if(pWin)
     441           0 :             pWin->Invalidate();
     442             : 
     443           0 :         SfxTabDialog::PageCreated(_nId, _rPage);
     444           0 :     }
     445             : 
     446           0 :     const SfxItemSet* AdvancedSettingsDialog::getOutputSet() const
     447             :     {
     448           0 :         return pExampleSet;
     449             :     }
     450             : 
     451           0 :     SfxItemSet* AdvancedSettingsDialog::getWriteOutputSet()
     452             :     {
     453           0 :         return pExampleSet;
     454             :     }
     455             : 
     456           0 :     ::std::pair< Reference< XConnection >, sal_Bool > AdvancedSettingsDialog::createConnection()
     457             :     {
     458           0 :         return m_pImpl->createConnection();
     459             :     }
     460             : 
     461           0 :     Reference< XComponentContext > AdvancedSettingsDialog::getORB() const
     462             :     {
     463           0 :         return m_pImpl->getORB();
     464             :     }
     465             : 
     466           0 :     Reference< XDriver > AdvancedSettingsDialog::getDriver()
     467             :     {
     468           0 :         return m_pImpl->getDriver();
     469             :     }
     470             : 
     471           0 :     OUString AdvancedSettingsDialog::getDatasourceType(const SfxItemSet& _rSet) const
     472             :     {
     473           0 :         return m_pImpl->getDatasourceType(_rSet);
     474             :     }
     475             : 
     476           0 :     void AdvancedSettingsDialog::clearPassword()
     477             :     {
     478           0 :         m_pImpl->clearPassword();
     479           0 :     }
     480             : 
     481           0 :     void AdvancedSettingsDialog::setTitle(const OUString& _sTitle)
     482             :     {
     483           0 :         SetText(_sTitle);
     484           0 :     }
     485             : 
     486           0 :     void AdvancedSettingsDialog::enableConfirmSettings( bool _bEnable )
     487             :     {
     488             :         (void)_bEnable;
     489           0 :     }
     490             : 
     491           0 :     sal_Bool AdvancedSettingsDialog::saveDatasource()
     492             :     {
     493           0 :         return PrepareLeaveCurrentPage();
     494             :     }
     495             : 
     496           0 : } // namespace dbaui
     497             : 
     498             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10