allows to initialize the document, either from scratch, or from a stored database document.

A newly instantiated database document cannot be operated until it is fully initialized. There are three possible means to do this initialization:

calling XLoadable::initNew

calling XLoadable::load

calling XStorable::storeAsURL

The third option was added for compatibility reasons, since a DatabaseDocument in earlier versions of OpenOffice.org did not support the XLoadable interface, so the usual way of creating a document from scratch was to create it, set properties as needed, and store it.

Since this can be done by multiple clients, every client is additionally required to register itself as com::sun::star::util::XCloseListener at the document, to prevent some other client closing the model while it's still needed by the first client.