xref: /aoo41x/main/offapi/com/sun/star/sheet/AddIn.idl (revision d1766043)
1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_sheet_AddIn_idl__
25cdf0e10cSrcweir#define __com_sun_star_sheet_AddIn_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_lang_XServiceName_idl__
28cdf0e10cSrcweir#include <com/sun/star/lang/XServiceName.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef __com_sun_star_sheet_XAddIn_idl__
32cdf0e10cSrcweir#include <com/sun/star/sheet/XAddIn.idl>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir
35cdf0e10cSrcweir#ifndef __com_sun_star_sheet_XCompatibilityNames_idl__
36cdf0e10cSrcweir#include <com/sun/star/sheet/XCompatibilityNames.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir
39cdf0e10cSrcweir//=============================================================================
40cdf0e10cSrcweir
41cdf0e10cSrcweirmodule com {  module sun {  module star {  module sheet {
42cdf0e10cSrcweir
43cdf0e10cSrcweir//=============================================================================
44cdf0e10cSrcweir
45cdf0e10cSrcweir/** is the base for AddIn services that supply functions which can be called
46cdf0e10cSrcweir	by other components.
47cdf0e10cSrcweir
48cdf0e10cSrcweir	<p>Any AddIn implementation must implement a service describing its
49cdf0e10cSrcweir	specific set of functions.
50cdf0e10cSrcweir	That service must contain the <type>AddIn</type> service, and the
51cdf0e10cSrcweir	functions that are implemented, in one or more interfaces.
52cdf0e10cSrcweir	The <type scope="com::sun::star::lang">XServiceName</type> interface
53cdf0e10cSrcweir	must describe that service, and the <type>XAddIn</type> interface
54cdf0e10cSrcweir	must describe the individual functions.</p>
55cdf0e10cSrcweir
56cdf0e10cSrcweir	<p>Each AddIn function can take parameters of the following types:</p>
57cdf0e10cSrcweir
58cdf0e10cSrcweir	<dl>
59cdf0e10cSrcweir	<dt><atom>long</atom></dt>
60cdf0e10cSrcweir	<dd>for integer values.</dd>
61cdf0e10cSrcweir
62cdf0e10cSrcweir	<dt><atom>double</atom></dt>
63cdf0e10cSrcweir	<dd>for floating point values.</dd>
64cdf0e10cSrcweir
65cdf0e10cSrcweir	<dt><atom>string</atom></dt>
66cdf0e10cSrcweir	<dd>for text strings.</dd>
67cdf0e10cSrcweir
68cdf0e10cSrcweir	<dt><atom>long[][]</atom></dt>
69cdf0e10cSrcweir	<dd>for (two-dimensional) arrays of integer values.</dd>
70cdf0e10cSrcweir
71cdf0e10cSrcweir	<dt><atom>double[][]</atom></dt>
72cdf0e10cSrcweir	<dd>for (two-dimensional) arrays of floating point values.</dd>
73cdf0e10cSrcweir
74cdf0e10cSrcweir	<dt><atom>string[][]</atom></dt>
75cdf0e10cSrcweir	<dd>for (two-dimensional) arrays of text strings.</dd>
76cdf0e10cSrcweir
77cdf0e10cSrcweir	<dt><atom>any[][]</atom></dt>
78cdf0e10cSrcweir	<dd>for (two-dimensional) arrays of mixed contents. Each <atom>any</atom>
79cdf0e10cSrcweir	will contain a <atom>double</atom> or a <atom>string</atom>, depending on
80cdf0e10cSrcweir	the data.</dd>
81cdf0e10cSrcweir
82cdf0e10cSrcweir	<dt><atom>any</atom></dt>
83cdf0e10cSrcweir	<dd>Depending on the data, a <atom>double</atom>, a <atom>string</atom>,
84cdf0e10cSrcweir	or an <atom>any[][]</atom> will be passed. If no argument is specified in
85cdf0e10cSrcweir	the function call, <void/> will be passed. This allows for optional
86cdf0e10cSrcweir	parameters.</dd>
87cdf0e10cSrcweir
88cdf0e10cSrcweir	<dt><type scope="com::sun::star::table">XCellRange</type></dt>
89cdf0e10cSrcweir	<dd>for a <type scope="com::sun::star::table">XCellRange</type> interface
90cdf0e10cSrcweir	to the source data.</dd>
91cdf0e10cSrcweir
92cdf0e10cSrcweir	<dt><type scope="com::sun::star::beans">XPropertySet</type></dt>
93cdf0e10cSrcweir	<dd>for a <type scope="com::sun::star::beans">XPropertySet</type>
94cdf0e10cSrcweir	interface to the <type>SpreadsheetDocument</type> making the function
95cdf0e10cSrcweir	call. Only one parameter of this type is allowed in each function. It
96cdf0e10cSrcweir	can be used to query document settings like
97cdf0e10cSrcweir	<member>SpreadsheetDocumentSettings::NullDate</member>.</dd>
98cdf0e10cSrcweir
99cdf0e10cSrcweir	<dt><atom>any[]</atom></dt>
100cdf0e10cSrcweir	<dd>for varying parameters. Only the last parameter of a function may
101cdf0e10cSrcweir	have this type. It will be filled with the remaining arguments of the
102cdf0e10cSrcweir	function call that were not used for the previous parameters. Each
103cdf0e10cSrcweir	element of the sequence will be filled as in the case of <atom>any</atom>
104cdf0e10cSrcweir	above.</dd>
105cdf0e10cSrcweir	</dl>
106cdf0e10cSrcweir
107cdf0e10cSrcweir	<p>Each AddIn function must have one of the following return types:</p>
108cdf0e10cSrcweir
109cdf0e10cSrcweir	<ul>
110cdf0e10cSrcweir	<li><atom>long</atom></li>
111cdf0e10cSrcweir	<li><atom>double</atom></li>
112cdf0e10cSrcweir	<li><atom>string</atom></li>
113cdf0e10cSrcweir	<li><atom>long[][]</atom></li>
114cdf0e10cSrcweir	<li><atom>double[][]</atom></li>
115cdf0e10cSrcweir	<li><atom>string[][]</atom></li>
116cdf0e10cSrcweir	<li><atom>any[][]</atom></li>
117cdf0e10cSrcweir	<li><type>XVolatileResult</type></li>
118cdf0e10cSrcweir	<li><atom>any</atom></li>
119cdf0e10cSrcweir	</ul>
120cdf0e10cSrcweir
121cdf0e10cSrcweir	<p>The sequences must contain arrays as described above for the
122cdf0e10cSrcweir	parameter types.
123cdf0e10cSrcweir	An <type>XVolatileResult</type> return value must contain an object
124cdf0e10cSrcweir	implementing the <type>VolatileResult</type> service, that contains
125cdf0e10cSrcweir	a volatile result. Subsequent calls with the same parameters must
126cdf0e10cSrcweir	return the same object.
127cdf0e10cSrcweir	An <atom>any</atom> return value can contain any of the other types.</p>
128cdf0e10cSrcweir */
129cdf0e10cSrcweirpublished service AddIn
130cdf0e10cSrcweir{
131cdf0e10cSrcweir	// ------------------------------------------------------------------------
132cdf0e10cSrcweir
133cdf0e10cSrcweir	/** contains a method that returns the service name of the add-in.
134cdf0e10cSrcweir	 */
135cdf0e10cSrcweir	interface com::sun::star::lang::XServiceName;
136cdf0e10cSrcweir
137cdf0e10cSrcweir	// ------------------------------------------------------------------------
138cdf0e10cSrcweir
139cdf0e10cSrcweir	/** provides access to function descriptions and localized names
140cdf0e10cSrcweir		and descriptions.
141cdf0e10cSrcweir 	 */
142cdf0e10cSrcweir	interface com::sun::star::sheet::XAddIn;
143cdf0e10cSrcweir
144cdf0e10cSrcweir	// ------------------------------------------------------------------------
145cdf0e10cSrcweir
146cdf0e10cSrcweir	/**	provides access to compatibility names for the functions.
147cdf0e10cSrcweir	 */
148cdf0e10cSrcweir	[optional] interface com::sun::star::sheet::XCompatibilityNames;
149cdf0e10cSrcweir};
150cdf0e10cSrcweir
151cdf0e10cSrcweir//=============================================================================
152cdf0e10cSrcweir
153cdf0e10cSrcweir}; }; }; };
154cdf0e10cSrcweir
155cdf0e10cSrcweir#endif
156cdf0e10cSrcweir
157