LCOV - code coverage report
Current view: top level - dbaccess/source/ui/inc - TableDesignView.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-08-25 Functions: 0 7 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 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                 :            : #ifndef DBAUI_TABLEDESIGNVIEW_HXX
      20                 :            : #define DBAUI_TABLEDESIGNVIEW_HXX
      21                 :            : 
      22                 :            : #include "dataview.hxx"
      23                 :            : #include <com/sun/star/beans/XPropertySet.hpp>
      24                 :            : #include <com/sun/star/frame/XController.hpp>
      25                 :            : #include <vcl/split.hxx>
      26                 :            : #include "IClipBoardTest.hxx"
      27                 :            : 
      28                 :            : namespace dbaui
      29                 :            : {
      30                 :            :     class OTableController;
      31                 :            :     class OTableFieldDescWin;
      32                 :            :     class OTableEditorCtrl;
      33                 :            :     //==================================================================
      34                 :            :     class OTableBorderWindow : public Window
      35                 :            :     {
      36                 :            :         Splitter                            m_aHorzSplitter;
      37                 :            :         OTableFieldDescWin*                 m_pFieldDescWin;
      38                 :            :         OTableEditorCtrl*                   m_pEditorCtrl;
      39                 :            : 
      40                 :            :         void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
      41                 :            :         void ArrangeChildren( long nSplitPos ,Rectangle& rRect);
      42                 :            :         DECL_LINK( SplitHdl, Splitter* );
      43                 :            :     protected:
      44                 :            :         virtual void DataChanged(const DataChangedEvent& rDCEvt);
      45                 :            :     public:
      46                 :            :         OTableBorderWindow(Window* pParent);
      47                 :            :         ~OTableBorderWindow();
      48                 :            :         // window overloads
      49                 :            :         virtual void Resize();
      50                 :            :         virtual void GetFocus();
      51                 :            : 
      52                 :          0 :         OTableEditorCtrl*       GetEditorCtrl() const { return m_pEditorCtrl; }
      53                 :          0 :         OTableFieldDescWin*     GetDescWin()    const { return m_pFieldDescWin; }
      54                 :            :     };
      55                 :            :     //==================================================================
      56                 :            :     class OTableDesignView : public ODataView
      57                 :            :                             ,public IClipboardTest
      58                 :            :     {
      59                 :            :         enum ChildFocusState
      60                 :            :         {
      61                 :            :             DESCRIPTION,
      62                 :            :             EDITOR,
      63                 :            :             NONE
      64                 :            :         };
      65                 :            :     private:
      66                 :            :         ::com::sun::star::lang::Locale      m_aLocale;
      67                 :            :         OTableBorderWindow*                 m_pWin;
      68                 :            :         OTableController&                   m_rController;
      69                 :            :         ChildFocusState                     m_eChildFocus;
      70                 :            : 
      71                 :            :         IClipboardTest* getActiveChild() const;
      72                 :            :     protected:
      73                 :            : 
      74                 :            : 
      75                 :            :         // return the Rectangle where I can paint myself
      76                 :            :         virtual void resizeDocumentView(Rectangle& rRect);
      77                 :            : 
      78                 :            :     public:
      79                 :            :         OTableDesignView(   Window* pParent,
      80                 :            :                             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&,
      81                 :            :                             OTableController& _rController);
      82                 :            :         virtual ~OTableDesignView();
      83                 :            : 
      84                 :            :         // window overloads
      85                 :            :         virtual long            PreNotify( NotifyEvent& rNEvt );
      86                 :            :         virtual void            GetFocus();
      87                 :            : 
      88         [ #  # ]:          0 :         OTableEditorCtrl*       GetEditorCtrl() const { return m_pWin ? m_pWin->GetEditorCtrl() : NULL; }
      89         [ #  # ]:          0 :         OTableFieldDescWin*     GetDescWin()    const { return m_pWin ? m_pWin->GetDescWin() : NULL; }
      90                 :          0 :         OTableController&       getController() const { return m_rController; }
      91                 :            : 
      92                 :          0 :         ::com::sun::star::lang::Locale      getLocale() const { return m_aLocale;}
      93                 :            : 
      94                 :            :         // IClipboardTest
      95                 :            :         virtual sal_Bool isCutAllowed();
      96                 :            :         virtual sal_Bool isCopyAllowed();
      97                 :            :         virtual sal_Bool isPasteAllowed();
      98                 :          0 :         virtual sal_Bool hasChildPathFocus() { return HasChildPathFocus(); }
      99                 :            :         virtual void copy();
     100                 :            :         virtual void cut();
     101                 :            :         virtual void paste();
     102                 :            : 
     103                 :            :         // set the view readonly or not
     104                 :            :         virtual void setReadOnly(sal_Bool _bReadOnly);
     105                 :            : 
     106                 :            :         virtual void initialize();
     107                 :            :         void reSync(); // resync window data with realdata
     108                 :            :     };
     109                 :            : }
     110                 :            : #endif // DBAUI_TABLEDESIGNVIEW_HXX
     111                 :            : 
     112                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10