20#ifndef INCLUDED_COMPHELPER_PROPERTY_HXX
21#define INCLUDED_COMPHELPER_PROPERTY_HXX
25#include <com/sun/star/beans/Property.hpp>
37 bool operator() (
const css::beans::Property& x,
const css::beans::Property& y)
const
39 return x.Name.compareTo(
y.Name) < 0;
62 const css::uno::Reference<css::beans::XPropertySet>& _rxDest);
74bool tryPropertyValue(css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue,
const css::uno::Any& _rValueToSet,
const T& _rCurrentValue)
76 bool bModified(
false);
78 ::cppu::convertPropertyValue(aNewValue, _rValueToSet);
79 if (aNewValue != _rCurrentValue)
81 _rConvertedValue <<= aNewValue;
82 _rOldValue <<= _rCurrentValue;
97template <
class ENUMTYPE>
98typename std::enable_if<std::is_enum<ENUMTYPE>::value,
bool>::type
99tryPropertyValueEnum(css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue,
const css::uno::Any& _rValueToSet,
const ENUMTYPE& _rCurrentValue)
101 bool bModified(
false);
106 if (aNewValue != _rCurrentValue)
108 _rConvertedValue <<= aNewValue;
109 _rOldValue <<= _rCurrentValue;
125COMPHELPER_DLLPUBLIC bool tryPropertyValue(css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue,
const css::uno::Any& _rValueToSet,
const css::uno::Any& _rCurrentValue,
const css::uno::Type& _rExpectedType);
#define COMPHELPER_DLLPUBLIC
class SAL_NO_VTABLE XPropertySet
bool hasProperty(const OUString &_rName, const Reference< XPropertySet > &_rxSet)
bool tryPropertyValue(Any &_rConvertedValue, Any &_rOldValue, const Any &_rValueToSet, const Any &_rCurrentValue, const Type &_rExpectedType)
std::enable_if< std::is_enum< ENUMTYPE >::value, bool >::type tryPropertyValueEnum(css::uno::Any &_rConvertedValue, css::uno::Any &_rOldValue, const css::uno::Any &_rValueToSet, const ENUMTYPE &_rCurrentValue)
helper for implementing cppu::OPropertySetHelper::convertFastPropertyValue for enum values
void ModifyPropertyAttributes(Sequence< Property > &seqProps, const OUString &sPropName, sal_Int16 nAddAttrib, sal_Int16 nRemoveAttrib)
void copyProperties(const Reference< XPropertySet > &_rxSource, const Reference< XPropertySet > &_rxDest)
void RemoveProperty(Sequence< Property > &_rProps, const OUString &_rPropName)
void any2enum(E &eRet, const css::uno::Any &rAny)
Sets int32 from enum or int in any with additional typecheck.
bool operator()(const css::beans::Property &x, const css::beans::Property &y) const