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_document_OfficeDocument_idl__
24#define __com_sun_star_document_OfficeDocument_idl__
25
26#include <com/sun/star/frame/XModel.idl>
27#include <com/sun/star/util/XModifiable.idl>
28#include <com/sun/star/frame/XStorable.idl>
29#include <com/sun/star/view/XPrintable.idl>
30#include <com/sun/star/view/XPrintJobBroadcaster.idl>
31#include <com/sun/star/document/XEventBroadcaster.idl>
32#include <com/sun/star/document/XEventsSupplier.idl>
33#include <com/sun/star/document/XDocumentInfoSupplier.idl>
34#include <com/sun/star/document/XViewDataSupplier.idl>
35#include <com/sun/star/document/XDocumentEventBroadcaster.idl>
36#include <com/sun/star/document/XEmbeddedScripts.idl>
37#include <com/sun/star/document/XDocumentPropertiesSupplier.idl>
38#include <com/sun/star/document/XUndoManagerSupplier.idl>
39
40//=============================================================================
41
42module com {   module sun {   module star {   module document {
43
44//=============================================================================
45/** abstract service which specifies a storable and printable document
46
47    <p>
48    All major document-like components should support this service
49    instead of simple components which supports a <type scope="com::sun::star::frame">Controller</type>
50    or pure <type scope="com::sun::star::awt">XWindow</type> only.
51    </p>
52
53    @see com::sun::star::frame::Controller
54 */
55published service OfficeDocument
56{
57    //-------------------------------------------------------------------------
58    /** represents a component which is created from an URL and arguments
59
60        <p>
61        It is a representation of a resource in the sense that it was
62        created/loaded from the resource. The arguments are passed to the loader
63        to modify its behavior.
64        </p>
65     */
66    interface com::sun::star::frame::XModel;
67
68    //-------------------------------------------------------------------------
69    /** a storable document should provide information about his modify state
70
71        <p>
72        With this interface it's possible too, to reset the modify state.
73        That can be necessary to prevent code against problems during closing
74        of the document without saving any changes.
75        </p>
76     */
77    interface com::sun::star::util::XModifiable;
78
79    //-------------------------------------------------------------------------
80    /** offers a simple way to store a component to an URL
81
82        <p>
83        This interface supports functionality
84        <ul>
85            <li>to make a copy of current component by saving it to another location</li>
86            <li>to commit made changes</li>
87            <li>to convert it by saving it by using suitable filter name.</li>
88        </ul>
89        </p>
90     */
91	interface com::sun::star::frame::XStorable;
92
93    //-------------------------------------------------------------------------
94    /** offers a way to print a component
95
96        <p>
97        It's possible to specify which printer should be used and of course
98        print the document on it.
99        </p>
100     */
101	interface com::sun::star::view::XPrintable;
102
103    //-------------------------------------------------------------------------
104    /** is an old and deprecated version of the <type>XDocumentEventBroadcaster</type> interface
105        @deprecated
106     */
107    [optional] interface XEventBroadcaster;
108
109    //-------------------------------------------------------------------------
110    /** makes it possible to register listeners which are called whenever
111        a document event occurs
112     */
113    [optional] interface XDocumentEventBroadcaster;
114
115    //-------------------------------------------------------------------------
116    /** access to bound event handlers
117	 */
118	[optional] interface XEventsSupplier;
119
120    //-------------------------------------------------------------------------
121    /** document can provide a <type>DocumentInfo</type>
122
123        <p>
124        Instead of the <type>StandaloneDocumentInfo</type> service the <type>DocumentInfo</type>
125        will be available on an already opened document only.
126        </p>
127
128        @deprecated     Use <type>XDocumentPropertiesSupplier</type> instead.
129	 */
130    [optional] interface XDocumentInfoSupplier;
131
132    //-------------------------------------------------------------------------
133    /** access to some properties describing all open views to a document
134	 */
135    [optional] interface XViewDataSupplier;
136
137    //-------------------------------------------------------------------------
138    /** allows for getting information about a print job
139
140        @since OpenOffice 1.1.2
141	 */
142    [optional] interface com::sun::star::view::XPrintJobBroadcaster;
143
144    /** is supported when the document can contain scripts and dialogs
145
146        @since OpenOffice 2.4
147    */
148    [optional] interface XEmbeddedScripts;
149
150    //-------------------------------------------------------------------------
151    /** access to the <type>DocumentProperties</type>.
152
153        @since OpenOffice 3.0
154     */
155    [optional] interface XDocumentPropertiesSupplier;
156
157    /** provides access to the document's undo manager.
158    */
159    [optional] interface XUndoManagerSupplier;
160
161    //-------------------------------------------------------------------------
162	/** controls the focus behaviour of the form controls in the document
163
164        <p>
165        If this flag is set to <TRUE/>, any view belonging to the document
166        should focus the first control in the document. With this, you may
167        control if your document works primarily as a form document.
168        </p>
169	*/
170	[property, optional] boolean AutomaticControlFocus;
171
172    //-------------------------------------------------------------------------
173	/** controls the initial (on-load) behavior of the form controls in the document
174
175        <p>If set to <TRUE/>, upon loading the document, the form controls will be in design mode.<br/>
176		If set to <FALSE/>, they will be alive, i.e. operational.<br/>
177        With this, you may control if your document works primarily as a form document.
178        </p>
179	*/
180	[property, optional] boolean ApplyFormDesignMode;
181
182    //-------------------------------------------------------------------------
183    /** contains a unique id for the document
184
185        <p>Once calculated, the id must not change until the document has been
186        closed. Upon closing it will not be made persistent. Thus, the document
187        may get a different id every time it gets loaded.</p>
188    */
189    [property, optional, readonly] string RuntimeUID;
190};
191
192//=============================================================================
193
194}; }; }; };
195
196#endif
197