LCOV - code coverage report
Current view: top level - reportdesign/source/core/inc - FixedLine.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 13 0.0 %
Date: 2014-11-03 Functions: 0 8 0.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_REPORTDESIGN_SOURCE_CORE_INC_FIXEDLINE_HXX
      20             : #define INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FIXEDLINE_HXX
      21             : 
      22             : #include <cppuhelper/propertysetmixin.hxx>
      23             : #include <com/sun/star/report/XFixedLine.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             : 
      30             : 
      31             : namespace reportdesign
      32             : {
      33             :     typedef ::cppu::PropertySetMixin<        com::sun::star::report::XFixedLine > FixedLinePropertySet;
      34             :     typedef ::cppu::WeakComponentImplHelper2<    com::sun::star::report::XFixedLine
      35             :                                                 ,com::sun::star::lang::XServiceInfo > FixedLineBase;
      36             : 
      37             :     /** \class OFixedLine Defines the implementation of a \interface com:::sun::star::report::XFixedLine
      38             :      * \ingroup reportdesign_api
      39             :      *
      40             :      */
      41             :     class OFixedLine :  public comphelper::OBaseMutex,
      42             :                             public FixedLineBase,
      43             :                             public FixedLinePropertySet
      44             :     {
      45             :         friend class OShapeHelper;
      46             :         OReportControlModel     m_aProps;
      47             :         ::com::sun::star::drawing::LineStyle    m_LineStyle;
      48             :         ::com::sun::star::drawing::LineDash     m_LineDash;
      49             :         sal_Int32               m_nOrientation;
      50             :         ::sal_Int32             m_LineColor;
      51             :         ::sal_Int16             m_LineTransparence;
      52             :         ::sal_Int32             m_LineWidth;
      53             : 
      54             :     private:
      55             :         OFixedLine(const OFixedLine&);
      56             :         OFixedLine& operator=(const OFixedLine&);
      57             : 
      58           0 :         template <typename T> void set(  const OUString& _sProperty
      59             :                                         ,const T& _Value
      60             :                                         ,T& _member)
      61             :         {
      62           0 :             BoundListeners l;
      63             :             {
      64           0 :                 ::osl::MutexGuard aGuard(m_aMutex);
      65           0 :                 prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l);
      66           0 :                 _member = _Value;
      67             :             }
      68           0 :             l.notify();
      69           0 :         }
      70             :         void checkIndex(sal_Int32 _nIndex);
      71             :     protected:
      72             :         virtual ~OFixedLine();
      73             :     public:
      74             :         explicit OFixedLine(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext);
      75             :         explicit OFixedLine(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext
      76             :                             ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _xFactory
      77             :                             ,::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _xShape
      78             :                             ,sal_Int32 _nOrientation);
      79             : 
      80             :         DECLARE_XINTERFACE( )
      81             :         // ::com::sun::star::lang::XServiceInfo
      82             :         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      83             :         virtual OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      84             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      85             : 
      86             :         static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      87             :         static OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      88             :         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
      89             :             create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
      90             :         // com::sun::star::beans::XPropertySet
      91             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      92             :         virtual void SAL_CALL setPropertyValue( const 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, std::exception) SAL_OVERRIDE;
      93             :         virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      94             :         virtual void SAL_CALL addPropertyChangeListener( const 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, std::exception) SAL_OVERRIDE;
      95             :         virtual void SAL_CALL removePropertyChangeListener( const 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, std::exception) SAL_OVERRIDE;
      96             :         virtual void SAL_CALL addVetoableChangeListener( const 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, std::exception) SAL_OVERRIDE;
      97             :         virtual void SAL_CALL removeVetoableChangeListener( const 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, std::exception) SAL_OVERRIDE;
      98             : 
      99             :         // XReportComponent
     100             :         REPORTCOMPONENT_HEADER()
     101             : 
     102             :         // XShape
     103             :         SHAPE_HEADER()
     104             : 
     105             :         // XShapeDescriptor
     106             :         virtual OUString SAL_CALL getShapeType(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     107             : 
     108             :         // XReportControlModel
     109             :         REPORTCONTROLMODEL_HEADER()
     110             : 
     111             :         // XFixedLine
     112             :         virtual ::sal_Int32 SAL_CALL getOrientation() throw (::com::sun::star::beans::UnknownPropertyException,::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     113             :         virtual void SAL_CALL setOrientation( ::sal_Int32 _orientation ) throw (::com::sun::star::beans::UnknownPropertyException,::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     114             :         virtual ::com::sun::star::drawing::LineStyle SAL_CALL getLineStyle() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     115             :         virtual void SAL_CALL setLineStyle( ::com::sun::star::drawing::LineStyle _linestyle ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     116             :         virtual ::com::sun::star::drawing::LineDash SAL_CALL getLineDash() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     117             :         virtual void SAL_CALL setLineDash( const ::com::sun::star::drawing::LineDash& _linedash ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     118             :         virtual ::sal_Int32 SAL_CALL getLineColor() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     119             :         virtual void SAL_CALL setLineColor( ::sal_Int32 _linecolor ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     120             :         virtual ::sal_Int16 SAL_CALL getLineTransparence() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     121             :         virtual void SAL_CALL setLineTransparence( ::sal_Int16 _linetransparence ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     122             :         virtual ::sal_Int32 SAL_CALL getLineWidth() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     123             :         virtual void SAL_CALL setLineWidth( ::sal_Int32 _linewidth ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     124             : 
     125             :         // ::com::sun::star::report::XReportControlFormat
     126             :         REPORTCONTROLFORMAT_HEADER()
     127             : 
     128             :         // XCloneable
     129             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     130             : 
     131             :         // XComponent
     132             :         virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     133           0 :         virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     134             :         {
     135           0 :             cppu::WeakComponentImplHelperBase::addEventListener(aListener);
     136           0 :         }
     137           0 :         virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     138             :         {
     139           0 :             cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
     140           0 :         }
     141             : 
     142             :         // XChild
     143             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     144             :         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, std::exception) SAL_OVERRIDE;
     145             : 
     146             :         // XContainer
     147             :         virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     148             :         virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     149             : 
     150             :         // XElementAccess
     151             :         virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     152             :         virtual sal_Bool SAL_CALL hasElements(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     153             : 
     154             :         // XIndexReplace
     155             :         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, std::exception) SAL_OVERRIDE;
     156             : 
     157             :         // XIndexContainer
     158             :         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, std::exception) SAL_OVERRIDE;
     159             :         virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     160             : 
     161             :         // XIndexAccess
     162             :         virtual ::sal_Int32 SAL_CALL getCount(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     163             :         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, std::exception) SAL_OVERRIDE;
     164             :     };
     165             : }
     166             : #endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FIXEDLINE_HXX
     167             : 
     168             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10