1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_comphelper.hxx"
26 #include <comphelper/propertycontainer.hxx>
27 #include <comphelper/property.hxx>
28 #include <cppuhelper/typeprovider.hxx>
29 #include <osl/diagnose.h>
30 #include <uno/data.h>
31 #include <com/sun/star/uno/genfunc.h>
32 #include <com/sun/star/beans/PropertyAttribute.hpp>
33 #include <rtl/ustrbuf.hxx>
34 
35 #include <algorithm>
36 
37 //.........................................................................
38 namespace comphelper
39 {
40 //.........................................................................
41 
42 using namespace ::com::sun::star::uno;
43 using namespace ::com::sun::star::lang;
44 using namespace ::com::sun::star::beans;
45 
46 //==========================================================================
47 //= OPropertyContainer
48 //==========================================================================
49 //--------------------------------------------------------------------------
OPropertyContainer(::cppu::OBroadcastHelper & _rBHelper)50 OPropertyContainer::OPropertyContainer(::cppu::OBroadcastHelper& _rBHelper)
51 	:OPropertyContainer_Base(_rBHelper)
52 {
53 }
54 
55 // -------------------------------------------------------------------------
~OPropertyContainer()56 OPropertyContainer::~OPropertyContainer()
57 {
58 }
59 
60 //--------------------------------------------------------------------------
getTypes()61 Sequence< Type > SAL_CALL OPropertyContainer::getTypes() throw (RuntimeException)
62 {
63 	// just the types from our one and only base class
64 	::cppu::OTypeCollection aTypes(
65 		::getCppuType( static_cast< Reference< XPropertySet >* >(NULL)),
66 		::getCppuType( static_cast< Reference< XFastPropertySet >* >(NULL)),
67 		::getCppuType( static_cast< Reference< XMultiPropertySet >* >(NULL))
68 	);
69 	return aTypes.getTypes();
70 }
71 
72 //--------------------------------------------------------------------------
setFastPropertyValue(sal_Int32 nHandle,const Any & rValue)73 void SAL_CALL OPropertyContainer::setFastPropertyValue( sal_Int32 nHandle, const Any& rValue ) throw ( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
74 {
75     OPropertyContainer_Base::setFastPropertyValue( nHandle, rValue );
76 }
77 
78 //--------------------------------------------------------------------------
convertFastPropertyValue(Any & _rConvertedValue,Any & _rOldValue,sal_Int32 _nHandle,const Any & _rValue)79 sal_Bool OPropertyContainer::convertFastPropertyValue(
80 	Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw (IllegalArgumentException)
81 {
82     return OPropertyContainerHelper::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
83 }
84 
85 //--------------------------------------------------------------------------
setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle,const Any & _rValue)86 void OPropertyContainer::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw (Exception)
87 {
88     OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue );
89 }
90 
91 //--------------------------------------------------------------------------
getFastPropertyValue(Any & _rValue,sal_Int32 _nHandle) const92 void OPropertyContainer::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
93 {
94     OPropertyContainerHelper::getFastPropertyValue( _rValue, _nHandle );
95 }
96 
97 //.........................................................................
98 }	// namespace comphelper
99 //.........................................................................
100 
101 
102