bump product version to 4.1.6.2
[LibreOffice.git] / include / comphelper / SettingsHelper.hxx
blob341b7431db06c555f79f678cd1de522dc0ab9fa6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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 <cppuhelper/implbase3.hxx>
27 namespace comphelper
29 class MasterPropertySet;
30 class MasterPropertySetInfo;
31 class ChainablePropertySet;
32 class ChainablePropertySetInfo;
34 typedef cppu::WeakImplHelper3
36 ::com::sun::star::beans::XPropertySet,
37 ::com::sun::star::beans::XMultiPropertySet,
38 ::com::sun::star::lang::XServiceInfo
40 HelperBaseNoState;
41 template < class ComphelperBase, class ComphelperBaseInfo > class SettingsHelperNoState :
42 public HelperBaseNoState,
43 public ComphelperBase
45 public:
46 SettingsHelperNoState ( ComphelperBaseInfo *pInfo, SolarMutex* pMutex = NULL)
47 : ComphelperBase ( pInfo, pMutex )
49 virtual ~SettingsHelperNoState () throw( ) {}
50 com::sun::star::uno::Any SAL_CALL queryInterface( const com::sun::star::uno::Type& aType ) throw (com::sun::star::uno::RuntimeException)
51 { return HelperBaseNoState::queryInterface( aType ); }
52 void SAL_CALL acquire( ) throw ()
53 { HelperBaseNoState::acquire( ); }
54 void SAL_CALL release( ) throw ()
55 { HelperBaseNoState::release( ); }
57 // XPropertySet
58 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( )
59 throw(::com::sun::star::uno::RuntimeException)
60 { return ComphelperBase::getPropertySetInfo(); }
61 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
62 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)
63 { ComphelperBase::setPropertyValue ( aPropertyName, aValue ); }
64 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName )
65 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
66 { return ComphelperBase::getPropertyValue ( PropertyName ); }
67 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener )
68 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
69 { ComphelperBase::addPropertyChangeListener ( aPropertyName, xListener ); }
70 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener )
71 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
72 { ComphelperBase::removePropertyChangeListener ( aPropertyName, aListener ); }
73 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
74 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
75 { ComphelperBase::addVetoableChangeListener ( PropertyName, aListener ); }
76 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
77 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
78 { ComphelperBase::removeVetoableChangeListener ( PropertyName, aListener ); }
80 // XMultiPropertySet
81 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 )
82 throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
83 { ComphelperBase::setPropertyValues ( aPropertyNames, aValues ); }
84 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames )
85 throw(::com::sun::star::uno::RuntimeException)
86 { return ComphelperBase::getPropertyValues ( aPropertyNames ); }
87 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 )
88 throw(::com::sun::star::uno::RuntimeException)
89 { ComphelperBase::addPropertiesChangeListener ( aPropertyNames, xListener ); }
90 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
91 throw(::com::sun::star::uno::RuntimeException)
92 { ComphelperBase::removePropertiesChangeListener ( xListener ); }
93 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 )
94 throw(::com::sun::star::uno::RuntimeException)
95 { ComphelperBase::firePropertiesChangeEvent ( aPropertyNames, xListener ); }
97 typedef comphelper::SettingsHelperNoState
99 ::comphelper::MasterPropertySet,
100 ::comphelper::MasterPropertySetInfo
102 MasterHelperNoState;
103 typedef comphelper::SettingsHelperNoState
105 ::comphelper::ChainablePropertySet,
106 ::comphelper::ChainablePropertySetInfo
108 ChainableHelperNoState;
111 #endif
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */