xref: /aoo41x/main/offapi/com/sun/star/sheet/AddIn.idl (revision cdf0e10c)
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
28*cdf0e10cSrcweir#ifndef __com_sun_star_sheet_AddIn_idl__
29*cdf0e10cSrcweir#define __com_sun_star_sheet_AddIn_idl__
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir#ifndef __com_sun_star_lang_XServiceName_idl__
32*cdf0e10cSrcweir#include <com/sun/star/lang/XServiceName.idl>
33*cdf0e10cSrcweir#endif
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir#ifndef __com_sun_star_sheet_XAddIn_idl__
36*cdf0e10cSrcweir#include <com/sun/star/sheet/XAddIn.idl>
37*cdf0e10cSrcweir#endif
38*cdf0e10cSrcweir
39*cdf0e10cSrcweir#ifndef __com_sun_star_sheet_XCompatibilityNames_idl__
40*cdf0e10cSrcweir#include <com/sun/star/sheet/XCompatibilityNames.idl>
41*cdf0e10cSrcweir#endif
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir//=============================================================================
44*cdf0e10cSrcweir
45*cdf0e10cSrcweirmodule com {  module sun {  module star {  module sheet {
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir//=============================================================================
48*cdf0e10cSrcweir
49*cdf0e10cSrcweir/** is the base for AddIn services that supply functions which can be called
50*cdf0e10cSrcweir	by other components.
51*cdf0e10cSrcweir
52*cdf0e10cSrcweir	<p>Any AddIn implementation must implement a service describing its
53*cdf0e10cSrcweir	specific set of functions.
54*cdf0e10cSrcweir	That service must contain the <type>AddIn</type> service, and the
55*cdf0e10cSrcweir	functions that are implemented, in one or more interfaces.
56*cdf0e10cSrcweir	The <type scope="com::sun::star::lang">XServiceName</type> interface
57*cdf0e10cSrcweir	must describe that service, and the <type>XAddIn</type> interface
58*cdf0e10cSrcweir	must describe the individual functions.</p>
59*cdf0e10cSrcweir
60*cdf0e10cSrcweir	<p>Each AddIn function can take parameters of the following types:</p>
61*cdf0e10cSrcweir
62*cdf0e10cSrcweir	<dl>
63*cdf0e10cSrcweir	<dt><atom>long</atom></dt>
64*cdf0e10cSrcweir	<dd>for integer values.</dd>
65*cdf0e10cSrcweir
66*cdf0e10cSrcweir	<dt><atom>double</atom></dt>
67*cdf0e10cSrcweir	<dd>for floating point values.</dd>
68*cdf0e10cSrcweir
69*cdf0e10cSrcweir	<dt><atom>string</atom></dt>
70*cdf0e10cSrcweir	<dd>for text strings.</dd>
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir	<dt><atom>long[][]</atom></dt>
73*cdf0e10cSrcweir	<dd>for (two-dimensional) arrays of integer values.</dd>
74*cdf0e10cSrcweir
75*cdf0e10cSrcweir	<dt><atom>double[][]</atom></dt>
76*cdf0e10cSrcweir	<dd>for (two-dimensional) arrays of floating point values.</dd>
77*cdf0e10cSrcweir
78*cdf0e10cSrcweir	<dt><atom>string[][]</atom></dt>
79*cdf0e10cSrcweir	<dd>for (two-dimensional) arrays of text strings.</dd>
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir	<dt><atom>any[][]</atom></dt>
82*cdf0e10cSrcweir	<dd>for (two-dimensional) arrays of mixed contents. Each <atom>any</atom>
83*cdf0e10cSrcweir	will contain a <atom>double</atom> or a <atom>string</atom>, depending on
84*cdf0e10cSrcweir	the data.</dd>
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir	<dt><atom>any</atom></dt>
87*cdf0e10cSrcweir	<dd>Depending on the data, a <atom>double</atom>, a <atom>string</atom>,
88*cdf0e10cSrcweir	or an <atom>any[][]</atom> will be passed. If no argument is specified in
89*cdf0e10cSrcweir	the function call, <void/> will be passed. This allows for optional
90*cdf0e10cSrcweir	parameters.</dd>
91*cdf0e10cSrcweir
92*cdf0e10cSrcweir	<dt><type scope="com::sun::star::table">XCellRange</type></dt>
93*cdf0e10cSrcweir	<dd>for a <type scope="com::sun::star::table">XCellRange</type> interface
94*cdf0e10cSrcweir	to the source data.</dd>
95*cdf0e10cSrcweir
96*cdf0e10cSrcweir	<dt><type scope="com::sun::star::beans">XPropertySet</type></dt>
97*cdf0e10cSrcweir	<dd>for a <type scope="com::sun::star::beans">XPropertySet</type>
98*cdf0e10cSrcweir	interface to the <type>SpreadsheetDocument</type> making the function
99*cdf0e10cSrcweir	call. Only one parameter of this type is allowed in each function. It
100*cdf0e10cSrcweir	can be used to query document settings like
101*cdf0e10cSrcweir	<member>SpreadsheetDocumentSettings::NullDate</member>.</dd>
102*cdf0e10cSrcweir
103*cdf0e10cSrcweir	<dt><atom>any[]</atom></dt>
104*cdf0e10cSrcweir	<dd>for varying parameters. Only the last parameter of a function may
105*cdf0e10cSrcweir	have this type. It will be filled with the remaining arguments of the
106*cdf0e10cSrcweir	function call that were not used for the previous parameters. Each
107*cdf0e10cSrcweir	element of the sequence will be filled as in the case of <atom>any</atom>
108*cdf0e10cSrcweir	above.</dd>
109*cdf0e10cSrcweir	</dl>
110*cdf0e10cSrcweir
111*cdf0e10cSrcweir	<p>Each AddIn function must have one of the following return types:</p>
112*cdf0e10cSrcweir
113*cdf0e10cSrcweir	<ul>
114*cdf0e10cSrcweir	<li><atom>long</atom></li>
115*cdf0e10cSrcweir	<li><atom>double</atom></li>
116*cdf0e10cSrcweir	<li><atom>string</atom></li>
117*cdf0e10cSrcweir	<li><atom>long[][]</atom></li>
118*cdf0e10cSrcweir	<li><atom>double[][]</atom></li>
119*cdf0e10cSrcweir	<li><atom>string[][]</atom></li>
120*cdf0e10cSrcweir	<li><atom>any[][]</atom></li>
121*cdf0e10cSrcweir	<li><type>XVolatileResult</type></li>
122*cdf0e10cSrcweir	<li><atom>any</atom></li>
123*cdf0e10cSrcweir	</ul>
124*cdf0e10cSrcweir
125*cdf0e10cSrcweir	<p>The sequences must contain arrays as described above for the
126*cdf0e10cSrcweir	parameter types.
127*cdf0e10cSrcweir	An <type>XVolatileResult</type> return value must contain an object
128*cdf0e10cSrcweir	implementing the <type>VolatileResult</type> service, that contains
129*cdf0e10cSrcweir	a volatile result. Subsequent calls with the same parameters must
130*cdf0e10cSrcweir	return the same object.
131*cdf0e10cSrcweir	An <atom>any</atom> return value can contain any of the other types.</p>
132*cdf0e10cSrcweir */
133*cdf0e10cSrcweirpublished service AddIn
134*cdf0e10cSrcweir{
135*cdf0e10cSrcweir	// ------------------------------------------------------------------------
136*cdf0e10cSrcweir
137*cdf0e10cSrcweir	/** contains a method that returns the service name of the add-in.
138*cdf0e10cSrcweir	 */
139*cdf0e10cSrcweir	interface com::sun::star::lang::XServiceName;
140*cdf0e10cSrcweir
141*cdf0e10cSrcweir	// ------------------------------------------------------------------------
142*cdf0e10cSrcweir
143*cdf0e10cSrcweir	/** provides access to function descriptions and localized names
144*cdf0e10cSrcweir		and descriptions.
145*cdf0e10cSrcweir 	 */
146*cdf0e10cSrcweir	interface com::sun::star::sheet::XAddIn;
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir	// ------------------------------------------------------------------------
149*cdf0e10cSrcweir
150*cdf0e10cSrcweir	/**	provides access to compatibility names for the functions.
151*cdf0e10cSrcweir	 */
152*cdf0e10cSrcweir	[optional] interface com::sun::star::sheet::XCompatibilityNames;
153*cdf0e10cSrcweir};
154*cdf0e10cSrcweir
155*cdf0e10cSrcweir//=============================================================================
156*cdf0e10cSrcweir
157*cdf0e10cSrcweir}; }; }; };
158*cdf0e10cSrcweir
159*cdf0e10cSrcweir#endif
160*cdf0e10cSrcweir
161