X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor%2Fmarkup-processor-anchor.cpp;h=d958d1979cc16ba7b7d3beabf5d840486f15df19;hb=8272ed044bd7789ad9abedae32a470018df04364;hp=87789e3577ea13ab453e7ac7076284bce12f2a9d;hpb=24024a00f26ee1b4b5d9f703ebbbb15d01668f44;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/markup-processor/markup-processor-anchor.cpp b/dali-toolkit/internal/text/markup-processor/markup-processor-anchor.cpp index 87789e3..d958d19 100644 --- a/dali-toolkit/internal/text/markup-processor/markup-processor-anchor.cpp +++ b/dali-toolkit/internal/text/markup-processor/markup-processor-anchor.cpp @@ -24,6 +24,8 @@ // INTERNAL INCLUDES #include +#include +#include #include #include @@ -33,10 +35,12 @@ namespace Toolkit { namespace Text { -void ProcessAnchor(const Tag& tag, Anchor& anchor) -{ - anchor.href = nullptr; +void ProcessAnchorTag(const Tag& tag, + Anchor& anchor, + ColorRun& colorRun, + UnderlinedCharacterRun& underlinedCharacterRun) +{ for(auto&& attribute : tag.attributes) { if(TokenComparison(MARKUP::ANCHOR_ATTRIBUTES::HREF, attribute.nameBuffer, attribute.nameLength)) @@ -47,6 +51,15 @@ void ProcessAnchor(const Tag& tag, Anchor& anchor) anchor.href[hrefLength - 1] = '\0'; // The memory is freed when the font run is removed from the logical model. } + else if(TokenComparison(MARKUP::ANCHOR_ATTRIBUTES::COLOR, attribute.nameBuffer, attribute.nameLength)) + { + ProcessColor(attribute, colorRun); + ProcessColorAttribute(attribute, underlinedCharacterRun); + } + else if(TokenComparison(MARKUP::ANCHOR_ATTRIBUTES::CLICKED_COLOR, attribute.nameBuffer, attribute.nameLength)) + { + ColorStringToVector4(attribute.valueBuffer, attribute.valueLength, anchor.clickedColor); + } } }