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
 
virtual void fireEvents (sal_Int32 *pnHandles, sal_Int32 nCount, sal_Bool bVetoable, bool bIgnoreRuntimeExceptionsWhileFiring)=0
 

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 @precond 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::OInterfaceContainerHelper3< css::util::XModifyListener > m_NotifyListeners
 for notification More...
 
bool m_isModified
 modify flag More...
 

Additional Inherited Members

- Protected Member Functions inherited from cppu::IEventNotificationHook
 ~IEventNotificationHook ()
 
- Protected Attributes inherited from comphelper::OMutexAndBroadcastHelper
::osl::Mutex m_aMutex
 
::cppu::OBroadcastHelper m_aBHelper
 

Detailed Description

Definition at line 66 of file opropertybag.hxx.

Constructor & Destructor Documentation

◆ OPropertyBag() [1/2]

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

◆ OPropertyBag() [2/2]

comphelper::OPropertyBag::OPropertyBag ( )

Definition at line 56 of file opropertybag.cxx.

◆ ~OPropertyBag()

comphelper::OPropertyBag::~OPropertyBag ( )
overridevirtual

Definition at line 67 of file opropertybag.cxx.

Member Function Documentation

◆ addModifyListener()

void SAL_CALL comphelper::OPropertyBag::addModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  xListener)
overrideprivatevirtual

◆ addProperty()

void SAL_CALL comphelper::OPropertyBag::addProperty ( const OUString &  Name,
::sal_Int16  Attributes,
const css::uno::Any &  DefaultValue 
)
overrideprivatevirtual

◆ addPropertyChangeListener()

virtual void SAL_CALL comphelper::OPropertyBag::addPropertyChangeListener ( const OUString &  p1,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  p2 
)
inlineoverrideprivatevirtual

Definition at line 133 of file opropertybag.hxx.

◆ addVetoableChangeListener()

virtual void SAL_CALL comphelper::OPropertyBag::addVetoableChangeListener ( const OUString &  p1,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  p2 
)
inlineoverrideprivatevirtual

Definition at line 137 of file opropertybag.hxx.

◆ convertFastPropertyValue()

sal_Bool SAL_CALL comphelper::OPropertyBag::convertFastPropertyValue ( css::uno::Any &  rConvertedValue,
css::uno::Any &  rOldValue,
sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overrideprivatevirtual

Definition at line 258 of file opropertybag.cxx.

References m_aDynamicProperties.

◆ createEnumeration()

Reference< XEnumeration > SAL_CALL comphelper::OPropertyBag::createEnumeration ( )
overrideprivatevirtual

Definition at line 229 of file opropertybag.cxx.

◆ findFreeHandle()

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

finds a free property handle @precond our mutex is locked

Definition at line 282 of file opropertybag.cxx.

References m_aDynamicProperties.

Referenced by addProperty(), and insert().

◆ fireEvents()

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

Implements cppu::IEventNotificationHook.

Definition at line 120 of file opropertybag.cxx.

References nCount, and setModifiedImpl().

◆ getElementType()

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

Definition at line 237 of file opropertybag.cxx.

◆ getFastPropertyValue()

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

Definition at line 253 of file opropertybag.cxx.

References m_aDynamicProperties.

◆ getImplementationName()

OUString SAL_CALL comphelper::OPropertyBag::getImplementationName ( )
overrideprivatevirtual

Definition at line 105 of file opropertybag.cxx.

◆ getInfoHelper()

cppu::IPropertyArrayHelper &SAL_CALL comphelper::OPropertyBag::getInfoHelper ( )
overrideprivate

◆ getPropertyDefaultByHandle()

Any comphelper::OPropertyBag::getPropertyDefaultByHandle ( sal_Int32  _nHandle) const
overrideprivatevirtual

Definition at line 529 of file opropertybag.cxx.

References Any, and m_aDynamicProperties.

◆ getPropertySetInfo()

Reference< XPropertySetInfo > SAL_CALL comphelper::OPropertyBag::getPropertySetInfo ( )
overrideprivatevirtual

Definition at line 180 of file opropertybag.cxx.

References getInfoHelper().

◆ getPropertyStateByHandle()

PropertyState comphelper::OPropertyBag::getPropertyStateByHandle ( sal_Int32  _nHandle)
overrideprivatevirtual

◆ getPropertyValue()

virtual css::uno::Any SAL_CALL comphelper::OPropertyBag::getPropertyValue ( const OUString &  p1)
inlineoverrideprivatevirtual

Definition at line 131 of file opropertybag.hxx.

◆ getPropertyValues()

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

◆ getSupportedServiceNames()

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

Definition at line 115 of file opropertybag.cxx.

◆ has()

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

Definition at line 186 of file opropertybag.cxx.

◆ hasElements()

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

Definition at line 245 of file opropertybag.cxx.

◆ impl_setPropertyValues_throw()

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 424 of file opropertybag.cxx.

References addProperty(), aProperties, begin, end, Exception, cppu::IPropertyArrayHelper::getHandleByName(), getInfoHelper(), m_bAutoAddProperties, nAttributes, nCount, and pName.

Referenced by setPropertyValues().

◆ initialize()

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

=== begin UNO interface implementations ==

Definition at line 75 of file opropertybag.cxx.

References aArguments, and aTypes.

◆ insert()

void SAL_CALL comphelper::OPropertyBag::insert ( const css::uno::Any &  aElement)
overrideprivatevirtual

◆ isModified()

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

◆ operator=()

const OPropertyBag & comphelper::OPropertyBag::operator= ( const OPropertyBag )
delete

◆ remove()

void SAL_CALL comphelper::OPropertyBag::remove ( const css::uno::Any &  aElement)
overrideprivatevirtual

Definition at line 221 of file opropertybag.cxx.

◆ removeModifyListener()

void SAL_CALL comphelper::OPropertyBag::removeModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  xListener)
overrideprivatevirtual

◆ removeProperty()

void SAL_CALL comphelper::OPropertyBag::removeProperty ( const OUString &  Name)
overrideprivatevirtual

◆ removePropertyChangeListener()

virtual void SAL_CALL comphelper::OPropertyBag::removePropertyChangeListener ( const OUString &  p1,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  p2 
)
inlineoverrideprivatevirtual

Definition at line 135 of file opropertybag.hxx.

◆ removeVetoableChangeListener()

virtual void SAL_CALL comphelper::OPropertyBag::removeVetoableChangeListener ( const OUString &  p1,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  p2 
)
inlineoverrideprivatevirtual

Definition at line 139 of file opropertybag.hxx.

◆ setFastPropertyValue_NoBroadcast()

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

Definition at line 263 of file opropertybag.cxx.

References m_aDynamicProperties, and nHandle.

◆ setModified()

void SAL_CALL comphelper::OPropertyBag::setModified ( sal_Bool  bModified)
overrideprivatevirtual

Definition at line 162 of file opropertybag.cxx.

References setModifiedImpl().

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

◆ setModifiedImpl()

void comphelper::OPropertyBag::setModifiedImpl ( bool  bModified,
bool  bIgnoreRuntimeExceptionsWhileFiring 
)
private

◆ setPropertyValue()

virtual void SAL_CALL comphelper::OPropertyBag::setPropertyValue ( const OUString &  p1,
const css::uno::Any &  p2 
)
inlineoverrideprivatevirtual

Definition at line 129 of file opropertybag.hxx.

◆ setPropertyValues()

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

◆ supportsService()

sal_Bool SAL_CALL comphelper::OPropertyBag::supportsService ( const OUString &  ServiceName)
overrideprivatevirtual

Definition at line 110 of file opropertybag.cxx.

References cppu::supportsService().

Member Data Documentation

◆ m_aAllowedTypes

TypeBag comphelper::OPropertyBag::m_aAllowedTypes
private

set of allowed property types

Definition at line 78 of file opropertybag.hxx.

Referenced by addProperty(), and insert().

◆ m_aDynamicProperties

::comphelper::PropertyBag comphelper::OPropertyBag::m_aDynamicProperties
private

◆ m_bAutoAddProperties

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 80 of file opropertybag.hxx.

Referenced by impl_setPropertyValues_throw().

◆ m_isModified

bool comphelper::OPropertyBag::m_isModified
private

modify flag

Definition at line 85 of file opropertybag.hxx.

Referenced by isModified(), and setModifiedImpl().

◆ m_NotifyListeners

::comphelper::OInterfaceContainerHelper3<css::util::XModifyListener> comphelper::OPropertyBag::m_NotifyListeners
private

for notification

Definition at line 83 of file opropertybag.hxx.

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

◆ m_pArrayHelper

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

our IPropertyArrayHelper implementation

Definition at line 74 of file opropertybag.hxx.

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


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