X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor-embedded-item.cpp;h=94d6fd41a2b3515b47448d5c78b7fcc6cff7d820;hb=refs%2Fchanges%2F69%2F272869%2F5;hp=1bfa3f47bef9971e0046eb48af86aa21551ecbdd;hpb=f2039d47f9bed8104575da80a2ecf0bb6e37ff8d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/markup-processor-embedded-item.cpp b/dali-toolkit/internal/text/markup-processor-embedded-item.cpp index 1bfa3f4..94d6fd4 100644 --- a/dali-toolkit/internal/text/markup-processor-embedded-item.cpp +++ b/dali-toolkit/internal/text/markup-processor-embedded-item.cpp @@ -25,6 +25,7 @@ // INTERNAL INCLUDES #include #include +#include namespace Dali { @@ -34,11 +35,6 @@ namespace Text { namespace { -const std::string XHTML_URL_ATTRIBUTE("url"); -const std::string XHTML_WIDTH_ATTRIBUTE("width"); -const std::string XHTML_HEIGHT_ATTRIBUTE("height"); -const std::string XHTML_COLOR_BLENDING_ATTRIBUTE("color-blending"); - const std::string NONE("none"); const std::string MULTIPLY("multiply"); } // namespace @@ -57,22 +53,22 @@ void ProcessEmbeddedItem(const Tag& tag, EmbeddedItem& embeddedItem) ++it) { const Attribute& attribute(*it); - if(TokenComparison(XHTML_URL_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + if(TokenComparison(MARKUP::EMBEDDED_ITEM_ATTRIBUTES::URL, attribute.nameBuffer, attribute.nameLength)) { embeddedItem.urlLength = attribute.valueLength; embeddedItem.url = new char[embeddedItem.urlLength]; memcpy(embeddedItem.url, attribute.valueBuffer, embeddedItem.urlLength); // The memory is freed when the font run is removed from the logical model. } - else if(TokenComparison(XHTML_WIDTH_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(MARKUP::EMBEDDED_ITEM_ATTRIBUTES::WIDTH, attribute.nameBuffer, attribute.nameLength)) { embeddedItem.width = StringToUint(attribute.valueBuffer); } - else if(TokenComparison(XHTML_HEIGHT_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(MARKUP::EMBEDDED_ITEM_ATTRIBUTES::HEIGHT, attribute.nameBuffer, attribute.nameLength)) { embeddedItem.height = StringToUint(attribute.valueBuffer); } - else if(TokenComparison(XHTML_COLOR_BLENDING_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(MARKUP::EMBEDDED_ITEM_ATTRIBUTES::COLOR_BLENDING, attribute.nameBuffer, attribute.nameLength)) { if(TokenComparison(MULTIPLY, attribute.valueBuffer, attribute.valueLength)) {