LCOV - code coverage report
Current view: top level - dbaccess/source/ui/tabledesign - TableFieldDescWin.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 9 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 7 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             : #ifndef INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_TABLEFIELDDESCWIN_HXX
      20             : #define INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_TABLEFIELDDESCWIN_HXX
      21             : 
      22             : #include <vcl/tabpage.hxx>
      23             : #include "FieldDescGenWin.hxx"
      24             : #include "IClipBoardTest.hxx"
      25             : 
      26             : class FixedText;
      27             : namespace dbaui
      28             : {
      29             :     class OFieldDescGenWin;
      30             :     class OTableDesignHelpBar;
      31             :     class OFieldDescription;
      32             :     // derivative of TabPage is a trick of TH,
      33             :     // to notice a change in system colours
      34             :     class OTableFieldDescWin : public TabPage
      35             :                                 ,public IClipboardTest
      36             :     {
      37             :         enum ChildFocusState
      38             :         {
      39             :             DESCRIPTION,
      40             :             HELP,
      41             :             NONE
      42             :         };
      43             :     private:
      44             :         VclPtr<OTableDesignHelpBar>    m_pHelpBar;
      45             :         VclPtr<OFieldDescGenWin>       m_pGenPage;
      46             :         VclPtr<FixedText>              m_pHeader;
      47             :         ChildFocusState         m_eChildFocus;
      48             : 
      49             :         IClipboardTest* getActiveChild() const;
      50             : 
      51             :     protected:
      52             :         virtual void Resize() SAL_OVERRIDE;
      53             :         virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
      54             : 
      55             :     public:
      56             :         OTableFieldDescWin( vcl::Window* pParent);
      57             :         virtual ~OTableFieldDescWin();
      58             :         virtual void dispose() SAL_OVERRIDE;
      59             : 
      60             :         void Init();
      61             : 
      62             :         void DisplayData( OFieldDescription* pFieldDescr );
      63             :         void SaveData( OFieldDescription* pFieldDescr );
      64             :         void SetReadOnly( bool bReadOnly );
      65             : 
      66             :         // Window overrides
      67             :         virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
      68             :         virtual void GetFocus() SAL_OVERRIDE;
      69             :         virtual void LoseFocus() SAL_OVERRIDE;
      70             : 
      71           0 :         void SetControlText( sal_uInt16 nControlId, const OUString& rText )
      72           0 :                 { m_pGenPage->SetControlText(nControlId,rText); }
      73           0 :         OUString GetControlText( sal_uInt16 nControlId )
      74           0 :                 { return m_pGenPage->GetControlText(nControlId); }
      75             : 
      76             :         // short GetFormatCategory(OFieldDescription* pFieldDescr) { return m_pGenPage ? m_pGenPage->GetFormatCategory(pFieldDescr) : -1; }
      77             :         // delivers a CAT_xxx (CAT_NUMBER, CAT_DATE ...) value to a Format set in the field
      78             : 
      79           0 :         OUString  BoolStringPersistent(const OUString& rUIString) const { return m_pGenPage->BoolStringPersistent(rUIString); }
      80           0 :         OUString  BoolStringUI(const OUString& rPersistentString) const { return m_pGenPage->BoolStringUI(rPersistentString); }
      81             : 
      82             :         // IClipboardTest
      83             :         virtual bool isCutAllowed() SAL_OVERRIDE;
      84             :         virtual bool isCopyAllowed() SAL_OVERRIDE;
      85             :         virtual bool isPasteAllowed() SAL_OVERRIDE;
      86           0 :         virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); }
      87             : 
      88             :         virtual void copy() SAL_OVERRIDE;
      89             :         virtual void cut() SAL_OVERRIDE;
      90             :         virtual void paste() SAL_OVERRIDE;
      91             : 
      92           0 :         inline OFieldDescGenWin* getGenPage() const { return m_pGenPage; }
      93           0 :         inline OTableDesignHelpBar* getHelpBar() const { return m_pHelpBar; }
      94             : 
      95             :     };
      96             : }
      97             : #endif // INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_TABLEFIELDDESCWIN_HXX
      98             : 
      99             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11