LibreOffice Module comphelper (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
comphelper::OPropertyBag Class Referencefinal

#include <opropertybag.hxx>

Inheritance diagram for comphelper::OPropertyBag:
[legend]
Collaboration diagram for comphelper::OPropertyBag:
[legend]

Public Member Functions

 OPropertyBag (const OPropertyBag &)=delete
 
const OPropertyBagoperator= (const OPropertyBag &)=delete
 
 OPropertyBag ()
 
virtual ~OPropertyBag () override
 
- Public Member Functions inherited from comphelper::OMutexAndBroadcastHelper
 OMutexAndBroadcastHelper ()
 
::osl::Mutex & GetMutex ()
 
::cppu::OBroadcastHelperGetBroadcastHelper ()
 
const ::cppu::OBroadcastHelperGetBroadcastHelper () const
 
- Public Member Functions inherited from comphelper::OPropertyStateHelper
 OPropertyStateHelper (::cppu::OBroadcastHelper &rBHlp)
 
 OPropertyStateHelper (::cppu::OBroadcastHelper &rBHlp,::cppu::IEventNotificationHook *i_pFireEvents)
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) override
 
virtual css::beans::PropertyState SAL_CALL getPropertyState (const OUString &PropertyName) override
 
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates (const css::uno::Sequence< OUString > &aPropertyName) override
 
virtual void SAL_CALL setPropertyToDefault (const OUString &PropertyName) override
 
virtual css::uno::Any SAL_CALL getPropertyDefault (const OUString &aPropertyName) override
 
virtual void setPropertyToDefaultByHandle (sal_Int32 nHandle)
 
- Public Member Functions inherited from cppu::OPropertySetHelper2
 OPropertySetHelper2 (OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents=NULL, bool bIgnoreRuntimeExceptionsWhileFiring=false)
 
virtual void SAL_CALL enableChangeListenerNotification (sal_Bool bEnable) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OPropertySetHelper
 OPropertySetHelper (OBroadcastHelper &rBHelper)
 
 OPropertySetHelper (OBroadcastHelper &rBHelper, bool bIgnoreRuntimeExceptionsWhileFiring)
 
 OPropertySetHelper (OBroadcastHelper &rBHelper, IEventNotificationHook *i_pFireEvents, bool bIgnoreRuntimeExceptionsWhileFiring=false)
 
css::uno::Sequence< css::uno::Type > getTypes ()
 
void SAL_CALL disposing ()
 
virtual void SAL_CALL setPropertyValue (const ::rtl::OUString &rPropertyName, const css::uno::Any &aValue) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL getPropertyValue (const ::rtl::OUString &aPropertyName) SAL_OVERRIDE
 
virtual void SAL_CALL addPropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removePropertyChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL addVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removeVetoableChangeListener (const ::rtl::OUString &aPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) SAL_OVERRIDE
 
virtual void SAL_CALL setPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues (const css::uno::Sequence< ::rtl::OUString > &PropertyNames) SAL_OVERRIDE
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 
virtual void SAL_CALL removePropertiesChangeListener (const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 
virtual void SAL_CALL firePropertiesChangeEvent (const css::uno::Sequence< ::rtl::OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::WeakAggImplHelper5< class, class, class, class, class >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryAggregation (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual void SAL_CALL acquire () SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OWeakAggObject
 OWeakAggObject ()
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 
virtual void SAL_CALL setDelegator (const css::uno::Reference< css::uno::XInterface > &Delegator) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryAggregation (const css::uno::Type &rType) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OWeakObject
 OWeakObject ()
 
 OWeakObject (const OWeakObject &)
 
OWeakObject &SAL_CALL operator= (const OWeakObject &)
 
virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter () SAL_OVERRIDE
 
SAL_CALL operator css::uno::Reference< css::uno::XInterface > ()
 

Private Member Functions

virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override
 === begin UNO interface implementations == More...
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual sal_Bool SAL_CALL isModified () override
 
virtual void SAL_CALL setModified (sal_Bool bModified) override
 
virtual void SAL_CALL addModifyListener (const css::uno::Reference< css::util::XModifyListener > &xListener) override
 
virtual void SAL_CALL removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &xListener) override
 
virtual void SAL_CALL addProperty (const OUString &Name,::sal_Int16 Attributes, const css::uno::Any &DefaultValue) override
 
virtual void SAL_CALL removeProperty (const OUString &Name) override
 
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPropertyValues () override
 
virtual void SAL_CALL setPropertyValues (const css::uno::Sequence< css::beans::PropertyValue > &aProps) override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL setPropertyValue (const OUString &p1, const css::uno::Any &p2) override
 
virtual css::uno::Any SAL_CALL getPropertyValue (const OUString &p1) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &p1, const css::uno::Reference< css::beans::XPropertyChangeListener > &p2) override
 
virtual void SAL_CALL removePropertyChangeListener (const OUString &p1, const css::uno::Reference< css::beans::XPropertyChangeListener > &p2) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &p1, const css::uno::Reference< css::beans::XVetoableChangeListener > &p2) override
 
virtual void SAL_CALL removeVetoableChangeListener (const OUString &p1, const css::uno::Reference< css::beans::XVetoableChangeListener > &p2) override
 
virtual sal_Bool SAL_CALL has (const css::uno::Any &aElement) override
 
virtual void SAL_CALL insert (const css::uno::Any &aElement) override
 
virtual void SAL_CALL remove (const css::uno::Any &aElement) override
 
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration () override
 
virtual css::uno::Type SAL_CALL getElementType () override
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual css::uno::Any getPropertyDefaultByHandle (sal_Int32 _nHandle) const override
 
virtual css::beans::PropertyState getPropertyStateByHandle (sal_Int32 _nHandle) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
virtual void fireEvents (sal_Int32 *pnHandles, sal_Int32 nCount, sal_Bool bVetoable, bool bIgnoreRuntimeExceptionsWhileFiring) override
 
void setModifiedImpl (bool bModified, bool bIgnoreRuntimeExceptionsWhileFiring)
 
sal_Int32 findFreeHandle () const
 finds a free property handle our mutex is locked More...
 
void impl_setPropertyValues_throw (const css::uno::Sequence< css::beans::PropertyValue > &_rProps)
 implements the setPropertyValues method More...
 

Private Attributes

std::unique_ptr< ::cppu::OPropertyArrayHelperm_pArrayHelper
 our IPropertyArrayHelper implementation More...
 
::comphelper::PropertyBag m_aDynamicProperties
 
TypeBag m_aAllowedTypes
 set of allowed property types More...
 
bool m_bAutoAddProperties
 should we automatically add properties which are tried to set, if they don't exist previously? More...
 
::comphelper::OInterfaceContainerHelper2 m_NotifyListeners
 for notification More...
 
bool m_isModified
 modify flag More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cppu::OPropertySetHelper
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo (IPropertyArrayHelper &rProperties)
 
- Protected Member Functions inherited from comphelper::OPropertyStateHelper
virtual ~OPropertyStateHelper () override
 
void firePropertyChange (sal_Int32 nHandle, const css::uno::Any &aNewValue, const css::uno::Any &aOldValue)
 
- Protected Member Functions inherited from cppu::OPropertySetHelper2
virtual ~OPropertySetHelper2 ()
 
- Protected Member Functions inherited from cppu::OPropertySetHelper
void SAL_CALL fire (sal_Int32 *pnHandles, const css::uno::Any *pNewValues, const css::uno::Any *pOldValues, sal_Int32 nCount, sal_Bool bVetoable)
 
void SAL_CALL setFastPropertyValues (sal_Int32 nSeqLen, sal_Int32 *pHandles, const css::uno::Any *pValues, sal_Int32 nHitCount)
 
void setDependentFastPropertyValue (sal_Int32 i_handle, const css::uno::Any &i_value)
 
 ~OPropertySetHelper ()
 
- Protected Member Functions inherited from cppu::OWeakAggObject
virtual ~OWeakAggObject () SAL_OVERRIDE
 
- Protected Member Functions inherited from cppu::OWeakObject
virtual ~OWeakObject () COVERITY_NOEXCEPT_FALSE
 
void disposeWeakConnectionPoint ()
 
- Protected Member Functions inherited from cppu::IEventNotificationHook
 ~IEventNotificationHook ()
 
- Static Protected Member Functions inherited from comphelper::OPropertyStateHelper
static css::uno::Sequence< css::uno::Type > getTypes ()
 
- Protected Attributes inherited from comphelper::OMutexAndBroadcastHelper
::osl::Mutex m_aMutex
 
::cppu::OBroadcastHelper m_aBHelper
 
- Protected Attributes inherited from cppu::OPropertySetHelper
OBroadcastHelperrBHelper
 
OMultiTypeInterfaceContainerHelperInt32 aBoundLC
 
OMultiTypeInterfaceContainerHelperInt32 aVetoableLC
 
Impl *const m_pReserved
 
- Protected Attributes inherited from cppu::OWeakAggObject
css::uno::WeakReferenceHelper xDelegator
 
- Protected Attributes inherited from cppu::OWeakObject
oslInterlockedCount m_refCount
 

Detailed Description

Definition at line 67 of file opropertybag.hxx.

Constructor & Destructor Documentation

comphelper::OPropertyBag::OPropertyBag ( const OPropertyBag )
delete
comphelper::OPropertyBag::OPropertyBag ( )

Definition at line 57 of file opropertybag.cxx.

References m_aMutex.

comphelper::OPropertyBag::~OPropertyBag ( )
overridevirtual

Definition at line 68 of file opropertybag.cxx.

Member Function Documentation

void SAL_CALL comphelper::OPropertyBag::addModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  xListener)
overrideprivatevirtual
void SAL_CALL comphelper::OPropertyBag::addProperty ( const OUString &  Name,
::sal_Int16  Attributes,
const css::uno::Any &  DefaultValue 
)
overrideprivatevirtual
virtual void SAL_CALL comphelper::OPropertyBag::addPropertyChangeListener ( const OUString &  p1,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  p2 
)
inlineoverrideprivatevirtual
virtual void SAL_CALL comphelper::OPropertyBag::addVetoableChangeListener ( const OUString &  p1,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  p2 
)
inlineoverrideprivatevirtual
sal_Bool SAL_CALL comphelper::OPropertyBag::convertFastPropertyValue ( css::uno::Any &  rConvertedValue,
css::uno::Any &  rOldValue,
sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overrideprivatevirtual
Reference< XEnumeration > SAL_CALL comphelper::OPropertyBag::createEnumeration ( )
overrideprivatevirtual

Definition at line 237 of file opropertybag.cxx.

sal_Int32 comphelper::OPropertyBag::findFreeHandle ( ) const
private

finds a free property handle our mutex is locked

Definition at line 290 of file opropertybag.cxx.

References comphelper::PropertyBag::hasPropertyByHandle(), and m_aDynamicProperties.

Referenced by addProperty(), and insert().

void comphelper::OPropertyBag::fireEvents ( sal_Int32 *  pnHandles,
sal_Int32  nCount,
sal_Bool  bVetoable,
bool  bIgnoreRuntimeExceptionsWhileFiring 
)
overrideprivatevirtual

Implements cppu::IEventNotificationHook.

Definition at line 129 of file opropertybag.cxx.

References setModifiedImpl().

Type SAL_CALL comphelper::OPropertyBag::getElementType ( )
overrideprivatevirtual

Definition at line 245 of file opropertybag.cxx.

void SAL_CALL comphelper::OPropertyBag::getFastPropertyValue ( css::uno::Any &  rValue,
sal_Int32  nHandle 
) const
overrideprivatevirtual
OUString SAL_CALL comphelper::OPropertyBag::getImplementationName ( )
overrideprivatevirtual

Definition at line 114 of file opropertybag.cxx.

cppu::IPropertyArrayHelper &SAL_CALL comphelper::OPropertyBag::getInfoHelper ( )
overrideprivatevirtual
Any comphelper::OPropertyBag::getPropertyDefaultByHandle ( sal_Int32  _nHandle) const
overrideprivatevirtual
Reference< XPropertySetInfo > SAL_CALL comphelper::OPropertyBag::getPropertySetInfo ( )
overrideprivatevirtual
PropertyState comphelper::OPropertyBag::getPropertyStateByHandle ( sal_Int32  _nHandle)
overrideprivatevirtual
virtual css::uno::Any SAL_CALL comphelper::OPropertyBag::getPropertyValue ( const OUString &  p1)
inlineoverrideprivatevirtual

Definition at line 132 of file opropertybag.hxx.

References cppu::OPropertySetHelper::getPropertyValue().

Sequence< PropertyValue > SAL_CALL comphelper::OPropertyBag::getPropertyValues ( )
overrideprivatevirtual
Sequence< OUString > SAL_CALL comphelper::OPropertyBag::getSupportedServiceNames ( )
overrideprivatevirtual

Definition at line 124 of file opropertybag.cxx.

sal_Bool SAL_CALL comphelper::OPropertyBag::has ( const css::uno::Any &  aElement)
overrideprivatevirtual

Definition at line 194 of file opropertybag.cxx.

sal_Bool SAL_CALL comphelper::OPropertyBag::hasElements ( )
overrideprivatevirtual

Definition at line 253 of file opropertybag.cxx.

void comphelper::OPropertyBag::impl_setPropertyValues_throw ( const css::uno::Sequence< css::beans::PropertyValue > &  _rProps)
private

implements the setPropertyValues method

Parameters
_rPropsthe property values to set
Exceptions
PropertyVetoExceptionif the XMultiPropertySet::setPropertyValues call does so
css::lang::IllegalArgumentExceptionif the XMultiPropertySet::setPropertyValues call does so
css::lang::WrappedTargetExceptionif the XMultiPropertySet::setPropertyValues call does so
css::uno::RuntimeExceptionif the XMultiPropertySet::setPropertyValues call does so
css::beans::UnknownPropertyExceptionif the XMultiPropertySet::setPropertyValues call does so, and <arg>_bTolerateUnknownProperties</arg> was set to <FALSE>
css::lang::WrappedTargetExceptionif the XMultiPropertySet::setPropertyValues call did throw an exception not listed above

Definition at line 432 of file opropertybag.cxx.

References addProperty(), Exception, cppu::getCaughtException(), cppu::IPropertyArrayHelper::getHandleByName(), getInfoHelper(), m_bAutoAddProperties, and cppu::OPropertySetHelper::setFastPropertyValues().

Referenced by setPropertyValues().

void SAL_CALL comphelper::OPropertyBag::initialize ( const css::uno::Sequence< css::uno::Any > &  aArguments)
overrideprivatevirtual

=== begin UNO interface implementations ==

Definition at line 76 of file opropertybag.cxx.

References comphelper::NamedValueCollection::get_ensureType().

void SAL_CALL comphelper::OPropertyBag::insert ( const css::uno::Any &  aElement)
overrideprivatevirtual
sal_Bool SAL_CALL comphelper::OPropertyBag::isModified ( )
overrideprivatevirtual
const OPropertyBag& comphelper::OPropertyBag::operator= ( const OPropertyBag )
delete
void SAL_CALL comphelper::OPropertyBag::remove ( const css::uno::Any &  aElement)
overrideprivatevirtual

Definition at line 229 of file opropertybag.cxx.

void SAL_CALL comphelper::OPropertyBag::removeModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  xListener)
overrideprivatevirtual
void SAL_CALL comphelper::OPropertyBag::removeProperty ( const OUString &  Name)
overrideprivatevirtual
virtual void SAL_CALL comphelper::OPropertyBag::removePropertyChangeListener ( const OUString &  p1,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  p2 
)
inlineoverrideprivatevirtual
virtual void SAL_CALL comphelper::OPropertyBag::removeVetoableChangeListener ( const OUString &  p1,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  p2 
)
inlineoverrideprivatevirtual
void SAL_CALL comphelper::OPropertyBag::setFastPropertyValue_NoBroadcast ( sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overrideprivatevirtual
void SAL_CALL comphelper::OPropertyBag::setModified ( sal_Bool  bModified)
overrideprivatevirtual

Definition at line 170 of file opropertybag.cxx.

References setModifiedImpl().

Referenced by addProperty(), insert(), and removeProperty().

void comphelper::OPropertyBag::setModifiedImpl ( bool  bModified,
bool  bIgnoreRuntimeExceptionsWhileFiring 
)
private
virtual void SAL_CALL comphelper::OPropertyBag::setPropertyValue ( const OUString &  p1,
const css::uno::Any &  p2 
)
inlineoverrideprivatevirtual

Definition at line 130 of file opropertybag.hxx.

References cppu::OPropertySetHelper::setPropertyValue().

void SAL_CALL comphelper::OPropertyBag::setPropertyValues ( const css::uno::Sequence< css::beans::PropertyValue > &  aProps)
overrideprivatevirtual
sal_Bool SAL_CALL comphelper::OPropertyBag::supportsService ( const OUString &  ServiceName)
overrideprivatevirtual

Definition at line 119 of file opropertybag.cxx.

References cppu::supportsService().

Member Data Documentation

TypeBag comphelper::OPropertyBag::m_aAllowedTypes
private

set of allowed property types

Definition at line 79 of file opropertybag.hxx.

Referenced by addProperty(), and insert().

::comphelper::PropertyBag comphelper::OPropertyBag::m_aDynamicProperties
private
bool comphelper::OPropertyBag::m_bAutoAddProperties
private

should we automatically add properties which are tried to set, if they don't exist previously?

Definition at line 81 of file opropertybag.hxx.

Referenced by impl_setPropertyValues_throw().

bool comphelper::OPropertyBag::m_isModified
private

modify flag

Definition at line 86 of file opropertybag.hxx.

Referenced by isModified(), and setModifiedImpl().

::comphelper::OInterfaceContainerHelper2 comphelper::OPropertyBag::m_NotifyListeners
private

for notification

Definition at line 84 of file opropertybag.hxx.

Referenced by addModifyListener(), removeModifyListener(), and setModifiedImpl().

std::unique_ptr< ::cppu::OPropertyArrayHelper > comphelper::OPropertyBag::m_pArrayHelper
private

our IPropertyArrayHelper implementation

Definition at line 75 of file opropertybag.hxx.

Referenced by addProperty(), getInfoHelper(), insert(), and removeProperty().


The documentation for this class was generated from the following files: