LibreOffice LibreOffice 26.2 SDK API Reference

Public Types | Exported Interfaces | Public Attributes | List of all members
OfficeDocument Service Referencepublished

abstract service which specifies a storable and printable document More...

`import"OfficeDocument.idl";`

Inheritance diagram for OfficeDocument:

## Public Types
typedef sequence< com::sun::star::beans::PropertyValue > | InteropGrabBag
| Grab bag of document properties, used as a string-any map for interim interop purposes. More...

## Exported Interfaces
interface | com::sun::star::frame::XModel
| represents a component which is created from a URL and arguments More...
interface | com::sun::star::util::XModifiable
| a storable document should provide information about his modify state More...
interface | com::sun::star::frame::XStorable
| offers a simple way to store a component to a URL More...
interface | com::sun::star::view::XPrintable
| offers a way to print a component More...
interface | XEventBroadcaster
| is an old and deprecated version of the XDocumentEventBroadcaster interface More...
interface | XDocumentEventBroadcaster
| makes it possible to register listeners which are called whenever a document event occurs More...
interface | XEventsSupplier
| access to bound event handlers More...
interface | XViewDataSupplier
| access to some properties describing all open views to a document More...
interface | com::sun::star::view::XPrintJobBroadcaster
| allows for getting information about a print job More...
interface | XEmbeddedScripts
| is supported when the document can contain scripts and dialogs More...
interface | XDocumentPropertiesSupplier
| access to the DocumentProperties. More...
interface | XUndoManagerSupplier
| provides access to the document's undo manager. More...

## Public Attributes
boolean | AutomaticControlFocus
| controls the focus behavior of the form controls in the document More...
boolean | ApplyFormDesignMode
| controls the initial (on-load) behavior of the form controls in the document More...
string | RuntimeUID
| contains a unique id for the document More...

## Additional Inherited Members
Public Member Functions inherited from XModel
boolean | attachResource ([in] string URL, [in] sequence< com::sun::star::beans::PropertyValue > Arguments)
| informs a model about its resource description. More...
string | getURL ()
| provides information about the location of this model More...
sequence< com::sun::star::beans::PropertyValue > | getArgs ()
| provides read access on currently representation of the com::sun::star::document::MediaDescriptor of this model which describes the model and its state More...
void | connectController ([in] XController Controller)
| is called whenever a new controller is created for this model. More...
void | disconnectController ([in] XController Controller)
| is called whenever an existing controller should be deregistered at this model. More...
void | lockControllers ()
| suspends some notifications to the controllers which are used for display updates. More...
void | unlockControllers ()
| resumes the notifications which were suspended by XModel::lockControllers(). More...
boolean | hasControllersLocked ()
| determines if there is at least one lock remaining. More...
XController | getCurrentController ()
| provides access to the controller which currently controls this model More...
void | setCurrentController ([in] XController Controller) raises ( com::sun::star::container::NoSuchElementException )
| sets a registered controller as the current controller. More...
com::sun::star::uno::XInterface | getCurrentSelection ()
| provides read access on current selection on controller More...
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. More...
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object. More...
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list. 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...
Public Member Functions inherited from XModifiable
boolean | isModified ()
void | setModified ([in] boolean bModified) raises ( com::sun::star::beans::PropertyVetoException )
| sets the status of the modified-flag from outside of the object. More...
Public Member Functions inherited from XModifyBroadcaster
void | addModifyListener ([in] com::sun::star::util::XModifyListener aListener)
| adds the specified listener to receive events "modified." More...
void | removeModifyListener ([in] com::sun::star::util::XModifyListener aListener)
| removes the specified listener. More...
Public Member Functions inherited from XStorable
boolean | hasLocation ()
| The object may know the location because it was loaded from there, or because it is stored there. More...
string | getLocation ()
| After XStorable::storeAsURL() it returns the URL the object was stored to. More...
boolean | isReadonly ()
| It is not possible to call XStorable::store() successfully when the data store is read-only. More...
void | store () raises ( com::sun::star::io::IOException )
| stores the data to the URL from which it was loaded. More...
void | storeAsURL ([in] string sURL, [in] sequence< com::sun::star::beans::PropertyValue > lArguments) raises ( com::sun::star::io::IOException )
| stores the object's persistent data to a URL and makes this URL the new location of the object. More...
void | storeToURL ([in] string sURL, [in] sequence< com::sun::star::beans::PropertyValue > lArguments) raises ( com::sun::star::io::IOException )
| stores the object's persistent data to a URL and continues to be a representation of the old URL. More...
Public Member Functions inherited from XPrintable
sequence< com::sun::star::beans::PropertyValue > | getPrinter ()
void | setPrinter ([in] sequence< com::sun::star::beans::PropertyValue > aPrinter) raises ( com::sun::star::lang::IllegalArgumentException )
| assigns a new printer to the object. More...
void | print ([in] sequence< com::sun::star::beans::PropertyValue > xOptions) raises ( com::sun::star::lang::IllegalArgumentException )
| prints the object. More...
Protected Member Functions inherited from XEventBroadcaster
void | addEventListener ([in] XEventListener Listener)
| registers the given listener More...
void | removeEventListener ([in] XEventListener Listener)
| unregisters the given listener More...
Protected Member Functions inherited from XDocumentEventBroadcaster
void | addDocumentEventListener ([in] XDocumentEventListener Listener)
| registers a listener which is notified about document events More...
void | removeDocumentEventListener ([in] XDocumentEventListener Listener)
| revokes a listener which has previously been registered to be notified about document events. More...
void | notifyDocumentEvent ([in] string EventName, [in] ::com::sun::star::frame::XController2 ViewController, [in] any Supplement) raises ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException )
| causes the broadcaster to notify all registered listeners of the given event More...
Protected Member Functions inherited from XEventsSupplier
com::sun::star::container::XNameReplace | getEvents ()
| offers a list of event handlers which are be bound to events of this object More...
Protected Member Functions inherited from XViewDataSupplier
::com::sun::star::container::XIndexAccess | getViewData ()
| retrieve information about currently opened view to restore it later More...
void | setViewData ([in] com::sun::star::container::XIndexAccess Data)
| restore all views which will be represented by given data argument More...
Protected Member Functions inherited from XPrintJobBroadcaster
void | addPrintJobListener ([in] XPrintJobListener xListener)
| adds an XPrintJobListener to be notified about print progress. More...
void | removePrintJobListener ([in] XPrintJobListener xListener)
| removes an XPrintJobListener. More...
Protected Member Functions inherited from XDocumentPropertiesSupplier
XDocumentProperties | getDocumentProperties ()
| provides the document properties object. More...
Protected Member Functions inherited from XUndoManagerSupplier
XUndoManager | getUndoManager ()
| returns the Undo manager associated with the component. More...
Protected Attributes inherited from XEmbeddedScripts
::com::sun::star::script::XStorageBasedLibraryContainer | BasicLibraries
| is the container of `StarBasic` macro libraries contained in the document More...
::com::sun::star::script::XStorageBasedLibraryContainer | DialogLibraries
| is the container of dialogs libraries contained in the document More...
boolean | AllowMacroExecution
| determines whether executing macros from this document is allowed. More...

## Detailed Description

abstract service which specifies a storable and printable document

All major document-like components should support this service instead of simple components which supports a com::sun::star::frame::Controller or pure com::sun::star::awt::XWindow only.

See also
  com::sun::star::frame::Controller

## Member Typedef Documentation

## ◆ InteropGrabBag

sequence<com::sun::star::beans::PropertyValue> InteropGrabBag
| optional property

Grab bag of document properties, used as a string-any map for interim interop purposes.

Since
  LibreOffice 4.2

This property is intentionally not handled by the ODF filter. Any member that should be handled there should be first moved out from this grab bag to a separate property.

## Exported Interfaces

## ◆ com::sun::star::frame::XModel

interface com::sun::star::frame::XModel

represents a component which is created from a URL and arguments

It is a representation of a resource in the sense that it was created/loaded from the resource. The arguments are passed to the loader to modify its behavior.

## ◆ com::sun::star::frame::XStorable

interface com::sun::star::frame::XStorable

offers a simple way to store a component to a URL

This interface supports functionality

- to make a copy of current component by saving it to another location
- to commit made changes
- to convert it by saving it by using suitable filter name.

## ◆ com::sun::star::util::XModifiable

interface com::sun::star::util::XModifiable

a storable document should provide information about his modify state

With this interface it's possible too, to reset the modify state. That can be necessary to prevent code against problem during closing of the document without saving any changes.

## ◆ com::sun::star::view::XPrintable

interface com::sun::star::view::XPrintable

offers a way to print a component

It's possible to specify which printer should be used and of course print the document on it.

## ◆ com::sun::star::view::XPrintJobBroadcaster

interface com::sun::star::view::XPrintJobBroadcaster
| optional

allows for getting information about a print job

Since
  OOo 1.1.2

## ◆ XDocumentEventBroadcaster

interface XDocumentEventBroadcaster
| optional

makes it possible to register listeners which are called whenever a document event occurs

## ◆ XDocumentPropertiesSupplier

interface XDocumentPropertiesSupplier
| optional

access to the DocumentProperties.

Since
  OOo 3.0

## ◆ XEmbeddedScripts

interface XEmbeddedScripts
| optional

is supported when the document can contain scripts and dialogs

Since
  OOo 2.4

## ◆ XEventBroadcaster

interface XEventBroadcaster
| optional

is an old and deprecated version of the XDocumentEventBroadcaster interface

Deprecated:

## ◆ XEventsSupplier

interface XEventsSupplier
| optional

access to bound event handlers

## ◆ XUndoManagerSupplier

interface XUndoManagerSupplier
| optional

provides access to the document's undo manager.

## ◆ XViewDataSupplier

interface XViewDataSupplier
| optional

access to some properties describing all open views to a document

## Member Data Documentation

## ◆ ApplyFormDesignMode

boolean ApplyFormDesignMode
| optional property

controls the initial (on-load) behavior of the form controls in the document

If set to `TRUE`, upon loading the document, the form controls will be in design mode.
If set to `FALSE`, they will be alive, i.e. operational.
With this, you may control if your document works primarily as a form document.

## ◆ AutomaticControlFocus

boolean AutomaticControlFocus
| optional property

controls the focus behavior of the form controls in the document

If this flag is set to `TRUE`, any view belonging to the document should focus the first control in the document. With this, you may control if your document works primarily as a form document.

## ◆ RuntimeUID

string RuntimeUID
| optional property readonly

contains a unique id for the document

Once calculated, the id must not change until the document has been closed. Upon closing it will not be made persistent. Thus, the document may get a different id every time it gets loaded.

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

- com/sun/star/document/OfficeDocument.idl