1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleEditableText_idl__
25cdf0e10cSrcweir#define __com_sun_star_accessibility_XAccessibleEditableText_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_XAccessibleText_idl__
28cdf0e10cSrcweir#include <com/sun/star/accessibility/XAccessibleText.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
31cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__
34cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl>
35cdf0e10cSrcweir#endif
36cdf0e10cSrcweir
37cdf0e10cSrcweirmodule com { module sun { module star { module accessibility {
38cdf0e10cSrcweir
39cdf0e10cSrcweir/** Implement this interface to give read and write access to a text
40cdf0e10cSrcweir    representation.
41cdf0e10cSrcweir
42cdf0e10cSrcweir    <p>This interface is typically used in conjunction with the
43cdf0e10cSrcweir    <type>XAccessibleText</type> interface and extents it about the ability
44cdf0e10cSrcweir    to modify the text represented by that interface.</p>
45cdf0e10cSrcweir
46*0d3a54ffSJürgen Schmidt    @since OpenOffice 1.1.2
47cdf0e10cSrcweir*/
48cdf0e10cSrcweirpublished interface XAccessibleEditableText
49cdf0e10cSrcweir    : ::com::sun::star::accessibility::XAccessibleText
50cdf0e10cSrcweir{
51cdf0e10cSrcweir    /** Copies the text range into the clipboard.
52cdf0e10cSrcweir
53cdf0e10cSrcweir        <p>The specified text between and including the two given indices is
54cdf0e10cSrcweir        copied into the system clipboard and is deleted afterwards from the
55cdf0e10cSrcweir        text represented by this object.  This is equivalent to calling
56cdf0e10cSrcweir        first <member>XAccessibleText::copyText</member> and then
57cdf0e10cSrcweir        <member>XAccessibleEditableText::deleteText</member> with the given
58cdf0e10cSrcweir        start and end indices.</p>
59cdf0e10cSrcweir
60cdf0e10cSrcweir        <p>The text indices are interpreted like those in the
61cdf0e10cSrcweir        <member>XAccessibleText::getTextRange</member> method. </p>
62cdf0e10cSrcweir
63cdf0e10cSrcweir        @param nStartIndex
64cdf0e10cSrcweir            Start index of the text to moved into the clipboard.
65cdf0e10cSrcweir            The valid range is 0..length.
66cdf0e10cSrcweir
67cdf0e10cSrcweir        @param nEndIndex
68cdf0e10cSrcweir            End index of the text to moved into the clipboard.
69cdf0e10cSrcweir            The valid range is 0..length.
70cdf0e10cSrcweir
71cdf0e10cSrcweir        @return
72cdf0e10cSrcweir            Returns a flag that indicates whether the operation has been
73cdf0e10cSrcweir            executed successfully.
74cdf0e10cSrcweir
75cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
76cdf0e10cSrcweir            if the indices are invalid
77cdf0e10cSrcweir    */
78cdf0e10cSrcweir    boolean cutText ([in] long nStartIndex, [in] long nEndIndex)
79cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
80cdf0e10cSrcweir
81cdf0e10cSrcweir    /** Pastes text from the clipboard.
82cdf0e10cSrcweir
83cdf0e10cSrcweir        <p>The text in the system clipboard is pasted into the text
84cdf0e10cSrcweir        represented by this object at the given index.  This method is
85cdf0e10cSrcweir        similar to the <member>XAccessibleEditableText::insertText</member>
86cdf0e10cSrcweir        method.  If the index is not valid then the system clipboard text is
87cdf0e10cSrcweir        not inserted.</p>
88cdf0e10cSrcweir
89cdf0e10cSrcweir        @param nIndex
90cdf0e10cSrcweir            Index at which to insert the text from the system clipboard into
91cdf0e10cSrcweir            the text represented by this object.
92cdf0e10cSrcweir            The valid range is 0..length.
93cdf0e10cSrcweir
94cdf0e10cSrcweir        @return
95cdf0e10cSrcweir            Returns a flag that indicates whether the operation has been
96cdf0e10cSrcweir            executed successfully.
97cdf0e10cSrcweir
98cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
99cdf0e10cSrcweir            if the index is invalid
100cdf0e10cSrcweir    */
101cdf0e10cSrcweir    boolean pasteText ([in] long nIndex)
102cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
103cdf0e10cSrcweir
104cdf0e10cSrcweir    /** Deletes a range of text.
105cdf0e10cSrcweir
106cdf0e10cSrcweir        <p>The text between and including the two given indices is deleted
107cdf0e10cSrcweir        from the text represented by this object.</p>
108cdf0e10cSrcweir
109cdf0e10cSrcweir        <p>The text indices are interpreted like those in the
110cdf0e10cSrcweir        <member>XAccessibleText::getTextRange</member> method. </p>
111cdf0e10cSrcweir
112cdf0e10cSrcweir        @param nStartIndex
113cdf0e10cSrcweir            Start index of the text to be deleted.
114cdf0e10cSrcweir            The valid range is 0..length.
115cdf0e10cSrcweir
116cdf0e10cSrcweir        @param nEndIndex
117cdf0e10cSrcweir            End index of the text to be deleted.
118cdf0e10cSrcweir            The valid range is 0..length.
119cdf0e10cSrcweir
120cdf0e10cSrcweir        @return
121cdf0e10cSrcweir            Returns a flag that indicates whether the operation has been
122cdf0e10cSrcweir            executed successfully.
123cdf0e10cSrcweir
124cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
125cdf0e10cSrcweir            if the indices are invalid
126cdf0e10cSrcweir    */
127cdf0e10cSrcweir    boolean deleteText ([in] long nStartIndex, [in] long nEndIndex)
128cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
129cdf0e10cSrcweir
130cdf0e10cSrcweir    /** Inserts text at the specified position.
131cdf0e10cSrcweir
132cdf0e10cSrcweir        <p>The specified string is inserted at the given index into the text
133cdf0e10cSrcweir        represented by this object.</p>
134cdf0e10cSrcweir
135cdf0e10cSrcweir        @param sText
136cdf0e10cSrcweir            Text that is inserted.
137cdf0e10cSrcweir
138cdf0e10cSrcweir        @param nIndex
139cdf0e10cSrcweir            Index at which to insert the text.
140cdf0e10cSrcweir            The valid range is 0..length.
141cdf0e10cSrcweir
142cdf0e10cSrcweir        @return
143cdf0e10cSrcweir            Returns a flag that indicates whether the operation has been
144cdf0e10cSrcweir            executed successfully.
145cdf0e10cSrcweir
146cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
147cdf0e10cSrcweir            if the indices are invalid
148cdf0e10cSrcweir    */
149cdf0e10cSrcweir    boolean insertText ([in] string sText, [in] long nIndex)
150cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
151cdf0e10cSrcweir
152cdf0e10cSrcweir    /** Replaces text.
153cdf0e10cSrcweir
154cdf0e10cSrcweir        <p>The text between the two given indices is replaced
155cdf0e10cSrcweir        by the specified replacement string. This method is
156cdf0e10cSrcweir        equivalent to calling first
157cdf0e10cSrcweir        <member>XAccessibleEditableText::deleteText</member> with the two
158cdf0e10cSrcweir        indices and afterwards calling
159cdf0e10cSrcweir        <member>XAccessibleEditableText::insertText</member> with the
160cdf0e10cSrcweir        replacement text and the start index.</p>
161cdf0e10cSrcweir
162cdf0e10cSrcweir        <p>The text indices are interpreted like those in the
163cdf0e10cSrcweir        <member>XAccessibleText::getTextRange</member> method. </p>
164cdf0e10cSrcweir
165cdf0e10cSrcweir        @param nStartIndex
166cdf0e10cSrcweir            Start index of the text to be replaced.
167cdf0e10cSrcweir            The valid range is 0..length.
168cdf0e10cSrcweir
169cdf0e10cSrcweir        @param nEndIndex
170cdf0e10cSrcweir            Start index of the text to be replaced.
171cdf0e10cSrcweir            The valid range is 0..length.
172cdf0e10cSrcweir
173cdf0e10cSrcweir        @param sReplacement
174cdf0e10cSrcweir            The Text that replaces the text between the given indices.
175cdf0e10cSrcweir
176cdf0e10cSrcweir        @return
177cdf0e10cSrcweir            Returns a flag that indicates whether the operation has been
178cdf0e10cSrcweir            executed successfully.
179cdf0e10cSrcweir
180cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
181cdf0e10cSrcweir            if the indices are invalid
182cdf0e10cSrcweir    */
183cdf0e10cSrcweir    boolean replaceText ([in] long nStartIndex, [in] long nEndIndex,
184cdf0e10cSrcweir        [in] string sReplacement)
185cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
186cdf0e10cSrcweir
187cdf0e10cSrcweir    /** Replaces the attributes of a text range by the given set of
188cdf0e10cSrcweir        attributes.
189cdf0e10cSrcweir
190cdf0e10cSrcweir        <p>Sets the attributes for the text between and including the two
191cdf0e10cSrcweir        given indices to those given.  The old attributes of this text
192cdf0e10cSrcweir        portion are replaced by the new list of attributes.</p>
193cdf0e10cSrcweir
194cdf0e10cSrcweir        <p>The text indices are interpreted like those in the
195cdf0e10cSrcweir        <member>XAccessibleText::getTextRange</member> method. </p>
196cdf0e10cSrcweir
197cdf0e10cSrcweir        @param nStartIndex
198cdf0e10cSrcweir            Start index of the text whose attributes are modified.
199cdf0e10cSrcweir            The valid range is 0..length.
200cdf0e10cSrcweir
201cdf0e10cSrcweir        @param nEndIndex
202cdf0e10cSrcweir            Start index of the text whose attributes are modified.
203cdf0e10cSrcweir            The valid range is 0..length.
204cdf0e10cSrcweir
205cdf0e10cSrcweir        @param aAttributeSet
206cdf0e10cSrcweir            Set of attributes that replaces the old list of attributes of
207cdf0e10cSrcweir            the specified text portion.
208cdf0e10cSrcweir
209cdf0e10cSrcweir        @return
210cdf0e10cSrcweir            Returns a flag that indicates whether the operation has been
211cdf0e10cSrcweir            executed successfully.
212cdf0e10cSrcweir
213cdf0e10cSrcweir        @throws ::com::sun::star::lang::IndexOutOfBoundsException
214cdf0e10cSrcweir            if the indices are invalid
215cdf0e10cSrcweir    */
216cdf0e10cSrcweir    boolean setAttributes ([in] long nStartIndex, [in] long nEndIndex,
217cdf0e10cSrcweir        [in] sequence<::com::sun::star::beans::PropertyValue> aAttributeSet)
218cdf0e10cSrcweir        raises (::com::sun::star::lang::IndexOutOfBoundsException);
219cdf0e10cSrcweir
220cdf0e10cSrcweir    /** Replaces the whole text with the given text.
221cdf0e10cSrcweir
222cdf0e10cSrcweir        <p>The text content of this object is set to the given string.</p>
223cdf0e10cSrcweir
224cdf0e10cSrcweir        @param sText
225cdf0e10cSrcweir            The new text that replaces the old text.
226cdf0e10cSrcweir
227cdf0e10cSrcweir        @return
228cdf0e10cSrcweir            Returns a flag that indicates whether the operation has been
229cdf0e10cSrcweir            executed successfully.
230cdf0e10cSrcweir    */
231cdf0e10cSrcweir    boolean setText ([in] string sText);
232cdf0e10cSrcweir};
233cdf0e10cSrcweir
234cdf0e10cSrcweir}; }; }; };
235cdf0e10cSrcweir
236cdf0e10cSrcweir#endif
237