1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_document_OfficeDocument_idl__
28*cdf0e10cSrcweir#define __com_sun_star_document_OfficeDocument_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#include <com/sun/star/frame/XModel.idl>
31*cdf0e10cSrcweir#include <com/sun/star/util/XModifiable.idl>
32*cdf0e10cSrcweir#include <com/sun/star/frame/XStorable.idl>
33*cdf0e10cSrcweir#include <com/sun/star/view/XPrintable.idl>
34*cdf0e10cSrcweir#include <com/sun/star/view/XPrintJobBroadcaster.idl>
35*cdf0e10cSrcweir#include <com/sun/star/document/XEventBroadcaster.idl>
36*cdf0e10cSrcweir#include <com/sun/star/document/XEventsSupplier.idl>
37*cdf0e10cSrcweir#include <com/sun/star/document/XDocumentInfoSupplier.idl>
38*cdf0e10cSrcweir#include <com/sun/star/document/XViewDataSupplier.idl>
39*cdf0e10cSrcweir#include <com/sun/star/document/XDocumentEventBroadcaster.idl>
40*cdf0e10cSrcweir#include <com/sun/star/document/XEmbeddedScripts.idl>
41*cdf0e10cSrcweir#include <com/sun/star/document/XDocumentPropertiesSupplier.idl>
42*cdf0e10cSrcweir#include <com/sun/star/document/XUndoManagerSupplier.idl>
43*cdf0e10cSrcweir
44*cdf0e10cSrcweir//=============================================================================
45*cdf0e10cSrcweir
46*cdf0e10cSrcweirmodule com {   module sun {   module star {   module document {
47*cdf0e10cSrcweir
48*cdf0e10cSrcweir//=============================================================================
49*cdf0e10cSrcweir/** abstract service which specifies a storable and printable document
50*cdf0e10cSrcweir
51*cdf0e10cSrcweir    <p>
52*cdf0e10cSrcweir    All major document-like components should support this service
53*cdf0e10cSrcweir    instead of simple components which supports a <type scope="com::sun::star::frame">Controller</type>
54*cdf0e10cSrcweir    or pure <type scope="com::sun::star::awt">XWindow</type> only.
55*cdf0e10cSrcweir    </p>
56*cdf0e10cSrcweir
57*cdf0e10cSrcweir    @see com::sun::star::frame::Controller
58*cdf0e10cSrcweir */
59*cdf0e10cSrcweirpublished service OfficeDocument
60*cdf0e10cSrcweir{
61*cdf0e10cSrcweir    //-------------------------------------------------------------------------
62*cdf0e10cSrcweir    /** represents a component which is created from an URL and arguments
63*cdf0e10cSrcweir
64*cdf0e10cSrcweir        <p>
65*cdf0e10cSrcweir        It is a representation of a resource in the sense that it was
66*cdf0e10cSrcweir        created/loaded from the resource. The arguments are passed to the loader
67*cdf0e10cSrcweir        to modify its behavior.
68*cdf0e10cSrcweir        </p>
69*cdf0e10cSrcweir     */
70*cdf0e10cSrcweir    interface com::sun::star::frame::XModel;
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir    //-------------------------------------------------------------------------
73*cdf0e10cSrcweir    /** a storable document should provide information about his modify state
74*cdf0e10cSrcweir
75*cdf0e10cSrcweir        <p>
76*cdf0e10cSrcweir        With this interface it's possible too, to reset the modify state.
77*cdf0e10cSrcweir        That can be neccessary to prevent code against problem during closing
78*cdf0e10cSrcweir        of the document without saving any changes.
79*cdf0e10cSrcweir        </p>
80*cdf0e10cSrcweir     */
81*cdf0e10cSrcweir    interface com::sun::star::util::XModifiable;
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir    //-------------------------------------------------------------------------
84*cdf0e10cSrcweir    /** offers a simple way to store a component to an URL
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir        <p>
87*cdf0e10cSrcweir        This interface supports functionality
88*cdf0e10cSrcweir        <ul>
89*cdf0e10cSrcweir            <li>to make a copy of current component by saving it to another location</li>
90*cdf0e10cSrcweir            <li>to commit made changes</li>
91*cdf0e10cSrcweir            <li>to convert it by saving it by using suitable filter name.</li>
92*cdf0e10cSrcweir        </ul>
93*cdf0e10cSrcweir        </p>
94*cdf0e10cSrcweir     */
95*cdf0e10cSrcweir	interface com::sun::star::frame::XStorable;
96*cdf0e10cSrcweir
97*cdf0e10cSrcweir    //-------------------------------------------------------------------------
98*cdf0e10cSrcweir    /** offers a way to print a component
99*cdf0e10cSrcweir
100*cdf0e10cSrcweir        <p>
101*cdf0e10cSrcweir        It's possible to specify wich printer should be used and of course
102*cdf0e10cSrcweir        print the document on it.
103*cdf0e10cSrcweir        </p>
104*cdf0e10cSrcweir     */
105*cdf0e10cSrcweir	interface com::sun::star::view::XPrintable;
106*cdf0e10cSrcweir
107*cdf0e10cSrcweir    //-------------------------------------------------------------------------
108*cdf0e10cSrcweir    /** is an old and deprecated version of the <type>XDocumentEventBroadcaster</type> interface
109*cdf0e10cSrcweir        @deprecated
110*cdf0e10cSrcweir     */
111*cdf0e10cSrcweir    [optional] interface XEventBroadcaster;
112*cdf0e10cSrcweir
113*cdf0e10cSrcweir    //-------------------------------------------------------------------------
114*cdf0e10cSrcweir    /** makes it possible to register listeners which are called whenever
115*cdf0e10cSrcweir        a document event occurs
116*cdf0e10cSrcweir     */
117*cdf0e10cSrcweir    [optional] interface XDocumentEventBroadcaster;
118*cdf0e10cSrcweir
119*cdf0e10cSrcweir    //-------------------------------------------------------------------------
120*cdf0e10cSrcweir    /** access to bound event handlers
121*cdf0e10cSrcweir	 */
122*cdf0e10cSrcweir	[optional] interface XEventsSupplier;
123*cdf0e10cSrcweir
124*cdf0e10cSrcweir    //-------------------------------------------------------------------------
125*cdf0e10cSrcweir    /** document can provide a <type>DocumentInfo</type>
126*cdf0e10cSrcweir
127*cdf0e10cSrcweir        <p>
128*cdf0e10cSrcweir        Instead of the <type>StandaloneDocumentInfo</type> service the <type>DocumentInfo</type>
129*cdf0e10cSrcweir        will be available on an already opened document only.
130*cdf0e10cSrcweir        </p>
131*cdf0e10cSrcweir
132*cdf0e10cSrcweir        @deprecated     Use <type>XDocumentPropertiesSupplier</type> instead.
133*cdf0e10cSrcweir	 */
134*cdf0e10cSrcweir    [optional] interface XDocumentInfoSupplier;
135*cdf0e10cSrcweir
136*cdf0e10cSrcweir    //-------------------------------------------------------------------------
137*cdf0e10cSrcweir    /** access to some properties describing all open views to a document
138*cdf0e10cSrcweir	 */
139*cdf0e10cSrcweir    [optional] interface XViewDataSupplier;
140*cdf0e10cSrcweir
141*cdf0e10cSrcweir    //-------------------------------------------------------------------------
142*cdf0e10cSrcweir    /** allows for getting information about a print job
143*cdf0e10cSrcweir
144*cdf0e10cSrcweir        @since OOo 1.1.2
145*cdf0e10cSrcweir	 */
146*cdf0e10cSrcweir    [optional] interface com::sun::star::view::XPrintJobBroadcaster;
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir    /** is supported when the document can contain scripts and dialogs
149*cdf0e10cSrcweir
150*cdf0e10cSrcweir        @since OOo 2.4
151*cdf0e10cSrcweir    */
152*cdf0e10cSrcweir    [optional] interface XEmbeddedScripts;
153*cdf0e10cSrcweir
154*cdf0e10cSrcweir    //-------------------------------------------------------------------------
155*cdf0e10cSrcweir    /** access to the <type>DocumentProperties</type>.
156*cdf0e10cSrcweir
157*cdf0e10cSrcweir        @since OOo 3.0
158*cdf0e10cSrcweir     */
159*cdf0e10cSrcweir    [optional] interface XDocumentPropertiesSupplier;
160*cdf0e10cSrcweir
161*cdf0e10cSrcweir    /** provides access to the document's undo manager.
162*cdf0e10cSrcweir    */
163*cdf0e10cSrcweir    [optional] interface XUndoManagerSupplier;
164*cdf0e10cSrcweir
165*cdf0e10cSrcweir    //-------------------------------------------------------------------------
166*cdf0e10cSrcweir	/** controls the focus behaviour of the form controls in the document
167*cdf0e10cSrcweir
168*cdf0e10cSrcweir        <p>
169*cdf0e10cSrcweir        If this flag is set to <TRUE/>, any view belonging to the document
170*cdf0e10cSrcweir        should focus the first control in the document. With this, you may
171*cdf0e10cSrcweir        control if your document works primarily as a form document.
172*cdf0e10cSrcweir        </p>
173*cdf0e10cSrcweir	*/
174*cdf0e10cSrcweir	[property, optional] boolean AutomaticControlFocus;
175*cdf0e10cSrcweir
176*cdf0e10cSrcweir    //-------------------------------------------------------------------------
177*cdf0e10cSrcweir	/** controls the initial (on-load) behavior of the form controls in the document
178*cdf0e10cSrcweir
179*cdf0e10cSrcweir        <p>If set to <TRUE/>, upon loading the document, the form controls will be in design mode.<br/>
180*cdf0e10cSrcweir		If set to <FALSE/>, they will be alive, i.e. operational.<br/>
181*cdf0e10cSrcweir        With this, you may control if your document works primarily as a form document.
182*cdf0e10cSrcweir        </p>
183*cdf0e10cSrcweir	*/
184*cdf0e10cSrcweir	[property, optional] boolean ApplyFormDesignMode;
185*cdf0e10cSrcweir
186*cdf0e10cSrcweir    //-------------------------------------------------------------------------
187*cdf0e10cSrcweir    /** contains a unique id for the document
188*cdf0e10cSrcweir
189*cdf0e10cSrcweir        <p>Once calculated, the id must not change until the document has been
190*cdf0e10cSrcweir        closed. Upon closing it will not be made persistent. Thus, the document
191*cdf0e10cSrcweir        may get a different id every time it gets loaded.</p>
192*cdf0e10cSrcweir    */
193*cdf0e10cSrcweir    [property, optional, readonly] string RuntimeUID;
194*cdf0e10cSrcweir};
195*cdf0e10cSrcweir
196*cdf0e10cSrcweir//=============================================================================
197*cdf0e10cSrcweir
198*cdf0e10cSrcweir}; }; }; };
199*cdf0e10cSrcweir
200*cdf0e10cSrcweir#endif
201