LibreOffice: DocumentDefinition Service Reference

LibreOffice LibreOffice 7.5 SDK API Reference

Loading...
Searching...
No Matches
Included Services | Exported Interfaces | Public Attributes | List of all members
DocumentDefinition Service Reference

specifies a sub document of an OfficeDatabaseDocument. More...

Inheritance diagram for DocumentDefinition:

## Included Services
service | DefinitionContent
| provides functionality for treating the object as part of a hierarchy of a database document's sub documents.
Included Services inherited from DefinitionContent
service | ::com::sun::star::ucb::Content
| provides the functionality for treating the object as part of a hierarchy of objects.

## Exported Interfaces
interface | ::com::sun::star::beans::XPropertySet
interface | ::com::sun::star::sdb::XSubDocument
Exported Interfaces inherited from DefinitionContent
interface | ::com::sun::star::container::XHierarchicalName
| provides access to the complete name of the content within its hierarchy
Exported Interfaces inherited from Content
interface | com::sun::star::ucb::XContent
| provides access to the identity and the type of the content and allows the registration of listeners for ContentEvents.
interface | com::sun::star::lang::XComponent
| must be implemented to make it possible to resolve cyclic object references.
interface | com::sun::star::ucb::XCommandProcessor
| enables the caller to let the content execute commands.
interface | com::sun::star::ucb::XCommandProcessor2
| is an enhanced version of XCommandProcessor that has an additional method for releasing command identifiers obtained via XCommandProcessor::createCommandIdentifier() to avoid resource leaks.
interface | com::sun::star::beans::XPropertiesChangeNotifier
| notifies changes of property values to listeners registered for those properties.
interface | com::sun::star::beans::XPropertyContainer
| can be used to add new properties to the content and to remove properties from the content dynamically.
interface | com::sun::star::beans::XPropertySetInfoChangeNotifier
| can be used to notify properties removed from or added to the content's property set.
interface | com::sun::star::ucb::XCommandInfoChangeNotifier
| can be used to notify commands removed from or added to the content's command set.
interface | com::sun::star::ucb::XContentCreator
| creates new contents (i.e.
interface | com::sun::star::container::XChild
| provides access to the parent content of this content.

## Public Attributes
string | Name
| is the name of the document.
boolean | AsTemplate
| Indicates if the document is to be used as template, for example, if a report is to be filled with data.

## Additional Inherited Members
Public Member Functions inherited from XContent
com::sun::star::ucb::XContentIdentifier | getIdentifier ()
| returns the identifier of the content.
string | getContentType ()
| returns a type string, which is unique for that type of content (e.g.
void | addContentEventListener ([in] com::sun::star::ucb::XContentEventListener Listener)
| adds a listener for content events.
void | removeContentEventListener ([in] com::sun::star::ucb::XContentEventListener Listener)
| removes a listener for content events.
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.
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 XCommandProcessor
long | createCommandIdentifier ()
| creates a unique identifier for a command.
any | execute ([in] Command aCommand, [in] long CommandId, [in] XCommandEnvironment Environment) raises ( com::sun::star::uno::Exception, CommandAbortedException )
| executes a command.
void | abort ([in] long CommandId)
| ends the command associated with the given id.
Public Member Functions inherited from XPropertiesChangeNotifier
void | addPropertiesChangeListener ([in] sequence< string > PropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener Listener)
| adds an XPropertiesChangeListener to the specified properties with the specified names.
void | removePropertiesChangeListener ([in] sequence< string > PropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener Listener)
| removes an XPropertiesChangeListener from the listener list.
Public Member Functions inherited from XPropertyContainer
void | addProperty ([in] string Name, [in] short Attributes, [in] any DefaultValue) raises ( com::sun::star::beans::PropertyExistException, com::sun::star::beans::IllegalTypeException, com::sun::star::lang::IllegalArgumentException )
| adds a property to the object.
void | removeProperty ([in] string Name) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::NotRemoveableException )
| removes a property from the object.
Public Member Functions inherited from XHierarchicalName
string | getHierarchicalName ()
string | composeHierarchicalName ([in] string aRelativeName) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::NoSupportException )
| builds the hierarchical name of an object, given a relative name
Public Member Functions inherited from XPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value of the property with the specified name.
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XPropertyChangeListener to the specified property.
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XPropertyChangeListener from the listener list.
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XVetoableChangeListener to the specified property with the name PropertyName.
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XVetoableChangeListener from the listener list.
Public Member Functions inherited from XSubDocument
::com::sun::star::lang::XComponent | open () raises ( ::com::sun::star::lang::WrappedTargetException )
| opens the sub document
::com::sun::star::lang::XComponent | openDesign () raises ( ::com::sun::star::lang::WrappedTargetException )
| opens the sub document in design mode
void | store () raises ( ::com::sun::star::lang::WrappedTargetException )
| stores the sub document, if it had previously been opened in either mode
boolean | close () raises ( ::com::sun::star::lang::WrappedTargetException )
| closes the sub document, if it had previously been opened in either mode
Protected Member Functions inherited from XCommandProcessor2
void | releaseCommandIdentifier ([in] long CommandId)
| releases a command identifier obtained through XCommandProcessor::createCommandIdentifier() when it is no longer used.
Protected Member Functions inherited from XPropertiesChangeNotifier
void | addPropertiesChangeListener ([in] sequence< string > PropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener Listener)
| adds an XPropertiesChangeListener to the specified properties with the specified names.
void | removePropertiesChangeListener ([in] sequence< string > PropertyNames, [in] com::sun::star::beans::XPropertiesChangeListener Listener)
| removes an XPropertiesChangeListener from the listener list.
Protected Member Functions inherited from XPropertyContainer
void | addProperty ([in] string Name, [in] short Attributes, [in] any DefaultValue) raises ( com::sun::star::beans::PropertyExistException, com::sun::star::beans::IllegalTypeException, com::sun::star::lang::IllegalArgumentException )
| adds a property to the object.
void | removeProperty ([in] string Name) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::NotRemoveableException )
| removes a property from the object.
Protected Member Functions inherited from XPropertySetInfoChangeNotifier
void | addPropertySetInfoChangeListener ([in] XPropertySetInfoChangeListener Listener)
| registers a listener for PropertySetInfoChangeEvents.
void | removePropertySetInfoChangeListener ([in] XPropertySetInfoChangeListener Listener)
| removes a listener for PropertySetInfoChangeEvents.
Protected Member Functions inherited from XCommandInfoChangeNotifier
void | addCommandInfoChangeListener ([in] XCommandInfoChangeListener Listener)
| registers a listener for CommandInfoChangeEvents.
void | removeCommandInfoChangeListener ([in] XCommandInfoChangeListener Listener)
| removes a listener for CommandInfoChangeEvents.
Protected Member Functions inherited from XContentCreator
sequence< com::sun::star::ucb::ContentInfo > | queryCreatableContentsInfo ()
| returns a list with information about the creatable contents.
com::sun::star::ucb::XContent | createNewContent ([in] com::sun::star::ucb::ContentInfo Info)
| creates a new content of given type.
Protected Member Functions inherited from XChild
com::sun::star::uno::XInterface | getParent ()
| grants access to the object containing this content.
void | setParent ([in] com::sun::star::uno::XInterface Parent) raises ( com::sun::star::lang::NoSupportException )
| sets the parent to this object.

## Detailed Description

specifies a sub document of an OfficeDatabaseDocument.

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.

## Exported Interfaces

## ◆ DefinitionContent

service DefinitionContent

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::XDocumentProperties 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 vetoes 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.

## Exported Interfaces

## ◆ ::com::sun::star::beans::XPropertySet

interface ::com::sun::star::beans::XPropertySet

## ◆ ::com::sun::star::sdb::XSubDocument

interface ::com::sun::star::sdb::XSubDocument

## Member Data Documentation

## ◆ AsTemplate

boolean AsTemplate
| propertyreadonly

Indicates if the document is to be used as template, for example, if a report is to be filled with data.

## ◆ Name

string Name
| propertyreadonly

is the name of the document.

If the document is part of the container, it is not possible to alter the name.

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

- com/sun/star/sdb/DocumentDefinition.idl