LCOV - code coverage report
Current view: top level - chart2/source/model/template - ChartType.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 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_TEMPLATE_CHARTTYPE_HXX
      20             : #define INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_CHARTTYPE_HXX
      21             : 
      22             : #include "MutexContainer.hxx"
      23             : #include "OPropertySet.hxx"
      24             : #include <cppuhelper/implbase6.hxx>
      25             : #include <comphelper/uno3.hxx>
      26             : #include "ModifyListenerHelper.hxx"
      27             : #include <com/sun/star/lang/XServiceInfo.hpp>
      28             : #include <com/sun/star/chart2/XChartType.hpp>
      29             : #include <com/sun/star/uno/XComponentContext.hpp>
      30             : #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
      31             : #include <com/sun/star/util/XCloneable.hpp>
      32             : 
      33             : #include <vector>
      34             : 
      35             : namespace chart
      36             : {
      37             : 
      38             : namespace impl
      39             : {
      40             : typedef ::cppu::WeakImplHelper6<
      41             :         css::lang::XServiceInfo,
      42             :         ::com::sun::star::chart2::XChartType,
      43             :         ::com::sun::star::chart2::XDataSeriesContainer,
      44             :         ::com::sun::star::util::XCloneable,
      45             :         ::com::sun::star::util::XModifyBroadcaster,
      46             :         ::com::sun::star::util::XModifyListener >
      47             :     ChartType_Base;
      48             : }
      49             : 
      50             : class ChartType :
      51             :     public MutexContainer,
      52             :     public impl::ChartType_Base,
      53             :     public ::property::OPropertySet
      54             : {
      55             : public:
      56             :     explicit ChartType(
      57             :         ::com::sun::star::uno::Reference<
      58             :             ::com::sun::star::uno::XComponentContext > const & xContext );
      59             :     virtual ~ChartType();
      60             : 
      61             :     /// merge XInterface implementations
      62             :      DECLARE_XINTERFACE()
      63             : 
      64             : protected:
      65             :     explicit ChartType( const ChartType & rOther );
      66             : 
      67             :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
      68         141 :         GetComponentContext() const { return m_xContext;}
      69             : 
      70             :     // ____ XChartType ____
      71             :     // still abstract ! implement !
      72             :     virtual OUString SAL_CALL getChartType()
      73             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
      74             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > SAL_CALL
      75             :         createCoordinateSystem( ::sal_Int32 DimensionCount )
      76             :         throw (::com::sun::star::lang::IllegalArgumentException,
      77             :                ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      78             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
      79             :         getSupportedMandatoryRoles()
      80             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      81             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
      82             :         getSupportedOptionalRoles()
      83             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      84             :     virtual OUString SAL_CALL getRoleOfSequenceForSeriesLabel()
      85             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      86             :     virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
      87             :         getSupportedPropertyRoles()
      88             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      89             : 
      90             :     // ____ XDataSeriesContainer ____
      91             :     virtual void SAL_CALL addDataSeries(
      92             :         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& aDataSeries )
      93             :         throw (::com::sun::star::lang::IllegalArgumentException,
      94             :                ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      95             :     virtual void SAL_CALL removeDataSeries(
      96             :         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& aDataSeries )
      97             :         throw (::com::sun::star::container::NoSuchElementException,
      98             :                ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      99             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > > SAL_CALL getDataSeries()
     100             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     101             :     virtual void SAL_CALL setDataSeries(
     102             :         const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > >& aDataSeries )
     103             :         throw (::com::sun::star::lang::IllegalArgumentException,
     104             :                ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     105             : 
     106             :     // ____ XModifyBroadcaster ____
     107             :     virtual void SAL_CALL addModifyListener(
     108             :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
     109             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     110             :     virtual void SAL_CALL removeModifyListener(
     111             :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
     112             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     113             : 
     114             :     // ____ XModifyListener ____
     115             :     virtual void SAL_CALL modified(
     116             :         const ::com::sun::star::lang::EventObject& aEvent )
     117             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     118             : 
     119             :     // ____ XEventListener (base of XModifyListener) ____
     120             :     virtual void SAL_CALL disposing(
     121             :         const ::com::sun::star::lang::EventObject& Source )
     122             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     123             : 
     124             :     void fireModifyEvent();
     125             : 
     126             :     // ____ OPropertySet ____
     127             :     virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
     128             :         throw(::com::sun::star::beans::UnknownPropertyException) SAL_OVERRIDE;
     129             :     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
     130             : 
     131             :     virtual void firePropertyChangeEvent() SAL_OVERRIDE;
     132             :     using OPropertySet::disposing;
     133             : 
     134             :     // ____ XPropertySet ____
     135             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
     136             :         getPropertySetInfo()
     137             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     138             : 
     139             :     /// merge XTypeProvider implementations
     140             :      DECLARE_XTYPEPROVIDER()
     141             : 
     142             : protected:
     143             :     ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >
     144             :         const m_xModifyEventForwarder;
     145             : 
     146             : private:
     147             :     void impl_addDataSeriesWithoutNotification(
     148             :         const ::com::sun::star::uno::Reference<
     149             :             ::com::sun::star::chart2::XDataSeries >& aDataSeries );
     150             : 
     151             : private:
     152             :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
     153             :         const m_xContext;
     154             : 
     155             :     typedef
     156             :         ::std::vector< ::com::sun::star::uno::Reference<
     157             :             ::com::sun::star::chart2::XDataSeries > >
     158             :         tDataSeriesContainerType;
     159             : 
     160             :     // --- mutable members: the following members need mutex guard ---
     161             : 
     162             :     tDataSeriesContainerType  m_aDataSeries;
     163             : 
     164             :     bool  m_bNotifyChanges;
     165             : };
     166             : 
     167             : } //  namespace chart
     168             : 
     169             : // INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_CHARTTYPE_HXX
     170             : #endif
     171             : 
     172             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11