LibreOffice LibreOffice 25.8 SDK API Reference

Public Member Functions | List of all members
XIdlArray Interface Referencepublished

Reflects an IDL sequence and provides dynamic access to instances of that sequence. More...

`import"XIdlArray.idl";`

Inheritance diagram for XIdlArray:

## Public Member Functions
void | realloc ([inout] any array, [in] long length) raises ( com::sun::star::lang::IllegalArgumentException )
| Reallocates the length of the sequence instance. More...
long | getLen ([in] any array) raises ( com::sun::star::lang::IllegalArgumentException )
| Returns the length of the given sequence. More...
any | get ([in] any aArray, [in] long nIndex) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::ArrayIndexOutOfBoundsException )
| Returns element at given index. More...
void | set ([inout] any aArray, [in] long nIndex, [in] any aNewValue) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::ArrayIndexOutOfBoundsException )
| Sets a new value at given index. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

Reflects an IDL sequence and provides dynamic access to instances of that sequence.

This interface supports widening conversion when getting or setting elements.

Attention
  Although the name of this interface denotes arrays, sequences are meant. Don't be obfuscated, arrays are not supported by UNO!

## Member Function Documentation

## ◆ get()

any get | ( | [in] any | aArray,
|  | [in] long | nIndex
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException,
|  | com::sun::star::lang::ArrayIndexOutOfBoundsException
| ) |  |

Returns element at given index.

Parameters

  aArray | sequence instance
  nIndex | index

Returns
  value

Exceptions

  IllegalArgumentException | if the specified object is not a sequence or if the specified object is null
  ArrayIndexOutOfBoundsException | if the specified index argument is negative, or if it is greater than or equal to the length of the specified sequence.

## ◆ getLen()

long getLen | ( | [in] any | array | ) |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

Returns the length of the given sequence.

Parameters

  array | sequence instance

Returns
  length of sequence

## ◆ realloc()

void realloc | ( | [inout] any | array,
|  | [in] long | length
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

Reallocates the length of the sequence instance.

Parameters

  array | sequence instance
  length | new length of sequence

## ◆ set()

void set | ( | [inout] any | aArray,
|  | [in] long | nIndex,
|  | [in] any | aNewValue
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException,
|  | com::sun::star::lang::ArrayIndexOutOfBoundsException
| ) |  |

Sets a new value at given index.

Parameters

  aArray | sequence instance
  nIndex | index
  aNewValue | new value to be set

Exceptions

  IllegalArgumentException | if the specified object is not a sequence or if the specified object is null
  ArrayIndexOutOfBoundsException | if the specified index argument is negative, or if it is greater than or equal to the length of the specified sequence.

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

- com/sun/star/reflection/XIdlArray.idl