1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_sdb_DocumentDefinition2_idl__ 24#define __com_sun_star_sdb_DocumentDefinition2_idl__ 25 26#ifndef __com_sun_star_beans_XPropertySet_idl__ 27#include <com/sun/star/beans/XPropertySet.idl> 28#endif 29#ifndef __com_sun_star_sdb_DefinitionContent_idl__ 30#include <com/sun/star/sdb/DefinitionContent.idl> 31#endif 32 33module com { module sun { module star { module sdb { 34 35 interface XSubDocument; 36 37/** specifies a sub document of a <type>OfficeDatabaseDocument</type>. 38 39 <p>Usual instances of a <code>DocumentDefinition</code> are forms and reports.</p> 40 41 <p>Note that the <code>DocumentDefinition</code> does not denote the actual document 42 (i.e. an object supporting the <type scope="com::sun::star::frame">XModel</type> interface), 43 but only a shortcut to access and load those actual documents.</p> 44*/ 45service DocumentDefinition 46{ 47 /** provides functionality for treating the object as part of a hierarchy 48 of a database document's sub documents. 49 50 <p>The <member scope="com::sun::star::ucb">XCommandProcessor::execute</member> method 51 of a <code>DocumentDefinition</code> supports at least the following commands, additionally to 52 the ones already supported by the DefinitionContent: 53 <ul> 54 <li><strong>open</strong>: loads the sub document in an own frame. The return value of 55 the <code>execute</code> method is the model of the loaded document.</li> 56 <li><strong>store</strong>: stores the document.</li> 57 <li><strong>openDesign</strong>: opens the sub document in an own frame, in design mode. 58 The user can make changes to the document, and save those changes. The return value of 59 the <code>execute</code> method is the model of the loaded document.</li> 60 <li><strong>preview</strong>: retrieves an image showing a preview of the sub document.</li> 61 <li><strong>getDocumentInfo</strong>: retrieves the document information, as 62 <type scope="com::sun::star::document">XDocumentInfo</type> instance, of the sub document.</li> 63 <li><strong>delete</strong>: deletes the sub document from the database document.</li> 64 <li><strong>close</strong>: closes the sub document, if it had previously been opened 65 using either the <code>open</code> or <code>openDesign</code> command. The return value 66 of the <code>execute</code> command is a <code>boolean</code> value indicating whether 67 the sub document could be closed. Reasons for not closing the document include vetos by 68 third parties, for instance, because the user opened a dialog modal to the sub document, 69 or a long-running task such as printing is currently running.</li> 70 <li><strong>show</strong>: shows the sub document. This is useful if you previously opened the 71 document hidden, or if you previously hide it using the <em>hide</em> command.<br/> 72 The <em>open</em> command is not available if the sub document has not been loaded, yet.</li> 73 <li><strong>hide</strong>: hides the sub document. In opposite to the <em>close</em> command, 74 only the document window is hidden, but the document is kept loaded. A subsequent execution 75 of the <em>show</em> command will show the window, again.</li> 76 </ul> 77 */ 78 service DefinitionContent; 79 80 interface ::com::sun::star::beans::XPropertySet; 81 82 interface ::com::sun::star::sdb::XSubDocument; 83 84 /** is the name of the document. If the document is part of the container, 85 it is not possible to alter the name.*/ 86 [readonly, property] string Name; 87 88 /** Indicates if the document is to be used as template, for example, if a report is to be filled with data. */ 89 [readonly, property] boolean AsTemplate; 90}; 91 92//============================================================================= 93 94}; }; }; }; 95 96#endif 97