Support paragraph tag <p> in markup
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / logical-model-impl.cpp
index 4516662..9ad00bc 100644 (file)
@@ -19,6 +19,7 @@
 #include <dali-toolkit/internal/text/logical-model-impl.h>
 
 // INTERNAL INCLUDES
+#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>
 
@@ -331,6 +332,19 @@ void LogicalModel::UpdateTextStyleRuns(CharacterIndex index, int numberOfCharact
 
   // Free memory allocated for the font family name.
   FreeFontFamilyNames(removedFontDescriptionRuns);
+
+  // Process the bounded paragraph runs
+  MergeBoundedParagraphRunsWhenRemoveCharacters(mText,
+                                                index,
+                                                numberOfCharacters,
+                                                mBoundedParagraphRuns);
+
+  Vector<BoundedParagraphRun> removedBoundedParagraphRuns;
+  UpdateCharacterRuns<BoundedParagraphRun>(index,
+                                           numberOfCharacters,
+                                           totalNumberOfCharacters,
+                                           mBoundedParagraphRuns,
+                                           removedBoundedParagraphRuns);
 }
 
 void LogicalModel::RetrieveStyle(CharacterIndex index, InputStyle& style)
@@ -600,6 +614,16 @@ void LogicalModel::FindParagraphs(CharacterIndex             index,
   }
 }
 
+Length LogicalModel::GetNumberOfBoundedParagraphRuns() const
+{
+  return mBoundedParagraphRuns.Count();
+}
+
+const Vector<BoundedParagraphRun>& LogicalModel::GetBoundedParagraphRuns() const
+{
+  return mBoundedParagraphRuns;
+}
+
 void LogicalModel::ClearEmbeddedImages()
 {
   FreeEmbeddedItems(mEmbeddedItems);