tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / offapi / com / sun / star / accessibility / XAccessibleMultiLineText.idl
blobd7afce097037626561f2a20c11b43c149ae02d2f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 module com { module sun { module star { module accessibility {
22 /** Implement this interface to provide a mapping between text index
23 and line numbers.
25 <p>This interface is typically used in conjunction with the
26 XAccessibleText interface and extends it with a notion
27 of line numbers</p>
29 @since OOo 3.0
32 interface XAccessibleMultiLineText
33 : ::com::sun::star::accessibility::XAccessibleText
35 /** Returns the line number at the specified index.
37 <p>For a text object that is spread over multiple lines, this method
38 provides a mapping from a text index to the corresponding line number.
39 </p>
41 @param nIndex
42 Index for which the line number should be returned.
43 The valid range is 0..length.
45 @return
46 Returns the line number of the specified text index.
48 @throws ::com::sun::star::lang::IndexOutOfBoundsException
49 if the index is invalid.
51 long getLineNumberAtIndex([in] long nIndex)
52 raises (::com::sun::star::lang::IndexOutOfBoundsException);
54 /** Returns the text of the specified line.
56 <p>Returns the substring of text that makes up the specified line
57 number.</p>
59 <p>The number of lines can be obtained by calling
60 XAccessibleMultiLineText::getLineNumberAtIndex()
61 with the index of the last character. In a loop, the last line
62 has been reached when TextSegment::SegmentEnd
63 of the returned value is equal to the index of the last
64 character of the text.</p>
66 @param nLineNo
67 The number of the line to return the substring from.
68 The valid range is 0..getLineNumberAtIndex(getCharacterCount()).
70 @return
71 Returns the requested text portion. This portion may be empty
72 or invalid when no appropriate text portion is found.
74 @throws ::com::sun::star::lang::IndexOutOfBoundsException
75 if the line number is invalid
78 TextSegment getTextAtLineNumber([in] long nLineNo)
79 raises (::com::sun::star::lang::IndexOutOfBoundsException);
81 /** Returns the text of the line in which the caret is located.
83 <p>The substring returned will most of the time be identical to
84 calling XAccessibleText::getTextAtIndex() with
85 the index returned by XAccessibleText::getCaretPosition()
86 and type AccessibleTextType::LINE beside the
87 following special case:</p>
89 <p>Some text implementations place the caret at the end of the current
90 line when the <b>End</b> key gets pressed. Since the index of this position
91 is identical to the one of the first character of the following line,
92 XAccessibleMultiLineText::getLineNumberAtIndex() will
93 return the line following the current one in this case.</p>
95 @return
96 Returns the requested text portion. This portion may be empty
97 or invalid if the paragraph object does not have a valid caret
98 position.
101 TextSegment getTextAtLineWithCaret();
103 /** Returns the number of the line in which the caret is located.
105 <p>The line number returned will most of the time be identical to
106 calling XAccessibleMultiLineText::getLineNumberAtIndex()
107 with the index returned by XAccessibleText::getCaretPosition()
108 beside the following special case:</p>
110 <p>Some text implementations place the caret at the end of the current
111 line when the <b>End</b> key gets pressed. Since the index of this position
112 is identical to the one of the first character of the following line,
113 XAccessibleMultiLineText::getLineNumberAtIndex() will
114 return the line following the current one in this case.</p>
116 @return
117 Returns the index of the line in which the caret is located or -1
118 if the paragraph does not have a valid caret position.
121 long getNumberOfLineWithCaret();
124 }; }; }; };
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */