Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > fc480f9d5aabed8eeaffe8ad3401a94c > files > 637

openoffice.org-devel-doc-3.2.1-0.3mdv2010.2.i586.rpm

<html>
<head>
<title>Interface XAccessibleText</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../idl.css">
</head>
<body>
<div id="adc-idlref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="3">
<tr>
<td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td>
<td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td>
<td class="navimain"><a href="XAccessibleText-xref.html" class="navimain">Use</a></td>
<td class="navimain"><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Accessibility/XAccessibleText" class="navimain">Devguide</a></td>
<td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td>
</tr>
</table>
<table class="navisub" border="0" cellpadding="0">
<tr>
<td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td>
<td class="navisub">Attributes' Summary</td>
<td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td>
<td class="navisub">Attributes' Details</td>
</tr>
</table>
<hr>
<table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;">
<tr>
<td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">accessibility</a> :: </p>
</td>
</tr>
<tr>
<td class="title">interface XAccessibleText</td>
</tr>
<tr>
<td/></tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>Implement this interface to give read-only access to a text.

 </dd>
<dd><p>The <a href="XAccessibleText.html">XAccessibleText</a> interface should be implemented by
 all UNO components that present textual information on the display like
 buttons, text entry fields, or text portions of the document window.
 The interface provides access to the text's content, attributes, and
 spatial location. However, text can not be modified with this
 interface. That is the task of the <a href="XAccessibleEditableText.html">XAccessibleEditableText</a>
 interface.</p>
 
 <p>The text length, i.e. the number of characters in the text, is
 returned by <a href="XAccessibleText.html#getCharacterCount">getCharacterCount</a>. 
 All methods that operate on particular characters (e.g. 
 <a href="XAccessibleText.html#getCharacterAt">getCharacterAt</a>) use character 
 indices from 0 to length-1. All methods that operate on character
 positions (e.g. <a href="XAccessibleText.html#getTextRange">getTextRange</a>) 
 use indices from 0 to length.</p>

 <p>Please note that accessible text does not necessarily support
 selection. In this case it should behave as if there where no
 selection. An empty selection is used for example to express the
 current cursor position.</p> 

 </dd>
<dt><b>Since </b></dt>
<dd>OpenOffice 1.1.2</dd>
</dl>
<a name="devmanual"> </a><dl>
<dt><b>Developers Guide</b></dt>
<dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Accessibility/XAccessibleText">Accessibility - XAccessibleText</a></dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Methods' Summary</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getCaretPosition">getCaretPosition</a></td>
<td class="imsum_right">Return the position of the caret.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#setCaretPosition">setCaretPosition</a></td>
<td class="imsum_right">Set the position of the caret.

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getCharacter">getCharacter</a></td>
<td class="imsum_right">Return the character at the specified position.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getCharacterAttributes">getCharacterAttributes</a></td>
<td class="imsum_right">Get the attribute set for the specified position.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getCharacterBounds">getCharacterBounds</a></td>
<td class="imsum_right">Return the bounding box of the specified position.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getCharacterCount">getCharacterCount</a></td>
<td class="imsum_right">Return the number of characters in the represented text.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getIndexAtPoint">getIndexAtPoint</a></td>
<td class="imsum_right">Return the text position for the specified screen position.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getSelectedText">getSelectedText</a></td>
<td class="imsum_right">Return the selected text.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getSelectionStart">getSelectionStart</a></td>
<td class="imsum_right">Return the position of the start of the selection.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getSelectionEnd">getSelectionEnd</a></td>
<td class="imsum_right">Return the position of the end of the selection.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#setSelection">setSelection</a></td>
<td class="imsum_right">Set a new selection.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getText">getText</a></td>
<td class="imsum_right">Return the whole text.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getTextRange">getTextRange</a></td>
<td class="imsum_right">Return the specified text range.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getTextAtIndex">getTextAtIndex</a></td>
<td class="imsum_right">Get a text portion around the given position.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getTextBeforeIndex">getTextBeforeIndex</a></td>
<td class="imsum_right">Get a text portion before the given position.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#getTextBehindIndex">getTextBehindIndex</a></td>
<td class="imsum_right">Get a text portion behind the given position.
 
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#copyText">copyText</a></td>
<td class="imsum_right">Copy the specified text into the clipboard.
 
 &nbsp;</td>
</tr>
</table>
<a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle">Methods' Details</td>
</tr>
<tr>
<td class="imdetail"><a name="getCaretPosition" class="membertitle">getCaretPosition</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">long</td>
</tr>
<tr>
<td valign="top"><b>getCaretPosition</b>();</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the position of the caret.
 
 </dd>
<dd><p>Returns the offset of the caret. The caret is often called text
 cursor. The caret is actually the position between two characters.
 Its position/offset is that of the character to the right of it.</p>
 
 </dd>
<dt><b>Returns</b></dt>
<dd>The returned offset is relative to the text represented by this
 object.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="setCaretPosition" class="membertitle">setCaretPosition</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">boolean</td>
</tr>
<tr>
<td valign="top"><b>setCaretPosition</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nIndex )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Set the position of the caret.

 </dd>
<dd><p>The caret is often called text cursor. The caret is actually the
 position between two characters. Its position/offset is that of the
 character to the right of it.</p>

 <p>Setting the caret position may or may not alter the current
 selection. A change of the selection is notified to the
 accessibility event listeners with an
 <b>AccessibleEventId::ACCESSIBLE_SELECTION_EVENT</b>.</p>

 <p>When the new caret position differs from the old one (which, of
 course, is the standard case) this is notified to the accessibility
 event listeners with an
 <b>AccessibleEventId::ACCESSIBLE_CARET_EVENT</b>.</p>

 </dd>
<dt><b>Parameter nIndex</b></dt>
<dd>The new index of the caret. This caret is actually placed to
 the left side of the character with that index. An index of 0
 places the caret so that the next insertion goes before the
 first character. An index of <a href="#getCharacterCount">getCharacterCount</a>
 leads to insertion after the last character.

 </dd>
<dt><b>Returns</b></dt>
<dd>Returns <b>true</b> if the caret has been moved and <b>false</b>
 otherwise. A <b>true</b> value does not necessarily mean that the
 caret has been positioned exactly at the required position.
 If that position lies inside a read-only area the caret is
 positioned before or behind it. Listen to the caret event to
 determine the new position.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the index is not valid.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getCharacter" class="membertitle">getCharacter</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">char</td>
</tr>
<tr>
<td valign="top"><b>getCharacter</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nIndex )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the character at the specified position.
 
 </dd>
<dd><p>Returns the character at the given index.</p>
 
 </dd>
<dt><b>Parameter nIndex</b></dt>
<dd>The index of the character to return.
 The valid range is 0..length-1.
 
 </dd>
<dt><b>Returns</b></dt>
<dd>the character at the index nIndex.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the index is invalid
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getCharacterAttributes" class="membertitle">getCharacterAttributes</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">sequence&lt; ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a> &gt;</td>
</tr>
<tr>
<td valign="top"><b>getCharacterAttributes</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nIndex,</td>
</tr>
<tr>
<td/><td valign="top">[in] sequence&lt; string &gt;</td>
<td valign="bottom">&nbsp;aRequestedAttributes )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Get the attribute set for the specified position.
 
 </dd>
<dd><p>Returns a set of attributes that are associated for the character
 at the given index. To prevent the method from returning possibly
 large sets of attributes that the caller is not interested in the
 caller has to provide a list of attributes that he wants to be
 returned.</p>
 
 </dd>
<dt><b>Parameter nIndex</b></dt>
<dd>The index of the character for which to return its attributes.
 The valid range is 0..length-1.
 
 </dd>
<dt><b>Parameter aRequestedAttributes</b></dt>
<dd>This string sequence defines the set of attributes that the
 caller is interested in. When there are attributes defined that
 are not listed in the sequence then they are not returned. When
 there are requested attributes that are not defined for the
 character then they are ignored, too.

 <p>An empty sequence signals the callers interest in all the
 attributes. This is usefull in two cases: a) Simply as a way to
 avoid passing a potentially large array to the called object or
 b) when the caller does not know what attributes the called
 objects supports but is interested in all of them
 nevertheless.</p>

 </dd>
<dt><b>Returns</b></dt>
<dd>Returns the explicitly or implicitly (empty
 <arg>aRequestedAttributes</arg> argument) requested attributes
 of the specified character. Each attribute is represented by a
 ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a>
 object. The returned list of attribute descriptions contains
 all attributes that are both members of the sequence of
 requested attributes and are defined for the character at the
 specified index.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the index is invalid
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getCharacterBounds" class="membertitle">getCharacterBounds</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/Rectangle.html">Rectangle</a></td>
</tr>
<tr>
<td valign="top"><b>getCharacterBounds</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nIndex )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the bounding box of the specified position.
 
 </dd>
<dd><p>Returns the bounding box of the indexed character.</p>
 
 <p>The virtual character after the last character of the represented
 text, i.e. the one at position length is a special case. It
 represents the current input position and will therefore typically
 be queried by AT more often than other positions. Because it does
 not represent an existing character its bounding box is defined in
 relation to preceding characters. It should be rougly equivalent to
 the bounding box of some character when inserted at the end of the
 text. Its height typically being the maximal height of all the
 characters in the text or the height of the preceding character, its
 width being at least one pixel so that the bounding box is not
 degenerate.<br>
 Note that the index 'length' is not always valid. Whether it is
 or not is implementation dependent. It typically is when text is
 editable or otherwise when on the screen the caret can be placed
 behind the text. You can be sure that the index is valid after you
 have received a <b>CARET</b> event
 for this index.</p>
 </dd>
<dt><b>Parameter nIndex</b></dt>
<dd>Index of the character for which to return its bounding box.
 The valid range is 0..length.
 
 </dd>
<dt><b>Returns</b></dt>
<dd>The bounding box of the referenced character. The bounding box
 of the virtual character at position length has to have
 non-empty dimensions.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the index is invalid
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getCharacterCount" class="membertitle">getCharacterCount</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">long</td>
</tr>
<tr>
<td valign="top"><b>getCharacterCount</b>();</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the number of characters in the represented text.
 
 </dd>
<dd><p>Returns the number of characters in the text represented by this
 object or, in other words, the text length.</p>
 
 </dd>
<dt><b>Returns</b></dt>
<dd>Returns the number of characters of this object's text. A zero
 value indicates an empty text.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getIndexAtPoint" class="membertitle">getIndexAtPoint</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">long</td>
</tr>
<tr>
<td valign="top"><b>getIndexAtPoint</b>(</td>
<td valign="top">[in] ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/Point.html">Point</a></td>
<td valign="bottom">&nbsp;aPoint );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the text position for the specified screen position.
 
 </dd>
<dd><p>Given a point in local coordinates, i.e. relative to the 
 coordinate system of the object, return the zero-based index of
 the character under that point. The same functionality could be 
 achieved by using the bounding boxes for each character as returned 
 by <a href="XAccessibleText.html">XAccessibleText</a>::<a href="XAccessibleText.html#getCharacterBounds">getCharacterBounds</a>. The method
 <a href="XAccessibleText.html">XAccessibleText</a>::<a href="XAccessibleText.html#getIndexAtPoint">getIndexAtPoint</a>, however, can be
 implemented in a more efficient way.</p>
 
 </dd>
<dt><b>Parameter aPoint</b></dt>
<dd>The position for which to look up the index of the character
 that is rendered on to the display at that point.
 
 </dd>
<dt><b>Returns</b></dt>
<dd>Index of the character under the given point or -1 if the point
 is invalid or there is no character under the point.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getSelectedText" class="membertitle">getSelectedText</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">string</td>
</tr>
<tr>
<td valign="top"><b>getSelectedText</b>();</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the selected text.
 
 </dd>
<dd><p>Returns the portion of the text that is selected.</p>
 
 </dd>
<dt><b>Returns</b></dt>
<dd>The returned text is the selected portion of the object's text.
 If no text is selected when this method is called or when
 selection is not supported an empty string is returned.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getSelectionStart" class="membertitle">getSelectionStart</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">long</td>
</tr>
<tr>
<td valign="top"><b>getSelectionStart</b>();</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the position of the start of the selection.
 
 </dd>
<dd><p>Returns the index of the start of the selected text.</p>
 
 </dd>
<dt><b>Returns</b></dt>
<dd>If there is no selection or selection is not supported the
 position of selection start and end will be the same undefined
 value.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getSelectionEnd" class="membertitle">getSelectionEnd</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">long</td>
</tr>
<tr>
<td valign="top"><b>getSelectionEnd</b>();</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the position of the end of the selection.
 
 </dd>
<dd><p>Returns the index of the end of the selected text.</p>
 
 </dd>
<dt><b>Returns</b></dt>
<dd>If there is no selection or selection is not supported the
 position of selection start and end will be the same undefined
 value.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="setSelection" class="membertitle">setSelection</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">boolean</td>
</tr>
<tr>
<td valign="top"><b>setSelection</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nStartIndex,</td>
</tr>
<tr>
<td/><td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nEndIndex )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Set a new selection.
 
 </dd>
<dd><p>Sets the selected text portion according to the given indices.
 The old selection is replaced by the new selection.</p>

 <p>The selection encompasses the same string of text that
 <a href="XAccessibleText.html">XAccessibleText</a>::<a href="XAccessibleText.html#getTextRange">getTextRange</a> would have
 selected. See there for details.</p>

 <p>Setting the selection may or may not change the caret position.
 Typically the caret is moved to the position after the second
 argument. When the caret is moved this is notified to the
 accessibility event listeners with an
 <b>AccessibleEventId::ACCESSIBLE_CARET_EVENT</b>.</p>
 
 </dd>
<dt><b>Parameter nStartIndex</b></dt>
<dd>The first character of the new selection. 
 The valid range is 0..length.
 
 @parm nEndIndex
 The position after the last character of the new selection.
 The valid range is 0..length.
 
 </dd>
<dt><b>Returns</b></dt>
<dd>Returns <b>true</b> if the selection has been set successfully and
 <b>false</b> otherwise or when selection is not supported.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the indices are invalid
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getText" class="membertitle">getText</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">string</td>
</tr>
<tr>
<td valign="top"><b>getText</b>();</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the whole text.
 
 </dd>
<dd><p>Returns the complete text. This is equivalent to a call to
 <a href="XAccessibleText.html">XAccessibleText</a>::<a href="XAccessibleText.html#getTextRange">getTextRange</a> with the arguments
 zero and <code>getCharacterCount()-1</code>.</p>
 
 </dd>
<dt><b>Returns</b></dt>
<dd>Returns a string that contains the complete text.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getTextRange" class="membertitle">getTextRange</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">string</td>
</tr>
<tr>
<td valign="top"><b>getTextRange</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nStartIndex,</td>
</tr>
<tr>
<td/><td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nEndIndex )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Return the specified text range.
 
 </dd>
<dd><p>Returns the substring between the two given indices.</p>

 <p>The substring starts with the character at nStartIndex
 (inclusive) and up to the character at nEndIndex (exclusive),
 if nStartIndex is less or equal nEndIndex. If nEndIndex is
 lower than nStartIndex, the result is the same as a call with
 the two arguments being exchanged.</p>

 <p>The whole text can be requested by passing the indices zero and
 <code>getCharacterCount()</code>. If both indices have the same 
 value, an empty string is returned.</p>
 
 </dd>
<dt><b>Parameter nStartIndex</b></dt>
<dd>Index of the first character to include in the returned string.
 The valid range is 0..length.
 
 </dd>
<dt><b>Parameter nEndIndex</b></dt>
<dd>Index of the last character to exclude in the returned string.
 The valid range is 0..length.
 
 </dd>
<dt><b>Returns</b></dt>
<dd>Returns the substring starting with the character at nStartIndex 
 (inclusive) and up to the character at nEndIndex (exclusive), if 
 nStartIndex is less than or equal to nEndIndex.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the indices are invalid
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getTextAtIndex" class="membertitle">getTextAtIndex</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3"><a href="TextSegment.html">TextSegment</a></td>
</tr>
<tr>
<td valign="top"><b>getTextAtIndex</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nIndex,</td>
</tr>
<tr>
<td/><td valign="top">[in] short</td>
<td valign="bottom">&nbsp;nTextType )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a>,<br>
::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Get a text portion around the given position.
 
 </dd>
<dd><p>Returns the substring of the specified text type that contains
 the character at the given index, if any. For example, given the
 text type <b>WORD, the word
 which contains the character at position nIndex is returned, or an
 empty string if no word is found at the that position.</p>
 
 </dd>
<dt><b>Parameter nIndex</b></dt>
<dd>Index of the character whose containing text portion is to be 
 returned.
 The valid range is 0..length.
 
 </dd>
<dt><b>Parameter nTextType</b></dt>
<dd>The type of the text portion to return. See
 <a href="AccessibleTextType.html">AccessibleTextType</a> for the complete list.
 
 </dd>
<dt><b>Returns</b></dt>
<dd>Returns the requested text portion. This portion may be empty
 or invalid when no appropriate text portion is found or text
 type is invalid.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the index is invalid
 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::InvalidArgumentException
 if the given text type is not valid.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getTextBeforeIndex" class="membertitle">getTextBeforeIndex</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3"><a href="TextSegment.html">TextSegment</a></td>
</tr>
<tr>
<td valign="top"><b>getTextBeforeIndex</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nIndex,</td>
</tr>
<tr>
<td/><td valign="top">[in] short</td>
<td valign="bottom">&nbsp;nTextType )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a>,<br>
::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Get a text portion before the given position.
 
 </dd>
<dd><p>Returns the substring of the specified text type that is
 located before the given character and does not include
 it. The result of this method should be same as a result for
 <a href="XAccessibleText.html">XAccessibleText</a>::<a href="XAccessibleText.html#getTextAtIndex">getTextAtIndex</a> with a
 suitably decreased index value.</p>

 <p>For example, if text type is <b>WORD, then the complete word 
 that is closest to and located before nIndex is returned.</p>

 <p>If the index is valid, but no suitable word (or other text
 type) is found, an empty text segment is returned.</p>
 
 </dd>
<dt><b>Parameter nIndex</b></dt>
<dd>Index of the character for which to return the text part before
 it. The index character will not be part of the returned
 string.
 The valid range is 0..length.
 
 </dd>
<dt><b>Parameter nTextType</b></dt>
<dd>The type of the text portion to return. See
 <a href="AccessibleTextType.html">AccessibleTextType</a> for the complete list.
 
 </dd>
<dt><b>Returns</b></dt>
<dd>Returns the requested text portion. This portion may be empty
 or invalid when no appropriate text portion is found or text
 type is invalid.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the index is invalid.
 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::InvalidArgumentException
 if the given text type is not valid.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="getTextBehindIndex" class="membertitle">getTextBehindIndex</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3"><a href="TextSegment.html">TextSegment</a></td>
</tr>
<tr>
<td valign="top"><b>getTextBehindIndex</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nIndex,</td>
</tr>
<tr>
<td/><td valign="top">[in] short</td>
<td valign="bottom">&nbsp;nTextType )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a>,<br>
::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Get a text portion behind the given position.
 
 </dd>
<dd><p>Returns the substring of the specified text type that is
 located after the given character and does not include
 it. The result of this method should be same as a result for
 <a href="XAccessibleText.html">XAccessibleText</a>::<a href="XAccessibleText.html#getTextAtIndex">getTextAtIndex</a> with a
 suitably increased index value.</p>

 <p>For example, if text type is <b>WORD, then the complete word
 that is closest to and located behind nIndex is returned.</p>

 <p>If the index is valid, but no suitable word (or other text
 type) is found, an empty string is returned.</p>
 
 </dd>
<dt><b>Parameter nIndex</b></dt>
<dd>Index of the character for which to return the text part after
 it. The index character will be part of the returned string.
 The valid range is 0..length.
 
 </dd>
<dt><b>Parameter nTextType</b></dt>
<dd>The type of the text portion to return. See
 <a href="AccessibleTextType.html">AccessibleTextType</a> for the complete list.
 
 </dd>
<dt><b>Returns</b></dt>
<dd>Returns the requested text portion. This portion may be empty
 or invalid when no appropriate text portion is found or text
 type is invalid.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the index is invalid
 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::InvalidArgumentException
 if the given text type is not valid.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="copyText" class="membertitle">copyText</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">boolean</td>
</tr>
<tr>
<td valign="top"><b>copyText</b>(</td>
<td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nStartIndex,</td>
</tr>
<tr>
<td/><td valign="top">[in] long</td>
<td valign="bottom">&nbsp;nEndIndex )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Copy the specified text into the clipboard.
 
 </dd>
<dd><p>Copy the specified text into the clipboard. The text that is 
 copied is the same text that would have been selected by the 
 <a href="XAccessibleText.html">XAccessibleText</a>::<a href="XAccessibleText.html#getTextRange">getTextRange</a> method. </p>

 <p>The other clipboard related methods
 <a href="XAccessibleEditableText.html">XAccessibleEditableText</a>::<a href="XAccessibleEditableText.html#cutText">cutText</a> and
 <a href="XAccessibleEditableText.html">XAccessibleEditableText</a>::<a href="XAccessibleEditableText.html#deleteText">deleteText</a> can be found in
 the <a href="XAccessibleEditableText.html">XAccessibleEditableText</a> because of their
 destructive nature.</p>
 
 </dd>
<dt><b>Parameter nStartIndex</b></dt>
<dd>Start index of the text to copied into the clipboard.
 The valid range is 0..length.
 
 </dd>
<dt><b>Parameter nEndIndex</b></dt>
<dd>End index of the text to copied into the clipboard.
 The valid range is 0..length.

 </dd>
<dt><b>Returns</b></dt>
<dd>Returns <b>true</b> if the specified text has been copied
 successfully into the clipboard.

 </dd>
<dt><b>Throws</b></dt>
<dd>::com::sun::star::lang::IndexOutOfBoundsException
 if the indices are invalid
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p>

</div> <!-- id="adc-idlref" -->
</body>

</html>