1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleEditableText_idl__ 29*cdf0e10cSrcweir#define __com_sun_star_accessibility_XAccessibleEditableText_idl__ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleText_idl__ 32*cdf0e10cSrcweir#include <com/sun/star/accessibility/XAccessibleText.idl> 33*cdf0e10cSrcweir#endif 34*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 35*cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 36*cdf0e10cSrcweir#endif 37*cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__ 38*cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl> 39*cdf0e10cSrcweir#endif 40*cdf0e10cSrcweir 41*cdf0e10cSrcweirmodule com { module sun { module star { module accessibility { 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir/** Implement this interface to give read and write access to a text 44*cdf0e10cSrcweir representation. 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir <p>This interface is typically used in conjunction with the 47*cdf0e10cSrcweir <type>XAccessibleText</type> interface and extents it about the ability 48*cdf0e10cSrcweir to modify the text represented by that interface.</p> 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir @since OOo 1.1.2 51*cdf0e10cSrcweir*/ 52*cdf0e10cSrcweirpublished interface XAccessibleEditableText 53*cdf0e10cSrcweir : ::com::sun::star::accessibility::XAccessibleText 54*cdf0e10cSrcweir{ 55*cdf0e10cSrcweir /** Copies the text range into the clipboard. 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir <p>The specified text between and including the two given indices is 58*cdf0e10cSrcweir copied into the system clipboard and is deleted afterwards from the 59*cdf0e10cSrcweir text represented by this object. This is equivalent to calling 60*cdf0e10cSrcweir first <member>XAccessibleText::copyText</member> and then 61*cdf0e10cSrcweir <member>XAccessibleEditableText::deleteText</member> with the given 62*cdf0e10cSrcweir start and end indices.</p> 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir <p>The text indices are interpreted like those in the 65*cdf0e10cSrcweir <member>XAccessibleText::getTextRange</member> method. </p> 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir @param nStartIndex 68*cdf0e10cSrcweir Start index of the text to moved into the clipboard. 69*cdf0e10cSrcweir The valid range is 0..length. 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir @param nEndIndex 72*cdf0e10cSrcweir End index of the text to moved into the clipboard. 73*cdf0e10cSrcweir The valid range is 0..length. 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir @return 76*cdf0e10cSrcweir Returns a flag that indicates whether the operation has been 77*cdf0e10cSrcweir executed successfully. 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 80*cdf0e10cSrcweir if the indices are invalid 81*cdf0e10cSrcweir */ 82*cdf0e10cSrcweir boolean cutText ([in] long nStartIndex, [in] long nEndIndex) 83*cdf0e10cSrcweir raises (::com::sun::star::lang::IndexOutOfBoundsException); 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir /** Pastes text from the clipboard. 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir <p>The text in the system clipboard is pasted into the text 88*cdf0e10cSrcweir represented by this object at the given index. This method is 89*cdf0e10cSrcweir similar to the <member>XAccessibleEditableText::insertText</member> 90*cdf0e10cSrcweir method. If the index is not valid then the system clipboard text is 91*cdf0e10cSrcweir not inserted.</p> 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir @param nIndex 94*cdf0e10cSrcweir Index at which to insert the text from the system clipboard into 95*cdf0e10cSrcweir the text represented by this object. 96*cdf0e10cSrcweir The valid range is 0..length. 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir @return 99*cdf0e10cSrcweir Returns a flag that indicates whether the operation has been 100*cdf0e10cSrcweir executed successfully. 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 103*cdf0e10cSrcweir if the index is invalid 104*cdf0e10cSrcweir */ 105*cdf0e10cSrcweir boolean pasteText ([in] long nIndex) 106*cdf0e10cSrcweir raises (::com::sun::star::lang::IndexOutOfBoundsException); 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir /** Deletes a range of text. 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir <p>The text between and including the two given indices is deleted 111*cdf0e10cSrcweir from the text represented by this object.</p> 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir <p>The text indices are interpreted like those in the 114*cdf0e10cSrcweir <member>XAccessibleText::getTextRange</member> method. </p> 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir @param nStartIndex 117*cdf0e10cSrcweir Start index of the text to be deleted. 118*cdf0e10cSrcweir The valid range is 0..length. 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir @param nEndIndex 121*cdf0e10cSrcweir End index of the text to be deleted. 122*cdf0e10cSrcweir The valid range is 0..length. 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir @return 125*cdf0e10cSrcweir Returns a flag that indicates whether the operation has been 126*cdf0e10cSrcweir executed successfully. 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 129*cdf0e10cSrcweir if the indices are invalid 130*cdf0e10cSrcweir */ 131*cdf0e10cSrcweir boolean deleteText ([in] long nStartIndex, [in] long nEndIndex) 132*cdf0e10cSrcweir raises (::com::sun::star::lang::IndexOutOfBoundsException); 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir /** Inserts text at the specified position. 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir <p>The specified string is inserted at the given index into the text 137*cdf0e10cSrcweir represented by this object.</p> 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir @param sText 140*cdf0e10cSrcweir Text that is inserted. 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir @param nIndex 143*cdf0e10cSrcweir Index at which to insert the text. 144*cdf0e10cSrcweir The valid range is 0..length. 145*cdf0e10cSrcweir 146*cdf0e10cSrcweir @return 147*cdf0e10cSrcweir Returns a flag that indicates whether the operation has been 148*cdf0e10cSrcweir executed successfully. 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 151*cdf0e10cSrcweir if the indices are invalid 152*cdf0e10cSrcweir */ 153*cdf0e10cSrcweir boolean insertText ([in] string sText, [in] long nIndex) 154*cdf0e10cSrcweir raises (::com::sun::star::lang::IndexOutOfBoundsException); 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir /** Replaces text. 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir <p>The text between the two given indices is replaced 159*cdf0e10cSrcweir by the specified replacement string. This method is 160*cdf0e10cSrcweir equivalent to calling first 161*cdf0e10cSrcweir <member>XAccessibleEditableText::deleteText</member> with the two 162*cdf0e10cSrcweir indices and afterwards calling 163*cdf0e10cSrcweir <member>XAccessibleEditableText::insertText</member> with the 164*cdf0e10cSrcweir replacement text and the start index.</p> 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir <p>The text indices are interpreted like those in the 167*cdf0e10cSrcweir <member>XAccessibleText::getTextRange</member> method. </p> 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir @param nStartIndex 170*cdf0e10cSrcweir Start index of the text to be replaced. 171*cdf0e10cSrcweir The valid range is 0..length. 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir @param nEndIndex 174*cdf0e10cSrcweir Start index of the text to be replaced. 175*cdf0e10cSrcweir The valid range is 0..length. 176*cdf0e10cSrcweir 177*cdf0e10cSrcweir @param sReplacement 178*cdf0e10cSrcweir The Text that replaces the text between the given indices. 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir @return 181*cdf0e10cSrcweir Returns a flag that indicates whether the operation has been 182*cdf0e10cSrcweir executed successfully. 183*cdf0e10cSrcweir 184*cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 185*cdf0e10cSrcweir if the indices are invalid 186*cdf0e10cSrcweir */ 187*cdf0e10cSrcweir boolean replaceText ([in] long nStartIndex, [in] long nEndIndex, 188*cdf0e10cSrcweir [in] string sReplacement) 189*cdf0e10cSrcweir raises (::com::sun::star::lang::IndexOutOfBoundsException); 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir /** Replaces the attributes of a text range by the given set of 192*cdf0e10cSrcweir attributes. 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir <p>Sets the attributes for the text between and including the two 195*cdf0e10cSrcweir given indices to those given. The old attributes of this text 196*cdf0e10cSrcweir portion are replaced by the new list of attributes.</p> 197*cdf0e10cSrcweir 198*cdf0e10cSrcweir <p>The text indices are interpreted like those in the 199*cdf0e10cSrcweir <member>XAccessibleText::getTextRange</member> method. </p> 200*cdf0e10cSrcweir 201*cdf0e10cSrcweir @param nStartIndex 202*cdf0e10cSrcweir Start index of the text whose attributes are modified. 203*cdf0e10cSrcweir The valid range is 0..length. 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir @param nEndIndex 206*cdf0e10cSrcweir Start index of the text whose attributes are modified. 207*cdf0e10cSrcweir The valid range is 0..length. 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir @param aAttributeSet 210*cdf0e10cSrcweir Set of attributes that replaces the old list of attributes of 211*cdf0e10cSrcweir the specified text portion. 212*cdf0e10cSrcweir 213*cdf0e10cSrcweir @return 214*cdf0e10cSrcweir Returns a flag that indicates whether the operation has been 215*cdf0e10cSrcweir executed successfully. 216*cdf0e10cSrcweir 217*cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 218*cdf0e10cSrcweir if the indices are invalid 219*cdf0e10cSrcweir */ 220*cdf0e10cSrcweir boolean setAttributes ([in] long nStartIndex, [in] long nEndIndex, 221*cdf0e10cSrcweir [in] sequence<::com::sun::star::beans::PropertyValue> aAttributeSet) 222*cdf0e10cSrcweir raises (::com::sun::star::lang::IndexOutOfBoundsException); 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir /** Replaces the whole text with the given text. 225*cdf0e10cSrcweir 226*cdf0e10cSrcweir <p>The text content of this object is set to the given string.</p> 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir @param sText 229*cdf0e10cSrcweir The new text that replaces the old text. 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir @return 232*cdf0e10cSrcweir Returns a flag that indicates whether the operation has been 233*cdf0e10cSrcweir executed successfully. 234*cdf0e10cSrcweir */ 235*cdf0e10cSrcweir boolean setText ([in] string sText); 236*cdf0e10cSrcweir}; 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir}; }; }; }; 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir#endif 241