1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_sdb_DocumentDefinition2_idl__ 28#define __com_sun_star_sdb_DocumentDefinition2_idl__ 29 30#ifndef __com_sun_star_beans_XPropertySet_idl__ 31#include <com/sun/star/beans/XPropertySet.idl> 32#endif 33#ifndef __com_sun_star_sdb_DefinitionContent_idl__ 34#include <com/sun/star/sdb/DefinitionContent.idl> 35#endif 36 37module com { module sun { module star { module sdb { 38 39 interface XSubDocument; 40 41/** specifies a sub document of a <type>OfficeDatabaseDocument</type>. 42 43 <p>Usual instances of a <code>DocumentDefinition</code> are forms and reports.</p> 44 45 <p>Note that the <code>DocumentDefinition</code> does not denote the actual document 46 (i.e. an object supporting the <type scope="com::sun::star::frame">XModel</type> interface), 47 but only a shortcut to access and load those actual documents.</p> 48*/ 49service DocumentDefinition 50{ 51 /** provides functionality for treating the object as part of a hierarchy 52 of a database document's sub documents. 53 54 <p>The <member scope="com::sun::star::ucb">XCommandProcessor::execute</member> method 55 of a <code>DocumentDefinition</code> supports at least the following commands, additionally to 56 the ones already supported by the DefinitionContent: 57 <ul> 58 <li><strong>open</strong>: loads the sub document in an own frame. The return value of 59 the <code>execute</code> method is the model of the loaded document.</li> 60 <li><strong>store</strong>: stores the document.</li> 61 <li><strong>openDesign</strong>: opens the sub document in an own frame, in design mode. 62 The user can make changes to the document, and save those changes. The return value of 63 the <code>execute</code> method is the model of the loaded document.</li> 64 <li><strong>preview</strong>: retrieves an image showing a preview of the sub document.</li> 65 <li><strong>getDocumentInfo</strong>: retrieves the document information, as 66 <type scope="com::sun::star::document">XDocumentInfo</type> instance, of the sub document.</li> 67 <li><strong>delete</strong>: deletes the sub document from the database document.</li> 68 <li><strong>close</strong>: closes the sub document, if it had previously been opened 69 using either the <code>open</code> or <code>openDesign</code> command. The return value 70 of the <code>execute</code> command is a <code>boolean</code> value indicating whether 71 the sub document could be closed. Reasons for not closing the document include vetos by 72 third parties, for instance, because the user opened a dialog modal to the sub document, 73 or a long-running task such as printing is currently running.</li> 74 <li><strong>show</strong>: shows the sub document. This is useful if you previously opened the 75 document hidden, or if you previously hide it using the <em>hide</em> command.<br/> 76 The <em>open</em> command is not available if the sub document has not been loaded, yet.</li> 77 <li><strong>hide</strong>: hides the sub document. In opposite to the <em>close</em> command, 78 only the document window is hidden, but the document is kept loaded. A subsequent execution 79 of the <em>show</em> command will show the window, again.</li> 80 </ul> 81 */ 82 service DefinitionContent; 83 84 interface ::com::sun::star::beans::XPropertySet; 85 86 interface ::com::sun::star::sdb::XSubDocument; 87 88 /** is the name of the document. If the document is part of the container, 89 it is not possible to alter the name.*/ 90 [readonly, property] string Name; 91 92 /** Indicates if the document is to be used as template, for example, if a report is to be filled with data. */ 93 [readonly, property] boolean AsTemplate; 94}; 95 96//============================================================================= 97 98}; }; }; }; 99 100#endif 101