Commit Graph

743 Commits

Author SHA1 Message Date
Tom Hacohen bdaa2c201d Evas textblock: Fixed wrong parsing of style tags. Support escaped '.
Thanks to cippp for the report.

SVN revision: 68573
2012-03-01 13:08:53 +00:00
Tom Hacohen 8a1351b5f0 Evas textblock: Better handle visible formats.
Fixed a crash. Thanks WooHyun for making me fix it now. :)

SVN revision: 67790
2012-02-09 12:21:18 +00:00
WooHyun Jung 768b9af1fb [evas/evas_object_textblock] When markup_to_utf8 is tried with an invalid
escape tag, escape will be NULL. "eina_strbuf_append" should not be
called with NULL string.


SVN revision: 67696
2012-02-03 11:24:44 +00:00
Tom Hacohen f91a385b62 Evas textblock: Fixed native size calculation - margins were not used.
SVN revision: 67631
2012-01-31 11:32:48 +00:00
Tom Hacohen 107d92d428 Evas textblock: Fixed a possible invalid mem write.
SVN revision: 67580
2012-01-29 10:01:27 +00:00
Tom Hacohen a64d78e07a Evas textblock: Fixed style user memory leak.
Thanks to Hermet for spotting it.

SVN revision: 67548
2012-01-26 14:02:59 +00:00
Tom Hacohen 98c61bfe6c Evas textblock: Added user style support.
This should make it easier to override the style set in textblock.

SVN revision: 67473
2012-01-23 16:08:36 +00:00
Tom Hacohen 7266659814 Evas textblock: Fix a bug with ellipsis and word-wrap.
Ellipsis didn't work well with word wrapping textblocks.

SVN revision: 67333
2012-01-19 12:11:44 +00:00
Tom Hacohen 1941918cdd Evas textblock: Also add tab support to prev commit, oops.
SVN revision: 67328
2012-01-19 08:44:01 +00:00
Tom Hacohen c6d242426f Evas textblock: Filter out illegal chars from format.
This really just filters them out. The solution is not complete, nor is
it the best one. But this fixes the bugs for the meanwhile.

SVN revision: 67327
2012-01-19 08:41:37 +00:00
Tom Hacohen e37d4495d3 Evas textblock: Indentation adjustment for the previous commit.
(I wanted the actual changes to be clear for review, so I split the
commit to two).

SVN revision: 67321
2012-01-19 07:52:37 +00:00
Tom Hacohen ef0ac9d69a Evas textblock: Merge text and format wrapping handling.
This should add a more standard compliant line breaking for format items
as well.

SVN revision: 67320
2012-01-19 07:52:34 +00:00
Sebastian Dransfeld 26de65cf2c evas: before_char is only used with BIDI_SUPPORT
SVN revision: 67303
2012-01-18 23:33:43 +00:00
Carsten Haitzler a70fc50208 we can optimize matching by breaking loop when match becomes 0 :)
SVN revision: 67267
2012-01-17 09:15:31 +00:00
Tom Hacohen 2d1166d846 Evas textblock: Fixed a possible bug with generic poppers removal.
Patch by Hyoyoung Chang.

SVN revision: 66798
2012-01-03 14:33:35 +00:00
Mike Blumenkrantz 4dde203f06 fix textblock parsing of tags with stupid trailing spaces like <br /> which people use for some stupid reason
SVN revision: 66444
2011-12-22 03:32:23 +00:00
Tom Hacohen 3e2f474ef8 Evas textblock: Use macros for the unicode chars/strings.
1. Make Obj replacement and Par Sep less confusing.
2. We'll may, at some point, use the Unicode NewLine char instead of \n.
so it's now easily replaceable.

SVN revision: 66255
2011-12-15 13:03:43 +00:00
Tom Hacohen 0e0a275762 Evas textblock: Improved the implementation of *_text_markup_to_utf8.
Also support passing NULL instead of a real textblock object.
Added appropriate tests + improved previous tests.

SVN revision: 66254
2011-12-15 12:40:29 +00:00
Tom Hacohen bdab64acae Evas textblock: Added evas_textblock_text_utf8_to_markup.
SVN revision: 66197
2011-12-14 15:04:03 +00:00
Tom Hacohen 4d61bb8329 Evas textblock: Fixed a couple of issues caused by previous commits.
SVN revision: 66194
2011-12-14 13:43:13 +00:00
Tom Hacohen c856f86a1f Evas textblock: Made 'br' and 'tab' default tags.
SVN revision: 66191
2011-12-14 13:27:15 +00:00
Tom Hacohen b794e7ff8e Evas textblock: Added support for default tags.
This is useful for defining default tags that can be overridden by style.
For example <b> and <i>.

SVN revision: 66190
2011-12-14 13:27:12 +00:00
Tom Hacohen ba3094581d Evas textblock: Renamed *markup_to_plain to *text_markup_to_utf8.
This should conform better to evas and what the function does.

SVN revision: 66182
2011-12-14 09:52:02 +00:00
Tom Hacohen 4e29867a30 Evas textblock: Implemented cursor_word_start/end
SVN revision: 66119
2011-12-12 15:25:46 +00:00
Tom Hacohen 346e25b031 Evas textblock: Added evas_textblock_markup_to_plain.
This function converts a textblock markup to plain text.
It converts for example <br/> to \n and a lot more.

SVN revision: 66034
2011-12-08 15:12:25 +00:00
Tom Hacohen 0ec467892d Evas textblock: Support self-closing formats, i.e <br/>.
Also updated tests to follow this. Using <br>, although will work, is
discouraged, please use <br/> instead.

SVN revision: 66023
2011-12-08 12:05:56 +00:00
Tom Hacohen 7f8dca2fda Evas textblock: Improve internal handling of formats.
SVN revision: 66022
2011-12-08 12:05:47 +00:00
Mike Blumenkrantz 580ee6e6ac same for these
SVN revision: 65913
2011-12-05 15:39:04 +00:00
Cedric BAIL 792e7bffed evas: more fine grained system detection.
SVN revision: 65903
2011-12-05 14:00:53 +00:00
Cedric BAIL 1c70650afc evas: cast as we did in eina.
SVN revision: 65902
2011-12-05 13:59:44 +00:00
Tom Hacohen 2bb72a2965 Evas textblock: Fix clang error.
Shouldn't ever happen, but whatever.
http://dev.enlightenment.fr/~discomfitor/evas-2011-11-08/report-Va2XPK.html#EndPath

SVN revision: 64978
2011-11-09 07:51:14 +00:00
Tom Hacohen 260f07ed81 Evas textblock: Fix clang complaint.
http://dev.enlightenment.fr/~discomfitor/evas-2011-11-08/report-FBRb3Q.html#EndPath

SVN revision: 64974
2011-11-09 07:19:09 +00:00
Tom Hacohen 5db25b11cb Evas textblock: Add ellipsis handling for format items.
Just cut before them.

SVN revision: 64817
2011-11-06 12:56:10 +00:00
Tom Hacohen 1b8ba7e17d Evas textblock: Fixed a bug with textblock ellipsis.
There was a possible segfault because we don't check if the current item
is a text item or a format item. I just removed the loop which triggered it
because it's not needed anyway, and now it works. Removing the loop also
let me remove some code that was only needed in the case of a loop.

SVN revision: 64816
2011-11-06 12:56:07 +00:00
Tom Hacohen 387bff89fb Evas textblock: Beautify the DRAW_FORMAT_DASHED macro a bit.
Patch by Shilpa Singh.

SVN revision: 64135
2011-10-17 12:18:57 +00:00
Tom Hacohen f1f954185a Evas textblock: Cleaned up DRAW_FORMAT/_DASHED macros.
Fixed compiler warnings.

SVN revision: 64132
2011-10-17 10:43:42 +00:00
Tom Hacohen ea9f23ad28 Evas textblock: Added dashed underline support.
Patch by Shilpa Singh

SVN revision: 64131
2011-10-17 10:43:08 +00:00
WooHyun Jung fb371c8aa6 evas/evas_object_textblock : When cursor_mode is BEFORE, dir_cur->node
can be NULL. So modified the conditional state.


SVN revision: 63824
2011-10-05 07:29:06 +00:00
Tom Hacohen 7b374f1dd3 Evas textblock: Fixed an issue when deleting A from <a><a>A</a></a>.
Reported by WooHyun. Thanks a lot, great catch, also told me where and what
the issue is exactly.

Also added a test to verify this works.

SVN revision: 63493
2011-09-20 08:05:50 +00:00
Tom Hacohen 0de47ae436 Evas textblock: Replace the rbtree index with a fixed ptr array.
This possibly doesn't scale as good but it's good enough for everything I've
tried. It's a lot easier to maintain comparing to the rbtree, and takes a
lot less memory. Next step is probably changing the array size according
to the actual content of the textblock.

SVN revision: 63474
2011-09-19 09:17:17 +00:00
Tom Hacohen c0b309e43e Evas textblock: Added a workaround for the coords_recalc not being called.
Please, when you fix this annoying issue, revert this terrible commit. This
commit is intended to be a temporary fix.

SVN revision: 63267
2011-09-07 10:41:44 +00:00
Tom Hacohen fe8c41c6c5 Evas textblock: Use viewport for getting visible range, not clip.
SVN revision: 63191
2011-09-05 12:03:53 +00:00
Tom Hacohen 8f07a73106 Evas textblock: Fixed an issue when there are no available fonts.
The problem was that our rbtree implementation doesn't support chaining
duplicates and with no fonts, all the paragraphs had the same y coord (0).
Changing the paragraph index to work on line_no for sorting fixes it,
as line numbers are also correct when there are no fonts.

Thanks a lot to KaKaRoTo for letting me know about this issue.

SVN revision: 63188
2011-09-05 09:04:43 +00:00
Tom Hacohen 54ebd93cde Evas font: Fix compilation with C++ compilers.
Thanks to cnook for pointing that out.

SVN revision: 63186
2011-09-05 07:13:23 +00:00
Tom Hacohen c4229776de Evas textblock: Fixed compiler warnings.
SVN revision: 63185
2011-09-05 07:13:07 +00:00
Tom Hacohen 73036290d6 Evas textblock: Fixed cursor_content_get's handling of formats.
Formats are now correctly enclosed with <> when returned, instead of just
the text being returned.

SVN revision: 62439
2011-08-14 11:26:45 +00:00
Tom Hacohen d6752c9e1b Evas textblock: Fixed bug in range_formats get.
Thanks to Sanjeev for the rebort.

SVN revision: 62333
2011-08-11 06:58:53 +00:00
Tom Hacohen e5b331009b Evas textblock: Added cursor_visible_range_get and cursor_range_formats_get.
SVN revision: 62259
2011-08-09 13:55:42 +00:00
Tom Hacohen 202623daed Evas textblock: Fixed a bug in evas_textblock_cursor_char_coord_set.
SVN revision: 62258
2011-08-09 13:55:38 +00:00
Tom Hacohen f765f1e290 Evas textblock: Fixed a bug in evas_textblock_cursor_line_coord_set.
SVN revision: 62257
2011-08-09 13:55:31 +00:00