LCOV - code coverage report
Current view: top level - forms/source/solar/component - navbarcontrol.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 3 3 100.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_FORMS_SOURCE_SOLAR_COMPONENT_NAVBARCONTROL_HXX
      21             : #define INCLUDED_FORMS_SOURCE_SOLAR_COMPONENT_NAVBARCONTROL_HXX
      22             : 
      23             : #include "formnavigation.hxx"
      24             : 
      25             : #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
      26             : #include <com/sun/star/frame/XStatusListener.hpp>
      27             : 
      28             : #include <toolkit/controls/unocontrol.hxx>
      29             : #include <toolkit/awt/vclxwindow.hxx>
      30             : #include <comphelper/uno3.hxx>
      31             : #include <cppuhelper/implbase1.hxx>
      32             : #include <tools/wintypes.hxx>
      33             : 
      34             : 
      35             : namespace frm
      36             : {
      37             : 
      38             :     typedef ::cppu::ImplHelper1 <   ::com::sun::star::frame::XDispatchProviderInterception
      39             :                                 >   ONavigationBarControl_Base;
      40             : 
      41             :     class ONavigationBarControl
      42             :                             :public UnoControl
      43             :                             ,public ONavigationBarControl_Base
      44             :     {
      45             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
      46             :     public:
      47             :         ONavigationBarControl(
      48             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
      49             :         );
      50             : 
      51             :     protected:
      52             :         virtual ~ONavigationBarControl();
      53             : 
      54             :     public:
      55             :         // XServiceInfo - static version
      56             :         static  OUString SAL_CALL getImplementationName_Static();
      57             :         static  ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static();
      58             : 
      59             :     protected:
      60             :         // UNO
      61        9504 :         DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarControl, UnoControl )
      62             :         virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      63             : 
      64             :         // XControl
      65             :         virtual void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& _rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& _rParent ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      66             : 
      67             :         // XServiceInfo
      68             :         virtual OUString SAL_CALL getImplementationName()  throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      69             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()  throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      70             : 
      71             :         // XTypeProvider
      72             :         DECLARE_XTYPEPROVIDER()
      73             : 
      74             :         // XVclWindowPeer
      75             :         virtual void SAL_CALL setDesignMode( sal_Bool _bOn ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      76             : 
      77             :         // XDispatchProviderInterception
      78             :         virtual void SAL_CALL registerDispatchProviderInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      79             :         virtual void SAL_CALL releaseDispatchProviderInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      80             :     };
      81             : 
      82             :     class ONavigationBarPeer
      83             :                         :public VCLXWindow
      84             :                         ,public OFormNavigationHelper
      85             :     {
      86             :     public:
      87             :         /** factory method
      88             :             @return
      89             :                 a new ONavigationBarPeer instance, which has been acquired once!
      90             :         */
      91             :         static ONavigationBarPeer* Create(
      92             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB,
      93             :             vcl::Window* _pParentWindow,
      94             :             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxModel
      95             :         );
      96             : 
      97             :     protected:
      98             :         ONavigationBarPeer(
      99             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
     100             :         );
     101             :         virtual ~ONavigationBarPeer();
     102             : 
     103             :     public:
     104             :         // XInterface
     105             :         DECLARE_XINTERFACE( )
     106             : 
     107             :         // XVclWindowPeer
     108             :         virtual void SAL_CALL setDesignMode( sal_Bool _bOn ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     109             : 
     110             :         // XWindow2
     111             :         using VCLXWindow::isEnabled;
     112             : 
     113             :     protected:
     114             :         // XTypeProvider
     115             :         DECLARE_XTYPEPROVIDER( )
     116             : 
     117             :         // XComponent
     118             :         void SAL_CALL dispose(  ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     119             : 
     120             :         // XVclWindowPeer
     121             :         void SAL_CALL setProperty( const OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rValue ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     122             :         ::com::sun::star::uno::Any SAL_CALL getProperty( const OUString& _rPropertyName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     123             : 
     124             :         // XEventListener
     125             :         virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     126             : 
     127             :         // OFormNavigationHelper overriables
     128             :         virtual void    interceptorsChanged( ) SAL_OVERRIDE;
     129             :         virtual void    featureStateChanged( sal_Int16 _nFeatureId, bool _bEnabled ) SAL_OVERRIDE;
     130             :         virtual void    allFeatureStatesChanged( ) SAL_OVERRIDE;
     131             :         virtual void    getSupportedFeatures( ::std::vector< sal_Int16 >& /* [out] */ _rFeatureIds ) SAL_OVERRIDE;
     132             : 
     133             :         // IFeatureDispatcher overriables
     134             :         virtual bool    isEnabled( sal_Int16 _nFeatureId ) const SAL_OVERRIDE;
     135             :     };
     136             : 
     137             : 
     138             : }   // namespace frm
     139             : 
     140             : 
     141             : #endif // INCLUDED_FORMS_SOURCE_SOLAR_COMPONENT_NAVBARCONTROL_HXX
     142             : 
     143             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11