LCOV - code coverage report
Current view: top level - dbaccess/source/ui/dlg - detailpages.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 6 0.0 %
Date: 2012-08-25 Functions: 0 12 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 76 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_DETAILPAGES_HXX_
      21                 :            : #define _DBAUI_DETAILPAGES_HXX_
      22                 :            : 
      23                 :            : #include "adminpages.hxx"
      24                 :            : #include "charsets.hxx"
      25                 :            : #include "charsetlistbox.hxx"
      26                 :            : #include <vcl/field.hxx>
      27                 :            : #include <vcl/fixed.hxx>
      28                 :            : #include <vcl/lstbox.hxx>
      29                 :            : #include <vcl/edit.hxx>
      30                 :            : #include <vcl/button.hxx>
      31                 :            : #include "TextConnectionHelper.hxx"
      32                 :            : #include "admincontrols.hxx"
      33                 :            : 
      34                 :            : #include <svtools/dialogcontrolling.hxx>
      35                 :            : 
      36                 :            : 
      37                 :            : //.........................................................................
      38                 :            : namespace dbaui
      39                 :            : {
      40                 :            : //.........................................................................
      41                 :            :     //=========================================================================
      42                 :            :     //= OCommonBehaviourTabPage
      43                 :            :     //=========================================================================
      44                 :            :     #define     CBTP_NONE                           0x00000000
      45                 :            :     #define     CBTP_USE_CHARSET                    0x00000002
      46                 :            :     #define     CBTP_USE_OPTIONS                    0x00000004
      47                 :            : 
      48                 :            :     /** eases the implementation of tab pages handling user/password and/or character
      49                 :            :         set and/or generic options input
      50                 :            :         <BR>
      51                 :            :         The controls to be used habe to be defined within the resource, as usual, but
      52                 :            :         this class does all the handling necessary.
      53                 :            :     */
      54                 :            :     class OCommonBehaviourTabPage : public OGenericAdministrationPage
      55                 :            :     {
      56                 :            :     protected:
      57                 :            : 
      58                 :            :         FixedText*          m_pOptionsLabel;
      59                 :            :         Edit*               m_pOptions;
      60                 :            : 
      61                 :            :         FixedLine*          m_pDataConvertFixedLine;
      62                 :            :         FixedText*          m_pCharsetLabel;
      63                 :            :         CharSetListBox*     m_pCharset;
      64                 :            : 
      65                 :            :         FixedLine*          m_pAutoFixedLine;
      66                 :            :         CheckBox*           m_pAutoRetrievingEnabled;
      67                 :            :         FixedText*          m_pAutoIncrementLabel;
      68                 :            :         Edit*               m_pAutoIncrement;
      69                 :            :         FixedText*          m_pAutoRetrievingLabel;
      70                 :            :         Edit*               m_pAutoRetrieving;
      71                 :            : 
      72                 :            :         sal_uInt32          m_nControlFlags;
      73                 :            : 
      74                 :            :     public:
      75                 :            :         virtual sal_Bool        FillItemSet (SfxItemSet& _rCoreAttrs);
      76                 :            : 
      77                 :            :         OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true);
      78                 :            :     protected:
      79                 :            : 
      80                 :            :             // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
      81                 :            :         virtual ~OCommonBehaviourTabPage();
      82                 :            : 
      83                 :            :         // must be overloaded by subclasses, but it isn't pure virtual
      84                 :            :         virtual void        implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
      85                 :            : 
      86                 :            :         // <method>OGenericAdministrationPage::fillControls</method>
      87                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
      88                 :            : 
      89                 :            :         // <method>OGenericAdministrationPage::fillWindows</method>
      90                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
      91                 :            :     };
      92                 :            : 
      93                 :            :     //========================================================================
      94                 :            :     //= ODbaseDetailsPage
      95                 :            :     //========================================================================
      96                 :            :     class ODbaseDetailsPage : public OCommonBehaviourTabPage
      97                 :            :     {
      98                 :            :     public:
      99                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
     100                 :            : 
     101                 :            :         ODbaseDetailsPage(Window* pParent, const SfxItemSet& _rCoreAttrs);
     102                 :            :     private:
     103                 :            :         // please add new controls also to <method>fillControls</method> or <method>fillWindows</method>
     104                 :            :         CheckBox            m_aShowDeleted;
     105                 :            :         FixedLine           m_aFL_1;
     106                 :            :         FixedText           m_aFT_Message;
     107                 :            :         PushButton          m_aIndexes;
     108                 :            : 
     109                 :            :         String              m_sDsn;
     110                 :            : 
     111                 :            :     protected:
     112                 :            : 
     113                 :            :         virtual ~ODbaseDetailsPage();
     114                 :            : 
     115                 :            :     protected:
     116                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     117                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     118                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     119                 :            : 
     120                 :            :     private:
     121                 :            :         DECL_LINK( OnButtonClicked, Button * );
     122                 :            :     };
     123                 :            : 
     124                 :            :     //========================================================================
     125                 :            :     //= OAdoDetailsPage
     126                 :            :     //========================================================================
     127                 :            :     class OAdoDetailsPage : public OCommonBehaviourTabPage
     128                 :            :     {
     129                 :            :     protected:
     130                 :            :         virtual ~OAdoDetailsPage();
     131                 :            :     public:
     132                 :            : 
     133                 :            :         OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     134                 :            :     };
     135                 :            : 
     136                 :            :     //========================================================================
     137                 :            :     //= OOdbcDetailsPage
     138                 :            :     //========================================================================
     139 [ #  # ][ #  # ]:          0 :     class OOdbcDetailsPage : public OCommonBehaviourTabPage
                 [ #  # ]
     140                 :            :     {
     141                 :            :     public:
     142                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
     143                 :            : 
     144                 :            :         OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     145                 :            :     protected:
     146                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     147                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     148                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     149                 :            :     private:
     150                 :            :         FixedLine           m_aFL_1;
     151                 :            :         CheckBox            m_aUseCatalog;
     152                 :            :     };
     153                 :            : 
     154                 :            : 
     155                 :            :     //========================================================================
     156                 :            :     //= OUserDriverDetailsPage
     157                 :            :     //========================================================================
     158 [ #  # ][ #  # ]:          0 :     class OUserDriverDetailsPage : public OCommonBehaviourTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     159                 :            :     {
     160                 :            :     public:
     161                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
     162                 :            : 
     163                 :            :         OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     164                 :            :     protected:
     165                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     166                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     167                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     168                 :            :     private:
     169                 :            :         FixedText           m_aFTHostname;
     170                 :            :         Edit                m_aEDHostname;
     171                 :            :         FixedText           m_aPortNumber;
     172                 :            :         NumericField        m_aNFPortNumber;
     173                 :            :         CheckBox            m_aUseCatalog;
     174                 :            :     };
     175                 :            : 
     176                 :            :     //========================================================================
     177                 :            :     //= OMySQLODBCDetailsPage
     178                 :            :     //========================================================================
     179         [ #  # ]:          0 :     class OMySQLODBCDetailsPage : public OCommonBehaviourTabPage
     180                 :            :     {
     181                 :            :     public:
     182                 :            :         OMySQLODBCDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     183                 :            :     };
     184                 :            : 
     185                 :            :     //========================================================================
     186                 :            :     //= OGeneralSpecialJDBCDetailsPage
     187                 :            :     //========================================================================
     188 [ #  # ][ #  # ]:          0 :     class OGeneralSpecialJDBCDetailsPage : public OCommonBehaviourTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     189                 :            :     {
     190                 :            :     public:
     191                 :            :         OGeneralSpecialJDBCDetailsPage(   Window* pParent
     192                 :            :                                         , sal_uInt16 _nResId
     193                 :            :                                         , const SfxItemSet& _rCoreAttrs
     194                 :            :                                         , sal_uInt16 _nPortId
     195                 :            :                                         );
     196                 :            : 
     197                 :            :     protected:
     198                 :            : 
     199                 :            : 
     200                 :            :         virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
     201                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     202                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     203                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     204                 :            : 
     205                 :            :         DECL_LINK(OnTestJavaClickHdl,PushButton*);
     206                 :            :         DECL_LINK(OnEditModified,Edit*);
     207                 :            : 
     208                 :            :         FixedLine           m_aFL_1;
     209                 :            :         FixedText           m_aFTHostname;
     210                 :            :         Edit                m_aEDHostname;
     211                 :            :         FixedText           m_aPortNumber;
     212                 :            :         NumericField        m_aNFPortNumber;
     213                 :            :         FixedText           m_aFTSocket;
     214                 :            :         Edit                m_aEDSocket;
     215                 :            : 
     216                 :            :         FixedText           m_aFTDriverClass;
     217                 :            :         Edit                m_aEDDriverClass;
     218                 :            :         PushButton          m_aTestJavaDriver;
     219                 :            : 
     220                 :            :         String              m_sDefaultJdbcDriverName;
     221                 :            :         sal_uInt16              m_nPortId;
     222                 :            :         bool                m_bUseClass;
     223                 :            :     };
     224                 :            : 
     225                 :            :     //========================================================================
     226                 :            :     //= MySQLNativePage
     227                 :            :     //========================================================================
     228 [ #  # ][ #  # ]:          0 :     class MySQLNativePage : public OCommonBehaviourTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     229                 :            :     {
     230                 :            :     public:
     231                 :            :         MySQLNativePage(    Window* pParent,
     232                 :            :                             const SfxItemSet& _rCoreAttrs );
     233                 :            : 
     234                 :            :     private:
     235                 :            :         FixedLine           m_aSeparator1;
     236                 :            :         MySQLNativeSettings m_aMySQLSettings;
     237                 :            : 
     238                 :            :         FixedLine           m_aSeparator2;
     239                 :            :         FixedText           m_aUserNameLabel;
     240                 :            :         Edit                m_aUserName;
     241                 :            :         CheckBox            m_aPasswordRequired;
     242                 :            : 
     243                 :            :     protected:
     244                 :            :         virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
     245                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     246                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     247                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     248                 :            :     };
     249                 :            : 
     250                 :            :     //========================================================================
     251                 :            :     //= OOdbcDetailsPage
     252                 :            :     //========================================================================
     253 [ #  # ][ #  # ]:          0 :     class OLDAPDetailsPage : public OCommonBehaviourTabPage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     254                 :            :     {
     255                 :            :     public:
     256                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
     257                 :            : 
     258                 :            :         OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     259                 :            :     protected:
     260                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     261                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     262                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     263                 :            :     private:
     264                 :            :         FixedLine           m_aFL_1;
     265                 :            :         FixedText           m_aBaseDN;
     266                 :            :         Edit                m_aETBaseDN;
     267                 :            :         CheckBox            m_aCBUseSSL;
     268                 :            :         FixedText           m_aPortNumber;
     269                 :            :         NumericField        m_aNFPortNumber;
     270                 :            :         FixedText           m_aFTRowCount;
     271                 :            :         NumericField        m_aNFRowCount;
     272                 :            : 
     273                 :            :         sal_Int32           m_iSSLPort;
     274                 :            :         sal_Int32           m_iNormalPort;
     275                 :            :         DECL_LINK( OnCheckBoxClick, CheckBox * );
     276                 :            :     };
     277                 :            : 
     278                 :            :     //========================================================================
     279                 :            :     //= OMozillaDetailsPage Detail page for Mozilla and Thunderbird addressbook
     280                 :            :     //========================================================================
     281                 :            :     class OMozillaDetailsPage : public OCommonBehaviourTabPage
     282                 :            :     {
     283                 :            :     protected:
     284                 :            :         virtual ~OMozillaDetailsPage();
     285                 :            :     public:
     286                 :            : 
     287                 :            :         OMozillaDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     288                 :            :     };
     289                 :            : 
     290                 :            :     //========================================================================
     291                 :            :     //= OTextDetailsPage
     292                 :            :     //========================================================================
     293                 :            :     class OTextDetailsPage : public OCommonBehaviourTabPage
     294                 :            :     {
     295                 :            :     public:
     296                 :            :         virtual sal_Bool        FillItemSet ( SfxItemSet& _rCoreAttrs );
     297                 :            : 
     298                 :            :         OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     299                 :            :         OTextConnectionHelper*  m_pTextConnectionHelper;
     300                 :            : 
     301                 :            :     private:
     302                 :            : 
     303                 :            :         String      m_aFieldSeparatorList;
     304                 :            :         String      m_aTextSeparatorList;
     305                 :            :         String      m_aTextNone;
     306                 :            :     protected:
     307                 :            :         virtual ~OTextDetailsPage();
     308                 :            :         virtual sal_Bool prepareLeave();
     309                 :            : 
     310                 :            :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
     311                 :            :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
     312                 :            :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
     313                 :            : 
     314                 :            :     private:
     315                 :            :     };
     316                 :            : 
     317                 :            : //.........................................................................
     318                 :            : }   // namespace dbaui
     319                 :            : //.........................................................................
     320                 :            : 
     321                 :            : #endif // _DBAUI_DETAILPAGES_HXX_
     322                 :            : 
     323                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10