LCOV - code coverage report
Current view: top level - reportdesign/source/core/inc - FixedText.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 24 0.0 %
Date: 2014-11-03 Functions: 0 12 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             : 
      20             : #ifndef INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FIXEDTEXT_HXX
      21             : #define INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_FIXEDTEXT_HXX
      22             : 
      23             : #include <cppuhelper/propertysetmixin.hxx>
      24             : #include <com/sun/star/report/XFixedText.hpp>
      25             : #include "ReportControlModel.hxx"
      26             : #include <cppuhelper/compbase2.hxx>
      27             : #include <comphelper/broadcasthelper.hxx>
      28             : #include <com/sun/star/lang/XServiceInfo.hpp>
      29             : #include "ReportHelperDefines.hxx"
      30             : 
      31             : 
      32             : namespace reportdesign
      33             : {
      34             :     typedef ::cppu::PropertySetMixin<        com::sun::star::report::XFixedText > FixedTextPropertySet;
      35             :     typedef ::cppu::WeakComponentImplHelper2<    com::sun::star::report::XFixedText
      36             :                                                 ,com::sun::star::lang::XServiceInfo > FixedTextBase;
      37             : 
      38             :     /** \class OFixedText Defines the implementation of a \interface com:::sun::star::report::XFixedText
      39             :      * \ingroup reportdesign_api
      40             :      *
      41             :      */
      42             :     class OFixedText :  public comphelper::OBaseMutex,
      43             :                             public FixedTextBase,
      44             :                             public FixedTextPropertySet
      45             :     {
      46             :         friend class OShapeHelper;
      47             :         OReportControlModel                 m_aProps;
      48             :         OUString                     m_sLabel;
      49             :     private:
      50             :         OFixedText(const OFixedText&);
      51             :         OFixedText& operator=(const OFixedText&);
      52             : 
      53           0 :         template <typename T> void set(  const OUString& _sProperty
      54             :                                         ,const T& _Value
      55             :                                         ,T& _member)
      56             :         {
      57           0 :             BoundListeners l;
      58             :             {
      59           0 :                 ::osl::MutexGuard aGuard(m_aMutex);
      60           0 :                 if ( _member != _Value )
      61             :                 {
      62           0 :                     prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l);
      63           0 :                     _member = _Value;
      64           0 :                 }
      65             :             }
      66           0 :             l.notify();
      67           0 :         }
      68           0 :         void set(  const OUString& _sProperty
      69             :                   ,bool _Value
      70             :                   ,bool& _member)
      71             :         {
      72           0 :             BoundListeners l;
      73             :             {
      74           0 :                 ::osl::MutexGuard aGuard(m_aMutex);
      75           0 :                 if ( _member != _Value )
      76             :                 {
      77           0 :                     prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l);
      78           0 :                     _member = _Value;
      79           0 :                 }
      80             :             }
      81           0 :             l.notify();
      82           0 :         }
      83             :         void checkIndex(sal_Int32 _nIndex);
      84             :     protected:
      85             :         virtual ~OFixedText();
      86             :     public:
      87             :         explicit OFixedText(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext);
      88             :         explicit OFixedText(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext
      89             :                             ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _xFactory
      90             :                             ,::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _xShape);
      91             : 
      92             :         DECLARE_XINTERFACE( )
      93             :         // ::com::sun::star::lang::XServiceInfo
      94             :         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      95             :         virtual OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      96             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      97             : 
      98             :         static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      99             :         static OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
     100             :         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
     101             :             create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
     102             :         // com::sun::star::beans::XPropertySet
     103             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     104             :         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;
     105             :         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;
     106             :         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;
     107             :         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;
     108             :         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;
     109             :         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;
     110             : 
     111             :         // XReportComponent
     112             :         REPORTCOMPONENT_HEADER()
     113             :         // XShape
     114             :         SHAPE_HEADER()
     115             : 
     116             :         // XShapeDescriptor
     117             :         virtual OUString SAL_CALL getShapeType(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     118             : 
     119             :         // XReportControlModel
     120             :         REPORTCONTROLMODEL_HEADER()
     121             : 
     122             :         // XCloneable
     123             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     124             : 
     125             :         // XFixedText
     126             :         virtual OUString SAL_CALL getLabel() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     127             :         virtual void SAL_CALL setLabel( const OUString& _label ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     128             : 
     129             :         // ::com::sun::star::report::XReportControlFormat
     130             :         REPORTCONTROLFORMAT_HEADER()
     131             : 
     132             :         // XComponent
     133             :         virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     134           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
     135             :         {
     136           0 :             cppu::WeakComponentImplHelperBase::addEventListener(aListener);
     137           0 :         }
     138           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
     139             :         {
     140           0 :             cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
     141           0 :         }
     142             : 
     143             :         // XChild
     144             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     145             :         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;
     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_FIXEDTEXT_HXX
     167             : 
     168             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10