4 #ifndef INCLUDED_CPPUHELPER_PROPSHLP_HXX
5 #define INCLUDED_CPPUHELPER_PROPSHLP_HXX
11 #include "com/sun/star/beans/XPropertySet.hpp"
12 #include "com/sun/star/beans/XPropertySetOption.hpp"
13 #include "com/sun/star/beans/XMultiPropertySet.hpp"
14 #include "com/sun/star/beans/XFastPropertySet.hpp"
34 static void * SAL_CALL
operator new(
size_t nSize )
36 static void SAL_CALL
operator delete(
void * pMem )
38 static void * SAL_CALL
operator new( size_t,
void * pMem )
40 static void SAL_CALL
operator delete(
void *,
void * )
60 ::
rtl::OUString * pPropName, sal_Int16 * pAttributes, sal_Int32 nHandle ) = 0;
64 virtual css::uno::Sequence< css::beans::Property > SAL_CALL
getProperties() = 0;
71 const ::rtl::OUString& rPropertyName ) = 0;
82 virtual sal_Int32 SAL_CALL
getHandleByName( const ::rtl::OUString & rPropertyName ) = 0;
89 sal_Int32 * pHandles,
const css::uno::Sequence< ::rtl::OUString > & rPropNames ) = 0;
108 css::beans::Property *pProps,
109 sal_Int32 nElements ,
119 const css::uno::Sequence< css::beans::Property > & aProps,
149 virtual
css::beans::Property SAL_CALL getPropertyByName(
161 virtual sal_Int32 SAL_CALL getHandleByName( const ::
rtl::OUString & rPropertyName )
SAL_OVERRIDE;
167 virtual sal_Int32 SAL_CALL fillHandles(
168 sal_Int32 * pHandles, const
css::uno::Sequence< ::
rtl::OUString > & rPropNames )
SAL_OVERRIDE;
179 css::uno::Sequence<
css::beans::Property > aInfos;
193 bool operator()(
const sal_Int32 & i1 ,
const sal_Int32 & i2)
const
210 static void * SAL_CALL
operator new(
size_t nSize )
212 static void SAL_CALL
operator delete(
void * pMem )
214 static void * SAL_CALL
operator new( size_t,
void * pMem )
216 static void SAL_CALL
operator delete(
void *,
void * )
252 const sal_Int32 & rKey,
253 const css::uno::Reference< css::uno::XInterface > & r );
263 const sal_Int32 & rKey,
264 const css::uno::Reference< css::uno::XInterface > & rxIFace );
311 sal_Int32 * pnHandles,
314 bool bIgnoreRuntimeExceptionsWhileFiring) = 0;
316 #if !defined _MSC_VER
337 public css::beans::XMultiPropertySet,
338 public css::beans::XFastPropertySet,
339 public css::beans::XPropertySet
395 bool bIgnoreRuntimeExceptionsWhileFiring =
false);
430 const ::rtl::OUString& aPropertyName,
431 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener)
SAL_OVERRIDE;
435 const ::rtl::OUString& aPropertyName,
436 const css::uno::Reference < css::beans::XPropertyChangeListener >& aListener)
SAL_OVERRIDE;
440 const ::rtl::OUString& aPropertyName,
441 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener)
SAL_OVERRIDE;
445 const ::rtl::OUString& aPropertyName,
446 const css::uno::Reference< css::beans::XVetoableChangeListener > & aListener )
SAL_OVERRIDE;
465 const css::uno::Sequence< ::rtl::OUString >& PropertyNames,
466 const css::uno::Sequence< css::uno::Any >& Values )
SAL_OVERRIDE;
469 const css::uno::Sequence< ::rtl::OUString >& PropertyNames )
SAL_OVERRIDE;
472 const css::uno::Sequence< ::rtl::OUString >& PropertyNames,
473 const css::uno::Reference< css::beans::XPropertiesChangeListener >& Listener )
SAL_OVERRIDE;
476 const css::uno::Reference< css::beans::XPropertiesChangeListener >& Listener )
SAL_OVERRIDE;
479 const css::uno::Sequence< ::rtl::OUString >& PropertyNames,
480 const css::uno::Reference< css::beans::XPropertiesChangeListener > & Listener )
SAL_OVERRIDE;
485 static css::uno::Reference < css::beans::XPropertySetInfo > SAL_CALL
498 sal_Int32 * pnHandles,
499 const css::uno::Any * pNewValues,
500 const css::uno::Any * pOldValues,
515 sal_Int32 * pHandles,
516 const css::uno::Any * pValues,
517 sal_Int32 nHitCount );
541 css::uno::Any & rConvertedValue,
542 css::uno::Any & rOldValue,
544 const css::uno::Any& rValue ) = 0;
567 const css::uno::Any& rValue ) = 0;
574 css::uno::Any& rValue,
575 sal_Int32 nHandle )
const = 0;
597 const css::uno::Any& i_value
626 sal_Int32* i_handles,
627 const css::uno::Any * i_newValues,
628 const css::uno::Any * i_oldValues,
651 public css::beans::XPropertySetOption
661 bool bIgnoreRuntimeExceptionsWhileFiring =
false);
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:358
unsigned char sal_Bool
Definition: types.h:18
#define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:371
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:567
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:12
Definition: bootstrap.hxx:14
Definition: Enterable.hxx:11
This String class provides base functionality for C++ like Unicode character array handling.
Definition: ustring.hxx:184
A mutual exclusion synchronization object.
Definition: mutex.hxx:15
A container of interfaces.
Definition: interfacecontainer.h:112
This struct contains the standard variables of a broadcaster.
Definition: interfacecontainer.h:420
This interface is used by the OPropertyHelper, to access the property description.
Definition: propshlp.hxx:31
virtual sal_Bool hasPropertyByName(const ::rtl::OUString &rPropertyName)=0
Return true if the property with the name rPropertyName exist, otherwise false.
virtual css::beans::Property getPropertyByName(const ::rtl::OUString &rPropertyName)=0
Return the property with the name rPropertyName.
virtual ~IPropertyArrayHelper()
Following the rule, the first virtual method implies a virtual destructor.
virtual sal_Bool fillPropertyMembersByHandle(::rtl::OUString *pPropName, sal_Int16 *pAttributes, sal_Int32 nHandle)=0
Return the property members Name and Attribute from the handle nHandle.
virtual sal_Int32 fillHandles(sal_Int32 *pHandles, const css::uno::Sequence< ::rtl::OUString > &rPropNames)=0
Fill the array with the handles of the properties.
virtual css::uno::Sequence< css::beans::Property > getProperties()=0
Return the sequence of properties.
virtual sal_Int32 getHandleByName(const ::rtl::OUString &rPropertyName)=0
Return the handle of the property with the name rPropertyName.
You can use this helper class to map a XPropertySet-Interface to a XFast- or a XMultiPropertySet inte...
Definition: propshlp.hxx:97
sal_Int32 getCount() const
Return the number of properties.
OPropertyArrayHelper(const css::uno::Sequence< css::beans::Property > &aProps, sal_Bool bSorted=true)
Create an object which supports the common property interfaces.
virtual css::uno::Sequence< css::beans::Property > getProperties() SAL_OVERRIDE
Return the sequence of properties.
OPropertyArrayHelper(css::beans::Property *pProps, sal_Int32 nElements, sal_Bool bSorted=true)
Create an object which supports the common property interfaces.
virtual sal_Bool fillPropertyMembersByHandle(::rtl::OUString *pPropName, sal_Int16 *pAttributes, sal_Int32 nHandle) SAL_OVERRIDE
Return the property members Name and Attribute from the handle nHandle.
Definition: propshlp.hxx:192
bool operator()(const sal_Int32 &i1, const sal_Int32 &i2) const
Definition: propshlp.hxx:193
Definition: propshlp.hxx:198
size_t operator()(const sal_Int32 &i) const
Definition: propshlp.hxx:199
Specialized class for key type sal_Int32, without explicit usage of STL symbols.
Definition: propshlp.hxx:207
sal_Int32 addInterface(const sal_Int32 &rKey, const css::uno::Reference< css::uno::XInterface > &r)
Insert an element in the container specified with the key.
void clear()
Remove all elements of all containers.
css::uno::Sequence< sal_Int32 > getContainedTypes() const
Return all id's under which at least one interface is added.
sal_Int32 keyType
Definition: propshlp.hxx:276
~OMultiTypeInterfaceContainerHelperInt32()
Delete all containers.
sal_Int32 removeInterface(const sal_Int32 &rKey, const css::uno::Reference< css::uno::XInterface > &rxIFace)
Remove an element from the container specified with the key.
OMultiTypeInterfaceContainerHelperInt32(::osl::Mutex &rMutex)
Create a container of interface containers.
void disposeAndClear(const css::lang::EventObject &rEvt)
Call disposing on all objects in the container that support XEventListener.
OInterfaceContainerHelper * getContainer(const sal_Int32 &rKey) const
Return the container created under this key.
An interface to extend event notification actions.
Definition: propshlp.hxx:289
virtual void fireEvents(sal_Int32 *pnHandles, sal_Int32 nCount, sal_Bool bVetoable, bool bIgnoreRuntimeExceptionsWhileFiring)=0
Method to be called by OPropertySetHelper::fire.
~IEventNotificationHook()
Definition: propshlp.hxx:319
This abstract class maps the methods of the interfaces XMultiPropertySet, XFastPropertySet and XPrope...
Definition: propshlp.hxx:340
virtual sal_Bool convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)=0
Converted the value rValue and return the result in rConvertedValue and the old value in rOldValue.
void setDependentFastPropertyValue(sal_Int32 i_handle, const css::uno::Any &i_value)
sets an dependent property's value
virtual void removeVetoableChangeListener(const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE
Ignored if the property is not constrained.
void setFastPropertyValues(sal_Int32 nSeqLen, sal_Int32 *pHandles, const css::uno::Any *pValues, sal_Int32 nHitCount)
Set multiple properties with the handles.
virtual void firePropertiesChangeEvent(const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
virtual IPropertyArrayHelper & getInfoHelper()=0
This abstract method must return the name to index table.
virtual css::uno::Sequence< css::uno::Any > getPropertyValues(const css::uno::Sequence< ::rtl::OUString > &PropertyNames) SAL_OVERRIDE
virtual void setPropertyValue(const ::rtl::OUString &rPropertyName, const css::uno::Any &aValue) SAL_OVERRIDE
Throw UnknownPropertyException or PropertyVetoException if the property with the name rPropertyName d...
Impl *const m_pReserved
reserved for future use.
Definition: propshlp.hxx:611
~OPropertySetHelper()
You must call disposing before destruction.
virtual void getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const =0
The same as getFastPropertyValue, but return the value through rValue and nHandle is always valid.
OMultiTypeInterfaceContainerHelperInt32 aBoundLC
Container for the XPropertyChangedListener.
Definition: propshlp.hxx:605
virtual void setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue)=0
The same as setFastPropertyValue; nHandle is always valid.
virtual void setFastPropertyValue(sal_Int32 nHandle, const css::uno::Any &rValue) SAL_OVERRIDE
Throw UnknownPropertyException or PropertyVetoException if the property with the name rPropertyName d...
void disposing()
Send a disposing notification to the listeners in the containers aBoundLC and aVetoableLC.
OBroadcastHelper & rBHelper
The common data of a broadcaster.
Definition: propshlp.hxx:601
OPropertySetHelper(OBroadcastHelper &rBHelper, bool bIgnoreRuntimeExceptionsWhileFiring)
Constructor.
virtual css::uno::Any queryInterface(const css::uno::Type &rType) SAL_OVERRIDE
Only returns a reference to XMultiPropertySet, XFastPropertySet, XPropertySet and XEventListener.
virtual css::uno::Any getPropertyValue(const ::rtl::OUString &aPropertyName) SAL_OVERRIDE
Throw UnknownPropertyException if the property with the name rPropertyName does not exist.
OMultiTypeInterfaceContainerHelperInt32 aVetoableLC
Container for the XPropertyVetoableListener.
Definition: propshlp.hxx:609
virtual void setPropertyValues(const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) SAL_OVERRIDE
OPropertySetHelper(OBroadcastHelper &rBHelper)
virtual css::uno::Any getFastPropertyValue(sal_Int32 nHandle) SAL_OVERRIDE
virtual void removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
virtual void removePropertyChangeListener(const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE
Ignored if the property is not bound.
OPropertySetHelper(OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents, bool bIgnoreRuntimeExceptionsWhileFiring=false)
Constructor.
void fire(sal_Int32 *pnHandles, const css::uno::Any *pNewValues, const css::uno::Any *pOldValues, sal_Int32 nCount, sal_Bool bVetoable)
This method fire events to all registered property listeners.
virtual void addPropertyChangeListener(const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE
Ignored if the property is not bound.
virtual void addVetoableChangeListener(const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE
Ignored if the property is not constrained.
virtual void addPropertiesChangeListener(const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
css::uno::Sequence< css::uno::Type > getTypes()
eases implementing XTypeProvider::getTypes, returns the types of XMultiPropertySet,...
static css::uno::Reference< css::beans::XPropertySetInfo > createPropertySetInfo(IPropertyArrayHelper &rProperties)
The property sequence is created in the call.
OPropertySetHelper plus XPropertySetOption.
Definition: propshlp.hxx:652
virtual void enableChangeListenerNotification(sal_Bool bEnable) SAL_OVERRIDE
virtual css::uno::Any queryInterface(const css::uno::Type &rType) SAL_OVERRIDE
Only returns a reference to XMultiPropertySet, XFastPropertySet, XPropertySet and XEventListener.
OPropertySetHelper2(OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents=NULL, bool bIgnoreRuntimeExceptionsWhileFiring=false)
Constructor.
virtual ~OPropertySetHelper2()
You must call disposing before destruction.