1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
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.
14 *
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).
20 *
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.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_accessibility_XAccessibleTextAttributes_idl__
29#define __com_sun_star_accessibility_XAccessibleTextAttributes_idl__
30
31#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
32#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
33#endif
34#ifndef __com_sun_star_beans_PropertyValue_idl__
35#include <com/sun/star/beans/PropertyValue.idl>
36#endif
37
38module com { module sun { module star { module accessibility {
39
40/** Implement this interface to give access to the attributes of a text.
41
42    @since OOo 2.0.4
43*/
44published interface XAccessibleTextAttributes
45{
46    /** Get the default attribute set for the text.
47
48        <p>Returns a set of all default paragraph and default character
49        attributes that are associated for the text. To prevent the method
50        from returning possibly large sets of attributes that the caller
51        is not interested in the caller can provide a list of attributes
52        that he wants to be returned.</p>
53
54        @param RequestedAttributes
55            This string sequence defines the set of attributes that the
56            caller is interested in. When there are requested attributes
57            that are not defined for the text then they are ignored.
58
59            <p>When the sequence is empty all attributes are returned.</p>
60
61        @return
62            Returns the requested attributes of the text. Each attribute
63            is represented by a <type scope="::com::sun::star::beans">PropertyValue</type>
64            object.
65    */
66    sequence<::com::sun::star::beans::PropertyValue>
67        getDefaultAttributes ( [in] sequence<string> RequestedAttributes );
68
69    /** Get the run attribute set for the specified position.
70
71        <p>Returns a set of character attributes that are associated for
72        the character at the given index and are directly set or are set
73        via a character style. To prevent the method from returning all of
74        these attributes the caller can provide a list of attributes
75        that he wants to be returned.</p>
76
77        @param Index
78            The index of the character for which to return its attributes.
79            The valid range is 0..length of text-1.
80
81        @param RequestedAttributes
82            This string sequence defines the set of attributes that the
83            caller is interested in. When there are requested attributes
84            that are not defined for the text then they are ignored.
85
86            <p>When the sequence is empty all attributes are returned.</p>
87
88        @return
89            Returns the requested attributes of the specified character.
90            Each attribute is represented by a
91            <type scope="::com::sun::star::beans">PropertyValue</type> object.
92
93        @throws ::com::sun::star::lang::IndexOutOfBoundsException
94            if the index is invalid
95    */
96    sequence<::com::sun::star::beans::PropertyValue>
97        getRunAttributes ( [in] long Index,
98                           [in] sequence<string> RequestedAttributes )
99        raises (::com::sun::star::lang::IndexOutOfBoundsException);
100
101};
102
103}; }; }; };
104
105#endif
106