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_XMultiFormulaTokens_idl__
25#define __com_sun_star_sheet_XMultiFormulaTokens_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_sheet_FormulaToken_idl__
32#include <com/sun/star/sheet/FormulaToken.idl>
33#endif
34
35#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
36#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
37#endif
38
39//=============================================================================
40
41module com {  module sun {  module star {  module sheet {
42
43//=============================================================================
44
45/** gives access to multiple sets of formula tokens.
46
47    A service implementing this interface can internally set an arbitrary
48    number of formula token sequences. The number of allowed formula token
49    sequences must be returned by the
50    <member scope="com::sun::star::sheet">XMultiFormulaTokens::getCount</member>
51    method. When the client code tries to access formula tokens at index that
52    is outside the allowed index range, the implementation shall return an
53    <type scope="com::sun::star::lang">IndexOutOfBoundsException</member>.
54 */
55interface XMultiFormulaTokens
56{
57    //-------------------------------------------------------------------------
58
59    /** returns the formula at specified index as sequence of tokens.
60
61        @throws IndexOutOfBoundsException
62            If the given index lies not in the valid range then an
63            <type scope="com::sun::star::lang">IndexOutOfBoundsException</type>
64            exception is thrown.
65     */
66    sequence< FormulaToken > getTokens( [in] long nIndex )
67        raises (::com::sun::star::lang::IndexOutOfBoundsException);
68
69    //-------------------------------------------------------------------------
70
71    /** sets the formula at specified index as sequence of tokens.
72
73        @throws IndexOutOfBoundsException
74            If the given index lies not in the valid range then an
75            <type scope="com::sun::star::lang">IndexOutOfBoundsException</type>
76            exception is thrown.
77     */
78    void setTokens( [in] long nIndex, [in] sequence< FormulaToken > aTokens )
79        raises (::com::sun::star::lang::IndexOutOfBoundsException);
80
81    //-------------------------------------------------------------------------
82
83    /** returns the number of formulas allowed in this formula token set.
84
85       @return the number of formulas the implementation supports.
86     */
87    long getCount();
88};
89
90//=============================================================================
91
92}; }; }; };
93
94#endif
95
96