LCOV - code coverage report
Current view: top level - dbaccess/source/ui/dlg - DBSetupConnectionPages.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 8 0.0 %
Date: 2014-11-03 Functions: 0 12 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             : #ifndef INCLUDED_DBACCESS_SOURCE_UI_DLG_DBSETUPCONNECTIONPAGES_HXX
      21             : #define INCLUDED_DBACCESS_SOURCE_UI_DLG_DBSETUPCONNECTIONPAGES_HXX
      22             : 
      23             : #include "ConnectionPageSetup.hxx"
      24             : 
      25             : #include "adminpages.hxx"
      26             : #include "admincontrols.hxx"
      27             : #include "curledit.hxx"
      28             : #include "TextConnectionHelper.hxx"
      29             : 
      30             : #include <svtools/roadmapwizard.hxx>
      31             : #include <ucbhelper/content.hxx>
      32             : #include <vcl/field.hxx>
      33             : 
      34             : namespace dbaui
      35             : 
      36             : {
      37             : 
      38             :     // OSpreadSheetConnectionPageSetup
      39             :     class OSpreadSheetConnectionPageSetup : public OConnectionTabPageSetup
      40             :     {
      41             :     public:
      42             :         virtual bool        FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
      43             :         static  OGenericAdministrationPage* CreateSpreadSheetTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
      44             :         OSpreadSheetConnectionPageSetup(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
      45             : 
      46             :     protected:
      47             :         CheckBox *m_pPasswordrequired;
      48             :         virtual ~OSpreadSheetConnectionPageSetup();
      49             : 
      50             :     protected:
      51             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
      52             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
      53             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
      54             : 
      55             :     };
      56             : 
      57             :     // OTextConnectionPage
      58             :     class OTextConnectionPageSetup : public OConnectionTabPageSetup
      59             :     {
      60             :     public:
      61             :         virtual bool        FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
      62             :            static   OGenericAdministrationPage* CreateTextTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
      63             :         OTextConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
      64             :         OTextConnectionHelper*  m_pTextConnectionHelper;
      65             :     private:
      66             : 
      67             :     protected:
      68             :         virtual ~OTextConnectionPageSetup();
      69             :         virtual bool prepareLeave() SAL_OVERRIDE;
      70             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
      71             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
      72             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
      73             :         bool    checkTestConnection() SAL_OVERRIDE;
      74             : 
      75             :     private:
      76             :         DECL_LINK(ImplGetExtensionHdl, OTextConnectionHelper*);
      77             :     };
      78             : 
      79             :     // OLDAPConnectionPageSetup
      80           0 :     class OLDAPConnectionPageSetup : public OGenericAdministrationPage
      81             :     {
      82             :     public:
      83             :         virtual bool        FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
      84             :         static  OGenericAdministrationPage* CreateLDAPTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
      85             :         OLDAPConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
      86           0 :         virtual Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OLDAPConnectionPageSetup, OnEditModified); }
      87             : 
      88             :     protected:
      89             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
      90             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
      91             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
      92             :         DECL_LINK(OnEditModified,Edit*);
      93             : 
      94             :     private:
      95             :         FixedText*          m_pFTHelpText;
      96             :         FixedText*          m_pFTHostServer;
      97             :         Edit*               m_pETHostServer;
      98             :         FixedText*          m_pFTBaseDN;
      99             :         Edit*               m_pETBaseDN;
     100             :         FixedText*          m_pFTPortNumber;
     101             :         NumericField*       m_pNFPortNumber;
     102             :         FixedText*          m_pFTDefaultPortNumber;
     103             :         CheckBox*           m_pCBUseSSL;
     104             :     };
     105             : 
     106             :     // MySQLNativeSetupPage
     107           0 :     class MySQLNativeSetupPage : public OGenericAdministrationPage
     108             :     {
     109             :     private:
     110             :         FixedText           *m_pHelpText;
     111             :         MySQLNativeSettings m_aMySQLSettings;
     112             : 
     113             :     public:
     114             :         MySQLNativeSetupPage( vcl::Window* _pParent, const SfxItemSet& _rCoreAttrs );
     115             : 
     116             :         static OGenericAdministrationPage* Create( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
     117             : 
     118             :     protected:
     119             :         virtual void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList ) SAL_OVERRIDE;
     120             :         virtual void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ) SAL_OVERRIDE;
     121             : 
     122             :         virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
     123             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
     124             : 
     125             :         virtual Link getControlModifiedLink() SAL_OVERRIDE;
     126             : 
     127             :     private:
     128             :         DECL_LINK( OnModified, Edit* );
     129             :     };
     130             : 
     131             :     // OGeneralSpecialJDBCConnectionPageSetup
     132           0 :     class OGeneralSpecialJDBCConnectionPageSetup : public OGenericAdministrationPage
     133             :     {
     134             :     public:
     135             :         OGeneralSpecialJDBCConnectionPageSetup(   vcl::Window* pParent
     136             :                                         , const SfxItemSet& _rCoreAttrs
     137             :                                         , sal_uInt16 _nPortId
     138             :                                         , sal_uInt16 _nDefaultPortResId
     139             :                                         , sal_uInt16 _nHelpTextResId
     140             :                                         , sal_uInt16 _nHeaderTextResId
     141             :                                         , sal_uInt16 _nDriverClassId );
     142             :     static  OGenericAdministrationPage* CreateMySQLJDBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
     143             :     static  OGenericAdministrationPage* CreateOracleJDBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
     144             : 
     145             :     protected:
     146             :         virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
     147             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
     148             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     149             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     150           0 :         virtual Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OGeneralSpecialJDBCConnectionPageSetup, OnEditModified); }
     151             : 
     152             :         DECL_LINK(OnTestJavaClickHdl,PushButton*);
     153             :         DECL_LINK(OnEditModified,Edit*);
     154             :         FixedText*          m_pHeaderText;
     155             :         FixedText*          m_pFTHelpText;
     156             :         FixedText*          m_pFTDatabasename;
     157             :         Edit*               m_pETDatabasename;
     158             :         FixedText*          m_pFTHostname;
     159             :         Edit*               m_pETHostname;
     160             :         FixedText*          m_pFTPortNumber;
     161             :         FixedText*          m_pFTDefaultPortNumber;
     162             :         NumericField*       m_pNFPortNumber;
     163             : 
     164             :         FixedText*          m_pFTDriverClass;
     165             :         Edit*               m_pETDriverClass;
     166             :         PushButton*         m_pPBTestJavaDriver;
     167             : 
     168             :         OUString              m_sDefaultJdbcDriverName;
     169             :         sal_uInt16              m_nPortId;
     170             :     };
     171             : 
     172             :     // OJDBCConnectionPageSetup
     173           0 :     class OJDBCConnectionPageSetup : public OConnectionTabPageSetup
     174             :     {
     175             :     public:
     176             :                 OJDBCConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
     177             :         static  OGenericAdministrationPage* CreateJDBCTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
     178             : 
     179             :     protected:
     180             :         virtual bool checkTestConnection() SAL_OVERRIDE;
     181             : 
     182             :         virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
     183             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
     184             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     185             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     186             : 
     187             :         DECL_LINK(OnTestJavaClickHdl,PushButton*);
     188             :         DECL_LINK(OnEditModified,Edit*);
     189             :         FixedText*          m_pFTDriverClass;
     190             :         Edit*               m_pETDriverClass;
     191             :         PushButton*         m_pPBTestJavaDriver;
     192             :     };
     193             : 
     194             :     // OJDBCConnectionPageSetup
     195             :     class OMySQLIntroPageSetup : public OGenericAdministrationPage
     196             :     {
     197             :     public:
     198             :         enum ConnectionType
     199             :         {
     200             :             VIA_ODBC,
     201             :             VIA_JDBC,
     202             :             VIA_NATIVE
     203             :         };
     204             : 
     205             :         OMySQLIntroPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
     206             : 
     207             :         static OMySQLIntroPageSetup*    CreateMySQLIntroTabPage( vcl::Window* _pParent, const SfxItemSet& _rAttrSet );
     208             :         ConnectionType      getMySQLMode();
     209             :         Link                maClickHdl;
     210           0 :         void                SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
     211             :         const Link&         GetClickHdl() const { return maClickHdl; }
     212             :         DECL_LINK(ImplClickHdl, OMySQLIntroPageSetup*);
     213             : 
     214             :     protected:
     215             :         virtual bool FillItemSet(SfxItemSet* _rSet) SAL_OVERRIDE;
     216             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
     217             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     218             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     219             :         virtual ~OMySQLIntroPageSetup();
     220             : 
     221             :     private:
     222             :         RadioButton         *m_pODBCDatabase;
     223             :         RadioButton         *m_pJDBCDatabase;
     224             :         RadioButton         *m_pNATIVEDatabase;
     225             : 
     226             :         DECL_LINK(OnSetupModeSelected, RadioButton*);
     227             : 
     228             :     };
     229             : 
     230             :     // OAuthentificationPageSetup
     231             :     class OAuthentificationPageSetup : public OGenericAdministrationPage
     232             :     {
     233             :     public:
     234             :         virtual bool        FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
     235             :         static  OGenericAdministrationPage* CreateAuthentificationTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
     236             :         OAuthentificationPageSetup(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
     237             : 
     238             :     protected:
     239             :         FixedText*  m_pFTHelpText;
     240             :         FixedText*  m_pFTUserName;
     241             :         Edit*       m_pETUserName;
     242             :         CheckBox*   m_pCBPasswordRequired;
     243             :         PushButton* m_pPBTestConnection;
     244             :         virtual ~OAuthentificationPageSetup();
     245             : 
     246             :     protected:
     247             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
     248             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     249             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     250             :     };
     251             : 
     252             :     // OFinalDBPageSetup
     253             :     class OFinalDBPageSetup : public OGenericAdministrationPage
     254             :     {
     255             :     public:
     256             :         virtual bool        FillItemSet ( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
     257             :            static   OGenericAdministrationPage* CreateFinalDBTabPageSetup( vcl::Window* pParent, const SfxItemSet& _rAttrSet);
     258             : 
     259             :         FixedText*   m_pFTFinalHeader;
     260             :         FixedText*   m_pFTFinalHelpText;
     261             :         RadioButton* m_pRBRegisterDataSource;
     262             :         RadioButton* m_pRBDontregisterDataSource;
     263             :         FixedText*   m_pFTAdditionalSettings;
     264             :         CheckBox*    m_pCBOpenAfterwards;
     265             :         CheckBox*    m_pCBStartTableWizard;
     266             :         FixedText*   m_pFTFinalText;
     267             : 
     268             :         OFinalDBPageSetup(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
     269             :         bool IsDatabaseDocumentToBeRegistered();
     270             :         bool IsDatabaseDocumentToBeOpened();
     271             :         bool IsTableWizardToBeStarted();
     272             :         void enableTableWizardCheckBox( bool _bSupportsTableCreation);
     273             : 
     274             :         /// may be used in SetXXXHdl calls to controls, is a link to <method>OnControlModified</method>
     275           0 :         Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OGenericAdministrationPage, OnControlModified); }
     276             : 
     277             :         DECL_LINK(OnOpenSelected, CheckBox*);
     278             :     protected:
     279             :         virtual ~OFinalDBPageSetup();
     280             : 
     281             :     protected:
     282             :         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
     283             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     284             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     285             :     };
     286             : 
     287             : }   // namespace dbaui
     288             : 
     289             : #endif
     290             : 
     291             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10