LCOV - code coverage report
Current view: top level - cui/source/inc - dbregister.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 2 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 3 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_CUI_SOURCE_INC_DBREGISTER_HXX
      21             : #define INCLUDED_CUI_SOURCE_INC_DBREGISTER_HXX
      22             : 
      23             : #include <rtl/ustring.hxx>
      24             : #include <sfx2/basedlgs.hxx>
      25             : #include <svl/poolitem.hxx>
      26             : #include <svtools/simptabl.hxx>
      27             : #include "optpath.hxx"
      28             : 
      29             : class SvTreeListEntry;
      30             : namespace svx
      31             : {
      32             :     class OptHeaderTabListBox;
      33             : }
      34             : 
      35             : namespace svx
      36             : {
      37             : 
      38             :     class DbRegistrationOptionsPage : public SfxTabPage
      39             :     {
      40             :     private:
      41             :         OUString            aTypeText;
      42             :         OUString            aPathText;
      43             : 
      44             :         VclPtr<SvSimpleTableContainer> m_pPathCtrl;
      45             :         VclPtr<PushButton>         m_pNew;
      46             :         VclPtr<PushButton>         m_pEdit;
      47             :         VclPtr<PushButton>         m_pDelete;
      48             : 
      49             :         VclPtr<svx::OptHeaderTabListBox> pPathBox;
      50             :         SvTreeListEntry*        m_pCurEntry;
      51             :         sal_uLong               m_nOldCount;
      52             :         bool                m_bModified;
      53             : 
      54             : #ifdef INCLUDED_CUI_SOURCE_INC_DBREGISTER_HXX
      55             :         DECL_LINK( NewHdl, void * );
      56             :         DECL_LINK( EditHdl, void * );
      57             :         DECL_LINK( DeleteHdl, void * );
      58             : 
      59             :         DECL_LINK(PathSelect_Impl, void *);
      60             : 
      61             :         DECL_LINK( HeaderSelect_Impl, HeaderBar * );
      62             :         DECL_LINK( HeaderEndDrag_Impl, HeaderBar * );
      63             :         DECL_LINK( NameValidator, OUString*);
      64             : 
      65             : 
      66             :         /** inserts a new entry in the tablistbox
      67             :             @param  _sName
      68             :                 The name of the entry.
      69             :             @param  _sLocation
      70             :                 The location of the file.
      71             :         */
      72             :         void insertNewEntry( const OUString& _sName,const OUString& _sLocation, const bool bReadOnly );
      73             : 
      74             :         /** opens the LinkDialog to create a register pair
      75             :             @param  _sOldName
      76             :                 The old name of the entry may be empty.
      77             :             @param  _sOldLocation
      78             :                 The old location of the entry may be empty.
      79             :             @param  _pEntry
      80             :                 The entry to remove if the entry will be changed
      81             :         */
      82             :         void openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry = NULL);
      83             : 
      84             : #endif
      85             : 
      86             :     public:
      87             :         DbRegistrationOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet );
      88             :         virtual ~DbRegistrationOptionsPage();
      89             :         virtual void dispose() SAL_OVERRIDE;
      90             : 
      91             :         static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rSet );
      92             :         static const sal_uInt16*      GetRanges();
      93             : 
      94             :         virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
      95             :         virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
      96             :         virtual void        FillUserData() SAL_OVERRIDE;
      97             :     };
      98             : 
      99             :     /** helper for DatabaseRegistrationDialog
     100             : 
     101             :         Necessary so that DatabaseRegistrationDialog is self-contained, i.e. always reflects
     102             :         the current registration state.
     103             :     */
     104             :     class RegistrationItemSetHolder
     105             :     {
     106             :     private:
     107             :         SfxItemSet  m_aRegistrationItems;
     108             : 
     109             :     protected:
     110             :         RegistrationItemSetHolder( const SfxItemSet& _rMasterSet );
     111             :         ~RegistrationItemSetHolder();
     112             : 
     113             :     protected:
     114           0 :         const SfxItemSet& getRegistrationItems() const { return m_aRegistrationItems; }
     115             :     };
     116             : 
     117           0 :     class DatabaseRegistrationDialog    :public RegistrationItemSetHolder
     118             :                                         ,public SfxSingleTabDialog
     119             :     {
     120             :     public:
     121             :         DatabaseRegistrationDialog( vcl::Window* pParent, const SfxItemSet& rAttr );
     122             : 
     123             :         virtual short   Execute() SAL_OVERRIDE;
     124             :     };
     125             : 
     126             : 
     127             : }
     128             : 
     129             : 
     130             : #endif // INCLUDED_CUI_SOURCE_INC_DBREGISTER_HXX
     131             : 
     132             : 
     133             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11