1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_accessibility_TextSegment_idl__ 29#define __com_sun_star_accessibility_TextSegment_idl__ 30 31module com { module sun { module star { module accessibility { 32 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. 37 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 44 enclosing text.</p> 45 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 51 position.</p> 52 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> 56 57 @see XAccessibleText 58 59 @since OOo 1.1.2 60*/ 61 62published struct TextSegment 63{ 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. 68 */ 69 string SegmentText; 70 71 /** Index of the first character of the text segment represented by this 72 structure. The index refers to the enclosing text. 73 */ 74 long SegmentStart; 75 76 /** Index of the character directly behind the last character of the 77 text segment represented by this structure. The index refers to the 78 enclosing text. 79 */ 80 long SegmentEnd; 81}; 82 83}; }; }; }; 84 85#endif 86