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_XExternalDocLink_idl__
29#define __com_sun_star_sheet_XExternalDocLink_idl__
30
31#include <com/sun/star/container/XEnumerationAccess.idl>
32#include <com/sun/star/container/XIndexAccess.idl>
33#include <com/sun/star/container/XNameAccess.idl>
34#include <com/sun/star/sheet/XExternalSheetCache.idl>
35
36module com {  module sun {  module star {  module sheet {
37
38//=============================================================================
39
40/** Primary interface for the <type scope="com::sun::star::sheet">ExternalDocLink</type> service.
41
42    @see com::sun::star::sheet::ExternalDocLink
43
44    @since OOo 3.1
45 */
46interface XExternalDocLink
47{
48    interface com::sun::star::container::XNameAccess;
49    interface com::sun::star::container::XIndexAccess;
50    interface com::sun::star::container::XEnumerationAccess;
51
52    //-------------------------------------------------------------------------
53
54    /** <p>This method adds a new sheet cache instance to the external document
55        link for a specified sheet name.  If a sheet cache instance already
56        exists for the specified name, then the existing instance is returned.</p>
57
58        <p>Note that a sheet name lookup is performed in a case-insensitive
59        fashion.</p>
60
61        @param aSheetName sheet name
62
63        @param DynamicCache specify whether or not the cache can grow when
64        non-cached regions are queried.  If <true/>, querying a non-cached
65        cell in this sheet cache will allow Calc to try to access the source
66        document to fetch the value in first access.  If <false/>, the source
67        document will not be accessed, and the non-cached regions are treated
68        as empty cells.
69
70        @return com::sun::star::sheet::XExternalSheetCache sheet cache instance
71     */
72    com::sun::star::sheet::XExternalSheetCache addSheetCache( [in] string aSheetName, [in] boolean DynamicCache );
73
74    //-------------------------------------------------------------------------
75
76    /** Index corresponding to the external document link.
77
78        <p>This index value corresponds with the external document
79        represented by an instance of
80        <type scope="com::sun::star::sheet">ExternalDocLink</type>.  This
81        value is stored within a formula token instance.</p>
82
83        <p>Each external document cache instance has a unique index value, and this
84        index value can be used to retrieve the corresponding external document cache
85        from the parent <type scope="com::sun::star::sheet">ExternalDocLinks</type> instance.</p>
86
87        @see com::sun::star::sheet::ExternalDocLinks
88        @see com::sun::star::sheet::FormulaToken
89        @see com::sun::star::sheet::ExternalReference
90     */
91    [attribute, readonly] long TokenIndex;
92};
93
94//=============================================================================
95
96}; }; }; };
97
98#endif
99