LCOV - code coverage report
Current view: top level - reportdesign/source/core/inc - FixedText.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 14 0.0 %
Date: 2012-08-25 Functions: 0 11 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 164 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                 :            : 
      20                 :            : #ifndef RPT_FIXEDTEXT_HXX
      21                 :            : #define RPT_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                 :            :         ::rtl::OUString                     m_sLabel;
      49                 :            :     private:
      50                 :            :         OFixedText(const OFixedText&);
      51                 :            :         OFixedText& operator=(const OFixedText&);
      52                 :            : 
      53                 :          0 :         template <typename T> void set(  const ::rtl::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                 :            :                 }
      65                 :            :             }
      66 [ #  # ][ #  # ]:          0 :             l.notify();
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      67                 :          0 :         }
      68                 :            :         void checkIndex(sal_Int32 _nIndex);
      69                 :            :     protected:
      70                 :            :         virtual ~OFixedText();
      71                 :            :     public:
      72                 :            :         explicit OFixedText(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext);
      73                 :            :         explicit OFixedText(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext
      74                 :            :                             ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _xFactory
      75                 :            :                             ,::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _xShape);
      76                 :            : 
      77                 :            :         DECLARE_XINTERFACE( )
      78                 :            :         // ::com::sun::star::lang::XServiceInfo
      79                 :            :         virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
      80                 :            :         virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
      81                 :            :         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
      82                 :            : 
      83                 :            :         static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      84                 :            :         static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      85                 :            :         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
      86                 :            :             create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
      87                 :            :         // com::sun::star::beans::XPropertySet
      88                 :            :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
      89                 :            :         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);
      90                 :            :         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);
      91                 :            :         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);
      92                 :            :         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);
      93                 :            :         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);
      94                 :            :         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);
      95                 :            : 
      96                 :            :         // XReportComponent
      97                 :            :         REPORTCOMPONENT_HEADER()
      98                 :            :         // XShape
      99                 :            :         SHAPE_HEADER()
     100                 :            : 
     101                 :            :         // XShapeDescriptor
     102                 :            :         virtual ::rtl::OUString SAL_CALL getShapeType(  ) throw (::com::sun::star::uno::RuntimeException);
     103                 :            : 
     104                 :            :         // XReportControlModel
     105                 :            :         REPORTCONTROLMODEL_HEADER()
     106                 :            : 
     107                 :            :         // XCloneable
     108                 :            :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone(  ) throw (::com::sun::star::uno::RuntimeException);
     109                 :            : 
     110                 :            :         // XFixedText
     111                 :            :         virtual ::rtl::OUString SAL_CALL getLabel() throw (::com::sun::star::uno::RuntimeException);
     112                 :            :         virtual void SAL_CALL setLabel( const ::rtl::OUString& _label ) throw (::com::sun::star::uno::RuntimeException);
     113                 :            : 
     114                 :            :         // ::com::sun::star::report::XReportControlFormat
     115                 :            :         REPORTCONTROLFORMAT_HEADER()
     116                 :            : 
     117                 :            :         // XComponent
     118                 :            :         virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
     119                 :          0 :         virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException)
     120                 :            :         {
     121                 :          0 :             cppu::WeakComponentImplHelperBase::addEventListener(aListener);
     122                 :          0 :         }
     123                 :          0 :         virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException)
     124                 :            :         {
     125                 :          0 :             cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
     126                 :          0 :         }
     127                 :            : 
     128                 :            :         // XChild
     129                 :            :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent(  ) throw (::com::sun::star::uno::RuntimeException);
     130                 :            :         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);
     131                 :            :         // XContainer
     132                 :            :         virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
     133                 :            :         virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
     134                 :            : 
     135                 :            :         // XElementAccess
     136                 :            :         virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw (::com::sun::star::uno::RuntimeException);
     137                 :            :         virtual ::sal_Bool SAL_CALL hasElements(  ) throw (::com::sun::star::uno::RuntimeException);
     138                 :            : 
     139                 :            :         // XIndexReplace
     140                 :            :         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);
     141                 :            : 
     142                 :            :         // XIndexContainer
     143                 :            :         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);
     144                 :            :         virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
     145                 :            : 
     146                 :            :         // XIndexAccess
     147                 :            :         virtual ::sal_Int32 SAL_CALL getCount(  ) throw (::com::sun::star::uno::RuntimeException);
     148                 :            :         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);
     149                 :            :     };
     150                 :            : }
     151                 :            : #endif //RPT_FIXEDTEXT_HXX
     152                 :            : 
     153                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10