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_accessibility_XAccessibleEditableText_idl__ 29#define __com_sun_star_accessibility_XAccessibleEditableText_idl__ 30 31#ifndef __com_sun_star_accessibility_XAccessibleText_idl__ 32#include <com/sun/star/accessibility/XAccessibleText.idl> 33#endif 34#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 35#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 36#endif 37#ifndef __com_sun_star_beans_PropertyValue_idl__ 38#include <com/sun/star/beans/PropertyValue.idl> 39#endif 40 41module com { module sun { module star { module accessibility { 42 43/** Implement this interface to give read and write access to a text 44 representation. 45 46 <p>This interface is typically used in conjunction with the 47 <type>XAccessibleText</type> interface and extents it about the ability 48 to modify the text represented by that interface.</p> 49 50 @since OOo 1.1.2 51*/ 52published interface XAccessibleEditableText 53 : ::com::sun::star::accessibility::XAccessibleText 54{ 55 /** Copies the text range into the clipboard. 56 57 <p>The specified text between and including the two given indices is 58 copied into the system clipboard and is deleted afterwards from the 59 text represented by this object. This is equivalent to calling 60 first <member>XAccessibleText::copyText</member> and then 61 <member>XAccessibleEditableText::deleteText</member> with the given 62 start and end indices.</p> 63 64 <p>The text indices are interpreted like those in the 65 <member>XAccessibleText::getTextRange</member> method. </p> 66 67 @param nStartIndex 68 Start index of the text to moved into the clipboard. 69 The valid range is 0..length. 70 71 @param nEndIndex 72 End index of the text to moved into the clipboard. 73 The valid range is 0..length. 74 75 @return 76 Returns a flag that indicates whether the operation has been 77 executed successfully. 78 79 @throws ::com::sun::star::lang::IndexOutOfBoundsException 80 if the indices are invalid 81 */ 82 boolean cutText ([in] long nStartIndex, [in] long nEndIndex) 83 raises (::com::sun::star::lang::IndexOutOfBoundsException); 84 85 /** Pastes text from the clipboard. 86 87 <p>The text in the system clipboard is pasted into the text 88 represented by this object at the given index. This method is 89 similar to the <member>XAccessibleEditableText::insertText</member> 90 method. If the index is not valid then the system clipboard text is 91 not inserted.</p> 92 93 @param nIndex 94 Index at which to insert the text from the system clipboard into 95 the text represented by this object. 96 The valid range is 0..length. 97 98 @return 99 Returns a flag that indicates whether the operation has been 100 executed successfully. 101 102 @throws ::com::sun::star::lang::IndexOutOfBoundsException 103 if the index is invalid 104 */ 105 boolean pasteText ([in] long nIndex) 106 raises (::com::sun::star::lang::IndexOutOfBoundsException); 107 108 /** Deletes a range of text. 109 110 <p>The text between and including the two given indices is deleted 111 from the text represented by this object.</p> 112 113 <p>The text indices are interpreted like those in the 114 <member>XAccessibleText::getTextRange</member> method. </p> 115 116 @param nStartIndex 117 Start index of the text to be deleted. 118 The valid range is 0..length. 119 120 @param nEndIndex 121 End index of the text to be deleted. 122 The valid range is 0..length. 123 124 @return 125 Returns a flag that indicates whether the operation has been 126 executed successfully. 127 128 @throws ::com::sun::star::lang::IndexOutOfBoundsException 129 if the indices are invalid 130 */ 131 boolean deleteText ([in] long nStartIndex, [in] long nEndIndex) 132 raises (::com::sun::star::lang::IndexOutOfBoundsException); 133 134 /** Inserts text at the specified position. 135 136 <p>The specified string is inserted at the given index into the text 137 represented by this object.</p> 138 139 @param sText 140 Text that is inserted. 141 142 @param nIndex 143 Index at which to insert the text. 144 The valid range is 0..length. 145 146 @return 147 Returns a flag that indicates whether the operation has been 148 executed successfully. 149 150 @throws ::com::sun::star::lang::IndexOutOfBoundsException 151 if the indices are invalid 152 */ 153 boolean insertText ([in] string sText, [in] long nIndex) 154 raises (::com::sun::star::lang::IndexOutOfBoundsException); 155 156 /** Replaces text. 157 158 <p>The text between the two given indices is replaced 159 by the specified replacement string. This method is 160 equivalent to calling first 161 <member>XAccessibleEditableText::deleteText</member> with the two 162 indices and afterwards calling 163 <member>XAccessibleEditableText::insertText</member> with the 164 replacement text and the start index.</p> 165 166 <p>The text indices are interpreted like those in the 167 <member>XAccessibleText::getTextRange</member> method. </p> 168 169 @param nStartIndex 170 Start index of the text to be replaced. 171 The valid range is 0..length. 172 173 @param nEndIndex 174 Start index of the text to be replaced. 175 The valid range is 0..length. 176 177 @param sReplacement 178 The Text that replaces the text between the given indices. 179 180 @return 181 Returns a flag that indicates whether the operation has been 182 executed successfully. 183 184 @throws ::com::sun::star::lang::IndexOutOfBoundsException 185 if the indices are invalid 186 */ 187 boolean replaceText ([in] long nStartIndex, [in] long nEndIndex, 188 [in] string sReplacement) 189 raises (::com::sun::star::lang::IndexOutOfBoundsException); 190 191 /** Replaces the attributes of a text range by the given set of 192 attributes. 193 194 <p>Sets the attributes for the text between and including the two 195 given indices to those given. The old attributes of this text 196 portion are replaced by the new list of attributes.</p> 197 198 <p>The text indices are interpreted like those in the 199 <member>XAccessibleText::getTextRange</member> method. </p> 200 201 @param nStartIndex 202 Start index of the text whose attributes are modified. 203 The valid range is 0..length. 204 205 @param nEndIndex 206 Start index of the text whose attributes are modified. 207 The valid range is 0..length. 208 209 @param aAttributeSet 210 Set of attributes that replaces the old list of attributes of 211 the specified text portion. 212 213 @return 214 Returns a flag that indicates whether the operation has been 215 executed successfully. 216 217 @throws ::com::sun::star::lang::IndexOutOfBoundsException 218 if the indices are invalid 219 */ 220 boolean setAttributes ([in] long nStartIndex, [in] long nEndIndex, 221 [in] sequence<::com::sun::star::beans::PropertyValue> aAttributeSet) 222 raises (::com::sun::star::lang::IndexOutOfBoundsException); 223 224 /** Replaces the whole text with the given text. 225 226 <p>The text content of this object is set to the given string.</p> 227 228 @param sText 229 The new text that replaces the old text. 230 231 @return 232 Returns a flag that indicates whether the operation has been 233 executed successfully. 234 */ 235 boolean setText ([in] string sText); 236}; 237 238}; }; }; }; 239 240#endif 241