Evas language utils: fixed evas_common_language_script_end_of_run_get and adjusted text and textblock object to use it.

SVN revision: 56478
This commit is contained in:
Tom Hacohen 2011-01-30 10:39:03 +00:00
parent ec59409dea
commit 3185db9667
3 changed files with 7 additions and 7 deletions

View File

@ -643,7 +643,7 @@ _evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unico
cutoff = evas_common_language_script_end_of_run_get(
text,
o->bidi_par_props,
pos, len);
pos, len - pos);
if (cutoff > 0)
{
#ifdef BIDI_SUPPORT

View File

@ -2589,14 +2589,14 @@ skip:
while (str && *str)
{
/* if this is the first line item and it starts with spaces - remove them */
int tmp_len = 0;
int tmp_len;
wrap = 0;
white_stripped = 0;
ti = _layout_text_item_new(c, fmt, str);
ti->parent.text_node = n;
ti->parent.text_pos = start + str - tbase;
tmp_len = eina_unicode_strlen(ti->text);
tmp_len = off - (str - tbase);
if (ti->parent.text_node)
{
int tmp_cut;

View File

@ -59,7 +59,7 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
{
Evas_Script_Type first = EVAS_SCRIPT_UNKNOWN;
int i;
for (i = start, str += start ; (i < len) ; i++, str++)
for (i = 0 ; i < len ; i++, str++)
{
Evas_Script_Type tmp;
tmp = _get_script(*str);
@ -75,11 +75,11 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
break;
}
}
i = i - start;
#ifdef BIDI_SUPPORT
{
int bidi_end;
bidi_end = evas_bidi_end_of_run_get(bidi_props, start, len);
bidi_end = evas_bidi_end_of_run_get(bidi_props, start,
start + len);
if (bidi_end > 0)
{
i = (i < bidi_end) ? i : bidi_end;
@ -94,7 +94,7 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
else
{
#ifdef BIDI_SUPPORT
return evas_bidi_end_of_run_get(bidi_props, start, len);
return evas_bidi_end_of_run_get(bidi_props, start, start + len);
#endif
}
return 0;