LibreOffice: XGalleryTheme Interface Reference

LibreOffice LibreOffice 7.6 SDK API Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
XGalleryTheme Interface Reference

provides access to the items of a Gallery themes. More...

`import <XGalleryTheme.idl;`

Inheritance diagram for XGalleryTheme:

## Public Member Functions
string | getName ()
| retrieves the name of the Gallery theme
void | update ()
| updates the theme
long | insertURLByIndex ([in] string URL, [in] long Index) raises ( com::sun::star::lang::WrappedTargetException )
| inserts an item
long | insertGraphicByIndex ([in] com::sun::star::graphic::XGraphic Graphic, [in] long Index) raises ( com::sun::star::lang::WrappedTargetException )
| inserts an item
long | insertDrawingByIndex ([in] com::sun::star::lang::XComponent Drawing, [in] long Index) raises ( com::sun::star::lang::WrappedTargetException )
| inserts an item
void | removeByIndex ([in] long Index) raises ( com::sun::star::lang::IndexOutOfBoundsException )
| deletes an item from the collection
Public Member Functions inherited from XIndexAccess
long | getCount ()
any | getByIndex ([in] long Index) raises ( com::sun::star::lang::IndexOutOfBoundsException, com::sun::star::lang::WrappedTargetException )
Public Member Functions inherited from XElementAccess
type | getElementType ()
boolean | hasElements ()
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

provides access to the items of a Gallery themes.

It also allows inserting and removing of single items.

This interface extends the interface com::sun::star::container::XIndexAccess which provides access to existing Gallery items collection.

See also
  com::sun::star::container::XIndexAccess
  com::sun::star::sheet::DataPilotTable

## Member Function Documentation

## ◆ getName()

string getName | ( |  | ) |

retrieves the name of the Gallery theme

Returns
  The name of the Gallery theme

## ◆ insertDrawingByIndex()

long insertDrawingByIndex | ( | [in] com::sun::star::lang::XComponent | Drawing,
|  | [in] long | Index
| ) |  |
raises | ( | com::sun::star::lang::WrappedTargetException
| ) |  |

inserts an item

Parameters

  Drawing | A drawing model that should be added to the collection
  Index | The zero based index of the position where to insert the new object inside the collection. If the index is larger than or equal to the number of already inserted items, the item is inserted at the end of the collection. If the index is smaller than 0, the item is inserted at the beginning of the collection.

Returns
  The zero based position at which the object was inserted. If the object could not be inserted, -1 is returned.

See also
  XGalleryItem
  com::sun::star::lang::WrappedTargetException

## ◆ insertGraphicByIndex()

long insertGraphicByIndex | ( | [in] com::sun::star::graphic::XGraphic | Graphic,
|  | [in] long | Index
| ) |  |
raises | ( | com::sun::star::lang::WrappedTargetException
| ) |  |

inserts an item

Parameters

  Graphic | The com::sun::star::graphic::XGraphic object that should be added to the collection
  Index | The zero based index of the position where to insert the new object inside the collection. If the index is larger than or equal to the number of already inserted items, the item is inserted at the end of the collection. If the index is smaller than 0, the item is inserted at the beginning of the collection.

Returns
  The zero based position at which the object was inserted. If the object could not be inserted, -1 is returned.

See also
  com::sun::star::graphic::XGraphic
  XGalleryItem
  com::sun::star::lang::WrappedTargetException

## ◆ insertURLByIndex()

long insertURLByIndex | ( | [in] string | URL,
|  | [in] long | Index
| ) |  |
raises | ( | com::sun::star::lang::WrappedTargetException
| ) |  |

inserts an item

Parameters

  URL | The URL of a graphic or media object, that should be added to the collection
  Index | The zero based index of the position where to insert the new object inside the collection. If the index is larger than or equal to the number of already inserted items, the item is inserted at the end of the collection. If the index is smaller than 0, the item is inserted at the beginning of the collection.

Returns
  The zero based position at which the object was inserted. If the object could not be inserted, -1 is returned.

See also
  XGalleryItem
  com::sun::star::lang::WrappedTargetException

## ◆ removeByIndex()

void removeByIndex | ( | [in] long | Index | ) |
raises | ( | com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

deletes an item from the collection

Parameters

  Index | The position of the item to be removed. The position is zero based.

See also
  com::sun::star::container::NoSuchElementException

## ◆ update()

void update | ( |  | ) |

updates the theme

This method iterates over each item of the Gallery theme and updates it accordingly. Main purpose is to automatically regenerate the thumbnails and to remove invalid items, that is items who have got a URL that has become invalid. This method also optimizes underlying data structures.

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

- com/sun/star/gallery/XGalleryTheme.idl