Renaming of enum values for coding standards compliance. 69/242669/2
authorGyörgy Straub <g.straub@partner.samsung.com>
Fri, 28 Aug 2020 12:20:30 +0000 (13:20 +0100)
committerGyörgy Straub <g.straub@partner.samsung.com>
Tue, 1 Sep 2020 07:18:46 +0000 (08:18 +0100)
Change-Id: I33856473015291aee43b3c584742fe52313f7db1
Signed-off-by: György Straub <g.straub@partner.samsung.com>
16 files changed:
dali/devel-api/adaptor-framework/accessibility-gesture-event.h
dali/devel-api/adaptor-framework/input-method-context.h
dali/devel-api/adaptor-framework/virtual-keyboard.h
dali/integration-api/adaptor-framework/scene-holder-impl.cpp
dali/internal/accessibility/common/accessibility-adaptor-impl.cpp
dali/internal/accessibility/common/accessibility-gesture-detector.cpp
dali/internal/accessibility/common/accessibility-gesture-detector.h
dali/internal/input/generic/input-method-context-impl-generic.cpp
dali/internal/input/generic/virtual-keyboard-impl-generic.cpp
dali/internal/input/tizen-wayland/ecore-virtual-keyboard.cpp
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp
dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp
dali/internal/input/windows/input-method-context-impl-win.cpp
dali/internal/input/windows/virtual-keyboard-impl-win.cpp
dali/internal/system/common/locale-utils.cpp
dali/internal/system/common/locale-utils.h

index 30a54f24b376fc84a1b905c44aadac303307ed02..800c660278fbed9009b41f3a0cd8878701b4ffcb 100644 (file)
@@ -60,12 +60,12 @@ struct AccessibilityGestureEvent
 
   enum State
   {
-    Clear,      ///< There is no state associated with this gesture. @SINCE_1_0.0
-    Started,    ///< The touched points on the screen have moved enough to be considered a gesture. @SINCE_1_0.0
-    Continuing, ///< The gesture is continuing. @SINCE_1_0.0
-    Finished,   ///< The user has lifted a finger or touched an additional point on the screen. @SINCE_1_0.0
-    Cancelled,  ///< The gesture has been cancelled. @SINCE_1_0.0
-    Possible    ///< A gesture is possible. @SINCE_1_0.0
+    CLEAR,      ///< There is no state associated with this gesture. @SINCE_1_9.28
+    STARTED,    ///< The touched points on the screen have moved enough to be considered a gesture. @SINCE_1_9.28
+    CONTINUING, ///< The gesture is continuing. @SINCE_1_9.28
+    FINISHED,   ///< The user has lifted a finger or touched an additional point on the screen. @SINCE_1_9.28
+    CANCELLED,  ///< The gesture has been cancelled. @SINCE_1_9.28
+    POSSIBLE    ///< A gesture is possible. @SINCE_1_9.28
   };
 
   State state;
index 04a8e72b22a3b2e0d9cdcd6a0fe9f71d55702627..3c6e33dcb8fcf9553e8ee2562bd16b053cf5ebdb 100755 (executable)
@@ -54,8 +54,8 @@ public:
    */
   enum TextDirection
   {
-    LeftToRight,
-    RightToLeft,
+    LEFT_TO_RIGHT,
+    RIGHT_TO_LEFT,
   };
 
   /**
index 84c2d4e6b9d2d146c296da01ae64e6025f112f1f..78ae0c4d352dce59d73b1f302c6d1473ff75ecae 100755 (executable)
@@ -51,8 +51,8 @@ typedef Signal< void ( int ) > LanguageChangedSignalType;
  */
 enum TextDirection
 {
-  LeftToRight,
-  RightToLeft,
+  LEFT_TO_RIGHT,
+  RIGHT_TO_LEFT,
 };
 
 /**
index e545376fe9f8969548ab63e0208ad3a3addd113d..e9c8a19455253b06fed5329f5d4fe906563951b9 100644 (file)
@@ -303,7 +303,7 @@ void SceneHolder::FeedTouchPoint( Dali::Integration::Point& point, int timeStamp
   Integration::TouchEvent touchEvent;
   Integration::HoverEvent hoverEvent;
   Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
-  if( type != Integration::TouchEventCombiner::DispatchNone )
+  if( type != Integration::TouchEventCombiner::DISPATCH_NONE )
   {
     DALI_LOG_INFO( gSceneHolderLogFilter, Debug::Verbose, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.GetDeviceId(), point.GetState(), point.GetScreenPosition().x, point.GetScreenPosition().y );
 
@@ -312,12 +312,12 @@ void SceneHolder::FeedTouchPoint( Dali::Integration::Point& point, int timeStamp
     Dali::BaseHandle sceneHolder( this );
 
     // First the touch and/or hover event & related gesture events are queued
-    if( type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth )
+    if( type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH )
     {
       mScene.QueueEvent( touchEvent );
     }
 
-    if( type == Integration::TouchEventCombiner::DispatchHover || type == Integration::TouchEventCombiner::DispatchBoth )
+    if( type == Integration::TouchEventCombiner::DISPATCH_HOVER || type == Integration::TouchEventCombiner::DISPATCH_BOTH )
     {
       mScene.QueueEvent( hoverEvent );
     }
index 5700fceb95797f392be009d5278631164f9beb35..aed44c78f5ac418c3a494a7e7861b209ee9c1f48 100644 (file)
@@ -257,7 +257,7 @@ bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, uint
   Integration::TouchEvent touchEvent;
   Integration::HoverEvent hoverEvent;
   Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent( Integration::Point( point ), timeStamp, touchEvent, hoverEvent );
-  if( type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth ) // hover event is ignored
+  if( type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH ) // hover event is ignored
   {
     // Process the touch event in accessibility gesture detector
     if( mAccessibilityGestureDetector )
index 5a7fd8d77698d55526806080c567bf64007699b9..18ae7c1f447c5d1e0c25e37ce7342334a25fd5c9 100644 (file)
@@ -46,7 +46,7 @@ namespace
 
 
 AccessibilityGestureDetector::AccessibilityGestureDetector()
-: mState( Clear ),
+: mState( CLEAR ),
   mScene(nullptr),
   mGestureHandler(nullptr),
   mPanning(false),
@@ -74,7 +74,7 @@ void AccessibilityGestureDetector::EmitPan(const AccessibilityGestureEvent gestu
 {
   if( mGestureHandler )
   {
-    if(gesture.state == AccessibilityGestureEvent::Started)
+    if(gesture.state == AccessibilityGestureEvent::STARTED)
     {
       mPanning = true;
     }
@@ -83,8 +83,8 @@ void AccessibilityGestureDetector::EmitPan(const AccessibilityGestureEvent gestu
     {
       mGestureHandler->HandlePanGesture(gesture);
 
-      if( (gesture.state == AccessibilityGestureEvent::Finished) ||
-          (gesture.state == AccessibilityGestureEvent::Cancelled) )
+      if( (gesture.state == AccessibilityGestureEvent::FINISHED) ||
+          (gesture.state == AccessibilityGestureEvent::CANCELLED) )
       {
         mPanning = false;
       }
@@ -98,20 +98,20 @@ void AccessibilityGestureDetector::SendEvent(const Integration::TouchEvent& even
 
   if (primaryPointState == PointState::INTERRUPTED)
   {
-    if ( ( mState == Started ) || ( mState == Possible ) )
+    if ( ( mState == STARTED ) || ( mState == POSSIBLE ) )
     {
       // If our pan had started and we are interrupted, then tell Core that pan is cancelled.
       mTouchEvents.push_back(event);
-      SendPan(AccessibilityGestureEvent::Cancelled, event);
+      SendPan(AccessibilityGestureEvent::CANCELLED, event);
     }
-    mState = Clear; // We should change our state to Clear.
+    mState = CLEAR; // We should change our state to CLEAR.
     mTouchEvents.clear();
   }
   else
   {
     switch (mState)
     {
-      case Clear:
+      case CLEAR:
       {
         if ( ( primaryPointState == PointState::DOWN ) || ( primaryPointState == PointState::STATIONARY ) )
         {
@@ -121,8 +121,8 @@ void AccessibilityGestureDetector::SendEvent(const Integration::TouchEvent& even
           if (event.GetPointCount() == mMinimumTouchesRequired)
           {
             // We have satisfied the minimum touches required for a pan, tell core that a gesture may be possible and change our state accordingly.
-            mState = Possible;
-            SendPan(AccessibilityGestureEvent::Possible, event);
+            mState = POSSIBLE;
+            SendPan(AccessibilityGestureEvent::POSSIBLE, event);
           }
 
           mTouchEvents.push_back(event);
@@ -130,7 +130,7 @@ void AccessibilityGestureDetector::SendEvent(const Integration::TouchEvent& even
         break;
       }
 
-      case Possible:
+      case POSSIBLE:
       {
         unsigned int pointCount(event.GetPointCount());
         if ( (pointCount >= mMinimumTouchesRequired)&&(pointCount <= mMaximumTouchesRequired) )
@@ -146,8 +146,8 @@ void AccessibilityGestureDetector::SendEvent(const Integration::TouchEvent& even
                  ( delta.LengthSquared() >= static_cast<float>( mMinimumDistanceSquared ) ) )
             {
               // If the touch point(s) have moved enough distance to be considered a pan, then tell Core that the pan gesture has started and change our state accordingly.
-              mState = Started;
-              SendPan(AccessibilityGestureEvent::Started, event);
+              mState = STARTED;
+              SendPan(AccessibilityGestureEvent::STARTED, event);
             }
           }
           else if (primaryPointState == PointState::UP)
@@ -155,40 +155,40 @@ void AccessibilityGestureDetector::SendEvent(const Integration::TouchEvent& even
             Vector2 delta(event.points[0].GetScreenPosition() - mPrimaryTouchDownLocation);
             if (delta.LengthSquared() >= static_cast<float>( mMinimumDistanceSquared ) )
             {
-              SendPan(AccessibilityGestureEvent::Started, event);
+              SendPan(AccessibilityGestureEvent::STARTED, event);
               mTouchEvents.push_back(event);
-              SendPan(AccessibilityGestureEvent::Finished, event);
+              SendPan(AccessibilityGestureEvent::FINISHED, event);
             }
             else
             {
-              // If we have lifted the primary touch point then tell core the pan is cancelled and change our state to Clear.
-              SendPan(AccessibilityGestureEvent::Cancelled, event);
+              // If we have lifted the primary touch point then tell core the pan is cancelled and change our state to CLEAR.
+              SendPan(AccessibilityGestureEvent::CANCELLED, event);
             }
-            mState = Clear;
+            mState = CLEAR;
             mTouchEvents.clear();
           }
         }
         else
         {
           // We do not satisfy pan conditions, tell Core our Gesture has been cancelled.
-          SendPan(AccessibilityGestureEvent::Cancelled, event);
+          SendPan(AccessibilityGestureEvent::CANCELLED, event);
 
           if (pointCount == 1 && primaryPointState == PointState::UP)
           {
-            // If we have lifted the primary touch point, then change our state to Clear...
-            mState = Clear;
+            // If we have lifted the primary touch point, then change our state to CLEAR...
+            mState = CLEAR;
             mTouchEvents.clear();
           }
           else
           {
-            // ...otherwise change it to Failed.
-            mState = Failed;
+            // ...otherwise change it to FAILED.
+            mState = FAILED;
           }
         }
         break;
       }
 
-      case Started:
+      case STARTED:
       {
         mTouchEvents.push_back(event);
 
@@ -199,13 +199,13 @@ void AccessibilityGestureDetector::SendEvent(const Integration::TouchEvent& even
           {
             case PointState::MOTION:
               // Pan is continuing, tell Core.
-              SendPan(AccessibilityGestureEvent::Continuing, event);
+              SendPan(AccessibilityGestureEvent::CONTINUING, event);
               break;
 
             case PointState::UP:
-              // Pan is finally finished when our primary point is lifted, tell Core and change our state to Clear.
-              SendPan(AccessibilityGestureEvent::Finished, event);
-              mState = Clear;
+              // Pan is finally finished when our primary point is lifted, tell Core and change our state to CLEAR.
+              SendPan(AccessibilityGestureEvent::FINISHED, event);
+              mState = CLEAR;
               mTouchEvents.clear();
               break;
 
@@ -217,9 +217,9 @@ void AccessibilityGestureDetector::SendEvent(const Integration::TouchEvent& even
                 {
                   if(iter->GetState() == PointState::UP)
                   {
-                    // The number of touch points will be less than the minimum required.  Inform core and change our state to Finished.
-                    SendPan(AccessibilityGestureEvent::Finished, event);
-                    mState = Finished;
+                    // The number of touch points will be less than the minimum required.  Inform core and change our state to FINISHED.
+                    SendPan(AccessibilityGestureEvent::FINISHED, event);
+                    mState = FINISHED;
                     break;
                   }
                 }
@@ -233,30 +233,30 @@ void AccessibilityGestureDetector::SendEvent(const Integration::TouchEvent& even
         else
         {
           // We have gone outside of the pan requirements, inform Core that the gesture is finished.
-          SendPan(AccessibilityGestureEvent::Finished, event);
+          SendPan(AccessibilityGestureEvent::FINISHED, event);
 
           if (pointCount == 1 && primaryPointState == PointState::UP)
           {
-            // If this was the primary point being released, then we change our state back to Clear...
-            mState = Clear;
+            // If this was the primary point being released, then we change our state back to CLEAR...
+            mState = CLEAR;
             mTouchEvents.clear();
           }
           else
           {
-            // ...otherwise we change it to Finished.
-            mState = Finished;
+            // ...otherwise we change it to FINISHED.
+            mState = FINISHED;
           }
         }
         break;
       }
 
-      case Finished:
-      case Failed:
+      case FINISHED:
+      case FAILED:
       {
         if (primaryPointState == PointState::UP)
         {
           // Change our state back to clear when the primary touch point is released.
-          mState = Clear;
+          mState = CLEAR;
           mTouchEvents.clear();
         }
         break;
@@ -280,7 +280,7 @@ void AccessibilityGestureDetector::SendPan(AccessibilityGestureEvent::State stat
     uint32_t previousTime( previousEvent.time );
 
     // If we've just started then we want to remove the threshold from Core calculations.
-    if ( state == AccessibilityGestureEvent::Started )
+    if ( state == AccessibilityGestureEvent::STARTED )
     {
       previousPosition = mPrimaryTouchDownLocation;
       previousTime = mPrimaryTouchDownTime;
index 520b3f68ee4a4e051315e8da2397de2738708fd6..e9297f290e3028a50d78e60530f954b38a54cf2d 100644 (file)
@@ -93,11 +93,11 @@ private:
    */
   enum State
   {
-    Clear,    ///< No gesture detected.
-    Possible, ///< The current touch event data suggests that a gesture is possible.
-    Started,  ///< A gesture has been detected.
-    Finished, ///< A previously started pan gesture has finished.
-    Failed,   ///< Current touch event data suggests a pan gesture is not possible.
+    CLEAR,    ///< No gesture detected.
+    POSSIBLE, ///< The current touch event data suggests that a gesture is possible.
+    STARTED,  ///< A gesture has been detected.
+    FINISHED, ///< A previously started pan gesture has finished.
+    FAILED,   ///< Current touch event data suggests a pan gesture is not possible.
   };
 
   State mState; ///< The current state of the detector.
index 1da21dc3c4be7b03f0968cb3eb6c046b42d1e8b2..43206c236a49f7ff9f2a4ac48d5afd9e1da92c74 100644 (file)
@@ -185,7 +185,7 @@ void InputMethodContextGeneric::NotifyTextInputMultiLine( bool multiLine )
 
 Dali::InputMethodContext::TextDirection InputMethodContextGeneric::GetTextDirection()
 {
-  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );
+  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );
   return direction;
 }
 
index 6c55384908e70c36ffdfb725f53e64c281fec6be..80994ec4f042bb8b794ab87d94cbe716acb7b7b3 100644 (file)
@@ -103,7 +103,7 @@ Dali::VirtualKeyboard::TextDirection GetTextDirection()
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "VirtualKeyboard::GetTextDirection\n" );
 
-  return Dali::VirtualKeyboard::LeftToRight;
+  return Dali::VirtualKeyboard::LEFT_TO_RIGHT;
 }
 
 } // namespace VirtualKeyboard
index 83190943a1351c5a3193801910c2fb8599f3b0dc..3d56d247095f456a8eca9b0572edf3798a21fe6f 100755 (executable)
@@ -196,7 +196,7 @@ Rect<int> GetSizeAndPosition()
 
 Dali::VirtualKeyboard::TextDirection GetTextDirection()
 {
-  Dali::VirtualKeyboard::TextDirection direction ( Dali::VirtualKeyboard::LeftToRight );
+  Dali::VirtualKeyboard::TextDirection direction ( Dali::VirtualKeyboard::LEFT_TO_RIGHT );
   return direction;
 }
 
index aa1061a0436f5f7b137b0f6f45bf5a4bcdbd48e1..36cb13a58d3cb1c9a4305c5aa6ac5d81cc55a41e 100755 (executable)
@@ -803,7 +803,7 @@ void InputMethodContextEcoreWl::NotifyTextInputMultiLine( bool multiLine )
 
 Dali::InputMethodContext::TextDirection InputMethodContextEcoreWl::GetTextDirection()
 {
-  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );
+  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );
 
     if ( mIMFContext )
     {
index 91442ba451f82052790d209924270bcd54b43cc8..58125ad0fb3e615fa16f9d55e364b9b690e15e1e 100755 (executable)
@@ -558,7 +558,7 @@ void InputMethodContextX::NotifyTextInputMultiLine( bool multiLine )
 
 Dali::InputMethodContext::TextDirection InputMethodContextX::GetTextDirection()
 {
-  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );
+  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );
 
     if ( mIMFContext )
     {
index ebcf1f2f5d1234653057d340e3eff76470ca32a3..a26c90a5adc489d72fee72081e9a05ff13f21408 100755 (executable)
@@ -247,7 +247,7 @@ void InputMethodContextWin::NotifyTextInputMultiLine( bool multiLine )
 \r
 Dali::InputMethodContext::TextDirection InputMethodContextWin::GetTextDirection()\r
 {\r
-  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );\r
+  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LEFT_TO_RIGHT );\r
 \r
   return direction;\r
 }\r
index e833efa75cd8e960a92ff675ce5213499ae9cef8..c0958fa16c5348d66b0327d740d69ae8eecc6e37 100644 (file)
@@ -84,7 +84,7 @@ Dali::VirtualKeyboard::LanguageChangedSignalType& LanguageChangedSignal()
 
 Dali::VirtualKeyboard::TextDirection GetTextDirection()
 {
-  return Dali::VirtualKeyboard::LeftToRight;
+  return Dali::VirtualKeyboard::LEFT_TO_RIGHT;
 }
 
 void RotateTo(int angle)
index 1979e2e27bc67e1d1a76b0011ca14269a34c685e..e61c30b7bfb52203f4851845b7fd66d76fc39161 100755 (executable)
@@ -42,112 +42,112 @@ struct LocaleDirectionInfo
 
 const LocaleDirectionInfo LOCALE_DIRECTION_LOOKUP_TABLE[] =
 {
-  { "af", "Afrikaans",          Locale::LeftToRight },
-  { "am", "Amharic",            Locale::LeftToRight },
-  { "ar", "Arabic",             Locale::RightToLeft },
-  { "as", "Assamese",           Locale::LeftToRight },
-  { "az", "Azerbaijani",        Locale::LeftToRight },
-  { "be", "Belarusian",         Locale::LeftToRight },
-  { "bg", "Bulgarian",          Locale::LeftToRight },
-  { "bn", "Bengali",            Locale::LeftToRight },
-  { "bo", "Tibetan",            Locale::LeftToRight },
-  { "bs", "Bosnian",            Locale::LeftToRight },
-  { "ca", "Catalan",            Locale::LeftToRight },
-  { "ck", "Iraq",               Locale::RightToLeft },
-  { "cs", "Czech",              Locale::LeftToRight },
-  { "cy", "Welsh",              Locale::LeftToRight },
-  { "da", "Danish",             Locale::LeftToRight },
-  { "de", "German",             Locale::LeftToRight },
-  { "dv", "Divehi",             Locale::RightToLeft },
-  { "el", "Greek",              Locale::LeftToRight },
-  { "en", "English",            Locale::LeftToRight },
-  { "es", "Spanish",            Locale::LeftToRight },
-  { "et", "Estonian",           Locale::LeftToRight },
-  { "eu", "Basque",             Locale::LeftToRight },
-  { "fa", "Farsi",              Locale::RightToLeft },
-  { "fi", "Finnish",            Locale::LeftToRight },
-  { "fo", "Faroese",            Locale::LeftToRight },
-  { "fr", "French",             Locale::LeftToRight },
-  { "gd", "Gaelic",             Locale::LeftToRight },
-  { "gl", "Galician",           Locale::LeftToRight },
-  { "gn", "Guarani",            Locale::LeftToRight },
-  { "gu", "Gujarati",           Locale::LeftToRight },
-  { "ha", "Hausa",              Locale::LeftToRight },
-  { "he", "Hebrew",             Locale::RightToLeft },
-  { "hi", "Hindi",              Locale::LeftToRight },
-  { "hr", "Croatian",           Locale::LeftToRight },
-  { "hu", "Hungarian",          Locale::LeftToRight },
-  { "hy", "Armenian",           Locale::LeftToRight },
-  { "id", "Indonesian",         Locale::LeftToRight },
-  { "is", "Icelandic",          Locale::LeftToRight },
-  { "it", "Italian",            Locale::LeftToRight },
-  { "ja", "Japanese",           Locale::LeftToRight },
-  { "ka", "Georgian",           Locale::LeftToRight },
-  { "kk", "Kazakh",             Locale::LeftToRight },
-  { "km", "Khmer",              Locale::LeftToRight },
-  { "kn", "Kannada",            Locale::LeftToRight },
-  { "ko", "Korean",             Locale::LeftToRight },
-  { "ks", "Kashmiri",           Locale::LeftToRight },
-  { "la", "Latin",              Locale::LeftToRight },
-  { "lo", "Lao",                Locale::LeftToRight },
-  { "lt", "Lithuanian",         Locale::LeftToRight },
-  { "lv", "Latvian",            Locale::LeftToRight },
-  { "mi", "Maori",              Locale::LeftToRight },
-  { "mk", "FYRO Macedonia",     Locale::LeftToRight },
-  { "ml", "Malayalam",          Locale::LeftToRight },
-  { "mn", "Mongolian",          Locale::LeftToRight },
-  { "mr", "Marathi",            Locale::LeftToRight },
-  { "ms", "Malay",              Locale::LeftToRight },
-  { "mt", "Maltese",            Locale::LeftToRight },
-  { "my", "Burmese",            Locale::LeftToRight },
-  { "nb", "Norwegian: Bokml",   Locale::LeftToRight },
-  { "ne", "Nepali",             Locale::LeftToRight },
-  { "nl", "Dutch",              Locale::LeftToRight },
-  { "nn", "Norwegian: Nynorsk", Locale::LeftToRight },
-  { "or", "Oriya",              Locale::LeftToRight },
-  { "pa", "Punjabi",            Locale::LeftToRight },
-  { "pl", "Polish",             Locale::LeftToRight },
-  { "pt", "Portuguese",         Locale::LeftToRight },
-  { "rm", "Raeto-Romance",      Locale::LeftToRight },
-  { "ro", "Romanian",           Locale::LeftToRight },
-  { "ru", "Russian",            Locale::LeftToRight },
-  { "sa", "Sanskrit",           Locale::LeftToRight },
-  { "sb", "Sorbian",            Locale::LeftToRight },
-  { "sd", "Sindhi",             Locale::LeftToRight },
-  { "si", "Sinhala",            Locale::LeftToRight },
-  { "sk", "Slovak",             Locale::LeftToRight },
-  { "sl", "Slovenian",          Locale::LeftToRight },
-  { "so", "Somali",             Locale::LeftToRight },
-  { "sq", "Albanian",           Locale::LeftToRight },
-  { "sr", "Serbian",            Locale::LeftToRight },
-  { "sv", "Swedish",            Locale::LeftToRight },
-  { "sw", "Swahili",            Locale::LeftToRight },
-  { "ta", "Tamil",              Locale::LeftToRight },
-  { "te", "Telugu",             Locale::LeftToRight },
-  { "tg", "Tajik",              Locale::LeftToRight },
-  { "th", "Thai",               Locale::LeftToRight },
-  { "tk", "Turkmen",            Locale::LeftToRight },
-  { "tn", "Setsuana",           Locale::LeftToRight },
-  { "tr", "Turkish",            Locale::LeftToRight },
-  { "ts", "Tsonga",             Locale::LeftToRight },
-  { "tt", "Tatar",              Locale::LeftToRight },
-  { "uk", "Ukrainian",          Locale::LeftToRight },
-  { "ur", "Urdu",               Locale::RightToLeft },
-  { "uz", "Uzbek",              Locale::LeftToRight },
-  { "vi", "Vietnamese",         Locale::LeftToRight },
-  { "xh", "Xhosa",              Locale::LeftToRight },
-  { "yi", "Yiddish",            Locale::RightToLeft },
-  { "zh", "Chinese",            Locale::LeftToRight },
-  { "zu", "Zulu",               Locale::LeftToRight },
-
-  { NULL, NULL, Locale::LeftToRight }
+  { "af", "Afrikaans",          Locale::LEFT_TO_RIGHT },
+  { "am", "Amharic",            Locale::LEFT_TO_RIGHT },
+  { "ar", "Arabic",             Locale::RIGHT_TO_LEFT },
+  { "as", "Assamese",           Locale::LEFT_TO_RIGHT },
+  { "az", "Azerbaijani",        Locale::LEFT_TO_RIGHT },
+  { "be", "Belarusian",         Locale::LEFT_TO_RIGHT },
+  { "bg", "Bulgarian",          Locale::LEFT_TO_RIGHT },
+  { "bn", "Bengali",            Locale::LEFT_TO_RIGHT },
+  { "bo", "Tibetan",            Locale::LEFT_TO_RIGHT },
+  { "bs", "Bosnian",            Locale::LEFT_TO_RIGHT },
+  { "ca", "Catalan",            Locale::LEFT_TO_RIGHT },
+  { "ck", "Iraq",               Locale::RIGHT_TO_LEFT },
+  { "cs", "Czech",              Locale::LEFT_TO_RIGHT },
+  { "cy", "Welsh",              Locale::LEFT_TO_RIGHT },
+  { "da", "Danish",             Locale::LEFT_TO_RIGHT },
+  { "de", "German",             Locale::LEFT_TO_RIGHT },
+  { "dv", "Divehi",             Locale::RIGHT_TO_LEFT },
+  { "el", "Greek",              Locale::LEFT_TO_RIGHT },
+  { "en", "English",            Locale::LEFT_TO_RIGHT },
+  { "es", "Spanish",            Locale::LEFT_TO_RIGHT },
+  { "et", "Estonian",           Locale::LEFT_TO_RIGHT },
+  { "eu", "Basque",             Locale::LEFT_TO_RIGHT },
+  { "fa", "Farsi",              Locale::RIGHT_TO_LEFT },
+  { "fi", "Finnish",            Locale::LEFT_TO_RIGHT },
+  { "fo", "Faroese",            Locale::LEFT_TO_RIGHT },
+  { "fr", "French",             Locale::LEFT_TO_RIGHT },
+  { "gd", "Gaelic",             Locale::LEFT_TO_RIGHT },
+  { "gl", "Galician",           Locale::LEFT_TO_RIGHT },
+  { "gn", "Guarani",            Locale::LEFT_TO_RIGHT },
+  { "gu", "Gujarati",           Locale::LEFT_TO_RIGHT },
+  { "ha", "Hausa",              Locale::LEFT_TO_RIGHT },
+  { "he", "Hebrew",             Locale::RIGHT_TO_LEFT },
+  { "hi", "Hindi",              Locale::LEFT_TO_RIGHT },
+  { "hr", "Croatian",           Locale::LEFT_TO_RIGHT },
+  { "hu", "Hungarian",          Locale::LEFT_TO_RIGHT },
+  { "hy", "Armenian",           Locale::LEFT_TO_RIGHT },
+  { "id", "Indonesian",         Locale::LEFT_TO_RIGHT },
+  { "is", "Icelandic",          Locale::LEFT_TO_RIGHT },
+  { "it", "Italian",            Locale::LEFT_TO_RIGHT },
+  { "ja", "Japanese",           Locale::LEFT_TO_RIGHT },
+  { "ka", "Georgian",           Locale::LEFT_TO_RIGHT },
+  { "kk", "Kazakh",             Locale::LEFT_TO_RIGHT },
+  { "km", "Khmer",              Locale::LEFT_TO_RIGHT },
+  { "kn", "Kannada",            Locale::LEFT_TO_RIGHT },
+  { "ko", "Korean",             Locale::LEFT_TO_RIGHT },
+  { "ks", "Kashmiri",           Locale::LEFT_TO_RIGHT },
+  { "la", "Latin",              Locale::LEFT_TO_RIGHT },
+  { "lo", "Lao",                Locale::LEFT_TO_RIGHT },
+  { "lt", "Lithuanian",         Locale::LEFT_TO_RIGHT },
+  { "lv", "Latvian",            Locale::LEFT_TO_RIGHT },
+  { "mi", "Maori",              Locale::LEFT_TO_RIGHT },
+  { "mk", "FYRO Macedonia",     Locale::LEFT_TO_RIGHT },
+  { "ml", "Malayalam",          Locale::LEFT_TO_RIGHT },
+  { "mn", "Mongolian",          Locale::LEFT_TO_RIGHT },
+  { "mr", "Marathi",            Locale::LEFT_TO_RIGHT },
+  { "ms", "Malay",              Locale::LEFT_TO_RIGHT },
+  { "mt", "Maltese",            Locale::LEFT_TO_RIGHT },
+  { "my", "Burmese",            Locale::LEFT_TO_RIGHT },
+  { "nb", "Norwegian: Bokml",   Locale::LEFT_TO_RIGHT },
+  { "ne", "Nepali",             Locale::LEFT_TO_RIGHT },
+  { "nl", "Dutch",              Locale::LEFT_TO_RIGHT },
+  { "nn", "Norwegian: Nynorsk", Locale::LEFT_TO_RIGHT },
+  { "or", "Oriya",              Locale::LEFT_TO_RIGHT },
+  { "pa", "Punjabi",            Locale::LEFT_TO_RIGHT },
+  { "pl", "Polish",             Locale::LEFT_TO_RIGHT },
+  { "pt", "Portuguese",         Locale::LEFT_TO_RIGHT },
+  { "rm", "Raeto-Romance",      Locale::LEFT_TO_RIGHT },
+  { "ro", "Romanian",           Locale::LEFT_TO_RIGHT },
+  { "ru", "Russian",            Locale::LEFT_TO_RIGHT },
+  { "sa", "Sanskrit",           Locale::LEFT_TO_RIGHT },
+  { "sb", "Sorbian",            Locale::LEFT_TO_RIGHT },
+  { "sd", "Sindhi",             Locale::LEFT_TO_RIGHT },
+  { "si", "Sinhala",            Locale::LEFT_TO_RIGHT },
+  { "sk", "Slovak",             Locale::LEFT_TO_RIGHT },
+  { "sl", "Slovenian",          Locale::LEFT_TO_RIGHT },
+  { "so", "Somali",             Locale::LEFT_TO_RIGHT },
+  { "sq", "Albanian",           Locale::LEFT_TO_RIGHT },
+  { "sr", "Serbian",            Locale::LEFT_TO_RIGHT },
+  { "sv", "Swedish",            Locale::LEFT_TO_RIGHT },
+  { "sw", "Swahili",            Locale::LEFT_TO_RIGHT },
+  { "ta", "Tamil",              Locale::LEFT_TO_RIGHT },
+  { "te", "Telugu",             Locale::LEFT_TO_RIGHT },
+  { "tg", "Tajik",              Locale::LEFT_TO_RIGHT },
+  { "th", "Thai",               Locale::LEFT_TO_RIGHT },
+  { "tk", "Turkmen",            Locale::LEFT_TO_RIGHT },
+  { "tn", "Setsuana",           Locale::LEFT_TO_RIGHT },
+  { "tr", "Turkish",            Locale::LEFT_TO_RIGHT },
+  { "ts", "Tsonga",             Locale::LEFT_TO_RIGHT },
+  { "tt", "Tatar",              Locale::LEFT_TO_RIGHT },
+  { "uk", "Ukrainian",          Locale::LEFT_TO_RIGHT },
+  { "ur", "Urdu",               Locale::RIGHT_TO_LEFT },
+  { "uz", "Uzbek",              Locale::LEFT_TO_RIGHT },
+  { "vi", "Vietnamese",         Locale::LEFT_TO_RIGHT },
+  { "xh", "Xhosa",              Locale::LEFT_TO_RIGHT },
+  { "yi", "Yiddish",            Locale::RIGHT_TO_LEFT },
+  { "zh", "Chinese",            Locale::LEFT_TO_RIGHT },
+  { "zu", "Zulu",               Locale::LEFT_TO_RIGHT },
+
+  { NULL, NULL, Locale::LEFT_TO_RIGHT }
 };
 
 } // unnamed namespace
 
 Locale::Direction GetDirection( const std::string& locale )
 {
-  Locale::Direction direction( Locale::LeftToRight );
+  Locale::Direction direction( Locale::LEFT_TO_RIGHT );
 
   if ( !locale.empty() && locale.size() > 2 )
   {
index fcfbd07a02c6536d9e94a22323c1ba189fe701be..9e82c55f34be7f541c48f4cf90e93e0106536522 100644 (file)
@@ -35,8 +35,8 @@ namespace Locale
 
 enum Direction
 {
-  LeftToRight,
-  RightToLeft,
+  LEFT_TO_RIGHT,
+  RIGHT_TO_LEFT,
 };
 
 Locale::Direction GetDirection( const std::string& locale );