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