TextView - Right to Left implementation.
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-view / split-by-new-line-char-policies.cpp
index 98ee6b8..f74966d 100644 (file)
@@ -71,14 +71,6 @@ Vector3 SplitPosition( const TextViewRelayout::RelayoutParameters& relayoutParam
                                              1.f, // Shrink factor
                                              subLineInfo );
 
-      // Stores some info to calculate the line justification in a post-process.
-      TextView::LineJustificationInfo justificationInfo;
-
-      justificationInfo.mIndices = relayoutParameters.mIndices;
-      justificationInfo.mLineLength = subLineInfo.mLineLength;
-
-      relayoutData.mLineJustificationInfo.push_back( justificationInfo );
-
       Toolkit::TextView::LineLayoutInfo lineInfo;
       lineInfo.mCharacterGlobalIndex = relayoutParameters.mCharacterGlobalIndex;    // Index to the first character of the next line.
       lineInfo.mSize = Size( subLineInfo.mLineLength, subLineInfo.mMaxCharHeight ); // Size of this piece of paragraph.
@@ -158,22 +150,6 @@ void CalculateSizeAndPosition( const TextView::LayoutParameters& layoutParameter
       relayoutParameters.mWordSize = wordLayoutInfo.mSize;
       relayoutParameters.mIndices.mCharacterIndex = 0u;
 
-      if( relayoutParameters.mIsNewLine )
-      {
-        // Stores some info to calculate the line justification in a post-process.
-        const bool isSplitOriginal = layoutParameters.mExceedPolicy == TextView::SplitOriginal;
-
-        if( !isSplitOriginal )
-        {
-          TextView::LineJustificationInfo justificationInfo;
-
-          justificationInfo.mIndices = relayoutParameters.mIndices;
-          justificationInfo.mLineLength = relayoutParameters.mParagraphSize.width;
-
-          relayoutData.mLineJustificationInfo.push_back( justificationInfo );
-        }
-      }
-
       for( TextViewProcessor::CharacterLayoutInfoContainer::iterator characterLayoutIt = wordLayoutInfo.mCharactersLayoutInfo.begin(),
              endCharacterLayoutIt = wordLayoutInfo.mCharactersLayoutInfo.end();
            characterLayoutIt != endCharacterLayoutIt;
@@ -290,10 +266,11 @@ void Relayout( Actor textView,
 {
   if( relayoutOperationMask & TextView::RELAYOUT_SIZE_POSITION )
   {
-    relayoutData.mLineJustificationInfo.clear();
     CalculateSizeAndPosition( layoutParameters,
                               relayoutData );
 
+    TextViewRelayout::ReorderRightToLeftLayout( relayoutData );
+
     TextViewRelayout::SetUnderlineInfo( relayoutData );
   }