merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / sheet / AddIn.idl
blob8f76f268416e413a49e05afa840e31f89368855d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_sheet_AddIn_idl__
29 #define __com_sun_star_sheet_AddIn_idl__
31 #ifndef __com_sun_star_lang_XServiceName_idl__
32 #include <com/sun/star/lang/XServiceName.idl>
33 #endif
35 #ifndef __com_sun_star_sheet_XAddIn_idl__
36 #include <com/sun/star/sheet/XAddIn.idl>
37 #endif
39 #ifndef __com_sun_star_sheet_XCompatibilityNames_idl__
40 #include <com/sun/star/sheet/XCompatibilityNames.idl>
41 #endif
43 //=============================================================================
45 module com { module sun { module star { module sheet {
47 //=============================================================================
49 /** is the base for AddIn services that supply functions which can be called
50 by other components.
52 <p>Any AddIn implementation must implement a service describing its
53 specific set of functions.
54 That service must contain the <type>AddIn</type> service, and the
55 functions that are implemented, in one or more interfaces.
56 The <type scope="com::sun::star::lang">XServiceName</type> interface
57 must describe that service, and the <type>XAddIn</type> interface
58 must describe the individual functions.</p>
60 <p>Each AddIn function can take parameters of the following types:</p>
62 <dl>
63 <dt><atom>long</atom></dt>
64 <dd>for integer values.</dd>
66 <dt><atom>double</atom></dt>
67 <dd>for floating point values.</dd>
69 <dt><atom>string</atom></dt>
70 <dd>for text strings.</dd>
72 <dt><atom>long[][]</atom></dt>
73 <dd>for (two-dimensional) arrays of integer values.</dd>
75 <dt><atom>double[][]</atom></dt>
76 <dd>for (two-dimensional) arrays of floating point values.</dd>
78 <dt><atom>string[][]</atom></dt>
79 <dd>for (two-dimensional) arrays of text strings.</dd>
81 <dt><atom>any[][]</atom></dt>
82 <dd>for (two-dimensional) arrays of mixed contents. Each <atom>any</atom>
83 will contain a <atom>double</atom> or a <atom>string</atom>, depending on
84 the data.</dd>
86 <dt><atom>any</atom></dt>
87 <dd>Depending on the data, a <atom>double</atom>, a <atom>string</atom>,
88 or an <atom>any[][]</atom> will be passed. If no argument is specified in
89 the function call, <void/> will be passed. This allows for optional
90 parameters.</dd>
92 <dt><type scope="com::sun::star::table">XCellRange</type></dt>
93 <dd>for a <type scope="com::sun::star::table">XCellRange</type> interface
94 to the source data.</dd>
96 <dt><type scope="com::sun::star::beans">XPropertySet</type></dt>
97 <dd>for a <type scope="com::sun::star::beans">XPropertySet</type>
98 interface to the <type>SpreadsheetDocument</type> making the function
99 call. Only one parameter of this type is allowed in each function. It
100 can be used to query document settings like
101 <member>SpreadsheetDocumentSettings::NullDate</member>.</dd>
103 <dt><atom>any[]</atom></dt>
104 <dd>for varying parameters. Only the last parameter of a function may
105 have this type. It will be filled with the remaining arguments of the
106 function call that were not used for the previous parameters. Each
107 element of the sequence will be filled as in the case of <atom>any</atom>
108 above.</dd>
109 </dl>
111 <p>Each AddIn function must have one of the following return types:</p>
113 <ul>
114 <li><atom>long</atom></li>
115 <li><atom>double</atom></li>
116 <li><atom>string</atom></li>
117 <li><atom>long[][]</atom></li>
118 <li><atom>double[][]</atom></li>
119 <li><atom>string[][]</atom></li>
120 <li><atom>any[][]</atom></li>
121 <li><type>XVolatileResult</type></li>
122 <li><atom>any</atom></li>
123 </ul>
125 <p>The sequences must contain arrays as described above for the
126 parameter types.
127 An <type>XVolatileResult</type> return value must contain an object
128 implementing the <type>VolatileResult</type> service, that contains
129 a volatile result. Subsequent calls with the same parameters must
130 return the same object.
131 An <atom>any</atom> return value can contain any of the other types.</p>
133 published service AddIn
135 // ------------------------------------------------------------------------
137 /** contains a method that returns the service name of the add-in.
139 interface com::sun::star::lang::XServiceName;
141 // ------------------------------------------------------------------------
143 /** provides access to function descriptions and localized names
144 and descriptions.
146 interface com::sun::star::sheet::XAddIn;
148 // ------------------------------------------------------------------------
150 /** provides access to compatibility names for the functions.
152 [optional] interface com::sun::star::sheet::XCompatibilityNames;
155 //=============================================================================
157 }; }; }; };
159 #endif