X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-effects-style.cpp;h=90c570ac8fde2f1c49c23829a749652722512eb5;hb=16561908a5e0e9bbef2aa11c9cdc3a27aeb1bd54;hp=8d552d4b798644b99f844d6c8ac45124497e16ae;hpb=b7108fc5f28fd650a1ea08a8692c822a63baf5bd;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-effects-style.cpp b/dali-toolkit/internal/text/text-effects-style.cpp index 8d552d4..90c570a 100644 --- a/dali-toolkit/internal/text/text-effects-style.cpp +++ b/dali-toolkit/internal/text/text-effects-style.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -22,7 +22,6 @@ #include #include #include -#include #include namespace Dali @@ -355,8 +354,8 @@ bool SetUnderlineProperties(ControllerPtr controller, const Property::Value& val { const Property::Map& propertiesMap = value.Get(); - bool enabled = false; - bool colorDefined = false; + bool enabled = false; + bool colorDefined = false; Vector4 color; bool heightDefined = false; float height = 0.f; @@ -976,11 +975,11 @@ bool SetStrikethroughProperties(ControllerPtr controller, const Property::Value& Text::ParsePropertyString(propertyString, parsedStringMap); empty = ParseStrikethroughProperties(parsedStringMap, - enabled, - colorDefined, - color, - heightDefined, - height); + enabled, + colorDefined, + color, + heightDefined, + height); controller->StrikethroughSetByString(!empty); } @@ -1057,7 +1056,7 @@ void GetStrikethroughProperties(ControllerPtr controller, Property::Value& value if(controller->IsStrikethroughSetByString()) { std::string strikethroughProperties = "{\"enable\":"; - const std::string enabledStr = enabled ? "true" : "false"; + const std::string enabledStr = enabled ? "true" : "false"; strikethroughProperties += "\"" + enabledStr + "\","; std::string colorStr; @@ -1092,6 +1091,17 @@ void GetStrikethroughProperties(ControllerPtr controller, Property::Value& value } } +Underline::Type StringToUnderlineType(const char* const underlineTypeStr) +{ + Underline::Type underlineType = Text::Underline::SOLID; + Scripting::GetEnumeration(underlineTypeStr, + UNDERLINE_TYPE_STRING_TABLE, + UNDERLINE_TYPE_STRING_TABLE_COUNT, + underlineType); + + return underlineType; +} + } // namespace Text } // namespace Toolkit