LCOV - code coverage report
Current view: top level - dbaccess/source/ui/dlg - DBSetupConnectionPages.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 8 0.0 %
Date: 2012-08-25 Functions: 0 12 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 64 0.0 %

           Branch data     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 DBAUI_DBSETUPCONNECTIONPAGES_HXX
      21                 :            : #define DBAUI_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                 :            : 
      35                 :            : //.........................................................................
      36                 :            : namespace dbaui
      37                 :            : 
      38                 :            : {
      39                 :            : //.........................................................................
      40                 :            : 
      41                 :            :        //========================================================================
      42                 :            :     //= OSpreadSheetConnectionPageSetup
      43                 :            :     //========================================================================
      44                 :            :     class OSpreadSheetConnectionPageSetup : public OConnectionTabPageSetup
      45                 :            :     {
      46                 :            :     public:
      47                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
      48                 :            :         static  OGenericAdministrationPage* CreateSpreadSheetTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
      49                 :            :         OSpreadSheetConnectionPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs);
      50                 :            : 
      51                 :            :     protected:
      52                 :            :         CheckBox m_aCBPasswordrequired;
      53                 :            :         virtual ~OSpreadSheetConnectionPageSetup();
      54                 :            : 
      55                 :            :     protected:
      56                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
      57                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
      58                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
      59                 :            : 
      60                 :            :     };
      61                 :            : 
      62                 :            :     //========================================================================
      63                 :            :     //= OTextConnectionPage
      64                 :            :     //========================================================================
      65                 :            :     class OTextConnectionPageSetup : public OConnectionTabPageSetup
      66                 :            :     {
      67                 :            :     public:
      68                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
      69                 :            :            static   OGenericAdministrationPage* CreateTextTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
      70                 :            :         OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs );
      71                 :            :         OTextConnectionHelper*  m_pTextConnectionHelper;
      72                 :            :     private:
      73                 :            : 
      74                 :            :     protected:
      75                 :            :         virtual ~OTextConnectionPageSetup();
      76                 :            :         virtual sal_Bool prepareLeave();
      77                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
      78                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
      79                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
      80                 :            :         bool    checkTestConnection();
      81                 :            : 
      82                 :            :     private:
      83                 :            :         DECL_LINK(ImplGetExtensionHdl, OTextConnectionHelper*);
      84                 :            :     };
      85                 :            : 
      86                 :            :     //========================================================================
      87                 :            :     //= OLDAPConnectionPageSetup
      88                 :            :     //========================================================================
      89 [ #  # ][ #  # ]:          0 :     class OLDAPConnectionPageSetup : public OGenericAdministrationPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
      90                 :            :     {
      91                 :            :     public:
      92                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
      93                 :            :         static  OGenericAdministrationPage* CreateLDAPTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
      94                 :            :         OLDAPConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs );
      95                 :          0 :         virtual Link getControlModifiedLink() { return LINK(this, OLDAPConnectionPageSetup, OnEditModified); }
      96                 :            : 
      97                 :            :     protected:
      98                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
      99                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     100                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     101                 :            :         DECL_LINK(OnEditModified,Edit*);
     102                 :            : 
     103                 :            :     private:
     104                 :            :         FixedText           m_aFTHeaderText;
     105                 :            :         FixedText           m_aFTHelpText;
     106                 :            :         FixedText           m_aFTHostServer;
     107                 :            :         Edit                m_aETHostServer;
     108                 :            :         FixedText           m_aFTBaseDN;
     109                 :            :         Edit                m_aETBaseDN;
     110                 :            :         FixedText           m_aFTPortNumber;
     111                 :            :         NumericField        m_aNFPortNumber;
     112                 :            :         FixedText           m_aFTDefaultPortNumber;
     113                 :            :         CheckBox            m_aCBUseSSL;
     114                 :            :     };
     115                 :            : 
     116                 :            :     //========================================================================
     117                 :            :     //= MySQLNativeSetupPage
     118                 :            :     //========================================================================
     119 [ #  # ][ #  # ]:          0 :     class MySQLNativeSetupPage : public OGenericAdministrationPage
         [ #  # ][ #  # ]
     120                 :            :     {
     121                 :            :     private:
     122                 :            :         FixedText           m_aHeader;
     123                 :            :         FixedText           m_aHelpText;
     124                 :            :         MySQLNativeSettings m_aMySQLSettings;
     125                 :            : 
     126                 :            :     public:
     127                 :            :         MySQLNativeSetupPage( Window* _pParent, const SfxItemSet& _rCoreAttrs );
     128                 :            : 
     129                 :            :         static OGenericAdministrationPage* Create( Window* pParent, const SfxItemSet& _rAttrSet );
     130                 :            : 
     131                 :            :     protected:
     132                 :            :         virtual void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList );
     133                 :            :         virtual void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList );
     134                 :            : 
     135                 :            :         virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
     136                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     137                 :            : 
     138                 :            :         virtual Link getControlModifiedLink();
     139                 :            : 
     140                 :            :     private:
     141                 :            :         DECL_LINK( OnModified, Edit* );
     142                 :            :     };
     143                 :            : 
     144                 :            :     //========================================================================
     145                 :            :     //= OGeneralSpecialJDBCConnectionPageSetup
     146                 :            :     //========================================================================
     147 [ #  # ][ #  # ]:          0 :     class OGeneralSpecialJDBCConnectionPageSetup : public OGenericAdministrationPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     148                 :            :     {
     149                 :            :     public:
     150                 :            :         OGeneralSpecialJDBCConnectionPageSetup(   Window* pParent
     151                 :            :                                         , sal_uInt16 _nResId
     152                 :            :                                         , const SfxItemSet& _rCoreAttrs
     153                 :            :                                         , sal_uInt16 _nPortId
     154                 :            :                                         , sal_uInt16 _nDefaultPortResId
     155                 :            :                                         , sal_uInt16 _nHelpTextResId
     156                 :            :                                         , sal_uInt16 _nHeaderTextResId
     157                 :            :                                         , sal_uInt16 _nDriverClassId );
     158                 :            :     static  OGenericAdministrationPage* CreateMySQLJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
     159                 :            :     static  OGenericAdministrationPage* CreateOracleJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
     160                 :            : 
     161                 :            :     protected:
     162                 :            :         virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
     163                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     164                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     165                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     166                 :          0 :         virtual Link getControlModifiedLink() { return LINK(this, OGeneralSpecialJDBCConnectionPageSetup, OnEditModified); }
     167                 :            : 
     168                 :            :         DECL_LINK(OnTestJavaClickHdl,PushButton*);
     169                 :            :         DECL_LINK(OnEditModified,Edit*);
     170                 :            :         FixedText           m_aFTHelpText;
     171                 :            :         FixedText           m_aFTDatabasename;
     172                 :            :         Edit                m_aETDatabasename;
     173                 :            :         FixedText           m_aFTHostname;
     174                 :            :         Edit                m_aETHostname;
     175                 :            :         FixedText           m_aFTPortNumber;
     176                 :            :         FixedText           m_aFTDefaultPortNumber;
     177                 :            :         NumericField        m_aNFPortNumber;
     178                 :            : 
     179                 :            : 
     180                 :            :         FixedText           m_aFTDriverClass;
     181                 :            :         Edit                m_aETDriverClass;
     182                 :            :         PushButton          m_aPBTestJavaDriver;
     183                 :            : 
     184                 :            :         String              m_sDefaultJdbcDriverName;
     185                 :            :         sal_uInt16              m_nPortId;
     186                 :            :     };
     187                 :            : 
     188                 :            : 
     189                 :            :     //========================================================================
     190                 :            :     //= OJDBCConnectionPageSetup
     191                 :            :     //========================================================================
     192 [ #  # ][ #  # ]:          0 :     class OJDBCConnectionPageSetup : public OConnectionTabPageSetup
         [ #  # ][ #  # ]
     193                 :            :     {
     194                 :            :     public:
     195                 :            :                 OJDBCConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs );
     196                 :            :         static  OGenericAdministrationPage* CreateJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
     197                 :            : 
     198                 :            :     protected:
     199                 :            :         virtual bool checkTestConnection();
     200                 :            : 
     201                 :            :         virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
     202                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     203                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     204                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     205                 :            : 
     206                 :            :         DECL_LINK(OnTestJavaClickHdl,PushButton*);
     207                 :            :         DECL_LINK(OnEditModified,Edit*);
     208                 :            :         FixedText           m_aFTDriverClass;
     209                 :            :         Edit                m_aETDriverClass;
     210                 :            :         PushButton          m_aPBTestJavaDriver;
     211                 :            :     };
     212                 :            : 
     213                 :            : 
     214                 :            : 
     215                 :            :     //========================================================================
     216                 :            :     //= OJDBCConnectionPageSetup
     217                 :            :     //========================================================================
     218                 :            :     class OMySQLIntroPageSetup : public OGenericAdministrationPage
     219                 :            :     {
     220                 :            :     public:
     221                 :            :         enum ConnectionType
     222                 :            :         {
     223                 :            :             VIA_ODBC,
     224                 :            :             VIA_JDBC,
     225                 :            :             VIA_NATIVE
     226                 :            :         };
     227                 :            : 
     228                 :            :         OMySQLIntroPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs);
     229                 :            : 
     230                 :            :         static OMySQLIntroPageSetup*    CreateMySQLIntroTabPage( Window* _pParent, const SfxItemSet& _rAttrSet );
     231                 :            :         ConnectionType      getMySQLMode();
     232                 :            :         Link                maClickHdl;
     233                 :          0 :         void                SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
     234                 :            :         const Link&         GetClickHdl() const { return maClickHdl; }
     235                 :            :         DECL_LINK(ImplClickHdl, OMySQLIntroPageSetup*);
     236                 :            : 
     237                 :            : 
     238                 :            : 
     239                 :            : 
     240                 :            :     protected:
     241                 :            :         virtual sal_Bool FillItemSet(SfxItemSet& _rSet);
     242                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     243                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     244                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     245                 :            :         virtual ~OMySQLIntroPageSetup();
     246                 :            : 
     247                 :            :     private:
     248                 :            :         RadioButton         m_aRB_ODBCDatabase;
     249                 :            :         RadioButton         m_aRB_JDBCDatabase;
     250                 :            :         RadioButton         m_aRB_NATIVEDatabase;
     251                 :            :         FixedText           m_aFT_ConnectionMode;
     252                 :            :         FixedText           m_aFT_Helptext;
     253                 :            :         FixedText           m_aFT_Headertext;
     254                 :            : 
     255                 :            :         DECL_LINK(OnSetupModeSelected, RadioButton*);
     256                 :            : 
     257                 :            :     };
     258                 :            : 
     259                 :            : 
     260                 :            : 
     261                 :            : 
     262                 :            :        //========================================================================
     263                 :            :     //= OAuthentificationPageSetup
     264                 :            :     //========================================================================
     265                 :            :     class OAuthentificationPageSetup : public OGenericAdministrationPage
     266                 :            :     {
     267                 :            :     public:
     268                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
     269                 :            :         static  OGenericAdministrationPage* CreateAuthentificationTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
     270                 :            :         OAuthentificationPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs);
     271                 :            : 
     272                 :            :     protected:
     273                 :            :         FixedText   m_aFTHelpText;
     274                 :            :         FixedText   m_aFTHeaderText;
     275                 :            :         FixedText   m_aFTUserName;
     276                 :            :         Edit        m_aETUserName;
     277                 :            :         CheckBox    m_aCBPasswordRequired;
     278                 :            :         PushButton  m_aPBTestConnection;
     279                 :            :         virtual ~OAuthentificationPageSetup();
     280                 :            : 
     281                 :            :     protected:
     282                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     283                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     284                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     285                 :            :     };
     286                 :            : 
     287                 :            : 
     288                 :            : 
     289                 :            :        //========================================================================
     290                 :            :     //= OFinalDBPageSetup
     291                 :            :     //========================================================================
     292                 :            :     class OFinalDBPageSetup : public OGenericAdministrationPage
     293                 :            :     {
     294                 :            :     public:
     295                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
     296                 :            :            static   OGenericAdministrationPage* CreateFinalDBTabPageSetup( Window* pParent, const SfxItemSet& _rAttrSet);
     297                 :            : 
     298                 :            :         FixedText   m_aFTFinalHeader;
     299                 :            :         FixedText   m_aFTFinalHelpText;
     300                 :            :         RadioButton m_aRBRegisterDataSource;
     301                 :            :         RadioButton m_aRBDontregisterDataSource;
     302                 :            :         FixedText   m_aFTAdditionalSettings;
     303                 :            :         CheckBox    m_aCBOpenAfterwards;
     304                 :            :         CheckBox    m_aCBStartTableWizard;
     305                 :            :         FixedText   m_aFTFinalText;
     306                 :            : 
     307                 :            :         OFinalDBPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs);
     308                 :            :         sal_Bool IsDatabaseDocumentToBeRegistered();
     309                 :            :         sal_Bool IsDatabaseDocumentToBeOpened();
     310                 :            :         sal_Bool IsTableWizardToBeStarted();
     311                 :            :         void enableTableWizardCheckBox( sal_Bool _bSupportsTableCreation);
     312                 :            : 
     313                 :            :         /// may be used in SetXXXHdl calls to controls, is a link to <method>OnControlModified</method>
     314                 :          0 :         Link getControlModifiedLink() { return LINK(this, OGenericAdministrationPage, OnControlModified); }
     315                 :            : 
     316                 :            :         DECL_LINK(OnOpenSelected, CheckBox*);
     317                 :            :     protected:
     318                 :            :         virtual ~OFinalDBPageSetup();
     319                 :            : 
     320                 :            :     protected:
     321                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     322                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     323                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     324                 :            :     };
     325                 :            : 
     326                 :            : //.........................................................................
     327                 :            : }   // namespace dbaui
     328                 :            : //.........................................................................
     329                 :            : 
     330                 :            : #endif
     331                 :            : 
     332                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10