1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_accessibility_XAccessibleTextMarkup_idl__
21 #define __com_sun_star_accessibility_XAccessibleTextMarkup_idl__
23 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
25 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
26 #include
<com
/sun
/star
/accessibility
/XAccessibleText.idl
>
27 #include
<com
/sun
/star
/accessibility
/TextSegment.idl
>
29 module com
{ module sun
{ module star
{ module accessibility
{
31 interface XAccessibleTextMarkup
;
34 /** Implement this interface to expose the text markups of a text.
36 <p>The XAccessibleTextMarkup interface is the main interface
37 to expose text markups in a text, typically of a text document, that are
38 used to reference other (parts of) documents. For supporting the
39 XAccessibleTextMarkup::getTextMarkupIndex() method of this
40 interface and other character related methods of the
41 XAccessibleTextMarkup interface, it is necessary to also
42 support the XAccessibleText interface.</p>
48 interface XAccessibleTextMarkup
49 : ::com
::sun
::star
::accessibility
::XAccessibleText
51 /** Returns the number of text markup of the given text markup type
54 <p>Throws IllegalArgumentException, if given text
55 markup type is out of valid range.</p>
58 This specifies the type of text markups, whose count should
59 be returned - see TextMarkupType.
62 The number of text markup of the given text markup type.
63 Returns 0 if there is no text markup.
65 long getTextMarkupCount
( [in] long TextMarkupType
)
66 raises
(::com
::sun
::star
::lang
::IllegalArgumentException
);
68 /** Returns the text segment of the text markup of the given index and
69 of the given text mark type
71 <p>Throws IndexOutOfBoundsException, if given index
72 is out of valid range.</p>
73 <p>Throws IllegalArgumentException, if given text
74 markup type is out of valid range.</p>
76 @param TextMarkupIndex
77 This index specifies the text markup to return.
80 This specifies the type of the text markup to be returned - see
84 If the given index is in range [0..getTextMarkupCount(TextMarkupType)-1],
85 the text segment - see TextSegment - of the text markup
86 of the given text markup type is returned.
88 TextSegment getTextMarkup
( [in] long TextMarkupIndex
,
89 [in] long TextMarkupType
)
90 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
,
91 ::com
::sun
::star
::lang
::IllegalArgumentException
);
93 /** returns a sequence of the text segments of the text markups at the given
94 character index and of the given text markup type.
96 <p>Throws IndexOutOfBoundsException, if given character
97 index is out of range [0..number of characters in the text).</p>
98 <p>Throws IllegalArgumentException, if given text
99 markup type is out of valid range.</p>
102 This index specifies the character index in the text.
104 @param TextMarkupType
105 This specifies the type of the text markups to be returned - see
109 If character index is in range [0..number of characters in the text-1],
110 a sequence of TextSegments of the text markups at
111 given character index of the given text markup type are returned.
112 The sequence is empty, if no such text markup is found.
114 sequence
<TextSegment
> getTextMarkupAtIndex
( [in] long CharIndex
,
115 [in] long TextMarkupType
)
116 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
,
117 ::com
::sun
::star
::lang
::IllegalArgumentException
);
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */