X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Flogical-model-impl.cpp;h=0de63d5774257ae3da7e22c5ef5eb26859888b53;hb=75fe6c4a2f784bd52ccf8eb16049317825338a6e;hp=8ecab1fa04c22e356f3550f5e64695fbd55e3cc4;hpb=b8da2e53925b9abb9fa362560069e8ca4aa62f81;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/logical-model-impl.cpp b/dali-toolkit/internal/text/logical-model-impl.cpp index 8ecab1f..0de63d5 100644 --- a/dali-toolkit/internal/text/logical-model-impl.cpp +++ b/dali-toolkit/internal/text/logical-model-impl.cpp @@ -55,6 +55,16 @@ void FreeEmbeddedItems(Vector& embeddedItem) embeddedItem.Clear(); } +void FreeAnchors(Vector& anchors) +{ + for(auto&& anchor : anchors) + { + delete[] anchor.href; + } + + anchors.Clear(); +} + LogicalModelPtr LogicalModel::New() { return LogicalModelPtr(new LogicalModel()); @@ -286,6 +296,15 @@ void LogicalModel::UpdateTextStyleRuns(CharacterIndex index, int numberOfCharact mColorRuns, removedColorRuns); + // This is needed until now for underline tag in mark-up processor + // Process the underlined runs. + Vector removedUnderlinedCharacterRuns; + UpdateCharacterRuns(index, + numberOfCharacters, + totalNumberOfCharacters, + mUnderlinedCharacterRuns, + removedUnderlinedCharacterRuns); + // Process the background color runs. Vector removedBackgroundColorRuns; UpdateCharacterRuns(index, @@ -573,6 +592,11 @@ void LogicalModel::ClearEmbeddedImages() FreeEmbeddedItems(mEmbeddedItems); } +void LogicalModel::ClearAnchors() +{ + FreeAnchors(mAnchors); +} + LogicalModel::~LogicalModel() { ClearFontDescriptionRuns();