From: tasn Date: Mon, 16 Aug 2010 09:40:01 +0000 (+0000) Subject: Evas textblock: Fixed evas_textblock_cursor_paragraph_text_get to return markup. X-Git-Tag: accepted/2.0/20130306.225542~242^2~1670 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0bca74383979b53c5344bbb0279eea59c97ac6c;p=profile%2Fivi%2Fevas.git Evas textblock: Fixed evas_textblock_cursor_paragraph_text_get to return markup. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@51181 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 9fbae88..fd64396 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -6053,7 +6053,7 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev } /** - * Return the text of the paragraph cur points to. + * Return the text of the paragraph cur points to - returns the text in markup.. * * @param cur the cursor pointing to the paragraph. * @return the text on success, NULL otherwise. @@ -6061,15 +6061,20 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev EAPI const char * evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) { + Evas_Textblock_Cursor cur1, cur2; if (!cur) return NULL; if (!cur->node) return NULL; - /*FIXME-tom: strip replace chars */ if (cur->node->utf8) { free(cur->node->utf8); } - cur->node->utf8 = evas_common_encoding_unicode_to_utf8( - eina_ustrbuf_string_get(cur->node->unicode), NULL); + cur1.obj = cur2.obj = cur->obj; + cur1.node = cur2.node = cur->node; + evas_textblock_cursor_paragraph_char_first(&cur1); + evas_textblock_cursor_paragraph_char_last(&cur2); + + cur->node->utf8 = evas_textblock_cursor_range_text_get(&cur1, &cur2, + EVAS_TEXTBLOCK_TEXT_MARKUP); return cur->node->utf8; }