1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XAccessibleTextMarkup.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_accessibility_XAccessibleTextMarkup_idl__
32 #define __com_sun_star_accessibility_XAccessibleTextMarkup_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
38 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
40 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
41 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
43 #ifndef __com_sun_star_accessibility_XAccessibleText_idl__
44 #include
<com
/sun
/star
/accessibility
/XAccessibleText.idl
>
46 #ifndef __com_sun_star_accessibility_TextSegment_idl__
47 #include
<com
/sun
/star
/accessibility
/TextSegment.idl
>
50 module com
{ module sun
{ module star
{ module accessibility
{
52 interface XAccessibleTextMarkup
;
55 /** Implement this interface to expose the text markups of a text.
57 <p>The <type>XAccessibleTextMarkup</type> interface is the main interface
58 to expose text markups in a text, typically of a text document, that are
59 used to reference other (parts of) documents. For supporting the
60 <member>XAccessibleTextMarkup::getTextMarkupIndex</member> method of this
61 interface and other character related methods of the
62 <type>XAccessibleTextMarkup</type> interface, it is necessary to also
63 support the <type>XAccessibleText</type> interface.</p>
69 interface XAccessibleTextMarkup
70 : ::com
::sun
::star
::accessibility
::XAccessibleText
72 /** Returns the number of text markup of the given text markup type
75 <p>Throws <type>IllegalArgumentException</type>, if given text
76 markup type is out of valid range.</p>
79 This specifies the type of text markups, whose count should
80 be returned - see <type>TextMarkupType</type>.
83 The number of text markup of the given text markup type.
84 Returns 0 if there is no text markup.
86 long getTextMarkupCount
( [in] long TextMarkupType
)
87 raises
(::com
::sun
::star
::lang
::IllegalArgumentException
);
89 /** Returns the text segment of the text markup of the given index and
90 of the given text mark type
92 <p>Throws <type>IndexOutOfBoundsException</type>, if given index
93 is out of valid range.</p>
94 <p>Throws <type>IllegalArgumentException</type>, if given text
95 markup type is out of valid range.</p>
97 @param TextMarkupIndex
98 This index specifies the text markup to return.
100 @param TextMarkupType
101 This specifies the type of the text markup to be returned - see
102 <type>TextMarkupType</type>.
105 If the given index is in range [0..getTextMarkupCount(TextMarkupType)-1],
106 the text segment - see <type>TextSegment</type> - of the text markup
107 of the given text markup type is returned.
109 TextSegment getTextMarkup
( [in] long TextMarkupIndex
,
110 [in] long TextMarkupType
)
111 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
,
112 ::com
::sun
::star
::lang
::IllegalArgumentException
);
114 /** returns a sequence of the text segments of the text markups at the given
115 character index and of the given text markup type.
117 <p>Throws <type>IndexOutOfBoundsException</type>, if given character
118 index is out of range [0..number of characters in the text).</p>
119 <p>Throws <type>IllegalArgumentException</type>, if given text
120 markup type is out of valid range.</p>
123 This index specifies the character index in the text.
125 @param TextMarkupType
126 This specifies the type of the text markups to be returned - see
127 <type>TextMarkupType</type>.
130 If character index is in range [0..number of characters in the text-1],
131 a seguence of <type>TextSegment</type>s of the text markups at
132 given character index of the given text markup type are returned.
133 The sequence is empty, if no such text markup is found.
135 sequence
<TextSegment
> getTextMarkupAtIndex
( [in] long CharIndex
,
136 [in] long TextMarkupType
)
137 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
,
138 ::com
::sun
::star
::lang
::IllegalArgumentException
);