X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-internal%2Fdali-toolkit-test-utils%2Ftoolkit-text-utils.cpp;h=64a8473cadb3e13e99546aba504fca27ad4cd72c;hb=798b5089bac6f9aec6458b3f12b3652cbaab7bb1;hp=6028e0263d5ddbd774e1c8567c15b826ed39ce18;hpb=862dfd28532f834238394c7ec0a15069c9bd2188;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp b/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp index 6028e02..64a8473 100755 --- a/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp +++ b/automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp @@ -102,7 +102,9 @@ void CreateTextModel( const std::string& text, ModelPtr& textModel, MetricsPtr& metrics, bool markupProcessorEnabled, - LineWrap::Mode wrapMode ) + LineWrap::Mode wrapMode, + bool ellipsisEnabled, + DevelText::EllipsisPosition::Type ellipsisPosition) { textModel = Model::New(); ///< Pointer to the text's model. LogicalModelPtr logicalModel = textModel->mLogicalModel; @@ -133,6 +135,12 @@ void CreateTextModel( const std::string& text, utf8 = reinterpret_cast( text.c_str() ); } + //Ellipsis + textModel-> mElideEnabled = ellipsisEnabled; + textModel-> mVisualModel->SetTextElideEnabled(ellipsisEnabled); + textModel-> mEllipsisPosition = ellipsisPosition; + textModel-> mVisualModel->SetEllipsisPosition(ellipsisPosition); + // 1) Convert to utf32 Vector& utf32Characters = logicalModel->mText; utf32Characters.Resize( textSize ); @@ -323,7 +331,6 @@ void CreateTextModel( const std::string& text, // Set the layout parameters. textModel->mHorizontalAlignment = Text::HorizontalAlignment::BEGIN; textModel->mIgnoreSpacesAfterText = true; - textModel->mMatchSystemLanguageDirection = false; Layout::Parameters layoutParameters( textArea, textModel ); @@ -344,7 +351,8 @@ void CreateTextModel( const std::string& text, layoutEngine.LayoutText( layoutParameters, layoutSize, false, - isAutoScroll ); + isAutoScroll, + ellipsisPosition); if( options.align ) { @@ -385,7 +393,7 @@ void ConfigureTextLabel( ControllerPtr controller ) controller->SetTextElideEnabled( true ); // Disable match system language direction - controller->SetMatchSystemLanguageDirection(false); + controller->SetMatchLayoutDirection(DevelText::MatchLayoutDirection::CONTENTS); } void ConfigureTextField( ControllerPtr controller ) @@ -417,7 +425,7 @@ void ConfigureTextField( ControllerPtr controller ) controller->SetTextElideEnabled( false ); // Disable match system language direction - controller->SetMatchSystemLanguageDirection(false); + controller->SetMatchLayoutDirection(DevelText::MatchLayoutDirection::CONTENTS); } void ConfigureTextEditor( ControllerPtr controller ) @@ -449,7 +457,7 @@ void ConfigureTextEditor( ControllerPtr controller ) controller->SetTextElideEnabled( false ); // Disable match system language direction - controller->SetMatchSystemLanguageDirection(false); + controller->SetMatchLayoutDirection(DevelText::MatchLayoutDirection::CONTENTS); } } // namespace Text