X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Flogical-model-impl.cpp;h=f1fd1f593837c4e32834889c920980c0a6dbd4e3;hb=0c862d5823332bc2161c64f901395f2390c82fd2;hp=8ecab1fa04c22e356f3550f5e64695fbd55e3cc4;hpb=f2039d47f9bed8104575da80a2ecf0bb6e37ff8d;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..f1fd1f5 100644 --- a/dali-toolkit/internal/text/logical-model-impl.cpp +++ b/dali-toolkit/internal/text/logical-model-impl.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. @@ -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,23 @@ 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 strikethrough runs. + Vector removedStrikethroughCharacterRuns; + UpdateCharacterRuns(index, + numberOfCharacters, + totalNumberOfCharacters, + mStrikethroughCharacterRuns, + removedStrikethroughCharacterRuns); + // Process the background color runs. Vector removedBackgroundColorRuns; UpdateCharacterRuns(index, @@ -573,6 +600,11 @@ void LogicalModel::ClearEmbeddedImages() FreeEmbeddedItems(mEmbeddedItems); } +void LogicalModel::ClearAnchors() +{ + FreeAnchors(mAnchors); +} + LogicalModel::~LogicalModel() { ClearFontDescriptionRuns();