Kaydet (Commit) e91cabea authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide_3: fix SwAccessibleParagraph::getRunAttributes() index

... check, which should accept the past-the-last-char index, because
as the comments say it returns the hard attributes of the SwTextNode
as well, so it should work for empty paragraphs too.

(similar fix was done in getCharacterAttributes() in IA2)

Change-Id: I01e1a8f66f103b63584e88ce785ac2044c5db2b9
üst 1813e7c7
...@@ -1415,7 +1415,7 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes( ...@@ -1415,7 +1415,7 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
const OUString& rText = GetString(); const OUString& rText = GetString();
if( ! IsValidChar( nIndex, rText.getLength()+1 ) ) if (!IsValidPosition(nIndex, rText.getLength()))
throw lang::IndexOutOfBoundsException(); throw lang::IndexOutOfBoundsException();
bool bSupplementalMode = false; bool bSupplementalMode = false;
...@@ -1844,7 +1844,7 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes( ...@@ -1844,7 +1844,7 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes(
{ {
const OUString& rText = GetString(); const OUString& rText = GetString();
if ( !IsValidChar( nIndex, rText.getLength() ) ) if (!IsValidPosition(nIndex, rText.getLength()))
{ {
throw lang::IndexOutOfBoundsException(); throw lang::IndexOutOfBoundsException();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment