* libspi/text.c (impl_getBoundedRanges): Bug fix.
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@392
e2bd861d-eb25-0410-b326-
f6ed22b6b98c
+2003-01-15 Padraig O'Briain <padraig.obriain@sun.com
+
+ * libspi/text.c (impl_getBoundedRanges): Bug fix.
+
2003-01-10 Padraig O'Briain <padraig.obriain@sun.com
* libspi/text.c:
2003-01-10 Padraig O'Briain <padraig.obriain@sun.com
* libspi/text.c:
int curr_offset;
gint minLineStart, minLineEnd, maxLineStart, maxLineEnd;
long bounds_min_offset;
int curr_offset;
gint minLineStart, minLineEnd, maxLineStart, maxLineEnd;
long bounds_min_offset;
+ long bounds_max_offset;
/* for horizontal text layouts, at least, the following check helps. */
bounds_min_offset = atk_text_get_offset_at_point (text, x, y,
(AtkCoordType) coordType);
/* for horizontal text layouts, at least, the following check helps. */
bounds_min_offset = atk_text_get_offset_at_point (text, x, y,
(AtkCoordType) coordType);
+ bounds_max_offset = atk_text_get_offset_at_point (text, x + width, y + height,
+ (AtkCoordType) coordType);
atk_text_get_text_at_offset (text, bounds_min_offset,
ATK_TEXT_BOUNDARY_LINE_START,
&minLineStart, &minLineEnd);
atk_text_get_text_at_offset (text, bounds_min_offset,
ATK_TEXT_BOUNDARY_LINE_START,
&minLineStart, &minLineEnd);
- atk_text_get_text_at_offset (text, bounds_min_offset,
+ atk_text_get_text_at_offset (text, bounds_max_offset,
ATK_TEXT_BOUNDARY_LINE_START,
&maxLineStart, &maxLineEnd);
startOffset = MIN (minLineStart, maxLineStart);
ATK_TEXT_BOUNDARY_LINE_START,
&maxLineStart, &maxLineEnd);
startOffset = MIN (minLineStart, maxLineStart);
- endOffset = MIN (minLineEnd, maxLineEnd);
+ endOffset = MAX (minLineEnd, maxLineEnd);
curr_offset = startOffset;
curr_offset = startOffset;