20#ifndef INCLUDED_OOX_HELPER_PROPERTYSET_HXX
21#define INCLUDED_OOX_HELPER_PROPERTYSET_HXX
23#include <com/sun/star/uno/Any.hxx>
24#include <com/sun/star/uno/Reference.hxx>
25#include <com/sun/star/uno/Sequence.hxx>
27#include <rtl/ustring.hxx>
32 namespace beans {
class XMultiPropertySet; }
34 namespace beans {
class XPropertySetInfo; }
64 const css::uno::Reference< css::beans::XPropertySet >& rxPropSet )
68 template<
typename Type >
72 void set(
const css::uno::Reference< css::beans::XPropertySet >& rxPropSet );
75 template<
typename Type >
77 {
set( css::uno::Reference< css::beans::XPropertySet >( rObject, css::uno::UNO_QUERY ) ); }
80 bool is()
const {
return mxPropSet.is(); }
89 css::uno::Any getAnyProperty( sal_Int32 nPropId )
const;
93 template<
typename Type >
95 {
return getAnyProperty( nPropId ) >>= orValue; }
100 {
bool bValue =
false;
return getProperty( bValue, nPropId ) && bValue; }
104 bool setAnyProperty( sal_Int32 nPropId,
const css::uno::Any& rValue );
107 template<
typename Type >
109 {
return setAnyProperty( nPropId, css::uno::Any( rValue ) ); }
111 {
return setAnyProperty( nPropId, css::uno::Any( rValue ) ); }
117 const css::uno::Sequence< OUString >& rPropNames,
118 const css::uno::Sequence< css::uno::Any >& rValues );
122 void setProperties(
const PropertyMap& rPropertyMap );
132 bool implGetPropertyValue( css::uno::Any& orValue,
const OUString& rPropName )
const;
135 bool implSetPropertyValue(
const OUString& rPropName,
const css::uno::Any& rValue );
138 css::uno::Reference< css::beans::XPropertySet >
140 css::uno::Reference< css::beans::XMultiPropertySet >
142 css::uno::Reference< css::beans::XPropertySetInfo >
A helper that maps property identifiers to property values.
A wrapper for a UNO property set.
css::uno::Reference< css::beans::XPropertySet > mxPropSet
The mandatory property set interface.
void set(const css::uno::Reference< css::beans::XPropertySet > &rxPropSet)
Sets the passed UNO property set and releases the old UNO property set.
bool setProperty(sal_Int32 nPropId, ::Color rValue)
PropertySet(const css::uno::Reference< css::beans::XPropertySet > &rxPropSet)
Constructs a property set wrapper with the passed UNO property set.
void set(const Type &rObject)
Queries the passed object (interface or any) for an XPropertySet and releases the old UNO property se...
PropertySet(const Type &rObject)
Constructs a property set wrapper after querying the XPropertySet interface.
css::uno::Reference< css::beans::XPropertySetInfo > mxPropSetInfo
Property information.
void setProperties(const css::uno::Sequence< OUString > &rPropNames, const css::uno::Sequence< css::uno::Any > &rValues)
Puts the passed properties into the property set.
bool is() const
Returns true, if the contained XPropertySet interface is valid.
bool getBoolProperty(sal_Int32 nPropId) const
Gets the specified boolean property from the property set.
css::uno::Reference< css::beans::XMultiPropertySet > mxMultiPropSet
The optional multi property set interface.
bool getProperty(Type &orValue, sal_Int32 nPropId) const
Gets the specified property from the property set.
bool setProperty(sal_Int32 nPropId, const Type &rValue)
Puts the passed value into the property set.
VCL_DLLPUBLIC void dump(const SkBitmap &bitmap, const char *file)
void set(css::uno::UnoInterfaceReference const &value)
class SAL_NO_VTABLE XPropertySet
bool hasProperty(const OUString &_rName, const Reference< XPropertySet > &_rxSet)
std::map< sal_Int32, STLPropertyMapEntry > PropertyMap
SVX_DLLPUBLIC OUString getProperty(css::uno::Reference< css::beans::XPropertyContainer > const &rxPropertyContainer, OUString const &rName)