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
/*@
@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 {
/* 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