Revert "[Tizen] modifies match align for first sentence line direciton" 31/191531/1
authorJoogab Yun <joogab.yun@samsung.com>
Thu, 18 Oct 2018 06:00:32 +0000 (15:00 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Thu, 18 Oct 2018 06:01:04 +0000 (15:01 +0900)
Change-Id: Id4061f06cd95685681f8a504a2b126df93471e93

dali-toolkit/internal/text/layouts/layout-engine.cpp

index 99eda82..0c3d9df 100755 (executable)
@@ -1111,9 +1111,6 @@ struct Engine::Impl
     const CharacterIndex lastCharacterPlusOne = startIndex + numberOfCharacters;
 
     alignmentOffset = MAX_FLOAT;
-
-    const bool firstLineDirection = matchSystemLanguageDirection == true ? lines.Begin()->direction : false;
-
     // Traverse all lines and align the glyphs.
     for( Vector<LineRun>::Iterator it = lines.Begin(), endIt = lines.End();
          it != endIt;
@@ -1139,8 +1136,7 @@ struct Engine::Impl
                                     horizontalAlignment,
                                     line,
                                     layoutDirection,
-                                    matchSystemLanguageDirection,
-                                    firstLineDirection );
+                                    matchSystemLanguageDirection );
 
       // Updates the alignment offset.
       alignmentOffset = std::min( alignmentOffset, line.alignmentOffset );
@@ -1151,18 +1147,17 @@ struct Engine::Impl
                                      HorizontalAlignment::Type horizontalAlignment,
                                      LineRun& line,
                                      Dali::LayoutDirection::Type layoutDirection,
-                                     bool matchSystemLanguageDirection,
-                                     const bool firstLineDirection )
+                                     bool matchSystemLanguageDirection )
   {
     line.alignmentOffset = 0.f;
     bool isRTL = RTL == line.direction;
     float lineLength = line.width;
     HorizontalAlignment::Type alignment = horizontalAlignment;
 
-    // match align for first line direction and system language direction
+    // match align for system language direction
     if( matchSystemLanguageDirection )
     {
-      isRTL = ( ( RTL == firstLineDirection ) && ( layoutDirection == LayoutDirection::RIGHT_TO_LEFT ) );
+      isRTL = layoutDirection == LayoutDirection::RIGHT_TO_LEFT;
     }
 
     // Swap the alignment type if the line is right to left.