X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-model.cpp;h=3868979b5cec590836a94b773b84bd29c5de754e;hp=26a9be8fc4350fd6bda4842d08a4d6432ae8f79b;hb=93ad73e0e2c46aca4c191a1e2f075061e167e8b5;hpb=803fc4e52d3fc95261c5af0b05c25d6bf243bc00 diff --git a/dali-toolkit/internal/text/text-model.cpp b/dali-toolkit/internal/text/text-model.cpp index 26a9be8..3868979 100644 --- a/dali-toolkit/internal/text/text-model.cpp +++ b/dali-toolkit/internal/text/text-model.cpp @@ -18,12 +18,20 @@ // CLASS HEADER #include +// EXTERNAL INCLUDES +#include + namespace Dali { namespace Toolkit { namespace Text { +namespace +{ +const char* DALI_ENV_MATCH_SYSTEM_LANGUAGE_DIRECTION("DALI_MATCH_SYSTEM_LANGUAGE_DIRECTION"); +} + ModelPtr Model::New() { return ModelPtr(new Model()); @@ -221,10 +229,14 @@ Model::Model() mAlignmentOffset(0.0f), mElideEnabled(false), mIgnoreSpacesAfterText(true), - mMatchSystemLanguageDirection(false) + mMatchSystemLanguageDirection(true) { mLogicalModel = LogicalModel::New(); mVisualModel = VisualModel::New(); + + // Check environment variable for DALI_MATCH_SYSTEM_LANGUAGE_DIRECTION + auto match = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_MATCH_SYSTEM_LANGUAGE_DIRECTION); + mMatchSystemLanguageDirection = match ? (std::atoi(match) == 0 ? false : true) : mMatchSystemLanguageDirection; } Model::~Model()