1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com
{ module sun
{ module star
{ module sdb
{
22 interface XSubDocument
;
24 /** specifies a sub document of an OfficeDatabaseDocument.
26 <p>Usual instances of a <code>DocumentDefinition</code> are forms and reports.</p>
28 <p>Note that the <code>DocumentDefinition</code> does not denote the actual document
29 (i.e. an object supporting the com::sun::star::frame::XModel interface),
30 but only a shortcut to access and load those actual documents.</p>
32 service DocumentDefinition
34 /** provides functionality for treating the object as part of a hierarchy
35 of a database document's sub documents.
37 <p>The com::sun::star::ucb::XCommandProcessor::execute() method
38 of a <code>DocumentDefinition</code> supports at least the following commands, additionally to
39 the ones already supported by the DefinitionContent:
41 <li><strong>open</strong>: loads the sub document in an own frame. The return value of
42 the <code>execute</code> method is the model of the loaded document.</li>
43 <li><strong>store</strong>: stores the document.</li>
44 <li><strong>openDesign</strong>: opens the sub document in an own frame, in design mode.
45 The user can make changes to the document, and save those changes. The return value of
46 the <code>execute</code> method is the model of the loaded document.</li>
47 <li><strong>preview</strong>: retrieves an image showing a preview of the sub document.</li>
48 <li><strong>getDocumentInfo</strong>: retrieves the document information, as
49 com::sun::star::document::XDocumentProperties
50 instance, of the sub document.</li>
51 <li><strong>delete</strong>: deletes the sub document from the database document.</li>
52 <li><strong>close</strong>: closes the sub document, if it had previously been opened
53 using either the <code>open</code> or <code>openDesign</code> command. The return value
54 of the <code>execute</code> command is a <code>boolean</code> value indicating whether
55 the sub document could be closed. Reasons for not closing the document include vetoes by
56 third parties, for instance, because the user opened a dialog modal to the sub document,
57 or a long-running task such as printing is currently running.</li>
58 <li><strong>show</strong>: shows the sub document. This is useful if you previously opened the
59 document hidden, or if you previously hide it using the <em>hide</em> command.<br/>
60 The <em>open</em> command is not available if the sub document has not been loaded, yet.</li>
61 <li><strong>hide</strong>: hides the sub document. In opposite to the <em>close</em> command,
62 only the document window is hidden, but the document is kept loaded. A subsequent execution
63 of the <em>show</em> command will show the window, again.</li>
66 service DefinitionContent
;
68 interface ::com
::sun
::star
::beans
::XPropertySet
;
70 interface ::com
::sun
::star
::sdb
::XSubDocument
;
72 /** is the name of the document. If the document is part of the container,
73 it is not possible to alter the name.*/
74 [readonly, property
] string Name
;
76 /** Indicates if the document is to be used as template, for example, if a report is to be filled with data. */
77 [readonly, property
] boolean AsTemplate
;
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */