Usual instances of a DocumentDefinition are forms and reports.
Note that the DocumentDefinition does not denote the actual document
(i.e. an object supporting the ::com::sun::star::frame::XModel interface),
but only a shortcut to access and load those actual documents.
provides functionality for treating the object as part of a hierarchy
of a database document's sub documents.
The ::com::sun::star::ucb::XCommandProcessor::execute method
of a DocumentDefinition supports at least the following commands, additionally to
the ones already supported by the DefinitionContent:
open: loads the sub document in an own frame. The return value of
the execute method is the model of the loaded document.
store: stores the document.
openDesign: opens the sub document in an own frame, in design mode.
The user can make changes to the document, and save those changes. The return value of
the execute method is the model of the loaded document.
preview: retrieves an image showing a preview of the sub document.
getDocumentInfo: retrieves the document information, as
::com::sun::star::document::XDocumentInfo instance, of the sub document.
delete: deletes the sub document from the database document.
close: closes the sub document, if it had previously been opened
using either the open or openDesign command. The return value
of the execute command is a boolean value indicating whether
the sub document could be closed. Reasons for not closing the document include vetos by
third parties, for instance, because the user opened a dialog modal to the sub document,
or a long-running task such as printing is currently running.
show: shows the sub document. This is useful if you previously opened the
document hidden, or if you previously hide it using the hide command.
The open command is not available if the sub document has not been loaded, yet.
hide: hides the sub document. In opposite to the close command,
only the document window is hidden, but the document is kept loaded. A subsequent execution
of the show command will show the window, again.