LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/comphelper - SettingsHelper.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 16 34 47.1 %
Date: 2013-07-09 Functions: 8 18 44.4 %
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 _COMPHELPER_SETTINGSHELPER_HXX_
      21             : #define _COMPHELPER_SETTINGSHELPER_HXX_
      22             : #include <com/sun/star/beans/XPropertySet.hpp>
      23             : #include <com/sun/star/beans/XMultiPropertySet.hpp>
      24             : #include <com/sun/star/lang/XServiceInfo.hpp>
      25             : #include <comphelper/solarmutex.hxx>
      26             : #include <cppuhelper/implbase3.hxx>
      27             : 
      28             : namespace comphelper
      29             : {
      30             :     class MasterPropertySet;
      31             :     class MasterPropertySetInfo;
      32             :     class ChainablePropertySet;
      33             :     class ChainablePropertySetInfo;
      34             : 
      35             :     typedef  cppu::WeakImplHelper3
      36             :     <
      37             :         ::com::sun::star::beans::XPropertySet,
      38             :         ::com::sun::star::beans::XMultiPropertySet,
      39             :         ::com::sun::star::lang::XServiceInfo
      40             :     >
      41             :     HelperBaseNoState;
      42             :     template < class ComphelperBase, class ComphelperBaseInfo > class SettingsHelperNoState :
      43             :         public HelperBaseNoState,
      44             :         public ComphelperBase
      45             :     {
      46             :     public:
      47         926 :         SettingsHelperNoState ( ComphelperBaseInfo *pInfo, SolarMutex* pMutex = NULL)
      48         926 :         : ComphelperBase ( pInfo, pMutex )
      49         926 :         {}
      50         926 :         virtual ~SettingsHelperNoState () throw( ) {}
      51          13 :         com::sun::star::uno::Any SAL_CALL queryInterface( const com::sun::star::uno::Type& aType ) throw (com::sun::star::uno::RuntimeException)
      52          13 :         { return HelperBaseNoState::queryInterface( aType ); }
      53         978 :         void SAL_CALL acquire(  ) throw ()
      54         978 :         { HelperBaseNoState::acquire( ); }
      55         978 :         void SAL_CALL release(  ) throw ()
      56         978 :         { HelperBaseNoState::release( ); }
      57             : 
      58             :         // XPropertySet
      59          84 :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  )
      60             :             throw(::com::sun::star::uno::RuntimeException)
      61          84 :         { return ComphelperBase::getPropertySetInfo(); }
      62         127 :         virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
      63             :             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)
      64         127 :         { ComphelperBase::setPropertyValue ( aPropertyName, aValue ); }
      65         271 :         virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName )
      66             :             throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
      67         271 :         { return ComphelperBase::getPropertyValue ( PropertyName ); }
      68           0 :         virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener )
      69             :             throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
      70           0 :         { ComphelperBase::addPropertyChangeListener ( aPropertyName, xListener ); }
      71           0 :         virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener )
      72             :             throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
      73           0 :         { ComphelperBase::removePropertyChangeListener ( aPropertyName, aListener ); }
      74           0 :         virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
      75             :             throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
      76           0 :         { ComphelperBase::addVetoableChangeListener ( PropertyName, aListener ); }
      77           0 :         virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
      78             :             throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
      79           0 :         { ComphelperBase::removeVetoableChangeListener ( PropertyName, aListener ); }
      80             : 
      81             :         // XMultiPropertySet
      82           0 :         virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
      83             :             throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
      84           0 :         { ComphelperBase::setPropertyValues ( aPropertyNames, aValues ); }
      85           0 :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames )
      86             :             throw(::com::sun::star::uno::RuntimeException)
      87           0 :         { return ComphelperBase::getPropertyValues ( aPropertyNames ); }
      88           0 :         virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
      89             :             throw(::com::sun::star::uno::RuntimeException)
      90           0 :         { ComphelperBase::addPropertiesChangeListener ( aPropertyNames, xListener ); }
      91           0 :         virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
      92             :             throw(::com::sun::star::uno::RuntimeException)
      93           0 :         { ComphelperBase::removePropertiesChangeListener ( xListener ); }
      94           0 :         virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
      95             :             throw(::com::sun::star::uno::RuntimeException)
      96           0 :         { ComphelperBase::firePropertiesChangeEvent ( aPropertyNames, xListener ); }
      97             :     };
      98             :     typedef comphelper::SettingsHelperNoState
      99             :     <
     100             :         ::comphelper::MasterPropertySet,
     101             :         ::comphelper::MasterPropertySetInfo
     102             :     >
     103             :     MasterHelperNoState;
     104             :     typedef comphelper::SettingsHelperNoState
     105             :     <
     106             :         ::comphelper::ChainablePropertySet,
     107             :         ::comphelper::ChainablePropertySetInfo
     108             :     >
     109             :     ChainableHelperNoState;
     110             : }
     111             : 
     112             : #endif
     113             : 
     114             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10