1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_comphelper.hxx"
30 #include <comphelper/propertycontainer.hxx>
31 #include <comphelper/property.hxx>
32 #include <cppuhelper/typeprovider.hxx>
33 #include <osl/diagnose.h>
34 #include <uno/data.h>
35 #include <com/sun/star/uno/genfunc.h>
36 #include <com/sun/star/beans/PropertyAttribute.hpp>
37 #include <rtl/ustrbuf.hxx>
38 
39 #include <algorithm>
40 
41 //.........................................................................
42 namespace comphelper
43 {
44 //.........................................................................
45 
46 using namespace ::com::sun::star::uno;
47 using namespace ::com::sun::star::lang;
48 using namespace ::com::sun::star::beans;
49 
50 //==========================================================================
51 //= OPropertyContainer
52 //==========================================================================
53 //--------------------------------------------------------------------------
54 OPropertyContainer::OPropertyContainer(::cppu::OBroadcastHelper& _rBHelper)
55 	:OPropertyContainer_Base(_rBHelper)
56 {
57 }
58 
59 // -------------------------------------------------------------------------
60 OPropertyContainer::~OPropertyContainer()
61 {
62 }
63 
64 //--------------------------------------------------------------------------
65 Sequence< Type > SAL_CALL OPropertyContainer::getTypes() throw (RuntimeException)
66 {
67 	// just the types from our one and only base class
68 	::cppu::OTypeCollection aTypes(
69 		::getCppuType( static_cast< Reference< XPropertySet >* >(NULL)),
70 		::getCppuType( static_cast< Reference< XFastPropertySet >* >(NULL)),
71 		::getCppuType( static_cast< Reference< XMultiPropertySet >* >(NULL))
72 	);
73 	return aTypes.getTypes();
74 }
75 
76 //--------------------------------------------------------------------------
77 void SAL_CALL OPropertyContainer::setFastPropertyValue( sal_Int32 nHandle, const Any& rValue ) throw ( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
78 {
79     OPropertyContainer_Base::setFastPropertyValue( nHandle, rValue );
80 }
81 
82 //--------------------------------------------------------------------------
83 sal_Bool OPropertyContainer::convertFastPropertyValue(
84 	Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw (IllegalArgumentException)
85 {
86     return OPropertyContainerHelper::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
87 }
88 
89 //--------------------------------------------------------------------------
90 void OPropertyContainer::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw (Exception)
91 {
92     OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue );
93 }
94 
95 //--------------------------------------------------------------------------
96 void OPropertyContainer::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
97 {
98     OPropertyContainerHelper::getFastPropertyValue( _rValue, _nHandle );
99 }
100 
101 //.........................................................................
102 }	// namespace comphelper
103 //.........................................................................
104 
105 
106