X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fmarkup-processor%2Fmarkup-processor.cpp;h=995253aa52b74d5953021e666f73655203675f53;hp=ed4cc57cc3c825534acde5e1c7e6b23505fd23f4;hb=5b8278f83bb96d54b29a45a5454b346b67b91a75;hpb=086fd12c21dbbf4a1207804f4e392b2504833d24 diff --git a/dali-toolkit/public-api/markup-processor/markup-processor.cpp b/dali-toolkit/public-api/markup-processor/markup-processor.cpp index ed4cc57..995253a 100644 --- a/dali-toolkit/public-api/markup-processor/markup-processor.cpp +++ b/dali-toolkit/public-api/markup-processor/markup-processor.cpp @@ -542,47 +542,11 @@ bool IsTag( std::string::const_iterator& it, const std::string::const_iterator& } // namespace -static inline bool HasMarkup( const std::string& markupString ) -{ - // Reset counters - unsigned int lessThanCount = 0; - unsigned int greaterThanCount = 0; - - // Check to see if any markup command surrounds are of equal number and not zero - for ( std::string::const_iterator it = markupString.begin(); it != markupString.end(); ++it ) - { - if ( *it == LESS_THAN ) - { - lessThanCount++; - } - else - { - if ( *it == GREATER_THAN ) - { - greaterThanCount++; - } - else - { - if ( *it == BACK_SLASH ) - { - return true; - } - } - } - } - if ( !lessThanCount || !greaterThanCount || lessThanCount != greaterThanCount ) - { - return false; - } - return true; -} - void GetStyledTextArray( const std::string& markupString, StyledTextArray& styledTextArray, bool scanForMarkup ) { styledTextArray.clear(); - // Scan markup ( if necessary ) to see if the string contains any change in style from default? - if ( !scanForMarkup || !HasMarkup( markupString ) ) + if ( !scanForMarkup ) { styledTextArray.push_back( StyledText( Text( markupString ), TextStyle() ) ); return;