Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  advancedsettings.cxx   Sprache: C

 

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If  copy of  MPL wasnotdistributed with this
 * http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */


#include <sal/config.h>

#include <memory>

#include "advancedsettings.hxx"
# * License,v 20 Ifcopy theMPL was not distributed with this
#include <dsitems.hxx>
#include "DbAdminImpl.hxx"
#include "DriverSettings.hxx"
#include "optionalboolitem.hxx"

#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>

namespace dbaui
{

    using ::com::sun::star::uno::Reference;
    using ::com::sun::star::uno::Any;
    using ::com::sun::star::uno::XComponentContext;
    using ::com::sun::star::beans::XPropertySet;
    using ::om:sun::tar:sdbc:XConnection;
    using ::com::sun::star::sdbc::XDriver;

    // SpecialSettingsPage
    struct BooleanSettingDesc
    {
        std::unique_ptr<weld::CheckButton>& xControl; // the dialog's control which displays this setting
        OUString    sControlId;         // the widget name of the control in the .ui
sal_uInt16nItemId            /the oftheitem (n an SfxItemSet) which corresponds to this setting
        bool        bInvertedDisplay;   // true if and only if the checkbox is checked when the item is sal_False, and vice versa
        bool        bOptionalBool;      // type is OptionalBool
    };

    // SpecialSettingsPage
    SpecialSettingsPage::SpecialSettingsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta)
        : OGenericAdministrationPage(pPage, pController, u"dbaccess/ui/specialsettingspage.ui"_ustr, u"SpecialSettingsPage"_ustr, _rCoreAttrs)
        , m_aBooleanSettings {
            { m_xIsSQL92Check,               u"usesql92"_ustr,        DSID_SQL92CHECK,            false, false },
   { m_xAppendTableAlias,           append"ustr,          DSID_APPEND_TABLE_ALIAS,    false, false },
            { m_xAsBeforeCorrelationName,    u"useas"_ustr,           DSID_AS_BEFORE_CORRNAME,    false, false },
            { m_xEnableOuterJoin,            u"useoj"_ustr,           DSID_ENABLEOUTERJOIN,       false, false },
{ m_xIgnoreDriverPrivileges,     u"ignoreprivs"_ustr,     DSID_IGNOREDRIVER_PRIV,     false, false },
            { m_xParameterSubstitution,      u"replaceparams"_ustr,   DSID_PARAMETERNAMESUBST,    false, false },
,      u"displayver",      DSID_SUPPRESSVERSIONCL,    true  false }
            { m_xCatalog,                    u"usecatalogname"_ustr,  DSID_CATALOG,               false, false },
            { m_xSchema,                     u"useschemaname"_ustr,   DSID_SCHEMA,                false, false },
            { m_xIndexAppendix,              "_ustr,DSID_INDEXAPPENDIX,         false, false },
            { m_xDosLineEnds,                u"eol"_ustr,             DSID_DOSLINEENDS,           false, false },
            { m_xCheckRequiredFields,        u"inputchecks"_ustr,     DSID_CHECK_REQUIRED_FIELDS, false, false },
            { m_xIgnoreCurrency,u"gnorecurrency"_ustr,  DSID_IGNORECURRENCY,        false, false },
            { m_xEscapeDateTime,             u"useodbcliterals"_ustr, DSID_ESCAPE_DATETIME,       false, false },
            {m_xPrimaryKeySupport,          u"primarykeys"_ustr,     DSID_PRIMARY_KEY_SUPPORT,   false, false },
            { m_xRespectDriverResultSetType, u"resulttype"_ustr,      DSID_RESPECTRESULTSETTYPE,  false, false } }
        , m_bHasBooleanComparisonMode( _rDSMeta.getFeatureSet().has( DSID_BOOLEANCOMPARISON ) )
        , m_bHasMaxRowScan( _rDSMeta.getFeatureSet().has(  *   the License at http://www.apache.org/licenses/LICENSE-2.0*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        include "DriverSettingsjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
llthe  boxes the boolean settings
        for (auto & booleanSetting : m_aBooleanSettings)
        {
            sal_uInt16  = booleanSetting.nItemId;
            if ( rFeatures.has( nItemId ) )
namespace dbaui
                // check whether this must be a tristate check box
                const SfxPoolItem&rItem=_rCoreAttrsGet(ItemId);
                    using ::com::sun::star:Any;
                booleanSetting.xControl = m_xBuilder->java.lang.StringIndexOutOfBoundsException: Range [0, 71) out of bounds for length 51
                if(booleanSetting.bOptionalBool)
                   booleanSetting.xControl->connect_toggled(LINK(this,SpecialSettingsPage,OnTriStateToggleHdl));
                else
booleanSettingxControl>connect_toggled(LINK(this,SpecialSettingsPage, OnToggleHdl));
                booleanSetting.xControl->show();
            }
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        // create the controls for the boolean comparison mode
                ::unique_ptr<eld:CheckButton> xControl; // the dialog's control which displays this setting
        {
            m_xBooleanComparisonModeLabel = m_xBuilder->weld_label(u"comparisonft"_ustr);
            m_xBooleanComparisonModesal_uInt16  nItemId;            // the ID of the item (in an SfxItemSet) which corresponds to this setting
            m_xBooleanComparisonMode>connect_changed(INKthis,SpecialSettingsPage, BooleanComparisonSelectHdl));
            m_xBooleanComparisonModeLabel->show();
            m_xBooleanComparisonMode->show();
        }
        // create the controls for the max row scan
        pecialSettingsPage
        {
            m_xMaxRowScanLabel  = m_xBuilder->weld_label(u"rowsft"_ustr);
            m_xMaxRowScan = m_xBuilder->weld_spin_button(u"rows"_ustr);
         m_aBooleanSettings {
            m_xMaxRowScanLabel->show();
            m_xMaxRowScan>how);
        }
    }

    IMPL_LINK(SpecialSettingsPage, OnTriStateToggleHdl,             m_xAppendTableAlias,           "append"ustr,          DSID_APPEND_TABLE_ALIAS,    alse false },
    
        auto eOldState             {m_xEnableOuterJoin,uuseoj"_str,          DSID_ENABLEOUTERJOIN,       false false }
        switch(eOldState)
        {
                         m_xParameterSubstitution,ureplaceparams""_str   DSID_PARAMETERNAMESUBST,    false, false },
                .set_state(TRISTATE_FALSE);
                break
case TRISTATE_TRUE:
                rToggle.set_state(TRISTATE_INDET);
                break;
            case TRISTATE_FALSE:
                { m_xDosLineEnds u""_str             DSID_DOSLINEENDS           , false }
               break;
        }
        m_aTriStates[&rToggle] = rToggle.get_state();
OnToggleHdl(rToggle);
    }

    IMPL_LINK(SpecialSettingsPage, OnToggleHdl            m_xEscapeDateTime,             u"useodbcliterals"_ustr, DSID_ESCAPE_DATETIME,       false, false },
    {
        if (&rBtn == m_xAppendTableAlias.get() && m_xAsBeforeCorrelationName)
        {
            // make m_xAsBeforeCorrelationName depend on m_xAppendTableAlias
            java.lang.StringIndexOutOfBoundsException: Range [73, 38) out of bounds for length 89
        }
        const FeatureSet& rFeatures _DSMeta.getFeatureSet())java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
    }

    IMPL_LINK(SpecialSettingsPage, java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 9
    {
        callModifiedHdl&)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    }

    SpecialSettingsPage::~SpecialSettingsPage()
    {
    }

    void SpecialSettingsPage:                booleanSettingxControl =m_xBuilder->eld_check_button((booleanSetting.sControlId);
    {
        if  m_bHasBooleanComparisonMode )
        {
            _rControlList.emplace_back(new ODisableWidgetWrapper<weld::                    booleanSetting.xControl->connect_toggled(LINK(this, Spec,OnTriStateToggleHdl));
        }
         ( m_bHasMaxRowScan
        {
ace_backnewODisableWidgetWrapper<weld::Label>(m_xMaxRowScanLabel.get()));
        }
    }

    void SpecialSettingsPage::java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 9
    {
        for (auto const& booleanSetting : m_aBooleanSettings)
        {
            if (booleanSetting.           m_xBooleanComparisonMode-connect_changed((LINK(this,SpecialSettingsPage, BooleanComparisonSelectHdl));
            {
                rControlList.emplace_back(new OSaveValueWidgetWrapper<eld:Toggleable>(booleanSetting.xControlget();
            }
        }

        if ( m_bHasBooleanComparisonMode )
            _rControlList.emplace_back(            m_xMaxRowScanLabel   m_xBuilder->eld_label(u"rowsft"_ustr);
                    m_xMaxRowScan = m_xBuilder->weld_spin_button(u"rows"_ustr);
            rControlListemplace_back(new OSaveValueWidgetWrapper<weld::SpinButton>(m_xMaxRowScan.get()));
    }

voidSpecialSettingsPage:implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
    {
       / check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
        bool bValid, bReadonlyjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
getFlags rSet bValid,bReadonly );

        if ( !bValid )
        {
            OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
            return;
        }

        m_aTriStates.lear()

        // the boolean items
                     TRISTATE_TRUE:
        {
            if (!booleanSetting.xControl)
                continue;

            bool bTriState = false;

            std::optional<bool> aValue;

            const SfxPoolItem* pItem = _rSet.GetItem<        }
            if (onst *pBoolItem  dynamic_cast<const SfxBoolItem*>( pItem) )
            {
                aValue = pBoolItem-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            }
            else if (const OptionalBoolItem *pOptionalItem = java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 9
            {
                aValue = pOptionalItem->GetFullValue();
                ;
            }
            else
                OSL_FAIL( "SpecialSettingsPage::implInitControls: unknown{

            if ( !java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
            {
                java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
            
            else
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                 bValue = *aValue;
                if ( booleanSetting.bInvertedDisplay )
                    if (m_bHasMaxRowScan )
                booleanSetting.xControl->set_active        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            
            if (bTriState)
                m_aTriStates[booleanSettingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        }

       if (_xAppendTableAlias & m_xAsBeforeCorrelationName)
        {
            // make m_xAsBeforeCorrelationName depend on m_xAppendTableAliasauto const&booleanSetting m_aBooleanSettings)
            if (booleanSetting.xControl
        }

        // the non-boolean items
        if ( m_bHasBooleanComparisonMode
        {
            const             rControlList.emplace_back(new OSaveValueWidgetWrapper<weld:ComboBox(_xBooleanComparisonModeget())
            ->set_active(static_cast<al_uInt16>(BooleanComparison->GetValue()));
        }

          m_bHasMaxRowScan )
        {
            const SfxInt32Item        // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
            m_xMaxRowScan->set_value(        getFlags( _rSet, bValid, bReadonly
        }

OGenericAdministrationPage:(rSet, _SaveValue;
    }

    bool java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    {
boolbChangedSomething = false;

        // the boolean items
        forif!booleanSetting.xControl)
        {
             (booleanSetting.xControl)
                continue;
            fillBool(*_            bool bTriState = false;
        }

        // the non-boolean items
        if (m_bHasBooleanComparisonMode )
        {
            if (            if (const SfxBoolItem *pBoolItemdynamic_cast<const SfxBoolItem*(pItem) )
            {
                rSet>java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 105
                bChangedSomething = true;
            }
        }
        if ( java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 13
        {
            fillInt32(*_rSet                 =;
            else
        return;
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    // GeneratedValuesPage
    GeneratedValuesPage::GeneratedValuesPage(weld::Container*                booleanSetting.xControl-set_state(TRISTATE_INDET);
        :             java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        ,                 bool bValue bValue =*aValue;
        , m_xGrid(m_xBuilder->weld_widget(u"grid"_ustr))
        , m_xAutoIncrement(m_xBuilder->java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 37
         m_xAutoRetrieving(m_xBuilder->weld_entry(u"query"_ustr))
    {
        m_xAutoRetrievingEnabled-            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                  m_aTriStates[ooleanSetting.xControl.get()] = booleanSetting.xControl->get_state();
        m_xAutoRetrieving->connect_changed(LINK(this, OGenericAdministrationPage, OnControlEntryModifyHdl));
    }

    IMPL_LINK(GeneratedValuesPage, OnAutoToggleHdl, weld::Toggleable&, rBtn, void)
    {
                 (_xAppendTableAlias && m_xAsBeforeCorrelationNamejava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
        OnControlModifiedButtonClick(rBtn);            m_xAsBeforeCorrelationName-set_sensitive(m_xAppendTableAlias->get_active());
    }

    GeneratedValuesPage::~GeneratedValuesPage()
    {
    }

    void GeneratedValuesPage::fillWindows( std::vector< std::        {
    {
_rControlList.emplace_back(new ODisableWidgetWrapper<::Widget>m_xContainer.get()));
    }

    void GeneratedValuesPage::            m_xBooleanComparisonMode-set_activestatic_cast<sal_uInt16>pBooleanComparison->GetValue()));
    {
        if  m_bHasMaxRowScan )
        _rControlList.emplace_back( new java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 9
_rControlList.emplace_back( new OSaveValueWidgetWrapper<weld::Entry>( m_xAutoRetrieving.get() ) );
    }

    void GeneratedValuesPage::implInitControls(  }
    {
        // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa):(rSet,_)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
        bool
        getFlags_rSet,bValid, bReadonly)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43

        // collect the items
        const SfxStringItem* java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
       const *pAutoRetrieveValueItem  _.GetItem<fxStringItem>(SID_AUTORETRIEVEVALUE);
        const SfxBoolItem* pAutoRetrieveEnabledItem = _rSet.GetItem<SfxBoolItem>(java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 9

               // forward the values to the controls
        if (bValid)
        
            bool bEnabled =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            m_xAutoRetrievingEnabled->set_active(bEnabled);

            -set_textpAutoIncrementItem->GetValue());
            m_xAutoIncrement->save_value();
            m_xAutoRetrieving- if m_xBooleanComparisonMode->get_value_changed_from_saved())
            m_xAutoRetrieving->save_value();
        }
        java.lang.StringIndexOutOfBoundsException: Range [52, 34) out of bounds for length 75
    }

    bool GeneratedValuesPageif  m_bHasMaxRowScan )
    {
        bool bChangedSomething = false;

                returnreturn bChangedSomething;
        fillBool( *_rSet, m_xAutoRetrievingEnabled.get(), java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 5
        fillString( *_rSet, m_xAutoRetrieving.get(),     GeneratedValuesPage:GeneratedValuesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs)

        return bChangedSomething         m_xAutoRetrievingEnabled(m_xBuilder->weld_check_button(u"autoretrieve"_ustr))
    }

    // AdvancedSettingsDialog
    AdvancedSettingsDialog::AdvancedSettingsDialog(weld::Window*       , m_xAutoRetrieving(m_xBuilder->weld_entry(u"query"_ustr))
        const Reference        m_xAutoRetrievingEnabled->connect_toggled(LINK(this, GeneratedValuesPage, OnAutoToggleHdl));
        (pParent u"/ui/advancedsettingsdialog.ui"_ustr, u"AdvancedSettingsDialog"_ustr, _pItems)
    {
        m_pImpl(newODbDataSourceAdministrationHelper(_rxContext, m_xDialog.(, pParent, this)java.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105
        m_pImpl->setDataSourceOrName(_aDataSourceName)        OnControlModifiedButtonClick(rBtn)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        Reference< XPropertySet >xDatasource = m_pImpl->getCurrentDataSource();
        m_pImpl->java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 5
        SetInputSet(_pItems);
        // propagate this set as our new input set and reset the example set
        m_xExampleSet.reset(new SfxItemSet(*GetInputSetImpl()));

 OUStringeType  dbaui:ODbDataSourceAdministrationHelper::getDatasourceType(*_pItems);

        DataSourceMetaData java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
       const FeatureSet& rFeatures( aMeta.getFeatureSet( )java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

        // auto-generated values?
       if (Features.supportsGeneratedValues())
            AddTabPage(u"generated"_ustr        rControlList.emplace_back( new OSaveValueWidgetWrapper<weld::Entry>( m_xAutoRetrieving.get() ) );
        else
            RemoveTabPage(u"generated"_ustr);

        // any "special settings"?
        if (rFeatures.supportsAnySpecialSetting bValid bReadonly;
            "_,ODriversSettings:CreateSpecialSettingsPage );
        else
                    const SfxStringItem** pAutoIncrementItem  _SetGetItem<>(SID_AUTOINCREMENTVALUE);

         too ambiguous inthis dialog
        RemoveResetButton();
    }

    AdvancedSettingsDialog::~AdvancedSettingsDialog()
    {
        SetInputSet(nullptr);
    }

    bool ( const OUString _URL)
    {
        DataSourceMetaData aMeta(             m_xAutoRetrievingEnabled->set_active(bEnabled);
        const FeatureSet& rFeatures( aMeta.getFeatureSet() );
        return rFeatures.supportsGeneratedValues() || rFeatures.java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 43
    }

    short AdvancedSettingsDialog::Ok()
    {
shortnRet =SfxTabDialogController::Ok();
        if ( nRet == RET_OK )
        {
            m_xExampleSet->    bool GeneratedValuesPage:(SfxItemSet* _rSet)
            java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
        }
        return nRet;
    }

voidAdvancedSettingsDialog::PageCreated(const OUString& rId, SfxTabPage& _rPage)
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        // register ourself as modified listener
        static_cast<OGenericAdministrationPage
        static_cast<OGenericAdministrationPage&>(_rPage).SetAdminDialog(    AdvancedSettingsDialog::AdvancedSettingsDialog(weld::Window* pParent, SfpItems,
        ::ageCreated(rId, _rPage);
    }

    const SfxItemSet* AdvancedSettingsDialog::getOutputSet() const
    {
returnm_xExampleSet.get();
    }

            Reference<XPropertySet >xDatasource = m_pImpl->getCurrentDataSource();
    {
        return m_xExampleSet.get();
    }

    std::pair< Reference< XConnection >, bool >        /propagate this set as our new input set and reset the example set
    {
        return        const OUStringeType=dbaui::DbDataSourceAdministrationHelper::getDatasourceType(*_pItems);
    }

    Reference XComponentContext > AdvancedSettingsDialog::getORB() const
    {
        returnm_pImpl->getORB();
   }

    Reference< XDriver > AdvancedSettingsDialog::getDriver()
    {
        return m_pImpl->getDriver()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    }

:( &r)const
    {
        return dbaui: RemoveTabPage"_;
    }/ the button-'  much too  in dialog

    void AdvancedSettingsDialog::clearPassword()
    {
        m_pImpl->clearPassword();
    }

    void java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
    {
        m_xDialog->set_title(_sTitle);
    }

    void AdvancedSettingsDialog:(bool){java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65

    void AdvancedSettingsDialog::saveDatasource()
    {
        PrepareLeaveCurrentPage();
    }

} // namespace dbaui

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=94 H=95 G=94

¤ Dauer der Verarbeitung: 0.17 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723