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