/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef __com_sun_star_sdb_DocumentDefinition2_idl__ #define __com_sun_star_sdb_DocumentDefinition2_idl__ #include #include module com { module sun { module star { module sdb { interface XSubDocument; /** specifies a sub document of a 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 XModel interface), but only a shortcut to access and load those actual documents.

*/ service DocumentDefinition { /** provides functionality for treating the object as part of a hierarchy of a database document's sub documents.

The 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 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 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.
*/ service DefinitionContent; interface ::com::sun::star::beans::XPropertySet; interface ::com::sun::star::sdb::XSubDocument; /** is the name of the document. If the document is part of the container, it is not possible to alter the name.*/ [readonly, property] string Name; /** Indicates if the document is to be used as template, for example, if a report is to be filled with data. */ [readonly, property] boolean AsTemplate; }; //============================================================================= }; }; }; }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */