Evas textblock: Eliminate the use of cutoff, we don't really want/need that.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:46:02 +0000 (10:46 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:46:02 +0000 (10:46 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56545 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 114da05..c08cd87 100644 (file)
@@ -2424,26 +2424,6 @@ _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt,
 
 /**
  * @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
  *
  * @param c the context to work on - Not NULL.
@@ -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,