LCOV - code coverage report
Current view: top level - dbaccess/source/ui/dlg - DBSetupConnectionPages.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 8 0.0 %
Date: 2014-04-14 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( Window* pParent, const SfxItemSet& _rAttrSet );
      44             :         OSpreadSheetConnectionPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs);
      45             : 
      46             :     protected:
      47             :         CheckBox m_aCBPasswordrequired;
      48             :         virtual ~OSpreadSheetConnectionPageSetup();
      49             : 
      50             :     protected:
      51             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_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( Window* pParent, const SfxItemSet& _rAttrSet );
      63             :         OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs );
      64             :         OTextConnectionHelper*  m_pTextConnectionHelper;
      65             :     private:
      66             : 
      67             :     protected:
      68             :         virtual ~OTextConnectionPageSetup();
      69             :         virtual sal_Bool prepareLeave() SAL_OVERRIDE;
      70             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_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( Window* pParent, const SfxItemSet& _rAttrSet );
      85             :         OLDAPConnectionPageSetup( 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, sal_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_aFTHeaderText;
      96             :         FixedText           m_aFTHelpText;
      97             :         FixedText           m_aFTHostServer;
      98             :         Edit                m_aETHostServer;
      99             :         FixedText           m_aFTBaseDN;
     100             :         Edit                m_aETBaseDN;
     101             :         FixedText           m_aFTPortNumber;
     102             :         NumericField        m_aNFPortNumber;
     103             :         FixedText           m_aFTDefaultPortNumber;
     104             :         CheckBox            m_aCBUseSSL;
     105             :     };
     106             : 
     107             :     // MySQLNativeSetupPage
     108           0 :     class MySQLNativeSetupPage : public OGenericAdministrationPage
     109             :     {
     110             :     private:
     111             :         FixedText           m_aHeader;
     112             :         FixedText           m_aHelpText;
     113             :         MySQLNativeSettings m_aMySQLSettings;
     114             : 
     115             :     public:
     116             :         MySQLNativeSetupPage( Window* _pParent, const SfxItemSet& _rCoreAttrs );
     117             : 
     118             :         static OGenericAdministrationPage* Create( Window* pParent, const SfxItemSet& _rAttrSet );
     119             : 
     120             :     protected:
     121             :         virtual void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList ) SAL_OVERRIDE;
     122             :         virtual void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ) SAL_OVERRIDE;
     123             : 
     124             :         virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     125             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     126             : 
     127             :         virtual Link getControlModifiedLink() SAL_OVERRIDE;
     128             : 
     129             :     private:
     130             :         DECL_LINK( OnModified, Edit* );
     131             :     };
     132             : 
     133             :     // OGeneralSpecialJDBCConnectionPageSetup
     134           0 :     class OGeneralSpecialJDBCConnectionPageSetup : public OGenericAdministrationPage
     135             :     {
     136             :     public:
     137             :         OGeneralSpecialJDBCConnectionPageSetup(   Window* pParent
     138             :                                         , sal_uInt16 _nResId
     139             :                                         , const SfxItemSet& _rCoreAttrs
     140             :                                         , sal_uInt16 _nPortId
     141             :                                         , sal_uInt16 _nDefaultPortResId
     142             :                                         , sal_uInt16 _nHelpTextResId
     143             :                                         , sal_uInt16 _nHeaderTextResId
     144             :                                         , sal_uInt16 _nDriverClassId );
     145             :     static  OGenericAdministrationPage* CreateMySQLJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
     146             :     static  OGenericAdministrationPage* CreateOracleJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
     147             : 
     148             :     protected:
     149             :         virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     150             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     151             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     152             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     153           0 :         virtual Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OGeneralSpecialJDBCConnectionPageSetup, OnEditModified); }
     154             : 
     155             :         DECL_LINK(OnTestJavaClickHdl,PushButton*);
     156             :         DECL_LINK(OnEditModified,Edit*);
     157             :         FixedText           m_aFTHelpText;
     158             :         FixedText           m_aFTDatabasename;
     159             :         Edit                m_aETDatabasename;
     160             :         FixedText           m_aFTHostname;
     161             :         Edit                m_aETHostname;
     162             :         FixedText           m_aFTPortNumber;
     163             :         FixedText           m_aFTDefaultPortNumber;
     164             :         NumericField        m_aNFPortNumber;
     165             : 
     166             :         FixedText           m_aFTDriverClass;
     167             :         Edit                m_aETDriverClass;
     168             :         PushButton          m_aPBTestJavaDriver;
     169             : 
     170             :         OUString              m_sDefaultJdbcDriverName;
     171             :         sal_uInt16              m_nPortId;
     172             :     };
     173             : 
     174             :     // OJDBCConnectionPageSetup
     175           0 :     class OJDBCConnectionPageSetup : public OConnectionTabPageSetup
     176             :     {
     177             :     public:
     178             :                 OJDBCConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs );
     179             :         static  OGenericAdministrationPage* CreateJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
     180             : 
     181             :     protected:
     182             :         virtual bool checkTestConnection() SAL_OVERRIDE;
     183             : 
     184             :         virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     185             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     186             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     187             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     188             : 
     189             :         DECL_LINK(OnTestJavaClickHdl,PushButton*);
     190             :         DECL_LINK(OnEditModified,Edit*);
     191             :         FixedText           m_aFTDriverClass;
     192             :         Edit                m_aETDriverClass;
     193             :         PushButton          m_aPBTestJavaDriver;
     194             :     };
     195             : 
     196             :     // OJDBCConnectionPageSetup
     197             :     class OMySQLIntroPageSetup : public OGenericAdministrationPage
     198             :     {
     199             :     public:
     200             :         enum ConnectionType
     201             :         {
     202             :             VIA_ODBC,
     203             :             VIA_JDBC,
     204             :             VIA_NATIVE
     205             :         };
     206             : 
     207             :         OMySQLIntroPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs);
     208             : 
     209             :         static OMySQLIntroPageSetup*    CreateMySQLIntroTabPage( Window* _pParent, const SfxItemSet& _rAttrSet );
     210             :         ConnectionType      getMySQLMode();
     211             :         Link                maClickHdl;
     212           0 :         void                SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
     213             :         const Link&         GetClickHdl() const { return maClickHdl; }
     214             :         DECL_LINK(ImplClickHdl, OMySQLIntroPageSetup*);
     215             : 
     216             :     protected:
     217             :         virtual bool FillItemSet(SfxItemSet& _rSet) SAL_OVERRIDE;
     218             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     219             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     220             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     221             :         virtual ~OMySQLIntroPageSetup();
     222             : 
     223             :     private:
     224             :         RadioButton         m_aRB_ODBCDatabase;
     225             :         RadioButton         m_aRB_JDBCDatabase;
     226             :         RadioButton         m_aRB_NATIVEDatabase;
     227             :         FixedText           m_aFT_ConnectionMode;
     228             :         FixedText           m_aFT_Helptext;
     229             :         FixedText           m_aFT_Headertext;
     230             : 
     231             :         DECL_LINK(OnSetupModeSelected, RadioButton*);
     232             : 
     233             :     };
     234             : 
     235             :     // OAuthentificationPageSetup
     236             :     class OAuthentificationPageSetup : public OGenericAdministrationPage
     237             :     {
     238             :     public:
     239             :         virtual bool        FillItemSet ( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     240             :         static  OGenericAdministrationPage* CreateAuthentificationTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
     241             :         OAuthentificationPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs);
     242             : 
     243             :     protected:
     244             :         FixedText   m_aFTHelpText;
     245             :         FixedText   m_aFTHeaderText;
     246             :         FixedText   m_aFTUserName;
     247             :         Edit        m_aETUserName;
     248             :         CheckBox    m_aCBPasswordRequired;
     249             :         PushButton  m_aPBTestConnection;
     250             :         virtual ~OAuthentificationPageSetup();
     251             : 
     252             :     protected:
     253             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     254             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     255             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     256             :     };
     257             : 
     258             :     // OFinalDBPageSetup
     259             :     class OFinalDBPageSetup : public OGenericAdministrationPage
     260             :     {
     261             :     public:
     262             :         virtual bool        FillItemSet ( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     263             :            static   OGenericAdministrationPage* CreateFinalDBTabPageSetup( Window* pParent, const SfxItemSet& _rAttrSet);
     264             : 
     265             :         FixedText*   m_pFTFinalHeader;
     266             :         FixedText*   m_pFTFinalHelpText;
     267             :         RadioButton* m_pRBRegisterDataSource;
     268             :         RadioButton* m_pRBDontregisterDataSource;
     269             :         FixedText*   m_pFTAdditionalSettings;
     270             :         CheckBox*    m_pCBOpenAfterwards;
     271             :         CheckBox*    m_pCBStartTableWizard;
     272             :         FixedText*   m_pFTFinalText;
     273             : 
     274             :         OFinalDBPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs);
     275             :         sal_Bool IsDatabaseDocumentToBeRegistered();
     276             :         sal_Bool IsDatabaseDocumentToBeOpened();
     277             :         sal_Bool IsTableWizardToBeStarted();
     278             :         void enableTableWizardCheckBox( sal_Bool _bSupportsTableCreation);
     279             : 
     280             :         /// may be used in SetXXXHdl calls to controls, is a link to <method>OnControlModified</method>
     281           0 :         Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OGenericAdministrationPage, OnControlModified); }
     282             : 
     283             :         DECL_LINK(OnOpenSelected, CheckBox*);
     284             :     protected:
     285             :         virtual ~OFinalDBPageSetup();
     286             : 
     287             :     protected:
     288             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     289             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     290             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     291             :     };
     292             : 
     293             : }   // namespace dbaui
     294             : 
     295             : #endif
     296             : 
     297             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10