Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
 Overview   Namespace   Class   Index   Help 
PUBLIC MEMBERS:  CLASSESSTRUCTSUNIONSENUMSTYPEDEFSMETHODSSTATIC METHODSDATASTATIC DATA
PROTECTED MEMBERS:  CLASSESSTRUCTSUNIONSENUMSTYPEDEFSMETHODSSTATIC METHODSDATASTATIC DATA
PRIVATE MEMBERS:  CLASSESSTRUCTSUNIONSENUMSTYPEDEFSMETHODSSTATIC METHODSDATASTATIC DATA

:: cppu ::

class OPropertySetHelper


Base Classes
com::sun::star::beans::XMultiPropertySet (public)
  |  
  |  com::sun::star::beans::XFastPropertySet (public)
  |    |  
  |    |  com::sun::star::beans::XPropertySet (public)
  |    |    |  
  +----+----+--OPropertySetHelper
Known Derived Classes
None.

virtual abstract interface template
YES YES YES NO
Description
This abstract class maps the methods of the interfaces XMultiPropertySet, XFastPropertySet and XPropertySet to the methods getInfoHelper, convertFastPropertyValue, setFastPropertyValue_NoBroadcast and getFastPropertyValue. You must derive from this class and overload the methods. It provides a standard implementation of the XPropertySetInfo. The XPropertiesChangeListener are inserted in the rBHelper.aLC structure. The XPropertyChangeListener and XVetoableChangeListener with no names are inserted in the rBHelper.aLC structure. So it is possible to advise property listeners with the connection point interfaces. But only listeners that listen to all property changes.
File
propshlp.hxx

Public Members

Methods


OPropertySetHelper( OBroadcastHelper & rBHelper ) throw( );

~OPropertySetHelper( ) throw( );
You must call disposing before destruction.
::com::sun::star::uno::Any
queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException );
Only returns a reference to XMultiPropertySet, XFastPropertySet, XPropertySet and XEventListener.
void
disposing( ) throw( );
Send a disposing notification to the listeners in the conatiners aBoundLC and aVetoableLC.
virtual void
setPropertyValue( const ::rtl::OUString & rPropertyName, const ::com::sun::star::uno::Any & aValue ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any
getPropertyValue( const ::rtl::OUString & aPropertyName ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
Throw UnknownPropertyException if the property with the name rPropertyName does not exist.
virtual void
addPropertyChangeListener( const ::rtl::OUString & aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
Ignored if the property is not bound.
virtual void
removePropertyChangeListener( const ::rtl::OUString & aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
Ignored if the property is not bound.
virtual void
addVetoableChangeListener( const ::rtl::OUString & aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
Ignored if the property is not constrained.
virtual void
removeVetoableChangeListener( const ::rtl::OUString & aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
Ignored if the property is not constrained.
virtual void
setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any & rValue ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any
getFastPropertyValue( sal_Int32 nHandle ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
virtual void
setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString > & PropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > & Values ) throw( ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString > & PropertyNames ) throw( ::com::sun::star::uno::RuntimeException );
virtual void
addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString > & PropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener > & Listener ) throw( ::com::sun::star::uno::RuntimeException );
virtual void
removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener > & Listener ) throw( ::com::sun::star::uno::RuntimeException );
virtual void
firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString > & PropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener > & Listener ) throw( ::com::sun::star::uno::RuntimeException );

Static Methods

static ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
createPropertySetInfo( IPropertyArrayHelper & rProperties ) throw( );
The property sequence is created in the call. The interface isn't used after the call.

Protected Members

Methods

void
fire( sal_Int32 * pnHandles, const ::com::sun::star::uno::Any * pNewValues, const ::com::sun::star::uno::Any * pOldValues, sal_Int32 nCount, sal_Bool bVetoable );
This method fire events to all registered property listeners.
void
setFastPropertyValues( sal_Int32 nSeqLen, sal_Int32 * pHandles, const ::com::sun::star::uno::Any * pValues, sal_Int32 nHitCount ) throw( ::com::sun::star::uno::Exception );
Set multiple properties with the handles.
virtual IPropertyArrayHelper &
getInfoHelper( ) = 0;
This abstract method must return the name to index table. This table contains all property names and types of this object. The method is not implemented in this class.
virtual sal_Bool
convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue, sal_Int32 nHandle, const ::com::sun::star::uno::Any & rValue ) throw( ::com::sun::star::lang::IllegalArgumentException ) = 0;
virtual void
setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any & rValue ) throw( ::com::sun::star::uno::Exception ) = 0;
virtual void
getFastPropertyValue( ::com::sun::star::uno::Any & rValue, sal_Int32 nHandle ) const = 0;

Data

OBroadcastHelper & rBHelper; The common data of a broadcaster. Use the mutex, disposing state and the listener container.
OMultiTypeInterfaceContainerHelperInt32 aBoundLC; Container for the XProperyChangedListener. The listeners are inserted by handle.
OMultiTypeInterfaceContainerHelperInt32 aVetoableLC; Container for the XPropertyVetoableListener. The listeners are inserted by handle.
void * m_pReserved; reserved for future use. do not use.

Private Members

Methods


OPropertySetHelper( const OPropertySetHelper & ) throw( );
OPropertySetHelper &
operator=( const OPropertySetHelper & ) throw( );

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.