1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
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>
35 #include <com/sun/star/uno/genfunc.h>
36 #include <com/sun/star/beans/PropertyAttribute.hpp>
37 #include <rtl/ustrbuf.hxx>
41 //.........................................................................
44 //.........................................................................
46 using namespace ::com::sun::star::uno
;
47 using namespace ::com::sun::star::lang
;
48 using namespace ::com::sun::star::beans
;
50 //==========================================================================
51 //= OPropertyContainer
52 //==========================================================================
53 //--------------------------------------------------------------------------
54 OPropertyContainer::OPropertyContainer(::cppu::OBroadcastHelper
& _rBHelper
)
55 :OPropertyContainer_Base(_rBHelper
)
59 // -------------------------------------------------------------------------
60 OPropertyContainer::~OPropertyContainer()
64 //--------------------------------------------------------------------------
65 Sequence
< Type
> SAL_CALL
OPropertyContainer::getTypes() throw (RuntimeException
)
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
))
73 return aTypes
.getTypes();
76 //--------------------------------------------------------------------------
77 void SAL_CALL
OPropertyContainer::setFastPropertyValue( sal_Int32 nHandle
, const Any
& rValue
) throw ( UnknownPropertyException
, PropertyVetoException
, IllegalArgumentException
, WrappedTargetException
, RuntimeException
)
79 OPropertyContainer_Base::setFastPropertyValue( nHandle
, rValue
);
82 //--------------------------------------------------------------------------
83 sal_Bool
OPropertyContainer::convertFastPropertyValue(
84 Any
& _rConvertedValue
, Any
& _rOldValue
, sal_Int32 _nHandle
, const Any
& _rValue
) throw (IllegalArgumentException
)
86 return OPropertyContainerHelper::convertFastPropertyValue( _rConvertedValue
, _rOldValue
, _nHandle
, _rValue
);
89 //--------------------------------------------------------------------------
90 void OPropertyContainer::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle
, const Any
& _rValue
) throw (Exception
)
92 OPropertyContainerHelper::setFastPropertyValue( _nHandle
, _rValue
);
95 //--------------------------------------------------------------------------
96 void OPropertyContainer::getFastPropertyValue(Any
& _rValue
, sal_Int32 _nHandle
) const
98 OPropertyContainerHelper::getFastPropertyValue( _rValue
, _nHandle
);
101 //.........................................................................
102 } // namespace comphelper
103 //.........................................................................