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_XAccessibleTextMarkup_idl__
29 #define __com_sun_star_accessibility_XAccessibleTextMarkup_idl__
31 #ifndef __com_sun_star_uno_XInterface_idl__
32 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
37 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
38 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
40 #ifndef __com_sun_star_accessibility_XAccessibleText_idl__
41 #include
<com
/sun
/star
/accessibility
/XAccessibleText.idl
>
43 #ifndef __com_sun_star_accessibility_TextSegment_idl__
44 #include
<com
/sun
/star
/accessibility
/TextSegment.idl
>
47 module com
{ module sun
{ module star
{ module accessibility
{
49 interface XAccessibleTextMarkup
;
52 /** Implement this interface to expose the text markups of a text.
54 <p>The <type>XAccessibleTextMarkup</type> interface is the main interface
55 to expose text markups in a text, typically of a text document, that are
56 used to reference other (parts of) documents. For supporting the
57 <member>XAccessibleTextMarkup::getTextMarkupIndex</member> method of this
58 interface and other character related methods of the
59 <type>XAccessibleTextMarkup</type> interface, it is necessary to also
60 support the <type>XAccessibleText</type> interface.</p>
66 interface XAccessibleTextMarkup
67 : ::com
::sun
::star
::accessibility
::XAccessibleText
69 /** Returns the number of text markup of the given text markup type
72 <p>Throws <type>IllegalArgumentException</type>, if given text
73 markup type is out of valid range.</p>
76 This specifies the type of text markups, whose count should
77 be returned - see <type>TextMarkupType</type>.
80 The number of text markup of the given text markup type.
81 Returns 0 if there is no text markup.
83 long getTextMarkupCount
( [in] long TextMarkupType
)
84 raises
(::com
::sun
::star
::lang
::IllegalArgumentException
);
86 /** Returns the text segment of the text markup of the given index and
87 of the given text mark type
89 <p>Throws <type>IndexOutOfBoundsException</type>, if given index
90 is out of valid range.</p>
91 <p>Throws <type>IllegalArgumentException</type>, if given text
92 markup type is out of valid range.</p>
94 @param TextMarkupIndex
95 This index specifies the text markup to return.
98 This specifies the type of the text markup to be returned - see
99 <type>TextMarkupType</type>.
102 If the given index is in range [0..getTextMarkupCount(TextMarkupType)-1],
103 the text segment - see <type>TextSegment</type> - of the text markup
104 of the given text markup type is returned.
106 TextSegment getTextMarkup
( [in] long TextMarkupIndex
,
107 [in] long TextMarkupType
)
108 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
,
109 ::com
::sun
::star
::lang
::IllegalArgumentException
);
111 /** returns a sequence of the text segments of the text markups at the given
112 character index and of the given text markup type.
114 <p>Throws <type>IndexOutOfBoundsException</type>, if given character
115 index is out of range [0..number of characters in the text).</p>
116 <p>Throws <type>IllegalArgumentException</type>, if given text
117 markup type is out of valid range.</p>
120 This index specifies the character index in the text.
122 @param TextMarkupType
123 This specifies the type of the text markups to be returned - see
124 <type>TextMarkupType</type>.
127 If character index is in range [0..number of characters in the text-1],
128 a seguence of <type>TextSegment</type>s of the text markups at
129 given character index of the given text markup type are returned.
130 The sequence is empty, if no such text markup is found.
132 sequence
<TextSegment
> getTextMarkupAtIndex
( [in] long CharIndex
,
133 [in] long TextMarkupType
)
134 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
,
135 ::com
::sun
::star
::lang
::IllegalArgumentException
);