1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __com_sun_star_accessibility_XAccessibleEditableText_idl__
30 #define __com_sun_star_accessibility_XAccessibleEditableText_idl__
32 #include
<com
/sun
/star
/accessibility
/XAccessibleText.idl
>
33 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
34 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
36 module com
{ module sun
{ module star
{ module accessibility
{
38 /** Implement this interface to give read and write access to a text
41 <p>This interface is typically used in conjunction with the
42 <type>XAccessibleText</type> interface and extents it about the ability
43 to modify the text represented by that interface.</p>
47 published
interface XAccessibleEditableText
48 : ::com
::sun
::star
::accessibility
::XAccessibleText
50 /** Copies the text range into the clipboard.
52 <p>The specified text between and including the two given indices is
53 copied into the system clipboard and is deleted afterwards from the
54 text represented by this object. This is equivalent to calling
55 first <member>XAccessibleText::copyText</member> and then
56 <member>XAccessibleEditableText::deleteText</member> with the given
57 start and end indices.</p>
59 <p>The text indices are interpreted like those in the
60 <member>XAccessibleText::getTextRange</member> method. </p>
63 Start index of the text to moved into the clipboard.
64 The valid range is 0..length.
67 End index of the text to moved into the clipboard.
68 The valid range is 0..length.
71 Returns a flag that indicates whether the operation has been
72 executed successfully.
74 @throws ::com::sun::star::lang::IndexOutOfBoundsException
75 if the indices are invalid
77 boolean cutText
([in] long nStartIndex
, [in] long nEndIndex
)
78 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
80 /** Pastes text from the clipboard.
82 <p>The text in the system clipboard is pasted into the text
83 represented by this object at the given index. This method is
84 similar to the <member>XAccessibleEditableText::insertText</member>
85 method. If the index is not valid then the system clipboard text is
89 Index at which to insert the text from the system clipboard into
90 the text represented by this object.
91 The valid range is 0..length.
94 Returns a flag that indicates whether the operation has been
95 executed successfully.
97 @throws ::com::sun::star::lang::IndexOutOfBoundsException
98 if the index is invalid
100 boolean pasteText
([in] long nIndex
)
101 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
103 /** Deletes a range of text.
105 <p>The text between and including the two given indices is deleted
106 from the text represented by this object.</p>
108 <p>The text indices are interpreted like those in the
109 <member>XAccessibleText::getTextRange</member> method. </p>
112 Start index of the text to be deleted.
113 The valid range is 0..length.
116 End index of the text to be deleted.
117 The valid range is 0..length.
120 Returns a flag that indicates whether the operation has been
121 executed successfully.
123 @throws ::com::sun::star::lang::IndexOutOfBoundsException
124 if the indices are invalid
126 boolean deleteText
([in] long nStartIndex
, [in] long nEndIndex
)
127 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
129 /** Inserts text at the specified position.
131 <p>The specified string is inserted at the given index into the text
132 represented by this object.</p>
135 Text that is inserted.
138 Index at which to insert the text.
139 The valid range is 0..length.
142 Returns a flag that indicates whether the operation has been
143 executed successfully.
145 @throws ::com::sun::star::lang::IndexOutOfBoundsException
146 if the indices are invalid
148 boolean insertText
([in] string sText
, [in] long nIndex
)
149 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
153 <p>The text between the two given indices is replaced
154 by the specified replacement string. This method is
155 equivalent to calling first
156 <member>XAccessibleEditableText::deleteText</member> with the two
157 indices and afterwards calling
158 <member>XAccessibleEditableText::insertText</member> with the
159 replacement text and the start index.</p>
161 <p>The text indices are interpreted like those in the
162 <member>XAccessibleText::getTextRange</member> method. </p>
165 Start index of the text to be replaced.
166 The valid range is 0..length.
169 Start index of the text to be replaced.
170 The valid range is 0..length.
173 The Text that replaces the text between the given indices.
176 Returns a flag that indicates whether the operation has been
177 executed successfully.
179 @throws ::com::sun::star::lang::IndexOutOfBoundsException
180 if the indices are invalid
182 boolean replaceText
([in] long nStartIndex
, [in] long nEndIndex
,
183 [in] string sReplacement
)
184 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
186 /** Replaces the attributes of a text range by the given set of
189 <p>Sets the attributes for the text between and including the two
190 given indices to those given. The old attributes of this text
191 portion are replaced by the new list of attributes.</p>
193 <p>The text indices are interpreted like those in the
194 <member>XAccessibleText::getTextRange</member> method. </p>
197 Start index of the text whose attributes are modified.
198 The valid range is 0..length.
201 Start index of the text whose attributes are modified.
202 The valid range is 0..length.
205 Set of attributes that replaces the old list of attributes of
206 the specified text portion.
209 Returns a flag that indicates whether the operation has been
210 executed successfully.
212 @throws ::com::sun::star::lang::IndexOutOfBoundsException
213 if the indices are invalid
215 boolean setAttributes
([in] long nStartIndex
, [in] long nEndIndex
,
216 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributeSet
)
217 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
219 /** Replaces the whole text with the given text.
221 <p>The text content of this object is set to the given string.</p>
224 The new text that replaces the old text.
227 Returns a flag that indicates whether the operation has been
228 executed successfully.
230 boolean setText
([in] string sText
);
237 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */