X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor-paragraph.cpp;h=e470bec7a4966cba2c084d018a8c40e0bfaa30d9;hb=refs%2Fchanges%2F03%2F274303%2F4;hp=35a1cc55b83deb040901997c209c889aba1fdf57;hpb=82031ca68ee58a2f30f01af3992523d0bb8e5fa6;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/markup-processor-paragraph.cpp b/dali-toolkit/internal/text/markup-processor-paragraph.cpp index 35a1cc5..e470bec 100644 --- a/dali-toolkit/internal/text/markup-processor-paragraph.cpp +++ b/dali-toolkit/internal/text/markup-processor-paragraph.cpp @@ -24,6 +24,7 @@ // INTERNAL INCLUDES #include #include +#include namespace Dali { @@ -31,11 +32,6 @@ namespace Toolkit { namespace Text { -namespace -{ -const std::string XHTML_ALIGN_ATTRIBUTE("align"); -} - void ProcessHorizontalAlignment(const Attribute& attribute, BoundedParagraphRun& boundedParagraphRun) { boundedParagraphRun.horizontalAlignmentDefined = HorizontalAlignmentTypeStringToTypeValue(attribute.valueBuffer, @@ -43,6 +39,12 @@ void ProcessHorizontalAlignment(const Attribute& attribute, BoundedParagraphRun& boundedParagraphRun.horizontalAlignment); } +void ProcessRelativeLineHeight(const Attribute& attribute, BoundedParagraphRun& boundedParagraphRun) +{ + boundedParagraphRun.relativeLineSize = StringToFloat(attribute.valueBuffer); + boundedParagraphRun.relativeLineSizeDefined = true; +} + void ProcessAttributesOfParagraphTag(const Tag& tag, BoundedParagraphRun& boundedParagraphRun) { // By default the align attribute is not defined until it's parsed. @@ -54,13 +56,16 @@ void ProcessAttributesOfParagraphTag(const Tag& tag, BoundedParagraphRun& bounde ++it) { const Attribute& attribute(*it); - if(TokenComparison(XHTML_ALIGN_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + if(TokenComparison(MARKUP::PARAGRAPH_ATTRIBUTES::ALIGN, attribute.nameBuffer, attribute.nameLength)) { ProcessHorizontalAlignment(attribute, boundedParagraphRun); } + else if(TokenComparison(MARKUP::PARAGRAPH_ATTRIBUTES::RELATIVE_LINE_HEIGHT, attribute.nameBuffer, attribute.nameLength)) + { + ProcessRelativeLineHeight(attribute, boundedParagraphRun); + } } } - } // namespace Text } // namespace Toolkit