[java-atk-wrapper] Fix bug 611256 - atk_text_get_text is not working correctly with the specified end offset



commit 0d4bc3eed622afb515497cce648d4bb7ac390e53
Author: Ke Wang <ke wang sun com>
Date:   Thu Mar 4 17:03:51 2010 +0800

    Fix bug 611256 - atk_text_get_text is not working correctly with the specified end offset

 wrapper/org/GNOME/Accessibility/AtkText.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/wrapper/org/GNOME/Accessibility/AtkText.java b/wrapper/org/GNOME/Accessibility/AtkText.java
index bea7bdb..8129a4a 100644
--- a/wrapper/org/GNOME/Accessibility/AtkText.java
+++ b/wrapper/org/GNOME/Accessibility/AtkText.java
@@ -52,11 +52,6 @@ public class AtkText {
 
 	/* Return string from start, up to, but not including end */
 	public String get_text (int start, int end) {
-		if (acc_text instanceof AccessibleExtendedText) {
-			AccessibleExtendedText acc_ext_text = (AccessibleExtendedText)acc_text;
-			return acc_ext_text.getTextRange(start, end-1);
-		}
-
 		int count = acc_text.getCharCount();
 		if (start < 0)
 			start = 0;
@@ -66,6 +61,11 @@ public class AtkText {
 		if (end < -1)
 			end = 0;
 
+		if (acc_text instanceof AccessibleExtendedText) {
+			AccessibleExtendedText acc_ext_text = (AccessibleExtendedText)acc_text;
+			return acc_ext_text.getTextRange(start, end);
+		}
+
 		StringBuffer buf = new StringBuffer();
 		for (int i = start; i <= end-1; i++) {
 			String str = acc_text.getAtIndex(



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