X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor-embedded-item.cpp;h=1bfa3f47bef9971e0046eb48af86aa21551ecbdd;hb=75fe6c4a2f784bd52ccf8eb16049317825338a6e;hp=7751c010c18f03a2bda91538208de7f5b64cc27d;hpb=d82494a77e405d5924cf1af3fe55b2d9b9577e3f;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 old mode 100755 new mode 100644 index 7751c01..1bfa3f4 --- a/dali-toolkit/internal/text/markup-processor-embedded-item.cpp +++ b/dali-toolkit/internal/text/markup-processor-embedded-item.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,13 +28,10 @@ namespace Dali { - namespace Toolkit { - namespace Text { - namespace { const std::string XHTML_URL_ATTRIBUTE("url"); @@ -44,40 +41,40 @@ const std::string XHTML_COLOR_BLENDING_ATTRIBUTE("color-blending"); const std::string NONE("none"); const std::string MULTIPLY("multiply"); -} +} // namespace -void ProcessEmbeddedItem( const Tag& tag, EmbeddedItem& embeddedItem ) +void ProcessEmbeddedItem(const Tag& tag, EmbeddedItem& embeddedItem) { - embeddedItem.url = nullptr; - embeddedItem.urlLength = 0u; - embeddedItem.width = 0u; - embeddedItem.height = 0u; + embeddedItem.url = nullptr; + embeddedItem.urlLength = 0u; + embeddedItem.width = 0u; + embeddedItem.height = 0u; embeddedItem.colorBlendingMode = ColorBlendingMode::NONE; - for( Vector::ConstIterator it = tag.attributes.Begin(), - endIt = tag.attributes.End(); - it != endIt; - ++it ) + for(Vector::ConstIterator it = tag.attributes.Begin(), + endIt = tag.attributes.End(); + it != endIt; + ++it) { - const Attribute& attribute( *it ); - if( TokenComparison(XHTML_URL_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength ) ) + const Attribute& attribute(*it); + if(TokenComparison(XHTML_URL_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) { embeddedItem.urlLength = attribute.valueLength; - embeddedItem.url = new char[embeddedItem.urlLength]; + 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(XHTML_WIDTH_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) { embeddedItem.width = StringToUint(attribute.valueBuffer); } - else if (TokenComparison(XHTML_HEIGHT_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(XHTML_HEIGHT_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) { embeddedItem.height = StringToUint(attribute.valueBuffer); } - else if (TokenComparison(XHTML_COLOR_BLENDING_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(XHTML_COLOR_BLENDING_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) { - if (TokenComparison(MULTIPLY, attribute.valueBuffer, attribute.valueLength)) + if(TokenComparison(MULTIPLY, attribute.valueBuffer, attribute.valueLength)) { embeddedItem.colorBlendingMode = ColorBlendingMode::MULTIPLY; }