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