Resolve incorrect position for Ellipsis when mixed LTR & RTL languages and set layout...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / markup-processor-color.cpp
index b66e37a..4fb95ef 100644 (file)
@@ -24,6 +24,7 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/color-run.h>
 #include <dali-toolkit/internal/text/markup-processor-helper-functions.h>
+#include <dali-toolkit/internal/text/markup-tags-and-attributes.h>
 
 namespace Dali
 {
@@ -31,9 +32,9 @@ namespace Toolkit
 {
 namespace Text
 {
-namespace
+void ProcessColor(const Attribute& attribute, ColorRun& colorRun)
 {
-const std::string XHTML_VALUE_ATTRIBUTE("value");
+  ColorStringToVector4(attribute.valueBuffer, attribute.valueLength, colorRun.color);
 }
 
 void ProcessColorTag(const Tag& tag, ColorRun& colorRun)
@@ -44,9 +45,9 @@ void ProcessColorTag(const Tag& tag, ColorRun& colorRun)
       ++it)
   {
     const Attribute& attribute(*it);
-    if(TokenComparison(XHTML_VALUE_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength))
+    if(TokenComparison(MARKUP::COLOR_ATTRIBUTES::VALUE, attribute.nameBuffer, attribute.nameLength))
     {
-      ColorStringToVector4(attribute.valueBuffer, attribute.valueLength, colorRun.color);
+      ProcessColor(attribute, colorRun);
     }
   }
 }