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_sheet_XFunctionAccess_idl__
25#define __com_sun_star_sheet_XFunctionAccess_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_container_NoSuchElementException_idl__
32#include <com/sun/star/container/NoSuchElementException.idl>
33#endif
34
35#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
36#include <com/sun/star/lang/IllegalArgumentException.idl>
37#endif
38
39//=============================================================================
40
41module com {  module sun {  module star {  module sheet {
42
43//=============================================================================
44
45/** allows generic access to all spreadsheet functions.
46
47	@see com::sun::star::sheet::FunctionAccess
48 */
49published interface XFunctionAccess: com::sun::star::uno::XInterface
50{
51	//-------------------------------------------------------------------------
52
53	/** calls a function and returns the result of the call.
54
55		@param aName
56		the (programmatic) name of the function.
57
58		@param aArguments
59		the arguments for the function call.
60		<p>Each element must be of one of the following types:</p>
61
62		<dl>
63		<dt><atom>long</atom> or <atom>double</atom></dt>
64		<dd>for a numeric value.</dd>
65
66		<dt><atom>string</atom></dt>
67		<dd>for a textual value.</dd>
68
69		<dt><atom>long[][]</atom> or <atom>double[][]</atom></dt>
70		<dd>for an array of numeric values.</dd>
71
72		<dt><atom>string[][]</atom></dt>
73		<dd>for an array of textual values.</dd>
74
75		<dt><atom>any[][]</atom></dt>
76		<dd>for a mixed array, where each element must be of <void/>,
77		<atom>long</atom>, <atom>double</atom> or <atom>string</atom>
78		type.</dd>
79
80		<dt><type scope="com::sun::star::table">XCellRange</type></dt>
81		<dd>for a <type>SheetCellRange</type> object that contains the
82		data.</dd>
83		</dl>
84
85		@returns
86			the result of the function call.
87
88			<p>Possible types for the result are:</p>
89
90			<dl>
91			<dt><void/></dt>
92			<dd>if no result is available.</dd>
93
94			<dt><atom>double</atom></dt>
95			<dd>for a numeric result.</dd>
96
97			<dt><atom>string</atom></dt>
98			<dd>for a textual result.</dd>
99
100			<dt><atom>any[][]</atom></dt>
101			<dd>for an array result, containing <atom>double</atom> and
102			<atom>string</atom> values.</dd>
103			</dl>
104
105		@throws <type scope="com::sun::star::container">NoSuchElementException</type>
106			if the named function does not exist.
107
108		@throws <type scope="com::sun::star::lang">IllegalArgumentException</type>
109			if the function can not be called with these arguments.
110	 */
111	any callFunction( [in] string aName, [in] sequence< any > aArguments )
112			raises( com::sun::star::container::NoSuchElementException,
113					com::sun::star::lang::IllegalArgumentException );
114};
115
116//=============================================================================
117
118}; }; }; };
119
120#endif
121
122