summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2010-08-16 09:40:01 +0000
committerTom Hacohen <tom@stosb.com>2010-08-16 09:40:01 +0000
commit9a1e0eecda86521bfcc219247795d64b1df50e7a (patch)
treeafdde295f6435ee568839dfee761aeefbf835ae8
parentff9e16874e87e4b6bfc79c5424362bc3f62d9f8b (diff)
Evas textblock: Fixed evas_textblock_cursor_paragraph_text_get to return markup.
SVN revision: 51181
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_textblock.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c
index 9fbae888bf..fd64396017 100644
--- a/legacy/evas/src/lib/canvas/evas_object_textblock.c
+++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c
@@ -6053,7 +6053,7 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
6053} 6053}
6054 6054
6055/** 6055/**
6056 * Return the text of the paragraph cur points to. 6056 * Return the text of the paragraph cur points to - returns the text in markup..
6057 * 6057 *
6058 * @param cur the cursor pointing to the paragraph. 6058 * @param cur the cursor pointing to the paragraph.
6059 * @return the text on success, NULL otherwise. 6059 * @return the text on success, NULL otherwise.
@@ -6061,15 +6061,20 @@ evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Ev
6061EAPI const char * 6061EAPI const char *
6062evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) 6062evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
6063{ 6063{
6064 Evas_Textblock_Cursor cur1, cur2;
6064 if (!cur) return NULL; 6065 if (!cur) return NULL;
6065 if (!cur->node) return NULL; 6066 if (!cur->node) return NULL;
6066 /*FIXME-tom: strip replace chars */
6067 if (cur->node->utf8) 6067 if (cur->node->utf8)
6068 { 6068 {
6069 free(cur->node->utf8); 6069 free(cur->node->utf8);
6070 } 6070 }
6071 cur->node->utf8 = evas_common_encoding_unicode_to_utf8( 6071 cur1.obj = cur2.obj = cur->obj;
6072 eina_ustrbuf_string_get(cur->node->unicode), NULL); 6072 cur1.node = cur2.node = cur->node;
6073 evas_textblock_cursor_paragraph_char_first(&cur1);
6074 evas_textblock_cursor_paragraph_char_last(&cur2);
6075
6076 cur->node->utf8 = evas_textblock_cursor_range_text_get(&cur1, &cur2,
6077 EVAS_TEXTBLOCK_TEXT_MARKUP);
6073 return cur->node->utf8; 6078 return cur->node->utf8;
6074} 6079}
6075 6080