mTextModel->mLogicalModel->ClearUnderlineRuns();
mTextModel->mLogicalModel->ClearEmbeddedImages();
mTextModel->mLogicalModel->ClearAnchors();
+ mTextModel->mLogicalModel->ClearBidirectionalParagraphInfo();
// Free the allocated memory used to store the conversion table in the bidirectional line info run.
for(Vector<BidirectionalLineInfoRun>::Iterator it = mTextModel->mLogicalModel->mBidirectionalLineInfo.Begin(),
// Reset the anchors buffer.
logicalModel->ClearAnchors();
+ // Reset the bidirectional paragraph info.
+ logicalModel->ClearBidirectionalParagraphInfo();
+
// We have cleared everything including the placeholder-text
impl.PlaceholderCleared();
#include <dali-toolkit/internal/text/logical-model-impl.h>
// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/bidirectional-support.h>
#include <dali-toolkit/internal/text/bounded-paragraph-helper-functions.h>
#include <dali-toolkit/internal/text/input-style.h>
#include <dali-toolkit/internal/text/text-run-container.h>
FreeAnchors(mAnchors);
}
+void LogicalModel::ClearBidirectionalParagraphInfo()
+{
+ TextAbstraction::BidirectionalSupport bidirectionalSupport = TextAbstraction::BidirectionalSupport::Get();
+ if(bidirectionalSupport)
+ {
+ for(auto it = mBidirectionalParagraphInfo.Begin(),
+ endIt = mBidirectionalParagraphInfo.End();
+ it != endIt;
+ ++it)
+ {
+ auto infoIndex = it->bidirectionalInfoIndex;
+ bidirectionalSupport.DestroyInfo(infoIndex);
+ }
+ }
+}
+
LogicalModel::~LogicalModel()
{
ClearFontDescriptionRuns();
ClearEmbeddedImages();
+ ClearBidirectionalParagraphInfo();
}
LogicalModel::LogicalModel()