LibreOffice: cppu::OPropertyArrayHelper Class Reference

LibreOffice LibreOffice 25.2 SDK C/C++ API Reference |

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
cppu::OPropertyArrayHelper Class Reference

You can use this helper class to map a XPropertySet-Interface to a XFast- or a XMultiPropertySet interface. More...

`#include <propshlp.hxx>`

Inheritance diagram for cppu::OPropertyArrayHelper:

## Public Member Functions
| OPropertyArrayHelper (css::beans::Property *pProps, sal_Int32 nElements, sal_Bool bSorted=true)
| Create an object which supports the common property interfaces.
| OPropertyArrayHelper (const css::uno::Sequence< css::beans::Property > &aProps, sal_Bool bSorted=true)
| Create an object which supports the common property interfaces.
sal_Int32 | getCount () const
| Return the number of properties.
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.
virtual css::uno::Sequence< css::beans::Property > | getProperties () SAL_OVERRIDE
| Return the sequence of properties.
virtual css::beans::Property | getPropertyByName (const ::rtl::OUString &rPropertyName) SAL_OVERRIDE
| Return the property with the name rPropertyName.
virtual sal_Bool | hasPropertyByName (const ::rtl::OUString &rPropertyName) SAL_OVERRIDE
| Return true if the property with the name rPropertyName exist, otherwise false.
virtual sal_Int32 | getHandleByName (const ::rtl::OUString &rPropertyName) SAL_OVERRIDE
| Return the handle of the property with the name rPropertyName.
virtual sal_Int32 | fillHandles (sal_Int32 *pHandles, const css::uno::Sequence< ::rtl::OUString > &rPropNames) SAL_OVERRIDE
| Fill the array with the handles of the properties.
Public Member Functions inherited from cppu::IPropertyArrayHelper
virtual | ~IPropertyArrayHelper ()
| Following the rule, the first virtual method implies a virtual destructor.

## Protected Attributes
void * | m_pReserved
| reserved for future use.

## Additional Inherited Members
Static Public Member Functions inherited from cppu::IPropertyArrayHelper
static void * | operator new (size_t nSize)
static void | operator delete (void *pMem)
static void * | operator new (size_t, void *pMem)
static void | operator delete (void *, void *)

## Detailed Description

You can use this helper class to map a XPropertySet-Interface to a XFast- or a XMultiPropertySet interface.

## Constructor & Destructor Documentation

## ◆ OPropertyArrayHelper() [1/2]

cppu::OPropertyArrayHelper::OPropertyArrayHelper | ( | css::beans::Property * | pProps,
|  | sal_Int32 | nElements,
|  | sal_Bool | bSorted = true )

Create an object which supports the common property interfaces.

Parameters

  pProps | array of properties The array pProps should be sorted.
  nElements | is the number of properties in the pProps structure.
  bSorted | indicates that the elements are sorted.

## ◆ OPropertyArrayHelper() [2/2]

cppu::OPropertyArrayHelper::OPropertyArrayHelper | ( | const css::uno::Sequence< css::beans::Property > & | aProps,
|  | sal_Bool | bSorted = true )

Create an object which supports the common property interfaces.

Parameters

  aProps | sequence of properties which are supported by this helper. The sequence aProps should be sorted.
  bSorted | indicates that the elements are sorted.

## Member Function Documentation

## ◆ fillHandles()

virtual sal_Int32 cppu::OPropertyArrayHelper::fillHandles | ( | sal_Int32 * | pHandles,
|  | const css::uno::Sequence< ::rtl::OUString > & | rPropNames )
| virtual

Fill the array with the handles of the properties.

Returns
  the handles of the names from the pHandles array. -1 indicates an unknown property name.

Implements cppu::IPropertyArrayHelper.

## ◆ fillPropertyMembersByHandle()

virtual sal_Bool cppu::OPropertyArrayHelper::fillPropertyMembersByHandle | ( | ::rtl::OUString * | pPropName,
|  | sal_Int16 * | pAttributes,
|  | sal_Int32 | nHandle )
| virtual

Return the property members Name and Attribute from the handle nHandle.

Parameters

  nHandle | the handle of a property. If the values of the handles are sorted in the same way as the names and the highest handle value is getCount() -1, then it is only an indexed access to the property array. Otherwise it is a linear search through the array.
  pPropName | is an out parameter filled with property name of the property with the handle nHandle. May be NULL.
  pAttributes | is an out parameter filled with attributes of the property with the handle nHandle. May be NULL.

Returns
  True, if the handle exist, otherwise false.

Implements cppu::IPropertyArrayHelper.

## ◆ getCount()

sal_Int32 cppu::OPropertyArrayHelper::getCount | ( |  | ) | const

Return the number of properties.

## ◆ getHandleByName()

virtual sal_Int32 cppu::OPropertyArrayHelper::getHandleByName | ( | const ::rtl::OUString & | rPropertyName | ) |
| virtual

Return the handle of the property with the name rPropertyName.

If the property does not exist -1 is returned.

Parameters

  rPropertyName | the name of the property.

Implements cppu::IPropertyArrayHelper.

## ◆ getProperties()

virtual css::uno::Sequence< css::beans::Property > cppu::OPropertyArrayHelper::getProperties | ( |  | ) |
| virtual

Return the sequence of properties.

The sequence is sorted by name.

Implements cppu::IPropertyArrayHelper.

## ◆ getPropertyByName()

virtual css::beans::Property cppu::OPropertyArrayHelper::getPropertyByName | ( | const ::rtl::OUString & | rPropertyName | ) |
| virtual

Return the property with the name rPropertyName.

Parameters

  rPropertyName | the name of the property.

Exceptions

  UnknownPropertyException | thrown if the property name is unknown.

Implements cppu::IPropertyArrayHelper.

## ◆ hasPropertyByName()

virtual sal_Bool cppu::OPropertyArrayHelper::hasPropertyByName | ( | const ::rtl::OUString & | rPropertyName | ) |
| virtual

Return true if the property with the name rPropertyName exist, otherwise false.

Parameters

  rPropertyName | the name of the property.

Implements cppu::IPropertyArrayHelper.

## Member Data Documentation

## ◆ m_pReserved

void* cppu::OPropertyArrayHelper::m_pReserved
| protected

reserved for future use.

do not use.

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

- cppuhelper/propshlp.hxx