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
24#ifndef __com_sun_star_document_XScriptInvocationContext_idl__
25#define __com_sun_star_document_XScriptInvocationContext_idl__
26
27
28#ifndef __com_sun_star_document_XEmbeddedScripts_idl__
29#include <com/sun/star/document/XEmbeddedScripts.idl>
30#endif
31
32//=============================================================================
33
34module com { module sun { module star { module document {
35
36//=============================================================================
37
38/** indicates support for executing scripts contained in a, possibly foreign, document.
39
40    <p>If the component implementing it is a document, which supports embedding scripts into
41    itself, then <member>ScriptContainer</member> refers to the document itself. Implementing this
42    interface is unnecessary then, instead the document should simply implement <type>XEmbeddedScripts</type> directly.</p>
43
44    <p>If the interface is implemented by a document which does not itself support embedding
45    scripts into it, but which  is associated unambiguously with a document which does,
46    then this other document is denoted by <member>ScriptContainer</member>.</p>
47
48    <p>If the interface is implemented by a controller, then <member>ScriptContainer</member>
49    refers to the document which supports embedding scripts, and which is unambiguosly
50    associated with the controller. This must not necessarily be the model returned by
51    <member scope="com::sun::star::frame">XController::getModel</member>.</p>
52
53    @since OpenOffice 2.4
54 */
55interface XScriptInvocationContext
56{
57    /** denotes the document which contains the scripts which are to be invoked from
58    the component implementing the XScriptInvocationContext inteface.
59    */
60    [attribute, readonly] XEmbeddedScripts ScriptContainer;
61};
62
63//=============================================================================
64
65}; }; }; };
66
67//=============================================================================
68
69#endif
70