LibreOffice: DocumentCloser Service Reference

LibreOffice LibreOffice 26.2 SDK API Reference

Loading...
Searching...
No Matches
DocumentCloser Service Referencepublished

The main task of this service is to close an office document frame embedded in an application running in another process correctly. More...

`import "DocumentCloser.idl";`

Inheritance diagram for DocumentCloser:

## Public Member Functions
| DocumentCloserCtor1 ([in] com::sun::star::frame::XFrame xFrame) raises ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::frame::DoubleInitializationException, ::com::sun::star::uno::Exception )
| is used to initialize the object on it's creation.
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
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

The main task of this service is to close an office document frame embedded in an application running in another process correctly.

The usual usage of this service is to create it, initialize with document frame, and to dispose the service. While disposing the service will do all the required actions to let the frame be closed using com::sun::star::util::XCloseable::close( true ). Thus in case there is a code that prevents closing of the frame the code automatically becomes the owner of the frame.

In addition the code will disconnect the VCL window the frame is based on from the container system window.

## Member Function Documentation

## ◆ DocumentCloserCtor1()

DocumentCloserCtor1 | ( | [in] com::sun::star::frame::XFrame | xFrame | ) |
raises | ( | ::com::sun::star::lang::IllegalArgumentException,
|  | ::com::sun::star::frame::DoubleInitializationException,
|  | ::com::sun::star::uno::Exception ) |  |  |

is used to initialize the object on it's creation.

Parameters

  xFrame | the frame of the document that should be closed.

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

- com/sun/star/embed/DocumentCloser.idl