20#ifndef INCLUDED_COMPHELPER_PROPAGG_HXX
21#define INCLUDED_COMPHELPER_PROPAGG_HXX
23#include <config_options.h>
24#include <com/sun/star/beans/Property.hpp>
25#include <com/sun/star/beans/PropertyState.hpp>
26#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
27#include <com/sun/star/beans/XVetoableChangeListener.hpp>
28#include <com/sun/star/lang/EventObject.hpp>
87#define DEFAULT_AGGREGATE_PROPERTY_ID 10000
91 friend class OPropertySetAggregationHelper;
121 const css::uno::Sequence< css::beans::Property>& _rAggProperties,
127 virtual sal_Bool SAL_CALL fillPropertyMembersByHandle( OUString* _pPropName, sal_Int16* _pAttributes,
128 sal_Int32 _nHandle)
override ;
131 virtual css::uno::Sequence< css::beans::Property> SAL_CALL getProperties()
override;
133 virtual css::beans::Property SAL_CALL getPropertyByName(
const OUString& _rPropertyName)
override;
136 virtual sal_Bool SAL_CALL hasPropertyByName(
const OUString& _rPropertyName)
override ;
138 virtual sal_Int32 SAL_CALL getHandleByName(
const OUString & _rPropertyName)
override;
140 virtual sal_Int32 SAL_CALL fillHandles( sal_Int32* _pHandles,
const css::uno::Sequence< OUString >& _rPropNames )
override;
150 bool fillAggregatePropertyInfoByHandle(OUString* _pPropName, sal_Int32* _pOriginalHandle,
151 sal_Int32 _nHandle)
const;
155 bool getPropertyByHandle( sal_Int32 _nHandle, css::beans::Property& _rProperty )
const;
176 PropertyOrigin classifyProperty(
const OUString& _rName );
179 const css::beans::Property* findPropertyByName(
const OUString& _rName)
const;
185 class PropertyForwarder;
194class UNLESS_MERGELIBS(COMPHELPER_DLLPUBLIC) OPropertySetAggregationHelper :
public OPropertyStateHelper
195 ,
public css::beans::XPropertiesChangeListener
196 ,
public css::beans::XVetoableChangeListener
198 friend class internal::PropertyForwarder;
201 css::uno::Reference< css::beans::XPropertyState> m_xAggregateState;
202 css::uno::Reference< css::beans::XPropertySet> m_xAggregateSet;
203 css::uno::Reference< css::beans::XMultiPropertySet> m_xAggregateMultiSet;
204 css::uno::Reference< css::beans::XFastPropertySet> m_xAggregateFastSet;
206 std::unique_ptr<internal::PropertyForwarder> m_pForwarder;
207 bool m_bListening : 1;
212 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& aType)
override;
215 virtual void SAL_CALL disposing(
const css::lang::EventObject& Source)
override;
218 virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle,
const css::uno::Any& aValue)
override;
219 virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle)
override;
222 virtual void SAL_CALL addPropertyChangeListener(
const OUString& aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener)
override;
223 virtual void SAL_CALL addVetoableChangeListener(
const OUString& PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener)
override;
226 virtual void SAL_CALL propertiesChange(
const css::uno::Sequence< css::beans::PropertyChangeEvent >& evt)
override;
229 virtual void SAL_CALL vetoableChange(
const css::beans::PropertyChangeEvent&
aEvent)
override;
232 virtual void SAL_CALL setPropertyValues(
const css::uno::Sequence< OUString >& PropertyNames,
const css::uno::Sequence< css::uno::Any >& Values)
override;
233 virtual void SAL_CALL addPropertiesChangeListener(
const css::uno::Sequence< OUString >& aPropertyNames,
const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener)
override;
236 virtual css::beans::PropertyState SAL_CALL getPropertyState(
const OUString& PropertyName)
override;
237 virtual void SAL_CALL setPropertyToDefault(
const OUString& PropertyName)
override;
238 virtual css::uno::Any SAL_CALL getPropertyDefault(
const OUString& aPropertyName)
override;
244 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper()
override = 0;
249 virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue, sal_Int32 _nHandle,
const css::uno::Any& _rValue )
override;
254 virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle,
const css::uno::Any& _rValue )
override;
257 virtual ~OPropertySetAggregationHelper()
override;
259 virtual void SAL_CALL getFastPropertyValue(css::uno::Any& rValue, sal_Int32 nHandle)
const override;
262 sal_Int32 getOriginalHandle( sal_Int32 _nHandle )
const;
286 void declareForwardedProperty( sal_Int32 _nHandle );
294 bool isCurrentlyForwardingProperty( sal_Int32 _nHandle )
const;
302 virtual void forwardingPropertyValue( sal_Int32 _nHandle );
310 virtual void forwardedPropertyValue( sal_Int32 _nHandle );
315 void setAggregation(
const css::uno::Reference< css::uno::XInterface >&);
316 void startListening();
used as callback for an OPropertyArrayAggregationHelper
virtual sal_Int32 getPreferredPropertyId(const OUString &_rName)=0
get the preferred handle for the given property
std::map< sal_Int32, internal::OPropertyAccessor > m_aPropertyAccessors
std::vector< css::beans::Property > m_aProperties
#define COMPHELPER_DLLPUBLIC
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
OUString getPropertyName(sal_Int32 nPropertyType)
#define DEFAULT_AGGREGATE_PROPERTY_ID
used for implementing a cppu::IPropertyArrayHelper for classes aggregating property sets
bool operator<(const OPropertyAccessor &rOb) const
bool operator==(const OPropertyAccessor &rOb) const
OPropertyAccessor(sal_Int32 _nOriginalHandle, std::size_t _nPos, bool _bAggregate)
sal_Int32 nOriginalHandle