xref: /AOO42X/main/offapi/com/sun/star/sheet/XSheetLinkable.idl (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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_XSheetLinkable_idl__
29#define __com_sun_star_sheet_XSheetLinkable_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_sheet_SheetLinkMode_idl__
36#include <com/sun/star/sheet/SheetLinkMode.idl>
37#endif
38
39//=============================================================================
40
41module com {  module sun {  module star {  module sheet {
42
43//=============================================================================
44
45/** enables a sheet to refer to another sheet in a different document.
46
47    <p>To insert a sheet link, the sheet used as linked sheet has to exist
48    already. The method <member>XSheetLinkable::link</member> creates a
49    <type>SheetLink</type> object in the document's <type>SheetLinks</type>
50    collection and links the sheet to the specified external sheet.</p>
51
52    @see com::sun::star::sheet::SheetLinks
53    @see com::sun::star::sheet::SheetLink
54
55    @deprecated
56 */
57published interface XSheetLinkable: com::sun::star::uno::XInterface
58{
59    //-------------------------------------------------------------------------
60
61    /** returns the link mode of the spreadsheet.
62
63        <p>If the returned value is <const>SheetLinkMode::NORMAL</const>,
64        formulas are copied. With <const>SheetLinkMode::VALUE</const>,
65        only results of formulas are used.</p>
66     */
67    com::sun::star::sheet::SheetLinkMode getLinkMode();
68
69    //-------------------------------------------------------------------------
70
71    /** enables the linking of the sheet and controls whether formulas
72        are copied.
73
74        @param nLinkMode
75            the value specifying the link mode for this spreadsheet.
76
77            <p>If the value is <const>SheetLinkMode::NORMAL</const>,
78            formulas are copied.  With <const>SheetLinkMode::VALUE</const>,
79            only results of formulas are used.</p>
80     */
81    void setLinkMode( [in] com::sun::star::sheet::SheetLinkMode nLinkMode );
82
83    //-------------------------------------------------------------------------
84
85    /** returns the target URL of the link.
86     */
87    string getLinkUrl();
88
89    //-------------------------------------------------------------------------
90
91    /** sets the target URL of the link.
92
93        <p>A <type>SheetLink</type> object with the same file name must
94        exist already or the link will not work.</p>
95     */
96    void setLinkUrl( [in] string aLinkUrl );
97
98    //-------------------------------------------------------------------------
99
100    /** returns the sheet name of the sheet in the source document.
101     */
102    string getLinkSheetName();
103
104    //-------------------------------------------------------------------------
105
106    /** sets the name of the linked sheet in the source document.
107
108        <p>This method sets the sheet name in the <type>SheetLink</type>
109        object, it does not modify the sheet name in the source document.</p>
110     */
111    void setLinkSheetName( [in] string aLinkSheetName );
112
113    //-------------------------------------------------------------------------
114
115    /** links the sheet to another sheet in another document.
116
117        <p>A <type>SheetLink</type> object is created if it does not exist,
118        and the link mode, the URL of the linked document and the linked
119        sheet name are set.</p>
120     */
121    void link( [in] string aUrl,
122             [in] string aSheetName,
123             [in] string aFilterName,
124             [in] string aFilterOptions,
125             [in] com::sun::star::sheet::SheetLinkMode nMode );
126
127};
128
129//=============================================================================
130
131}; }; }; };
132
133#endif
134
135