summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2015-02-09 17:30:30 +0000
committerJaehwan Kim <jae.hwan.kim@samsung.com>2015-04-27 17:54:09 +0900
commit1c07d71155f55d5ef65c4182518d6c004c9ec84f (patch)
treee7c195656c888b05e5ef2e6715397c5278d0c560
parent75782b15f5219008e991d53e8a678fa40cefe088 (diff)
downloadefl-1c07d71155f55d5ef65c4182518d6c004c9ec84f.tar.gz
evas text: fix _ellipsis_get to return -1.0 on failure.
Summary: When getting ellipsis value from evas text object fails, the most reasonable return value is -1.0. Currently, evas_object_text_ellipsis_get API with NULL returns 0.0. It means ellipsis is not off. It must return -1.0 when API fails. @fix Comments by Tom: until now, this was inconsistent. With this change, it now returns -1.0 consistently. Also, fixed commit summary. Reviewers: woohyun, Hermet, seoz, tasn Reviewed By: tasn Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1944 Change-Id: I28672de1524c959b3d17349e8b2e081f1cca933b origin: upstream
-rw-r--r--src/lib/evas/canvas/evas_text.eo4
-rw-r--r--src/tests/evas/evas_test_text.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_text.eo b/src/lib/evas/canvas/evas_text.eo
index 1614ca66c7..52eb071414 100644
--- a/src/lib/evas/canvas/evas_text.eo
+++ b/src/lib/evas/canvas/evas_text.eo
@@ -58,12 +58,12 @@ class Evas.Text (Evas.Object, Efl.Text, Efl.Text_Properties)
/*@
@brief Gets the ellipsis currently set on the text object.
- @return The ellipsis set on the text object.
+ @return The ellipsis set on the text object. The ellipsis is -1.0.
@see evas_object_text_ellipsis_set.
@since 1.8 */
}
values {
- double ellipsis; /*@ the ellipsis. */
+ double ellipsis(-1); /*@ the ellipsis. */
}
}
bidi_delimiters {
diff --git a/src/tests/evas/evas_test_text.c b/src/tests/evas/evas_test_text.c
index e969050161..90ce19dcc8 100644
--- a/src/tests/evas/evas_test_text.c
+++ b/src/tests/evas/evas_test_text.c
@@ -224,6 +224,10 @@ START_TEST(evas_text_ellipsis)
/* Ligatures */
buf = "Fffffffffffffffffffffffffffffffffff";
_test_ellipsis(to, buf, font, size, 0.0);
+
+ /* Check ellipsis value with NULL */
+ fail_if(evas_object_text_ellipsis_get(NULL) != -1.0);
+
END_TEXT_TEST();
}
END_TEST