LCOV - code coverage report
Current view: top level - reportdesign/source/core/inc - Shape.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 13 0.0 %
Date: 2012-08-25 Functions: 0 14 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 196 0.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 RPT_SHAPE_HXX
      20                 :            : #define RPT_SHAPE_HXX
      21                 :            : 
      22                 :            : #include <cppuhelper/propertysetmixin.hxx>
      23                 :            : #include <com/sun/star/report/XShape.hpp>
      24                 :            : #include "ReportControlModel.hxx"
      25                 :            : #include <cppuhelper/compbase2.hxx>
      26                 :            : #include <comphelper/broadcasthelper.hxx>
      27                 :            : #include <com/sun/star/lang/XServiceInfo.hpp>
      28                 :            : #include "ReportHelperDefines.hxx"
      29                 :            : #include <comphelper/propagg.hxx>
      30                 :            : #include <memory>
      31                 :            : 
      32                 :            : namespace reportdesign
      33                 :            : {
      34                 :            :     typedef ::cppu::PropertySetMixin<        com::sun::star::report::XShape > ShapePropertySet;
      35                 :            :     typedef ::cppu::WeakComponentImplHelper2<    com::sun::star::report::XShape
      36                 :            :                                                 ,com::sun::star::lang::XServiceInfo > ShapeBase;
      37                 :            : 
      38                 :            :     /** \class OShape Defines the implementation of a \interface com:::sun::star::report::XShape
      39                 :            :      * \ingroup reportdesign_api
      40                 :            :      *
      41                 :            :      */
      42                 :            :     class OShape :  public comphelper::OBaseMutex,
      43                 :            :                     public ShapeBase,
      44                 :            :                     public ShapePropertySet
      45                 :            :     {
      46                 :            :         friend class OShapeHelper;
      47                 :            :         ::std::auto_ptr< ::comphelper::OPropertyArrayAggregationHelper> m_pAggHelper;
      48                 :            :         OReportControlModel                                             m_aProps;
      49                 :            :         com::sun::star::drawing::HomogenMatrix3                         m_Transformation;
      50                 :            :         ::sal_Int32                                                     m_nZOrder;
      51                 :            :         ::sal_Bool                                                      m_bOpaque;
      52                 :            : 
      53                 :            :         ::rtl::OUString                                                 m_sServiceName;
      54                 :            :         ::rtl::OUString                                                 m_CustomShapeEngine;
      55                 :            :         ::rtl::OUString                                                 m_CustomShapeData;
      56                 :            :         com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
      57                 :            :                                                                         m_CustomShapeGeometry;
      58                 :            : 
      59                 :            :     private:
      60                 :            :         OShape(const OShape&);
      61                 :            :         OShape& operator=(const OShape&);
      62                 :            : 
      63                 :          0 :         template <typename T> void set(  const ::rtl::OUString& _sProperty
      64                 :            :                                         ,const T& _Value
      65                 :            :                                         ,T& _member)
      66                 :            :         {
      67 [ #  # ][ #  # ]:          0 :             BoundListeners l;
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      68                 :            :             {
      69 [ #  # ][ #  # ]:          0 :                 ::osl::MutexGuard aGuard(m_aMutex);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      70 [ #  # ][ #  # ]:          0 :                 prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l);
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      71   [ #  #  #  #  :          0 :                 _member = _Value;
          #  #  #  #  #  
          #  #  #  #  #  
           #  # ][ #  #  
          #  #  #  #  #  
                #  #  # ]
                 [ #  # ]
      72                 :            :             }
      73 [ #  # ][ #  # ]:          0 :             l.notify();
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      74                 :          0 :         }
      75                 :            :         void checkIndex(sal_Int32 _nIndex);
      76                 :            :         cppu::IPropertyArrayHelper& getInfoHelper();
      77                 :            :     protected:
      78                 :            :         virtual ~OShape();
      79                 :            :     public:
      80                 :            :         explicit OShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext);
      81                 :            :         explicit OShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext
      82                 :            :                         ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _xFactory
      83                 :            :                         ,::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _xShape
      84                 :            :                         ,const ::rtl::OUString& _sServiceName);
      85                 :            : 
      86                 :            :         DECLARE_XINTERFACE( )
      87                 :            :         // ::com::sun::star::lang::XServiceInfo
      88                 :            :         virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
      89                 :            :         virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
      90                 :            :         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
      91                 :            : 
      92                 :            :         static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      93                 :            :         static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      94                 :            :         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
      95                 :            :             create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
      96                 :            :         // com::sun::star::beans::XPropertySet
      97                 :            :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
      98                 :            :         virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) 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                 :            :         virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     100                 :            :         virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     101                 :            :         virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     102                 :            :         virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     103                 :            :         virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     104                 :            : 
     105                 :            :         // XReportComponent
     106                 :            :         REPORTCOMPONENT_HEADER()
     107                 :            : 
     108                 :            :         // XShape
     109                 :            :         SHAPE_HEADER()
     110                 :            : 
     111                 :            :         virtual ::rtl::OUString SAL_CALL getCustomShapeEngine() throw (::com::sun::star::uno::RuntimeException);
     112                 :            :         virtual void SAL_CALL setCustomShapeEngine( const ::rtl::OUString& _customshapeengine ) throw (::com::sun::star::uno::RuntimeException);
     113                 :            :         virtual ::rtl::OUString SAL_CALL getCustomShapeData() throw (::com::sun::star::uno::RuntimeException);
     114                 :            :         virtual void SAL_CALL setCustomShapeData( const ::rtl::OUString& _customshapedata ) throw (::com::sun::star::uno::RuntimeException);
     115                 :            :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCustomShapeGeometry() throw (::com::sun::star::uno::RuntimeException);
     116                 :            :         virtual void SAL_CALL setCustomShapeGeometry( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _customshapegeometry ) throw (::com::sun::star::uno::RuntimeException);
     117                 :            : 
     118                 :            :         virtual ::sal_Bool SAL_CALL getOpaque() throw (::com::sun::star::uno::RuntimeException);
     119                 :            :         virtual void SAL_CALL setOpaque( ::sal_Bool _opaque ) throw (::com::sun::star::uno::RuntimeException);
     120                 :            : 
     121                 :            :         // XShapeDescriptor
     122                 :            :         virtual ::rtl::OUString SAL_CALL getShapeType(  ) throw (::com::sun::star::uno::RuntimeException);
     123                 :            : 
     124                 :            :         // XReportControlModel
     125                 :            :         REPORTCONTROLMODEL_HEADER()
     126                 :            : 
     127                 :            :         // XReportControlFormat
     128                 :            :         REPORTCONTROLFORMAT_HEADER()
     129                 :            :         // XShape
     130                 :            :         virtual ::sal_Int32 SAL_CALL getZOrder() throw (::com::sun::star::uno::RuntimeException);
     131                 :            :         virtual void SAL_CALL setZOrder( ::sal_Int32 _zorder ) throw (::com::sun::star::uno::RuntimeException);
     132                 :            :         virtual ::com::sun::star::drawing::HomogenMatrix3 SAL_CALL getTransformation() throw (::com::sun::star::uno::RuntimeException);
     133                 :            :         virtual void SAL_CALL setTransformation( const ::com::sun::star::drawing::HomogenMatrix3& _transformation ) throw (::com::sun::star::uno::RuntimeException);
     134                 :            : 
     135                 :            :         // XCloneable
     136                 :            :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone(  ) throw (::com::sun::star::uno::RuntimeException);
     137                 :            : 
     138                 :            :         // XComponent
     139                 :            :         virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
     140                 :          0 :         virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException)
     141                 :            :         {
     142                 :          0 :             cppu::WeakComponentImplHelperBase::addEventListener(aListener);
     143                 :          0 :         }
     144                 :          0 :         virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException)
     145                 :            :         {
     146                 :          0 :             cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
     147                 :          0 :         }
     148                 :            : 
     149                 :            :         // XChild
     150                 :            :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent(  ) throw (::com::sun::star::uno::RuntimeException);
     151                 :            :         virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
     152                 :            : 
     153                 :            :         // XContainer
     154                 :            :         virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
     155                 :            :         virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
     156                 :            : 
     157                 :            :         // XElementAccess
     158                 :            :         virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw (::com::sun::star::uno::RuntimeException);
     159                 :            :         virtual ::sal_Bool SAL_CALL hasElements(  ) throw (::com::sun::star::uno::RuntimeException);
     160                 :            : 
     161                 :            :         // XIndexReplace
     162                 :            :         virtual void SAL_CALL replaceByIndex( ::sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     163                 :            : 
     164                 :            :         // XIndexContainer
     165                 :            :         virtual void SAL_CALL insertByIndex( ::sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     166                 :            :         virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     167                 :            : 
     168                 :            :         // XIndexAccess
     169                 :            :         virtual ::sal_Int32 SAL_CALL getCount(  ) throw (::com::sun::star::uno::RuntimeException);
     170                 :            :         virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     171                 :            :     };
     172                 :            : }
     173                 :            : #endif //RPT_SHAPE_HXX
     174                 :            : 
     175                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10