LibreOffice: XClipboard Interface Reference

LibreOffice LibreOffice 7.4 SDK API Reference

Public Member Functions | List of all members
XClipboard Interface Referencepublished

`import"XClipboard.idl";`

Inheritance diagram for XClipboard:

## Public Member Functions
com::sun::star::datatransfer::XTransferable | getContents ()
| To get the current content of the clipboard. More...
void | setContents ([in] com::sun::star::datatransfer::XTransferable xTrans, [in] XClipboardOwner xClipboardOwner)
| Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents. More...
string | getName ()
| To get the name of the clipboard instance. 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

Developers Guide
  Office Development - Common Application Features - Clipboard

## Member Function Documentation

## ◆ getContents()

com::sun::star::datatransfer::XTransferable getContents | ( |  | ) |

To get the current content of the clipboard.

Returns
  The transferable object representing the current content of this clipboard.

See also
  com::sun::star::datatransfer::XTransferable

## ◆ getName()

string getName | ( |  | ) |

To get the name of the clipboard instance.

Returns
  The name of this clipboard object.

If the returned string is empty the clipboard instance is the system clipboard.

## ◆ setContents()

void setContents | ( | [in] com::sun::star::datatransfer::XTransferable | xTrans,
|  | [in] XClipboardOwner | xClipboardOwner
| ) |  |

Sets the current contents of the clipboard to the specified transferable object and registers the specified clipboard owner as the owner of the new contents.

Parameters

  xTrans | The transferable object to set as new content.

If the given com::sun::star::datatransfer::XTransferable has no com::sun::star::datatransfer::DataFlavor the clipboard will be deleted.

A NULL value is not allowed.

Parameters

  xClipboardOwner | The new owner of the clipboard.

NULL is an acceptable value and means that the caller is not interested in lost ownership notifications.

See also
  com::sun::star::datatransfer::XTransferable
  com::sun::star::datatransfer::clipboard::XClipboardOwner

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

- com/sun/star/datatransfer/clipboard/XClipboard.idl