1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AddIn.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_sheet_AddIn_idl__
32 #define __com_sun_star_sheet_AddIn_idl__
34 #ifndef __com_sun_star_lang_XServiceName_idl__
35 #include
<com
/sun
/star
/lang
/XServiceName.idl
>
38 #ifndef __com_sun_star_sheet_XAddIn_idl__
39 #include
<com
/sun
/star
/sheet
/XAddIn.idl
>
42 #ifndef __com_sun_star_sheet_XCompatibilityNames_idl__
43 #include
<com
/sun
/star
/sheet
/XCompatibilityNames.idl
>
46 //=============================================================================
48 module com
{ module sun
{ module star
{ module sheet
{
50 //=============================================================================
52 /** is the base for AddIn services that supply functions which can be called
55 <p>Any AddIn implementation must implement a service describing its
56 specific set of functions.
57 That service must contain the <type>AddIn</type> service, and the
58 functions that are implemented, in one or more interfaces.
59 The <type scope="com::sun::star::lang">XServiceName</type> interface
60 must describe that service, and the <type>XAddIn</type> interface
61 must describe the individual functions.</p>
63 <p>Each AddIn function can take parameters of the following types:</p>
66 <dt><atom>long</atom></dt>
67 <dd>for integer values.</dd>
69 <dt><atom>double</atom></dt>
70 <dd>for floating point values.</dd>
72 <dt><atom>string</atom></dt>
73 <dd>for text strings.</dd>
75 <dt><atom>long[][]</atom></dt>
76 <dd>for (two-dimensional) arrays of integer values.</dd>
78 <dt><atom>double[][]</atom></dt>
79 <dd>for (two-dimensional) arrays of floating point values.</dd>
81 <dt><atom>string[][]</atom></dt>
82 <dd>for (two-dimensional) arrays of text strings.</dd>
84 <dt><atom>any[][]</atom></dt>
85 <dd>for (two-dimensional) arrays of mixed contents. Each <atom>any</atom>
86 will contain a <atom>double</atom> or a <atom>string</atom>, depending on
89 <dt><atom>any</atom></dt>
90 <dd>Depending on the data, a <atom>double</atom>, a <atom>string</atom>,
91 or an <atom>any[][]</atom> will be passed. If no argument is specified in
92 the function call, <void/> will be passed. This allows for optional
95 <dt><type scope="com::sun::star::table">XCellRange</type></dt>
96 <dd>for a <type scope="com::sun::star::table">XCellRange</type> interface
97 to the source data.</dd>
99 <dt><type scope="com::sun::star::beans">XPropertySet</type></dt>
100 <dd>for a <type scope="com::sun::star::beans">XPropertySet</type>
101 interface to the <type>SpreadsheetDocument</type> making the function
102 call. Only one parameter of this type is allowed in each function. It
103 can be used to query document settings like
104 <member>SpreadsheetDocumentSettings::NullDate</member>.</dd>
106 <dt><atom>any[]</atom></dt>
107 <dd>for varying parameters. Only the last parameter of a function may
108 have this type. It will be filled with the remaining arguments of the
109 function call that were not used for the previous parameters. Each
110 element of the sequence will be filled as in the case of <atom>any</atom>
114 <p>Each AddIn function must have one of the following return types:</p>
117 <li><atom>long</atom></li>
118 <li><atom>double</atom></li>
119 <li><atom>string</atom></li>
120 <li><atom>long[][]</atom></li>
121 <li><atom>double[][]</atom></li>
122 <li><atom>string[][]</atom></li>
123 <li><atom>any[][]</atom></li>
124 <li><type>XVolatileResult</type></li>
125 <li><atom>any</atom></li>
128 <p>The sequences must contain arrays as described above for the
130 An <type>XVolatileResult</type> return value must contain an object
131 implementing the <type>VolatileResult</type> service, that contains
132 a volatile result. Subsequent calls with the same parameters must
133 return the same object.
134 An <atom>any</atom> return value can contain any of the other types.</p>
136 published service AddIn
138 // ------------------------------------------------------------------------
140 /** contains a method that returns the service name of the add-in.
142 interface com
::sun
::star
::lang
::XServiceName
;
144 // ------------------------------------------------------------------------
146 /** provides access to function descriptions and localized names
149 interface com
::sun
::star
::sheet
::XAddIn
;
151 // ------------------------------------------------------------------------
153 /** provides access to compatibility names for the functions.
155 [optional] interface com
::sun
::star
::sheet
::XCompatibilityNames
;
158 //=============================================================================