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_XExternalSheetCache_idl__
25#define __com_sun_star_sheet_XExternalSheetCache_idl__
26
27#include <com/sun/star/lang/IllegalArgumentException.idl>
28
29module com {  module sun {  module star {  module sheet {
30
31/** Primary interface for the <type scope="com::sun::star::sheet">ExternalSheetCache</type> service.
32
33    @see com::sun::star::sheet::ExternalSheetCache
34
35    @since OpenOffice 3.1
36 */
37interface XExternalSheetCache
38{
39    /** It sets a cached value for a specified cell position.  The value is expected
40        to be either of type <type>string</type> or of type <type>double</type>.  No
41        other data types are supported.
42
43        @param nRow row position (0-based)
44        @param nColumn column position (0-based)
45        @param aValue cell value to be cached
46     */
47    void setCellValue( [in] long nColumn, [in] long nRow, [in] any aValue )
48            raises (com::sun::star::lang::IllegalArgumentException);
49
50    /** It retrieves a cached value from a specified cell position.  The cached
51        value can be either <type>string</type> or <type>double</type>.
52
53        @return any cached cell value
54     */
55    any getCellValue( [in] long nColumn, [in] long nRow )
56            raises (com::sun::star::lang::IllegalArgumentException);
57
58    /** It returns a list of all row numbers where a cached cell or cells exist.
59        The row numbers are sorted in ascending order.
60
61        @return sequence<long> list of all row numbers with cached cell(s)
62     */
63    sequence< long > getAllRows();
64
65    /** Given a row number, this method returns a list of all columns numbers
66        that store cached cell values in that row.  The column numbers are
67        sorted in ascending order.
68
69        @return sequence<long> list of all columns numbers with cached cell values
70     */
71    sequence< long > getAllColumns( [in] long nRow )
72            raises (com::sun::star::lang::IllegalArgumentException);
73
74    //-------------------------------------------------------------------------
75
76    /** Index corresponding to this instance of an external sheet cache for
77        usage in formula tokens.
78
79        <p>This index to the external sheet cache is expected in the
80        <member>SingleReference::Sheet</member> member if it is part of an
81        external reference token.
82
83        <p>Each external sheet cache has a unique index value inside the
84        <type>ExternalDocLink</type> instance.</p>
85
86        @see FormulaToken
87        @see ExternalReference
88     */
89    [attribute, readonly] long TokenIndex;
90
91};
92
93}; }; }; };
94
95#endif
96