LCOV - code coverage report
Current view: top level - chart2/source/model/main - Axis.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 1 100.0 %
Date: 2014-11-03 Functions: 1 1 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             : #ifndef INCLUDED_CHART2_SOURCE_MODEL_MAIN_AXIS_HXX
      20             : #define INCLUDED_CHART2_SOURCE_MODEL_MAIN_AXIS_HXX
      21             : 
      22             : #include <com/sun/star/uno/XComponentContext.hpp>
      23             : #include "MutexContainer.hxx"
      24             : #include "OPropertySet.hxx"
      25             : #include <cppuhelper/implbase6.hxx>
      26             : #include <comphelper/uno3.hxx>
      27             : 
      28             : #include "ServiceMacros.hxx"
      29             : #include "ModifyListenerHelper.hxx"
      30             : #include <com/sun/star/lang/XServiceInfo.hpp>
      31             : #include <com/sun/star/chart2/XAxis.hpp>
      32             : #include <com/sun/star/chart2/XTitled.hpp>
      33             : #include <com/sun/star/util/XCloneable.hpp>
      34             : #include <com/sun/star/util/XModifyBroadcaster.hpp>
      35             : #include <com/sun/star/util/XModifyListener.hpp>
      36             : 
      37             : namespace chart
      38             : {
      39             : 
      40             : namespace impl
      41             : {
      42             : typedef ::cppu::WeakImplHelper6<
      43             :         ::com::sun::star::chart2::XAxis,
      44             :         ::com::sun::star::chart2::XTitled,
      45             :         ::com::sun::star::lang::XServiceInfo,
      46             :         ::com::sun::star::util::XCloneable,
      47             :         ::com::sun::star::util::XModifyBroadcaster,
      48             :         ::com::sun::star::util::XModifyListener >
      49             :     Axis_Base;
      50             : }
      51             : 
      52             : class Axis :
      53             :     public MutexContainer,
      54             :     public impl::Axis_Base,
      55             :     public ::property::OPropertySet
      56             : {
      57             : public:
      58             :     Axis( ::com::sun::star::uno::Reference<
      59             :           ::com::sun::star::uno::XComponentContext > const & xContext );
      60             :     virtual ~Axis();
      61             : 
      62             :     /// establish methods for factory instatiation
      63         684 :     APPHELPER_SERVICE_FACTORY_HELPER( Axis )
      64             :     /// XServiceInfo declarations
      65             :     APPHELPER_XSERVICEINFO_DECL()
      66             : 
      67             :     /// merge XInterface implementations
      68             :      DECLARE_XINTERFACE()
      69             :     /// merge XTypeProvider implementations
      70             :      DECLARE_XTYPEPROVIDER()
      71             : 
      72             : protected:
      73             :     explicit Axis( const Axis & rOther );
      74             : 
      75             :     // late initialization to call after copy-constructing
      76             :     void Init( const Axis & rOther );
      77             : 
      78             :     // ____ OPropertySet ____
      79             :     virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
      80             :         throw (css::beans::UnknownPropertyException,
      81             :                css::uno::RuntimeException) SAL_OVERRIDE;
      82             : 
      83             :     // ____ OPropertySet ____
      84             :     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
      85             : 
      86             :     // ____ XPropertySet ____
      87             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
      88             :         getPropertySetInfo()
      89             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      90             : 
      91             :     // ____ XAxis ____
      92             :     virtual void SAL_CALL setScaleData( const ::com::sun::star::chart2::ScaleData& rScaleData )
      93             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      94             :     virtual ::com::sun::star::chart2::ScaleData SAL_CALL getScaleData()
      95             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      96             :     virtual ::com::sun::star::uno::Reference<
      97             :                 ::com::sun::star::beans::XPropertySet > SAL_CALL getGridProperties()
      98             :                     throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      99             :     virtual ::com::sun::star::uno::Sequence<
     100             :                 ::com::sun::star::uno::Reference<
     101             :                         ::com::sun::star::beans::XPropertySet > > SAL_CALL getSubGridProperties()
     102             :                     throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     103             :     virtual ::com::sun::star::uno::Sequence<
     104             :                 ::com::sun::star::uno::Reference<
     105             :                     ::com::sun::star::beans::XPropertySet > > SAL_CALL getSubTickProperties()
     106             :                     throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     107             : 
     108             :     // ____ XTitled ____
     109             :     virtual ::com::sun::star::uno::Reference<
     110             :                 ::com::sun::star::chart2::XTitle > SAL_CALL getTitleObject()
     111             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     112             :     virtual void SAL_CALL setTitleObject(
     113             :         const ::com::sun::star::uno::Reference<
     114             :             ::com::sun::star::chart2::XTitle >& Title )
     115             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     116             : 
     117             :     // ____ XCloneable ____
     118             :     // Note: the coordinate systems are not cloned!
     119             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
     120             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     121             : 
     122             :     // ____ XModifyBroadcaster ____
     123             :     virtual void SAL_CALL addModifyListener(
     124             :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
     125             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     126             :     virtual void SAL_CALL removeModifyListener(
     127             :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
     128             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     129             : 
     130             :     // ____ XModifyListener ____
     131             :     virtual void SAL_CALL modified(
     132             :         const ::com::sun::star::lang::EventObject& aEvent )
     133             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     134             : 
     135             :     // ____ XEventListener (base of XModifyListener) ____
     136             :     virtual void SAL_CALL disposing(
     137             :         const ::com::sun::star::lang::EventObject& Source )
     138             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     139             : 
     140             :     // ____ OPropertySet ____
     141             :     virtual void firePropertyChangeEvent() SAL_OVERRIDE;
     142             :     using OPropertySet::disposing;
     143             : 
     144             :     void fireModifyEvent();
     145             : 
     146             : private: //methods
     147             :     void AllocateSubGrids();
     148             : 
     149             : private: //member
     150             : 
     151             :     ::com::sun::star::uno::Reference<
     152             :         ::com::sun::star::util::XModifyListener >   m_xModifyEventForwarder;
     153             : 
     154             :     ::com::sun::star::chart2::ScaleData             m_aScaleData;
     155             : 
     156             :     ::com::sun::star::uno::Reference<
     157             :         ::com::sun::star::beans::XPropertySet >     m_xGrid;
     158             : 
     159             :     ::com::sun::star::uno::Sequence<
     160             :         ::com::sun::star::uno::Reference<
     161             :             ::com::sun::star::beans::XPropertySet > >     m_aSubGridProperties;
     162             : 
     163             :     ::com::sun::star::uno::Reference<
     164             :         ::com::sun::star::chart2::XTitle >          m_xTitle;
     165             : };
     166             : 
     167             : } //  namespace chart
     168             : 
     169             : // INCLUDED_CHART2_SOURCE_MODEL_MAIN_AXIS_HXX
     170             : #endif
     171             : 
     172             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10