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_TextSegment_idl__
29 #define __com_sun_star_accessibility_TextSegment_idl__
31 module com
{ module sun
{ module star
{ module accessibility
{
33 /** This structure describes a text segment that is embedded in a larger
34 portion of text. It is used for example by the
35 <type>XAccessibleText</type> interface to describe a text portion that
36 was inserted into or deleted from an accessible text.
38 <p>The indices <member>TextSegment::SegmentStart</member> and
39 <member>TextSegment::SegmentEnd</member> refer to the enclosing text.
40 The <member>TextSegment::SegmentText</member> member contains the text
41 between these two indices including the start index but not the end
42 index. With it you can use this structure without having to
43 access the <type>XAccessibleText</type> interface that represents the
46 <p>An empty text segment is expressed by
47 <member>TextSegment::SegmentStart</member> and
48 <member>TextSegment::SegmentEnd</member> set to the same value. While a
49 value of -1 signals an error (like the request for a word after the last
50 character of a text) all other values define the empty string at that
53 <p>The <member>SegmentText</member> member is a copy of the
54 corresponding text segment of the enclosing text. Modifying this
55 structure does not alter the enclosing text.</p>
62 published
struct TextSegment
64 /** A copy of the text segment of the enclosing text delimited by the
65 text indices <member>TextSegment::SegmentStart</member> and
66 <member>TextSegment::SegmentEnd</member>. Modifying it does not
67 alter the enclosing text.
71 /** Index of the first character of the text segment represented by this
72 structure. The index refers to the enclosing text.
76 /** Index of the character directly behind the last character of the
77 text segment represented by this structure. The index refers to the