1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_accessibility_TextSegment_idl__
25#define __com_sun_star_accessibility_TextSegment_idl__
26
27module com { module sun { module star { module accessibility {
28
29/** This structure describes a text segment that is embedded in a larger
30    portion of text.  It is used for example by the
31    <type>XAccessibleText</type> interface to describe a text portion that
32    was inserted into or deleted from an accessible text.
33
34    <p>The indices <member>TextSegment::SegmentStart</member> and
35    <member>TextSegment::SegmentEnd</member> refer to the enclosing text.
36    The <member>TextSegment::SegmentText</member> member contains the text
37    between these two indices including the start index but not the end
38    index.  With it you can use this structure without having to
39    access the <type>XAccessibleText</type> interface that represents the
40    enclosing text.</p>
41
42    <p>An empty text segment is expressed by
43    <member>TextSegment::SegmentStart</member> and
44    <member>TextSegment::SegmentEnd</member> set to the same value.  While a
45    value of -1 signals an error (like the request for a word after the last
46    character of a text) all other values define the empty string at that
47    position.</p>
48
49    <p>The <member>SegmentText</member> member is a copy of the
50    corresponding text segment of the enclosing text.  Modifying this
51    structure does not alter the enclosing text.</p>
52
53    @see XAccessibleText
54
55    @since OpenOffice 1.1.2
56*/
57
58published struct TextSegment
59{
60    /** A copy of the text segment of the enclosing text delimited by the
61        text indices <member>TextSegment::SegmentStart</member> and
62        <member>TextSegment::SegmentEnd</member>.  Modifying it does not
63        alter the enclosing text.
64    */
65    string SegmentText;
66
67    /** Index of the first character of the text segment represented by this
68        structure.  The index refers to the enclosing text.
69    */
70    long SegmentStart;
71
72    /** Index of the character directly behind the last character of the
73        text segment represented by this structure.  The index refers to the
74        enclosing text.
75    */
76    long SegmentEnd;
77};
78
79}; }; }; };
80
81#endif
82