LCOV - code coverage report
Current view: top level - libreoffice/reportdesign/source/core/inc - Group.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 15 0.0 %
Date: 2012-12-27 Functions: 0 7 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 REPORTDESIGN_API_GROUP_HXX
      20             : #define REPORTDESIGN_API_GROUP_HXX
      21             : 
      22             : #include <com/sun/star/report/XGroup.hpp>
      23             : #include <cppuhelper/compbase2.hxx>
      24             : #include <comphelper/broadcasthelper.hxx>
      25             : #include <comphelper/sequence.hxx>
      26             : #include <cppuhelper/propertysetmixin.hxx>
      27             : #include <com/sun/star/uno/XComponentContext.hpp>
      28             : #include "GroupProperties.hxx"
      29             : #include <comphelper/uno3.hxx>
      30             : #include <com/sun/star/lang/XServiceInfo.hpp>
      31             : 
      32             : namespace reportdesign
      33             : {
      34             :     typedef ::cppu::WeakComponentImplHelper2< com::sun::star::report::XGroup
      35             :                                          ,   ::com::sun::star::lang::XServiceInfo> GroupBase;
      36             :     typedef ::cppu::PropertySetMixin< com::sun::star::report::XGroup> GroupPropertySet;
      37             : 
      38             :     /** \class OGroup Defines the implementation of a \interface com:::sun::star::report::XGroup
      39             :      * \ingroup reportdesign_api
      40             :      *
      41             :      */
      42             :     class OGroup :   public comphelper::OMutexAndBroadcastHelper
      43             :                     ,public GroupBase
      44             :                     ,public GroupPropertySet
      45             :     {
      46             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >    m_xContext;
      47             :         ::com::sun::star::uno::WeakReference< ::com::sun::star::report::XGroups >       m_xParent;
      48             :         ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>           m_xHeader;
      49             :         ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>           m_xFooter;
      50             :         ::com::sun::star::uno::Reference< ::com::sun::star::report::XFunctions >        m_xFunctions;
      51             :         ::rptshared::GroupProperties                                                    m_aProps;
      52             : 
      53             :     private:
      54             :         OGroup& operator=(const OGroup&);
      55             :         OGroup(const OGroup&);
      56             : 
      57           0 :         template <typename T> void set(  const ::rtl::OUString& _sProperty
      58             :                                         ,const T& _Value
      59             :                                         ,T& _member)
      60             :         {
      61           0 :             BoundListeners l;
      62             :             {
      63           0 :                 ::osl::MutexGuard aGuard(m_aMutex);
      64           0 :                 if ( _member != _Value )
      65             :                 {
      66           0 :                     prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l);
      67           0 :                     _member = _Value;
      68             :                 }
      69             :             }
      70           0 :             l.notify();
      71           0 :         }
      72             :         void setSection(     const ::rtl::OUString& _sProperty
      73             :                             ,const sal_Bool& _bOn
      74             :                             ,const ::rtl::OUString& _sName
      75             :                             ,::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _member);
      76             :     protected:
      77             :         // TODO: VirtualFunctionFinder: This is virtual function!
      78             :         //
      79             :         virtual ~OGroup();
      80             : 
      81             :         /** this function is called upon disposing the component
      82             :         */
      83             :         // TODO: VirtualFunctionFinder: This is virtual function!
      84             :         //
      85             :         virtual void SAL_CALL disposing();
      86             :     public:
      87             :         OGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroups >& _xParent
      88             :             ,const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& context);
      89             : 
      90             :         void copyGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xSource);
      91             : 
      92             :         DECLARE_XINTERFACE( )
      93             :         // ::com::sun::star::lang::XServiceInfo
      94             :         virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
      95             :         virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
      96             :         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
      97             : 
      98             :         static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
      99             : 
     100             :         // com::sun::star::beans::XPropertySet
     101             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
     102             :         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);
     103             :         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);
     104             :         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);
     105             :         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);
     106             :         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);
     107             :         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);
     108             : 
     109             :         // XGroup
     110             :         virtual ::sal_Bool SAL_CALL getSortAscending() throw (::com::sun::star::uno::RuntimeException);
     111             :         virtual void SAL_CALL setSortAscending( ::sal_Bool _sortascending ) throw (::com::sun::star::uno::RuntimeException);
     112             :         virtual ::sal_Bool SAL_CALL getHeaderOn() throw (::com::sun::star::uno::RuntimeException);
     113             :         virtual void SAL_CALL setHeaderOn( ::sal_Bool _headeron ) throw (::com::sun::star::uno::RuntimeException);
     114             :         virtual ::sal_Bool SAL_CALL getFooterOn() throw (::com::sun::star::uno::RuntimeException);
     115             :         virtual void SAL_CALL setFooterOn( ::sal_Bool _footeron ) throw (::com::sun::star::uno::RuntimeException);
     116             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > SAL_CALL getHeader() throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
     117             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > SAL_CALL getFooter() throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
     118             :         virtual ::sal_Int16 SAL_CALL getGroupOn() throw (::com::sun::star::uno::RuntimeException);
     119             :         virtual void SAL_CALL setGroupOn( ::sal_Int16 _groupon ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
     120             :         virtual ::sal_Int32 SAL_CALL getGroupInterval() throw (::com::sun::star::uno::RuntimeException);
     121             :         virtual void SAL_CALL setGroupInterval( ::sal_Int32 _groupinterval ) throw (::com::sun::star::uno::RuntimeException);
     122             :         virtual ::sal_Int16 SAL_CALL getKeepTogether() throw (::com::sun::star::uno::RuntimeException);
     123             :         virtual void SAL_CALL setKeepTogether( ::sal_Int16 _keeptogether ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
     124             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroups > SAL_CALL getGroups() throw (::com::sun::star::uno::RuntimeException);
     125             :         virtual ::rtl::OUString SAL_CALL getExpression() throw (::com::sun::star::uno::RuntimeException);
     126             :         virtual void SAL_CALL setExpression( const ::rtl::OUString& _expression ) throw (::com::sun::star::uno::RuntimeException);
     127             :         virtual ::sal_Bool SAL_CALL getStartNewColumn() throw (::com::sun::star::uno::RuntimeException);
     128             :         virtual void SAL_CALL setStartNewColumn( ::sal_Bool _startnewcolumn ) throw (::com::sun::star::uno::RuntimeException);
     129             :         virtual ::sal_Bool SAL_CALL getResetPageNumber() throw (::com::sun::star::uno::RuntimeException);
     130             :         virtual void SAL_CALL setResetPageNumber( ::sal_Bool _resetpagenumber ) throw (::com::sun::star::uno::RuntimeException);
     131             : 
     132             :         //XFunctionsSupplier
     133             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XFunctions > SAL_CALL getFunctions() throw (::com::sun::star::uno::RuntimeException);
     134             : 
     135             :         // XChild
     136             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent(  ) throw (::com::sun::star::uno::RuntimeException);
     137             :         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);
     138             : 
     139             :         // XComponent
     140             :         virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
     141           0 :         virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException)
     142             :         {
     143           0 :             cppu::WeakComponentImplHelperBase::addEventListener(aListener);
     144           0 :         }
     145           0 :         virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException)
     146             :         {
     147           0 :             cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
     148           0 :         }
     149             : 
     150           0 :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getContext(){ return m_xContext; }
     151             :     };
     152             : // =============================================================================
     153             : } // namespace reportdesign
     154             : // =============================================================================
     155             : #endif //
     156             : 
     157             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10