From f41ecb26ea154f68f9dbb454048f6faef04da19a Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Mon, 15 Jun 2015 09:30:22 +0100 Subject: [PATCH] Add the 'Carriage Return' character to the IsNewParagraph(). Change-Id: I01c559eca64c69611759b9e7b601fb2287cdb4a4 Signed-off-by: Victor Cebollada --- text/dali/devel-api/text-abstraction/script.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/text/dali/devel-api/text-abstraction/script.cpp b/text/dali/devel-api/text-abstraction/script.cpp index 1e192f3..f794f78 100644 --- a/text/dali/devel-api/text-abstraction/script.cpp +++ b/text/dali/devel-api/text-abstraction/script.cpp @@ -27,9 +27,10 @@ namespace TextAbstraction namespace { const unsigned int WHITE_SPACE_THRESHOLD = 0x21; ///< All characters below 0x21 are considered white spaces. -const unsigned int CHAR_FL = 0x000A; ///< NL Line feed, new line. +const unsigned int CHAR_LF = 0x000A; ///< NL Line feed, new line. const unsigned int CHAR_VT = 0x000B; ///< Vertical tab. const unsigned int CHAR_FF = 0x000C; ///< NP Form feed, new page. +const unsigned int CHAR_CR = 0x000D; ///< Carriage return, new line. const unsigned int CHAR_NEL = 0x0085; ///< Next line. const unsigned int CHAR_LS = 0x2028; ///< Line separator. const unsigned int CHAR_PS = 0x2029; ///< Paragraph separator @@ -533,9 +534,10 @@ bool IsWhiteSpace( Character character ) bool IsNewParagraph( Character character ) { - return ( ( CHAR_FL == character ) || + return ( ( CHAR_LF == character ) || ( CHAR_VT == character ) || ( CHAR_FF == character ) || + ( CHAR_CR == character ) || ( CHAR_NEL == character ) || ( CHAR_LS == character ) || ( CHAR_PS == character ) ); -- 2.7.4