From 3d24e2daadeeab6b69dbf1c928e620349ba156e9 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 30 Jan 2011 10:40:59 +0000 Subject: [PATCH] Evas textblock: Removed unused functions. SVN revision: 56497 --- .../src/lib/canvas/evas_object_textblock.c | 68 ------------------- 1 file changed, 68 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 589fa81971..2eab9396a0 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -2428,74 +2428,6 @@ _layout_word_start(const Eina_Unicode *str, int start) return p; } -/** - * @internal - * Strips trailing whitespace from the item's text. - * - * @param c the context to work with - NOT NULL. - * @param fmt does nothing. - * @param it the item to strip. - * - * @return #EINA_TRUE if it stripped, #EINA_FALSE otherwise. - */ -static Eina_Bool -_layout_strip_trailing_whitespace(Ctxt *c, Evas_Object_Textblock_Format *fmt __UNUSED__, Evas_Object_Textblock_Item *it) -{ - int p, tp, chr, adv, tw, th; - Evas_Object_Textblock_Text_Item *ti; - - /*FIXME: Add support for removing tabs and other whites as well. */ - if (it->type != EVAS_TEXTBLOCK_ITEM_TEXT) return EINA_FALSE; - ti = _ITEM_TEXT(it); - - p = eina_unicode_strlen(ti->text) - 1; - tp = p; - if (p >= 0) - { - chr = GET_PREV(ti->text, p); - if (_is_white(chr)) - { - _layout_item_text_cutoff(c, ti, tp); - adv = 0; - if (ti->parent.format->font.font) - adv = c->ENFN->font_h_advance_get(c->ENDT, - ti->parent.format->font.font, - ti->text, &ti->parent.text_props); - tw = th = 0; - if (ti->parent.format->font.font) - c->ENFN->font_string_size_get(c->ENDT, - ti->parent.format->font.font, - ti->text, &ti->parent.text_props, &tw, &th); - it->w = tw; - it->h = th; - it->adv = adv; - c->x = it->x + adv; - return EINA_TRUE; - } - } - return EINA_FALSE; -} - -/** - * FIXME: document - */ -static int -_layout_item_abort(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Textblock_Item *it) -{ - Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); - - /*FIXME: handle it in some way? */ - if (it->type != EVAS_TEXTBLOCK_ITEM_TEXT) - return 0; - _item_free(c->obj, NULL, _ITEM(ti)); - if (c->ln->items) - { - it = (Evas_Object_Textblock_Item *)(EINA_INLIST_GET(c->ln->items))->last; - return _layout_strip_trailing_whitespace(c, fmt, it); - } - return 0; -} - /** * @internal * returns the index of the words end starting from p