X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Flayouts%2Flayout-engine.cpp;h=061707a7bffd434c422e2877b4a8a0b262d78b7f;hb=ce96793b0e8a68de6c562c1ad3114145b5223203;hp=0c3d9df9d02bf945a8dfafe39eb1dc9f09ef7ca0;hpb=7fed24cb5c2cd9c4dcc301568573b1f17fe8e5b7;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp old mode 100755 new mode 100644 index 0c3d9df..061707a --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -1104,9 +1104,7 @@ struct Engine::Impl Length numberOfCharacters, Text::HorizontalAlignment::Type horizontalAlignment, Vector& lines, - float& alignmentOffset, - Dali::LayoutDirection::Type layoutDirection, - bool matchSystemLanguageDirection ) + float& alignmentOffset ) { const CharacterIndex lastCharacterPlusOne = startIndex + numberOfCharacters; @@ -1134,9 +1132,7 @@ struct Engine::Impl // the box width, line length, and the paragraph's direction. CalculateHorizontalAlignment( size.width, horizontalAlignment, - line, - layoutDirection, - matchSystemLanguageDirection ); + line ); // Updates the alignment offset. alignmentOffset = std::min( alignmentOffset, line.alignmentOffset ); @@ -1145,24 +1141,16 @@ struct Engine::Impl void CalculateHorizontalAlignment( float boxWidth, HorizontalAlignment::Type horizontalAlignment, - LineRun& line, - Dali::LayoutDirection::Type layoutDirection, - bool matchSystemLanguageDirection ) + LineRun& line ) { line.alignmentOffset = 0.f; - bool isRTL = RTL == line.direction; + const bool isRTL = RTL == line.direction; float lineLength = line.width; - HorizontalAlignment::Type alignment = horizontalAlignment; - - // match align for system language direction - if( matchSystemLanguageDirection ) - { - isRTL = layoutDirection == LayoutDirection::RIGHT_TO_LEFT; - } - // Swap the alignment type if the line is right to left. + HorizontalAlignment::Type alignment = horizontalAlignment; if( isRTL ) { + // Swap the alignment type if the line is right to left. switch( alignment ) { case HorizontalAlignment::BEGIN: @@ -1181,7 +1169,6 @@ struct Engine::Impl break; } } - } // Calculate the horizontal line offset. @@ -1313,18 +1300,14 @@ void Engine::Align( const Size& size, Length numberOfCharacters, Text::HorizontalAlignment::Type horizontalAlignment, Vector& lines, - float& alignmentOffset, - Dali::LayoutDirection::Type layoutDirection, - bool matchSystemLanguageDirection ) + float& alignmentOffset ) { mImpl->Align( size, startIndex, numberOfCharacters, horizontalAlignment, lines, - alignmentOffset, - layoutDirection, - matchSystemLanguageDirection ); + alignmentOffset ); } void Engine::SetDefaultLineSpacing( float lineSpacing )