1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_accessibility_XAccessibleEditableText_idl__
29 #define __com_sun_star_accessibility_XAccessibleEditableText_idl__
31 #ifndef __com_sun_star_accessibility_XAccessibleText_idl__
32 #include
<com
/sun
/star
/accessibility
/XAccessibleText.idl
>
34 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
35 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
37 #ifndef __com_sun_star_beans_PropertyValue_idl__
38 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
41 module com
{ module sun
{ module star
{ module accessibility
{
43 /** Implement this interface to give read and write access to a text
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>
52 published
interface XAccessibleEditableText
53 : ::com
::sun
::star
::accessibility
::XAccessibleText
55 /** Copies the text range into the clipboard.
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>
64 <p>The text indices are interpreted like those in the
65 <member>XAccessibleText::getTextRange</member> method. </p>
68 Start index of the text to moved into the clipboard.
69 The valid range is 0..length.
72 End index of the text to moved into the clipboard.
73 The valid range is 0..length.
76 Returns a flag that indicates whether the operation has been
77 executed successfully.
79 @throws ::com::sun::star::lang::IndexOutOfBoundsException
80 if the indices are invalid
82 boolean cutText
([in] long nStartIndex
, [in] long nEndIndex
)
83 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
85 /** Pastes text from the clipboard.
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
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.
99 Returns a flag that indicates whether the operation has been
100 executed successfully.
102 @throws ::com::sun::star::lang::IndexOutOfBoundsException
103 if the index is invalid
105 boolean pasteText
([in] long nIndex
)
106 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
108 /** Deletes a range of text.
110 <p>The text between and including the two given indices is deleted
111 from the text represented by this object.</p>
113 <p>The text indices are interpreted like those in the
114 <member>XAccessibleText::getTextRange</member> method. </p>
117 Start index of the text to be deleted.
118 The valid range is 0..length.
121 End index of the text to be deleted.
122 The valid range is 0..length.
125 Returns a flag that indicates whether the operation has been
126 executed successfully.
128 @throws ::com::sun::star::lang::IndexOutOfBoundsException
129 if the indices are invalid
131 boolean deleteText
([in] long nStartIndex
, [in] long nEndIndex
)
132 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
134 /** Inserts text at the specified position.
136 <p>The specified string is inserted at the given index into the text
137 represented by this object.</p>
140 Text that is inserted.
143 Index at which to insert the text.
144 The valid range is 0..length.
147 Returns a flag that indicates whether the operation has been
148 executed successfully.
150 @throws ::com::sun::star::lang::IndexOutOfBoundsException
151 if the indices are invalid
153 boolean insertText
([in] string sText
, [in] long nIndex
)
154 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
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>
166 <p>The text indices are interpreted like those in the
167 <member>XAccessibleText::getTextRange</member> method. </p>
170 Start index of the text to be replaced.
171 The valid range is 0..length.
174 Start index of the text to be replaced.
175 The valid range is 0..length.
178 The Text that replaces the text between the given indices.
181 Returns a flag that indicates whether the operation has been
182 executed successfully.
184 @throws ::com::sun::star::lang::IndexOutOfBoundsException
185 if the indices are invalid
187 boolean replaceText
([in] long nStartIndex
, [in] long nEndIndex
,
188 [in] string sReplacement
)
189 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
191 /** Replaces the attributes of a text range by the given set of
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>
198 <p>The text indices are interpreted like those in the
199 <member>XAccessibleText::getTextRange</member> method. </p>
202 Start index of the text whose attributes are modified.
203 The valid range is 0..length.
206 Start index of the text whose attributes are modified.
207 The valid range is 0..length.
210 Set of attributes that replaces the old list of attributes of
211 the specified text portion.
214 Returns a flag that indicates whether the operation has been
215 executed successfully.
217 @throws ::com::sun::star::lang::IndexOutOfBoundsException
218 if the indices are invalid
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
);
224 /** Replaces the whole text with the given text.
226 <p>The text content of this object is set to the given string.</p>
229 The new text that replaces the old text.
232 Returns a flag that indicates whether the operation has been
233 executed successfully.
235 boolean setText
([in] string sText
);