X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor-span.cpp;h=d7bf5eb7224f40b2f1ba5e66e015057f51a381a3;hb=fc4ebd23458e95ade416baeb1a8cf44bac9bca13;hp=40a508d80919c269fee19f1964d14e1867b04e27;hpb=e172c89c895d46d430b2cf0a0dbceeea0ae09b29;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/markup-processor-span.cpp b/dali-toolkit/internal/text/markup-processor-span.cpp index 40a508d..d7bf5eb 100644 --- a/dali-toolkit/internal/text/markup-processor-span.cpp +++ b/dali-toolkit/internal/text/markup-processor-span.cpp @@ -26,6 +26,7 @@ #include #include #include +#include namespace Dali { @@ -42,9 +43,22 @@ const std::string XHTML_WIDTH_ATTRIBUTE("font-width"); const std::string XHTML_SLANT_ATTRIBUTE("font-slant"); const std::string XHTML_COLOR_ATTRIBUTE("text-color"); + +//the underlined character's attributes +const std::string XHTML_UNDERLINE_COLOR_ATTRIBUTE("u-color"); +const std::string XHTML_UNDERLINE_HEIGHT_ATTRIBUTE("u-height"); +const std::string XHTML_UNDERLINE_TYPE_ATTRIBUTE("u-type"); +const std::string XHTML_UNDERLINE_DASH_GAP_ATTRIBUTE("u-dash-gap"); +const std::string XHTML_UNDERLINE_DASH_WIDTH_ATTRIBUTE("u-dash-width"); } // namespace -void ProcessSpanTag(const Tag& tag, ColorRun& colorRun, FontDescriptionRun& fontRun, bool& isColorDefined, bool& isFontDefined) +void ProcessSpanTag(const Tag& tag, + ColorRun& colorRun, + FontDescriptionRun& fontRun, + UnderlinedCharacterRun& underlinedCharacterRun, + bool& isColorDefined, + bool& isFontDefined, + bool& isUnderlinedCharacterDefined) { for(Vector::ConstIterator it = tag.attributes.Begin(), endIt = tag.attributes.End(); @@ -83,6 +97,31 @@ void ProcessSpanTag(const Tag& tag, ColorRun& colorRun, FontDescriptionRun& font isFontDefined = true; ProcessFontSlant(attribute, fontRun); } + else if(TokenComparison(XHTML_UNDERLINE_COLOR_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + { + isUnderlinedCharacterDefined = true; + ProcessColorAttribute(attribute, underlinedCharacterRun); + } + else if(TokenComparison(XHTML_UNDERLINE_HEIGHT_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + { + isUnderlinedCharacterDefined = true; + ProcessHeightAttribute(attribute, underlinedCharacterRun); + } + else if(TokenComparison(XHTML_UNDERLINE_TYPE_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + { + isUnderlinedCharacterDefined = true; + ProcessTypeAttribute(attribute, underlinedCharacterRun); + } + else if(TokenComparison(XHTML_UNDERLINE_DASH_GAP_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + { + isUnderlinedCharacterDefined = true; + ProcessDashGapAttribute(attribute, underlinedCharacterRun); + } + else if(TokenComparison(XHTML_UNDERLINE_DASH_WIDTH_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + { + isUnderlinedCharacterDefined = true; + ProcessDashWidthAttribute(attribute, underlinedCharacterRun); + } } }