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