From 39997676989de74ba940c655d8bca4d2c1659f86 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 30 Jan 2011 10:46:02 +0000 Subject: [PATCH] Evas textblock: Eliminate the use of cutoff, we don't really want/need that. SVN revision: 56545 --- .../src/lib/canvas/evas_object_textblock.c | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 114da05f43..c08cd87e7e 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -2422,26 +2422,6 @@ _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt, return -1; } -/** - * @internal - * Cut the text in the item up until cut. - * - * @param c the context to work on - Not NULL. - * @param it the item to cut - not null. - * @param cut the cut index. - */ -static void -_layout_item_text_cutoff(Ctxt *c __UNUSED__, Evas_Object_Textblock_Text_Item *ti, int cut) -{ - Eina_Unicode *ts; - - ts = ti->text; - ts[cut] = 0; - ti->text = eina_unicode_strdup(ts); - free(ts); - evas_common_text_props_cutoff(&ti->parent.text_props, cut); -} - /** * @internal * Cut the text up until cut and split @@ -2785,7 +2765,12 @@ skip: ti->parent.text_pos, tmp_len); if (tmp_cut > 0) { - _layout_item_text_cutoff(c, ti, tmp_cut); + Eina_Unicode *ts; + + ts = ti->text; + ts[tmp_cut] = 0; + ti->text = eina_unicode_strdup(ts); + free(ts); tmp_len = tmp_cut; } evas_common_text_props_bidi_set(&ti->parent.text_props,