[java-atk-wrapper] Text: reuse char_count



commit de2fd8e903be5e8d7d0c54f582b99994e59d8ae2
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Sun Jul 28 12:32:56 2019 +0200

    Text: reuse char_count

 wrapper/org/GNOME/Accessibility/AtkText.java | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/wrapper/org/GNOME/Accessibility/AtkText.java b/wrapper/org/GNOME/Accessibility/AtkText.java
index 5e6019c..2d39d4f 100644
--- a/wrapper/org/GNOME/Accessibility/AtkText.java
+++ b/wrapper/org/GNOME/Accessibility/AtkText.java
@@ -522,10 +522,10 @@ public class AtkText {
                        }
                        case AtkTextBoundary.WORD_START :
                        {
-                               if (offset == get_character_count())
-                                       return new StringSequence("", 0, 0);
+                               if (offset == char_count)
+                                       return new StringSequence("", char_count, char_count);
 
-                               String s = get_text(0, get_character_count());
+                               String s = get_text(0, char_count);
                                int start = getPreviousWordStart(offset+1, s);
                                if (start == BreakIterator.DONE) {
                                        start = 0;
@@ -544,7 +544,7 @@ public class AtkText {
                                if (offset == 0)
                                        return new StringSequence("", 0, 0);
 
-                               String s = get_text(0, get_character_count());
+                               String s = get_text(0, char_count);
                                int start = getPreviousWordEnd(offset, s);
                                if (start == BreakIterator.DONE) {
                                        start = 0;
@@ -560,10 +560,10 @@ public class AtkText {
                        }
                        case AtkTextBoundary.SENTENCE_START :
                        {
-                               if (offset == get_character_count())
-                                       return new StringSequence("", 0, 0);
+                               if (offset == char_count)
+                                       return new StringSequence("", char_count, char_count);
 
-                               String s = get_text(0, get_character_count());
+                               String s = get_text(0, char_count);
                                int start = getPreviousSentenceStart(offset+1, s);
                                if (start == BreakIterator.DONE) {
                                        start = 0;
@@ -582,7 +582,7 @@ public class AtkText {
                                if (offset == 0)
                                        return new StringSequence("", 0, 0);
 
-                               String s = get_text(0, get_character_count());
+                               String s = get_text(0, char_count);
                                int start = getPreviousSentenceEnd(offset, s);
                                if (start == BreakIterator.DONE) {
                                        start = 0;
@@ -600,7 +600,7 @@ public class AtkText {
                        case AtkTextBoundary.LINE_END :
                        {
                                BreakIterator lines = BreakIterator.getLineInstance();
-                               String s = get_text(0, get_character_count());
+                               String s = get_text(0, char_count);
                                lines.setText(s);
 
                                int start = lines.preceding(offset);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]