LCOV - code coverage report
Current view: top level - include/dbaccess - dataview.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 2 3 66.7 %
Date: 2015-06-13 12:38:46 Functions: 2 3 66.7 %
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_DATAVIEW_HXX
      20             : #define INCLUDED_DBACCESS_DATAVIEW_HXX
      21             : 
      22             : #include <dbaccess/dbaccessdllapi.h>
      23             : 
      24             : #include <com/sun/star/uno/XComponentContext.hpp>
      25             : #include <svtools/acceleratorexecute.hxx>
      26             : #include <sal/macros.h>
      27             : #include <vcl/fixed.hxx>
      28             : 
      29             : #include <memory>
      30             : 
      31             : class FixedLine;
      32             : namespace dbaui
      33             : {
      34             :     class IController;
      35             :     class DBACCESS_DLLPUBLIC ODataView :    public vcl::Window
      36             :     {
      37             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >    m_xContext;  // the service factory to work with
      38             : 
      39             :     protected:
      40             :         rtl::Reference<IController> m_xController;  // the controller in where we resides in
      41             :         VclPtr<FixedLine>   m_aSeparator;
      42             :         ::std::unique_ptr< ::svt::AcceleratorExecute> m_pAccel;
      43             : 
      44             :     public:
      45             :         ODataView(  vcl::Window* pParent,
      46             :                     IController& _rController,
      47             :                     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ,
      48             :                     WinBits nStyle = 0 );
      49             :         virtual ~ODataView();
      50             :         virtual void dispose() SAL_OVERRIDE;
      51             : 
      52             :         /// late construction
      53             :         virtual void Construct();
      54             :         // initialize will be called when after the controller finished his initialize method
      55           0 :         virtual void initialize(){}
      56             :         // window overridables
      57             :         virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
      58             :         virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
      59             :         virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
      60             : 
      61          10 :         inline IController& getCommandController() const { return *m_xController.get(); }
      62             : 
      63             :         /** will be called when the controls need to be resized.
      64             :         */
      65             :         void resizeControls(const Size& /*_rDiff*/) { Resize(); }
      66             : 
      67           4 :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() { return m_xContext;}
      68             : 
      69             :         // the default implementation simply calls resizeAll( GetSizePixel() )
      70             :         virtual void Resize() SAL_OVERRIDE;
      71             : 
      72             :         void attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame);
      73             :     protected:
      74             :         // window overridables
      75             :         virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& _rRect ) SAL_OVERRIDE;
      76             : 
      77             :         /// re-arrange all controls, including the toolbox, it's separator, and the "real view"
      78             :         virtual void resizeAll( const Rectangle& _rPlayground );
      79             : 
      80             :         // re-arrange the controls belonging to the document itself
      81             :         virtual void resizeDocumentView( Rectangle& _rPlayground );
      82             :     };
      83             : }
      84             : #endif // INCLUDED_DBACCESS_DATAVIEW_HXX
      85             : 
      86             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11