diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-08-04 15:48:48 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-08-04 19:36:33 +0200 |
commit | 6cb9d45c43b525a682a5f8826f93e3981703cf4f (patch) | |
tree | 4b615ed13fb211616f50975fa3fc6087d9350c53 /offapi/com | |
parent | 12f96c3d0f61018cfa83c940765311aa9015f60a (diff) |
a11y: Add missing "not" in XAccessibleText::getTextBehindIndex doc
The doc was contradicting itself, saying (emphasis added):
> Returns the substring of the specified text type that is
> located after the given character and DOES NOT INCLUDE IT.
and
> For example, if text type is
> AccessibleTextType::WORD, then the complete word
> that is closest to and LOCATED BEHIND nIndex is returned.
but also
> The index character WILL BE PART of the returned string.
Add the missing "not" to the latter to make this
consistent and match the observed behavior when testing
this with a Writer paragraph consisting of the characters
"abcdefg":
Calling `getTextBehindIndex(2, css::accessibility::AccessibleTextType::CHARACTER)`
on the corresponding a11y object's `XAccessibleText` interface returns
a TextSegment with
* "d" as text
* a start offset of 3
* an end offset of 4
This is also consistent with `XAccessibleText::getTextBeforeIndex`,
whose documentation is similar and includes the "not"
at the corresponding place. Calling
`getTextBeforeIndex(2, css::accessibility::AccessibleTextType::CHARACTER)`
returns a TextSegment with
* "b" as text
* a start offset of 1
* an end offset of 2
The commit message of the commit adding this suggests that the
semantics were changed at some point, maybe the doc just wasn't
updated to reflect this at this one place back then.
commit 161503a286e6f7e1be49f84d9ad6a6287bac486e
Date: Thu Apr 24 16:36:13 2003 +0000
INTEGRATION: CWS uaa02 (1.1.2); FILE ADDED
2003/04/08 11:43:30 af 1.1.2.6: #108113# Made validity of index 'length' implementation dependent for getCharacterBounds().
2003/04/08 10:04:41 af 1.1.2.5: #108113# Added a sequence of requested attributes to getCharacterAttributes().
2003/04/04 14:37:30 af 1.1.2.4: #i12332# Made position <length> a valid character for method getCharacterBounds().
-> 2003/03/18 15:59:07 af 1.1.2.3: #108113# Changed the semantics of getText{Before,At,After}Index().
2003/03/14 10:40:54 af 1.1.2.2: #108113# Removed references to the drafts directory.
2003/03/11 15:00:42 af 1.1.2.1: #108113# Moved from drafts/com/sun/star/accessibility.
Change-Id: I4a3e73829f03c79977cef7542ff59603ea10c6dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137800
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'offapi/com')
-rw-r--r-- | offapi/com/sun/star/accessibility/XAccessibleText.idl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/offapi/com/sun/star/accessibility/XAccessibleText.idl b/offapi/com/sun/star/accessibility/XAccessibleText.idl index 19bd830fced6..4f7066a82746 100644 --- a/offapi/com/sun/star/accessibility/XAccessibleText.idl +++ b/offapi/com/sun/star/accessibility/XAccessibleText.idl @@ -427,7 +427,7 @@ interface XAccessibleText : ::com::sun::star::uno::XInterface @param nIndex Index of the character for which to return the text part after - it. The index character will be part of the returned string. + it. The index character will not be part of the returned string. The valid range is 0..length. @param nTextType |