X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-impl.cpp;h=294b534827cb45dbcac1a360fa9de708816527a8;hp=db6fde1c81297e6967136ffe041522ecd59ffd15;hb=076f84a43592f26ff0aa2bced54583f712800fe3;hpb=895806b4ad86de88dcc731aeb8e3dbe453ce4202 diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index db6fde1..294b534 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -39,6 +39,7 @@ #include #include #include +#include using namespace Dali; @@ -1620,9 +1621,22 @@ void Controller::Impl::CopyUnderlinedFromLogicalToVisualModels(bool shouldClearP Length numberOfCharacters = it->characterRun.numberOfCharacters; for(Length index = 0u; index < numberOfCharacters; index++) { - GlyphRun underlineGlyphRun; - underlineGlyphRun.glyphIndex = charactersToGlyph[characterIndex + index]; - underlineGlyphRun.numberOfGlyphs = glyphsPerCharacter[characterIndex + index]; + UnderlinedGlyphRun underlineGlyphRun; + underlineGlyphRun.glyphRun.glyphIndex = charactersToGlyph[characterIndex + index]; + underlineGlyphRun.glyphRun.numberOfGlyphs = glyphsPerCharacter[characterIndex + index]; + + //Copy properties (attributes) + underlineGlyphRun.properties.type = it->properties.type; + underlineGlyphRun.properties.color = it->properties.color; + underlineGlyphRun.properties.height = it->properties.height; + underlineGlyphRun.properties.dashGap = it->properties.dashGap; + underlineGlyphRun.properties.dashWidth = it->properties.dashWidth; + underlineGlyphRun.properties.typeDefined = it->properties.typeDefined; + underlineGlyphRun.properties.colorDefined = it->properties.colorDefined; + underlineGlyphRun.properties.heightDefined = it->properties.heightDefined; + underlineGlyphRun.properties.dashGapDefined = it->properties.dashGapDefined; + underlineGlyphRun.properties.dashWidthDefined = it->properties.dashWidthDefined; + mModel->mVisualModel->mUnderlineRuns.PushBack(underlineGlyphRun); } } @@ -1639,8 +1653,14 @@ void Controller::Impl::CopyStrikethroughFromLogicalToVisualModels() for(Vector::ConstIterator it = strikethroughCharacterRuns.Begin(), endIt = strikethroughCharacterRuns.End(); it != endIt; ++it) { - CharacterIndex characterIndex = it->characterRun.characterIndex; - Length numberOfCharacters = it->characterRun.numberOfCharacters; + CharacterIndex characterIndex = it->characterRun.characterIndex; + Length numberOfCharacters = it->characterRun.numberOfCharacters; + + if(numberOfCharacters == 0) + { + continue; + } + StrikethroughGlyphRun strikethroughGlyphRun; strikethroughGlyphRun.color = it->color; strikethroughGlyphRun.isColorSet = it->isColorSet; @@ -1836,6 +1856,7 @@ void Controller::Impl::ClearStyleData() { mModel->mLogicalModel->mColorRuns.Clear(); mModel->mLogicalModel->ClearFontDescriptionRuns(); + mModel->mLogicalModel->ClearStrikethroughRuns(); } void Controller::Impl::ResetScrollPosition()