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_XAccessibleTextMarkup_idl__ 25#define __com_sun_star_accessibility_XAccessibleTextMarkup_idl__ 26 27#ifndef __com_sun_star_uno_XInterface_idl__ 28#include <com/sun/star/uno/XInterface.idl> 29#endif 30#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 31#include <com/sun/star/lang/IllegalArgumentException.idl> 32#endif 33#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 34#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 35#endif 36#ifndef __com_sun_star_accessibility_XAccessibleText_idl__ 37#include <com/sun/star/accessibility/XAccessibleText.idl> 38#endif 39#ifndef __com_sun_star_accessibility_TextSegment_idl__ 40#include <com/sun/star/accessibility/TextSegment.idl> 41#endif 42 43module com { module sun { module star { module accessibility { 44 45 interface XAccessibleTextMarkup; 46 47 48/** Implement this interface to expose the text markups of a text. 49 50 <p>The <type>XAccessibleTextMarkup</type> interface is the main interface 51 to expose text markups in a text, typically of a text document, that are 52 used to reference other (parts of) documents. For supporting the 53 <member>XAccessibleTextMarkup::getTextMarkupIndex</member> method of this 54 interface and other character related methods of the 55 <type>XAccessibleTextMarkup</type> interface, it is necessary to also 56 support the <type>XAccessibleText</type> interface.</p> 57 58 @see XAccessibleText 59 60 @since OpenOffice 3.0 61*/ 62interface XAccessibleTextMarkup 63 : ::com::sun::star::accessibility::XAccessibleText 64{ 65 /** Returns the number of text markup of the given text markup type 66 of a text. 67 68 <p>Throws <type>IllegalArgumentException</type>, if given text 69 markup type is out of valid range.</p> 70 71 @param TextMarkupType 72 This specifies the type of text markups, whose count should 73 be returned - see <type>TextMarkupType</type>. 74 75 @return 76 The number of text markup of the given text markup type. 77 Returns 0 if there is no text markup. 78 */ 79 long getTextMarkupCount ( [in] long TextMarkupType ) 80 raises (::com::sun::star::lang::IllegalArgumentException); 81 82 /** Returns the text segment of the text markup of the given index and 83 of the given text mark type 84 85 <p>Throws <type>IndexOutOfBoundsException</type>, if given index 86 is out of valid range.</p> 87 <p>Throws <type>IllegalArgumentException</type>, if given text 88 markup type is out of valid range.</p> 89 90 @param TextMarkupIndex 91 This index specifies the text markup to return. 92 93 @param TextMarkupType 94 This specifies the type of the text markup to be returned - see 95 <type>TextMarkupType</type>. 96 97 @return 98 If the given index is in range [0..getTextMarkupCount(TextMarkupType)-1], 99 the text segment - see <type>TextSegment</type> - of the text markup 100 of the given text markup type is returned. 101 */ 102 TextSegment getTextMarkup ( [in] long TextMarkupIndex, 103 [in] long TextMarkupType ) 104 raises (::com::sun::star::lang::IndexOutOfBoundsException, 105 ::com::sun::star::lang::IllegalArgumentException); 106 107 /** returns a sequence of the text segments of the text markups at the given 108 character index and of the given text markup type. 109 110 <p>Throws <type>IndexOutOfBoundsException</type>, if given character 111 index is out of range [0..number of characters in the text).</p> 112 <p>Throws <type>IllegalArgumentException</type>, if given text 113 markup type is out of valid range.</p> 114 115 @param CharIndex 116 This index specifies the character index in the text. 117 118 @param TextMarkupType 119 This specifies the type of the text markups to be returned - see 120 <type>TextMarkupType</type>. 121 122 @return 123 If character index is in range [0..number of characters in the text-1], 124 a seguence of <type>TextSegment</type>s of the text markups at 125 given character index of the given text markup type are returned. 126 The sequence is empty, if no such text markup is found. 127 */ 128 sequence<TextSegment> getTextMarkupAtIndex ( [in] long CharIndex, 129 [in] long TextMarkupType ) 130 raises (::com::sun::star::lang::IndexOutOfBoundsException, 131 ::com::sun::star::lang::IllegalArgumentException); 132}; 133 134}; }; }; }; 135 136#endif 137