Revert "[Tizen] Sorts text sequences in LTR and RTL by system language direction."
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 5 Nov 2018 08:19:23 +0000 (17:19 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 5 Nov 2018 08:19:23 +0000 (17:19 +0900)
This reverts commit f77a142d5fe5bd5972e5d940b3077634f3b9408a.

19 files changed:
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/text/bidirectional-support.cpp [changed mode: 0755->0644]
dali-toolkit/internal/text/bidirectional-support.h [changed mode: 0755->0644]
dali-toolkit/internal/text/text-controller-impl.cpp
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
docs/content/images/text-controls/HelloWorld-Default-BEGIN.png [deleted file]
docs/content/images/text-controls/HelloWorld-Default-CENTER.png [deleted file]
docs/content/images/text-controls/HelloWorld-Default-END.png
docs/content/images/text-controls/HelloWorld-System-BEGIN.png [deleted file]
docs/content/images/text-controls/HelloWorld-System-CENTER.png [deleted file]
docs/content/images/text-controls/HelloWorld-System-END.png
docs/content/images/text-controls/LTR_RTL.png [deleted file]
docs/content/images/text-controls/LTR_order.png [deleted file]
docs/content/images/text-controls/RTL_order.png [deleted file]
docs/content/shared-javascript-and-cpp-documentation/text-label.md

index bef3271..75312ef 100755 (executable)
@@ -70,8 +70,7 @@ public:
     }
     return bidirectionalSupportHandle;
   }
     }
     return bidirectionalSupportHandle;
   }
-  BidiInfoIndex CreateInfo( const Character* const paragraph, Length numberOfCharacters,
-                            bool matchSystemLanguageDirection, LayoutDirection::Type layoutDirection ){return 0;}
+  BidiInfoIndex CreateInfo( const Character* const paragraph, Length numberOfCharacters ){return 0;}
 
   void DestroyInfo( BidiInfoIndex bidiInfoIndex )
   {
 
   void DestroyInfo( BidiInfoIndex bidiInfoIndex )
   {
@@ -303,11 +302,9 @@ BidirectionalSupport BidirectionalSupport::Get()
 }
 
 BidiInfoIndex BidirectionalSupport::CreateInfo( const Character* const paragraph,
 }
 
 BidiInfoIndex BidirectionalSupport::CreateInfo( const Character* const paragraph,
-                                                Length numberOfCharacters,
-                                                bool matchSystemLanguageDirection,
-                                                LayoutDirection::Type layoutDirection )
+                                                Length numberOfCharacters )
 {
 {
-  return GetImplementation( *this ).CreateInfo( paragraph, numberOfCharacters, matchSystemLanguageDirection, layoutDirection );
+  return GetImplementation( *this ).CreateInfo( paragraph, numberOfCharacters );
 }
 
 void BidirectionalSupport::DestroyInfo( BidiInfoIndex bidiInfoIndex )
 }
 
 void BidirectionalSupport::DestroyInfo( BidiInfoIndex bidiInfoIndex )
index 5196d17..af57128 100755 (executable)
@@ -1226,10 +1226,6 @@ void TextEditor::OnInitialize()
   mController->SetNoTextDoubleTapAction( Controller::NoTextTap::HIGHLIGHT );
   mController->SetNoTextLongPressAction( Controller::NoTextTap::HIGHLIGHT );
 
   mController->SetNoTextDoubleTapAction( Controller::NoTextTap::HIGHLIGHT );
   mController->SetNoTextLongPressAction( Controller::NoTextTap::HIGHLIGHT );
 
-  // Sets layoutDirection value
-  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
-  mController->SetLayoutDirection( layoutDirection );
-
   // Forward input events to controller
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
   // Forward input events to controller
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
index 5077ced..d4485ba 100755 (executable)
@@ -1286,10 +1286,6 @@ void TextField::OnInitialize()
   mController->SetNoTextDoubleTapAction( Controller::NoTextTap::HIGHLIGHT );
   mController->SetNoTextLongPressAction( Controller::NoTextTap::HIGHLIGHT );
 
   mController->SetNoTextDoubleTapAction( Controller::NoTextTap::HIGHLIGHT );
   mController->SetNoTextLongPressAction( Controller::NoTextTap::HIGHLIGHT );
 
-  // Sets layoutDirection value
-  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
-  mController->SetLayoutDirection( layoutDirection );
-
   // Forward input events to controller
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
   // Forward input events to controller
   EnableGestureDetection( static_cast<Gesture::Type>( Gesture::Tap | Gesture::Pan | Gesture::LongPress ) );
   GetTapGestureDetector().SetMaximumTapsRequired( 2 );
index 376709a..7a8c283 100755 (executable)
@@ -884,10 +884,6 @@ void TextLabel::OnInitialize()
   // Enable the text ellipsis.
   mController->SetTextElideEnabled( true );   // If false then text larger than control will overflow
 
   // Enable the text ellipsis.
   mController->SetTextElideEnabled( true );   // If false then text larger than control will overflow
 
-  // Sets layoutDirection value
-  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
-  mController->SetLayoutDirection( layoutDirection );
-
   Layout::Engine& engine = mController->GetLayoutEngine();
   engine.SetCursorWidth( 0u ); // Do not layout space for the cursor.
 }
   Layout::Engine& engine = mController->GetLayoutEngine();
   engine.SetCursorWidth( 0u ); // Do not layout space for the cursor.
 }
old mode 100755 (executable)
new mode 100644 (file)
index 9f9bddc..57dc613
@@ -88,9 +88,7 @@ void SetBidirectionalInfo( const Vector<Character>& text,
                            const Vector<LineBreakInfo>& lineBreakInfo,
                            CharacterIndex startIndex,
                            Length numberOfCharacters,
                            const Vector<LineBreakInfo>& lineBreakInfo,
                            CharacterIndex startIndex,
                            Length numberOfCharacters,
-                           Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
-                           bool matchSystemLanguageDirection,
-                           Dali::LayoutDirection::Type layoutDirection )
+                           Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo )
 {
   // Find where to insert the new paragraphs.
   BidirectionalRunIndex bidiInfoIndex = 0u;
 {
   // Find where to insert the new paragraphs.
   BidirectionalRunIndex bidiInfoIndex = 0u;
@@ -167,9 +165,7 @@ void SetBidirectionalInfo( const Vector<Character>& text,
 
         // Create the bidirectional info for the whole paragraph and store the index to the table with this info in the run.
         bidirectionalRun.bidirectionalInfoIndex = bidirectionalSupport.CreateInfo( textBuffer + bidirectionalRun.characterRun.characterIndex,
 
         // Create the bidirectional info for the whole paragraph and store the index to the table with this info in the run.
         bidirectionalRun.bidirectionalInfoIndex = bidirectionalSupport.CreateInfo( textBuffer + bidirectionalRun.characterRun.characterIndex,
-                                                                                   bidirectionalRun.characterRun.numberOfCharacters,
-                                                                                   matchSystemLanguageDirection,
-                                                                                   layoutDirection );
+                                                                                   bidirectionalRun.characterRun.numberOfCharacters );
 
         bidirectionalInfo.Insert( bidirectionalInfo.Begin() + bidiInfoIndex, bidirectionalRun );
         ++bidiInfoIndex;
 
         bidirectionalInfo.Insert( bidirectionalInfo.Begin() + bidiInfoIndex, bidirectionalRun );
         ++bidiInfoIndex;
old mode 100755 (executable)
new mode 100644 (file)
index c29f401..39ec9d6
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/dali-vector.h>
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/actors/actor-enumerations.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/bidirectional-line-info-run.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/bidirectional-line-info-run.h>
@@ -46,17 +45,13 @@ namespace Text
  * @param[in] startIndex The character from where the bidirectional info is set.
  * @param[in] numberOfCharacters The number of characters.
  * @param[out] bidirectionalInfo Vector with the bidirectional infor for each paragraph.
  * @param[in] startIndex The character from where the bidirectional info is set.
  * @param[in] numberOfCharacters The number of characters.
  * @param[out] bidirectionalInfo Vector with the bidirectional infor for each paragraph.
- * @param[in] matchSystemLanguageDirection Whether match for system language direction or not.
- * @param[in] layoutDirection The direction of the system language.
  */
 void SetBidirectionalInfo( const Vector<Character>& text,
                            const Vector<ScriptRun>& scripts,
                            const Vector<LineBreakInfo>& lineBreakInfo,
                            CharacterIndex startIndex,
                            Length numberOfCharacters,
  */
 void SetBidirectionalInfo( const Vector<Character>& text,
                            const Vector<ScriptRun>& scripts,
                            const Vector<LineBreakInfo>& lineBreakInfo,
                            CharacterIndex startIndex,
                            Length numberOfCharacters,
-                           Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
-                           bool matchSystemLanguageDirection = false,
-                           Dali::LayoutDirection::Type layoutDirection = LayoutDirection::LEFT_TO_RIGHT );
+                           Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo );
 
 /**
  * Sets the visual to logical map tables.
 
 /**
  * Sets the visual to logical map tables.
index 97a3da9..caefc0c 100755 (executable)
@@ -963,9 +963,7 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired )
                           lineBreakInfo,
                           startIndex,
                           requestedNumberOfCharacters,
                           lineBreakInfo,
                           startIndex,
                           requestedNumberOfCharacters,
-                          bidirectionalInfo,
-                          mModel->mMatchSystemLanguageDirection,
-                          mLayoutDirection );
+                          bidirectionalInfo );
 
     if( 0u != bidirectionalInfo.Count() )
     {
 
     if( 0u != bidirectionalInfo.Count() )
     {
index 5d0543c..f0b496f 100755 (executable)
@@ -427,11 +427,6 @@ void Controller::SetMatchSystemLanguageDirection( bool match )
   mImpl->mModel->mMatchSystemLanguageDirection = match;
 }
 
   mImpl->mModel->mMatchSystemLanguageDirection = match;
 }
 
-void Controller::SetLayoutDirection( Dali::LayoutDirection::Type layoutDirection )
-{
-  mImpl->mLayoutDirection = layoutDirection;
-}
-
 
 void Controller::SetLineWrapMode( Text::LineWrap::Mode lineWrapMode )
 {
 
 void Controller::SetLineWrapMode( Text::LineWrap::Mode lineWrapMode )
 {
index 33f1f8f..f92a69d 100755 (executable)
@@ -1255,13 +1255,6 @@ public: // Queries & retrieves.
    */
   void SetMatchSystemLanguageDirection( bool match );
 
    */
   void SetMatchSystemLanguageDirection( bool match );
 
-  /**
-   * @brief Sets layoutDirection value
-   * @param[in] layoutDirection The value of system language direction
-   */
-  void SetLayoutDirection( Dali::LayoutDirection::Type layoutDirection );
-
-
 public: // Relayout.
 
   /**
 public: // Relayout.
 
   /**
diff --git a/docs/content/images/text-controls/HelloWorld-Default-BEGIN.png b/docs/content/images/text-controls/HelloWorld-Default-BEGIN.png
deleted file mode 100755 (executable)
index ca9d860..0000000
Binary files a/docs/content/images/text-controls/HelloWorld-Default-BEGIN.png and /dev/null differ
diff --git a/docs/content/images/text-controls/HelloWorld-Default-CENTER.png b/docs/content/images/text-controls/HelloWorld-Default-CENTER.png
deleted file mode 100755 (executable)
index cb28206..0000000
Binary files a/docs/content/images/text-controls/HelloWorld-Default-CENTER.png and /dev/null differ
index 204ba94..3302d08 100755 (executable)
Binary files a/docs/content/images/text-controls/HelloWorld-Default-END.png and b/docs/content/images/text-controls/HelloWorld-Default-END.png differ
diff --git a/docs/content/images/text-controls/HelloWorld-System-BEGIN.png b/docs/content/images/text-controls/HelloWorld-System-BEGIN.png
deleted file mode 100755 (executable)
index 11c8eda..0000000
Binary files a/docs/content/images/text-controls/HelloWorld-System-BEGIN.png and /dev/null differ
diff --git a/docs/content/images/text-controls/HelloWorld-System-CENTER.png b/docs/content/images/text-controls/HelloWorld-System-CENTER.png
deleted file mode 100755 (executable)
index cb28206..0000000
Binary files a/docs/content/images/text-controls/HelloWorld-System-CENTER.png and /dev/null differ
index d8c674b..2794090 100755 (executable)
Binary files a/docs/content/images/text-controls/HelloWorld-System-END.png and b/docs/content/images/text-controls/HelloWorld-System-END.png differ
diff --git a/docs/content/images/text-controls/LTR_RTL.png b/docs/content/images/text-controls/LTR_RTL.png
deleted file mode 100755 (executable)
index d9defc3..0000000
Binary files a/docs/content/images/text-controls/LTR_RTL.png and /dev/null differ
diff --git a/docs/content/images/text-controls/LTR_order.png b/docs/content/images/text-controls/LTR_order.png
deleted file mode 100755 (executable)
index 6e8a3c1..0000000
Binary files a/docs/content/images/text-controls/LTR_order.png and /dev/null differ
diff --git a/docs/content/images/text-controls/RTL_order.png b/docs/content/images/text-controls/RTL_order.png
deleted file mode 100755 (executable)
index b97e0f8..0000000
Binary files a/docs/content/images/text-controls/RTL_order.png and /dev/null differ
index 8b9d4d6..9b463e4 100755 (executable)
@@ -90,14 +90,14 @@ label.HorizontalAlignment = "BEGIN"; // "CENTER" or "END"
 
 
 
 
 
 
-The text's alignment and order can be modified to match the direction of the system language.
+The text's alignment can be modified to match the direction of the system language.
 
 
-If the MATCH_SYSTEM_LANGUAGE_DIRECTION property is set to true then the direction of the text is ignored, instead the text is aligned and ordered as the system default language.
+If the MATCH_SYSTEM_LANGUAGE_DIRECTION property is set to true then the direction of the text is ignored, instead the text is aligned as the system default language.
 
 ~~~{.cpp}
 // C++
 
 
 ~~~{.cpp}
 // C++
 
-label.SetProperty( Toolkit::DevelTextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION, true );
+label.SetProperty( TextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION, true );
 ~~~
 
 ~~~{.js}
 ~~~
 
 ~~~{.js}
@@ -109,19 +109,8 @@ label.matchSystemLanguageDirection = true;
 |  |  |
 |--|--|
 | Current system language direction left-to-right | |
 |  |  |
 |--|--|
 | Current system language direction left-to-right | |
-| MATCH_SYSTEM_LANGUAGE_DIRECTION set to TRUE. | MATCH_SYSTEM_LANGUAGE_DIRECTION set to FALSE (default). |
-| BEGIN alignment | BEGIN alignment  |
-| ![ ](../assets/img/text-controls/HelloWorld-System-BEGIN.png) ![ ](HelloWorld-System-BEGIN.png) | ![ ](../assets/img/text-controls/HelloWorld-Default-BEGIN.png) ![ ](HelloWorld-Default-BEGIN.png) |
-| CENTER alignment | CENTER alignment  |
-| ![ ](../assets/img/text-controls/HelloWorld-System-CENTER.png) ![ ](HelloWorld-System-CENTER.png) | ![ ](../assets/img/text-controls/HelloWorld-Default-CENTER.png) ![ ](HelloWorld-Default-CENTER.png) |
-| END alignment | END alignment  |
-| ![ ](../assets/img/text-controls/HelloWorld-System-END.png) ![ ](HelloWorld-System-END.png) | ![ ](../assets/img/text-controls/HelloWorld-Default-END.png) ![ ](HelloWorld-Default-END.png) |
-
-
-|  |  |
-|--|--|
-| Current system language direction left-to-right | Current system language direction right-to-left |
-| ![ ](../assets/img/text-controls/LTR_order.png) ![ ](LTR_order.png)  | ![ ](../assets/img/text-controls/RTL_order.png) ![ ](RTL_order.png) |
+| END alignment and MATCH_SYSTEM_LANGUAGE_DIRECTION set to TRUE. | END alignment and MATCH_SYSTEM_LANGUAGE_DIRECTION set to FALSE (default). |
+| ![ ](HelloWorld-System-END.png) | ![ ](HelloWorld-Default-END.png) |
 
 
 The examples above assume that the TextLabel size greater than the minimum required.  
 
 
 The examples above assume that the TextLabel size greater than the minimum required.