LCOV - code coverage report
Current view: top level - chart2/source/model/inc - Diagram.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-08-25 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 4 50.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 CHART_DIAGRAM_HXX
      20                 :            : #define CHART_DIAGRAM_HXX
      21                 :            : 
      22                 :            : #include "OPropertySet.hxx"
      23                 :            : #include "MutexContainer.hxx"
      24                 :            : #include <cppuhelper/implbase8.hxx>
      25                 :            : #include <comphelper/uno3.hxx>
      26                 :            : #include <com/sun/star/beans/PropertyValue.hpp>
      27                 :            : #include <com/sun/star/chart2/data/XDataSource.hpp>
      28                 :            : #include <com/sun/star/chart2/XDiagram.hpp>
      29                 :            : #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
      30                 :            : #include <com/sun/star/chart2/XTitled.hpp>
      31                 :            : #include <com/sun/star/chart/X3DDefaultSetter.hpp>
      32                 :            : #include <com/sun/star/lang/XServiceInfo.hpp>
      33                 :            : #include <com/sun/star/uno/XComponentContext.hpp>
      34                 :            : #include <com/sun/star/util/XCloneable.hpp>
      35                 :            : #include <com/sun/star/util/XModifyBroadcaster.hpp>
      36                 :            : #include <com/sun/star/util/XModifyListener.hpp>
      37                 :            : 
      38                 :            : #include "ServiceMacros.hxx"
      39                 :            : 
      40                 :            : #include <map>
      41                 :            : #include <vector>
      42                 :            : 
      43                 :            : namespace chart
      44                 :            : {
      45                 :            : 
      46                 :            : namespace impl
      47                 :            : {
      48                 :            : typedef ::cppu::WeakImplHelper8<
      49                 :            :     ::com::sun::star::chart2::XDiagram,
      50                 :            :     ::com::sun::star::lang::XServiceInfo,
      51                 :            :     ::com::sun::star::chart2::XCoordinateSystemContainer,
      52                 :            :     ::com::sun::star::chart2::XTitled,
      53                 :            :     ::com::sun::star::chart::X3DDefaultSetter,
      54                 :            :     ::com::sun::star::util::XModifyBroadcaster,
      55                 :            :     ::com::sun::star::util::XModifyListener,
      56                 :            :     ::com::sun::star::util::XCloneable >
      57                 :            :     Diagram_Base;
      58                 :            : }
      59                 :            : 
      60                 :            : class Diagram :
      61                 :            :     public MutexContainer,
      62                 :            :     public impl::Diagram_Base,
      63                 :            :     public ::property::OPropertySet
      64                 :            : {
      65                 :            : public:
      66                 :            :     Diagram( ::com::sun::star::uno::Reference<
      67                 :            :              ::com::sun::star::uno::XComponentContext > const & xContext );
      68                 :            :     virtual ~Diagram();
      69                 :            : 
      70                 :            :     /// establish methods for factory instatiation
      71 [ +  - ][ +  - ]:         62 :     APPHELPER_SERVICE_FACTORY_HELPER( Diagram )
      72                 :            : 
      73                 :            :     /// XServiceInfo declarations
      74                 :            :     APPHELPER_XSERVICEINFO_DECL()
      75                 :            : 
      76                 :            :     /// merge XInterface implementations
      77                 :            :      DECLARE_XINTERFACE()
      78                 :            :     /// merge XTypeProvider implementations
      79                 :            :      DECLARE_XTYPEPROVIDER()
      80                 :            : 
      81                 :            : protected:
      82                 :            :     explicit Diagram( const Diagram & rOther );
      83                 :            : 
      84                 :            :     // ____ OPropertySet ____
      85                 :            :     virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
      86                 :            :         throw(::com::sun::star::beans::UnknownPropertyException);
      87                 :            : 
      88                 :            :     // ____ OPropertySet ____
      89                 :            :     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
      90                 :            : 
      91                 :            :     // ____ XPropertySet ____
      92                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
      93                 :            :         getPropertySetInfo()
      94                 :            :         throw (::com::sun::star::uno::RuntimeException);
      95                 :            : 
      96                 :            :     // ____ XFastPropertySet ____
      97                 :            :     virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
      98                 :            :         throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
      99                 :            : 
     100                 :            :     /// make original interface function visible again
     101                 :            :     using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
     102                 :            : 
     103                 :            :     virtual void SAL_CALL getFastPropertyValue(
     104                 :            :         ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
     105                 :            : 
     106                 :            :     // ____ XDiagram ____
     107                 :            :     virtual ::com::sun::star::uno::Reference<
     108                 :            :         ::com::sun::star::beans::XPropertySet > SAL_CALL getWall()
     109                 :            :         throw (::com::sun::star::uno::RuntimeException);
     110                 :            :     virtual ::com::sun::star::uno::Reference<
     111                 :            :         ::com::sun::star::beans::XPropertySet > SAL_CALL getFloor()
     112                 :            :         throw (::com::sun::star::uno::RuntimeException);
     113                 :            :     virtual ::com::sun::star::uno::Reference<
     114                 :            :         ::com::sun::star::chart2::XLegend > SAL_CALL getLegend()
     115                 :            :         throw (::com::sun::star::uno::RuntimeException);
     116                 :            :     virtual void SAL_CALL setLegend( const ::com::sun::star::uno::Reference<
     117                 :            :                                      ::com::sun::star::chart2::XLegend >& xLegend )
     118                 :            :         throw (::com::sun::star::uno::RuntimeException);
     119                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XColorScheme > SAL_CALL getDefaultColorScheme()
     120                 :            :         throw (::com::sun::star::uno::RuntimeException);
     121                 :            :     virtual void SAL_CALL setDefaultColorScheme(
     122                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XColorScheme >& xColorScheme )
     123                 :            :         throw (::com::sun::star::uno::RuntimeException);
     124                 :            :     virtual void SAL_CALL setDiagramData(
     125                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xDataSource,
     126                 :            :         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
     127                 :            :             throw (::com::sun::star::uno::RuntimeException);
     128                 :            : 
     129                 :            :     // ____ XCoordinateSystemContainer ____
     130                 :            :     virtual void SAL_CALL addCoordinateSystem(
     131                 :            :         const ::com::sun::star::uno::Reference<
     132                 :            :             ::com::sun::star::chart2::XCoordinateSystem >& aCoordSys )
     133                 :            :         throw (::com::sun::star::lang::IllegalArgumentException,
     134                 :            :                ::com::sun::star::uno::RuntimeException);
     135                 :            :     virtual void SAL_CALL removeCoordinateSystem(
     136                 :            :         const ::com::sun::star::uno::Reference<
     137                 :            :             ::com::sun::star::chart2::XCoordinateSystem >& aCoordSys )
     138                 :            :         throw (::com::sun::star::container::NoSuchElementException,
     139                 :            :                ::com::sun::star::uno::RuntimeException);
     140                 :            :     virtual ::com::sun::star::uno::Sequence<
     141                 :            :         ::com::sun::star::uno::Reference<
     142                 :            :         ::com::sun::star::chart2::XCoordinateSystem > > SAL_CALL getCoordinateSystems()
     143                 :            :         throw (::com::sun::star::uno::RuntimeException);
     144                 :            :     virtual void SAL_CALL setCoordinateSystems(
     145                 :            :         const ::com::sun::star::uno::Sequence<
     146                 :            :             ::com::sun::star::uno::Reference<
     147                 :            :                 ::com::sun::star::chart2::XCoordinateSystem > >& aCoordinateSystems )
     148                 :            :         throw (::com::sun::star::lang::IllegalArgumentException,
     149                 :            :                ::com::sun::star::uno::RuntimeException);
     150                 :            : 
     151                 :            :     // ____ XTitled ____
     152                 :            :     virtual ::com::sun::star::uno::Reference<
     153                 :            :         ::com::sun::star::chart2::XTitle > SAL_CALL getTitleObject()
     154                 :            :         throw (::com::sun::star::uno::RuntimeException);
     155                 :            :     virtual void SAL_CALL setTitleObject( const ::com::sun::star::uno::Reference<
     156                 :            :                                           ::com::sun::star::chart2::XTitle >& Title )
     157                 :            :         throw (::com::sun::star::uno::RuntimeException);
     158                 :            : 
     159                 :            :     // ____ X3DDefaultSetter ____
     160                 :            :     virtual void SAL_CALL set3DSettingsToDefault() throw (::com::sun::star::uno::RuntimeException);
     161                 :            :     virtual void SAL_CALL setDefaultRotation() throw (::com::sun::star::uno::RuntimeException);
     162                 :            :     virtual void SAL_CALL setDefaultIllumination() throw (::com::sun::star::uno::RuntimeException);
     163                 :            : 
     164                 :            :     // ____ XCloneable ____
     165                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
     166                 :            :         throw (::com::sun::star::uno::RuntimeException);
     167                 :            : 
     168                 :            :     // ____ XModifyBroadcaster ____
     169                 :            :     virtual void SAL_CALL addModifyListener(
     170                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
     171                 :            :         throw (::com::sun::star::uno::RuntimeException);
     172                 :            :     virtual void SAL_CALL removeModifyListener(
     173                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
     174                 :            :         throw (::com::sun::star::uno::RuntimeException);
     175                 :            : 
     176                 :            :     // ____ XModifyListener ____
     177                 :            :     virtual void SAL_CALL modified(
     178                 :            :         const ::com::sun::star::lang::EventObject& aEvent )
     179                 :            :         throw (::com::sun::star::uno::RuntimeException);
     180                 :            : 
     181                 :            :     // ____ XEventListener (base of XModifyListener) ____
     182                 :            :     virtual void SAL_CALL disposing(
     183                 :            :         const ::com::sun::star::lang::EventObject& Source )
     184                 :            :         throw (::com::sun::star::uno::RuntimeException);
     185                 :            : 
     186                 :            :     // ____ OPropertySet ____
     187                 :            :     virtual void firePropertyChangeEvent();
     188                 :            :     using OPropertySet::disposing;
     189                 :            : 
     190                 :            :     void fireModifyEvent();
     191                 :            : 
     192                 :            : private:
     193                 :            :      ::com::sun::star::uno::Reference<
     194                 :            :          ::com::sun::star::uno::XComponentContext >                m_xContext;
     195                 :            : 
     196                 :            :     typedef
     197                 :            :         ::std::vector< ::com::sun::star::uno::Reference<
     198                 :            :             ::com::sun::star::chart2::XCoordinateSystem > >
     199                 :            :         tCoordinateSystemContainerType;
     200                 :            : 
     201                 :            :     tCoordinateSystemContainerType m_aCoordSystems;
     202                 :            : 
     203                 :            :     ::com::sun::star::uno::Reference<
     204                 :            :         ::com::sun::star::beans::XPropertySet >
     205                 :            :                         m_xWall;
     206                 :            : 
     207                 :            :     ::com::sun::star::uno::Reference<
     208                 :            :         ::com::sun::star::beans::XPropertySet >
     209                 :            :                         m_xFloor;
     210                 :            : 
     211                 :            :     ::com::sun::star::uno::Reference<
     212                 :            :         ::com::sun::star::chart2::XTitle >
     213                 :            :                         m_xTitle;
     214                 :            : 
     215                 :            :     ::com::sun::star::uno::Reference<
     216                 :            :         ::com::sun::star::chart2::XLegend >
     217                 :            :                         m_xLegend;
     218                 :            : 
     219                 :            :     ::com::sun::star::uno::Reference<
     220                 :            :         ::com::sun::star::chart2::XColorScheme >
     221                 :            :                         m_xColorScheme;
     222                 :            : 
     223                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
     224                 :            : };
     225                 :            : 
     226                 :            : } //  namespace chart
     227                 :            : 
     228                 :            : // CHART_DIAGRAM_HXX
     229                 :            : #endif
     230                 :            : 
     231                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10