Merge branch 'tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-input / text-input-impl.cpp
index 67eac9a..512b163 100644 (file)
@@ -37,7 +37,6 @@
 #include <dali-toolkit/public-api/controls/alignment/alignment.h>
 #include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 
-using namespace std;
 using namespace Dali;
 
 // Local Data
@@ -1043,7 +1042,7 @@ void TextInput::OnKeyInputFocusGained()
     imfManager.Activate();
 
     // When window gain lost focus, the imf manager is deactivated. Thus when window gain focus again, the imf manager must be activated.
-    imfManager.SetRestoreAferFocusLost( true );
+    imfManager.SetRestoreAfterFocusLost( true );
 
     imfManager.SetCursorPosition( mCursorPosition );
     imfManager.NotifyCursorPosition();
@@ -1077,7 +1076,7 @@ void TextInput::OnKeyInputFocusLost()
   if ( imfManager )
   {
     // The text editing is finished. Therefore the imf manager don't have restore activation.
-    imfManager.SetRestoreAferFocusLost( false );
+    imfManager.SetRestoreAfterFocusLost( false );
 
     // Notify that the text editing finish.
     imfManager.Deactivate();
@@ -1207,7 +1206,7 @@ float TextInput::GetHeightForWidth( float width )
 
 // Private Internal methods
 
-void TextInput::OnHandlePan(Actor actor, PanGesture gesture)
+void TextInput::OnHandlePan(Actor actor, const PanGesture& gesture)
 {
   switch (gesture.state)
   {
@@ -1332,7 +1331,7 @@ bool TextInput::OnHandleTwoTouched(Dali::Actor actor, const TouchEvent& touch)
   return false;
 }
 
-void TextInput::OnDoubleTap(Dali::Actor actor, Dali::TapGesture tap)
+void TextInput::OnDoubleTap(Dali::Actor actor, const Dali::TapGesture& tap)
 {
    // If text exists then select nearest word.
    if ( !mStyledText.empty())
@@ -1397,7 +1396,7 @@ void TextInput::OnDoubleTap(Dali::Actor actor, Dali::TapGesture tap)
 }
 
 // TODO: Change the function name to be more general.
-void TextInput::OnTextTap(Dali::Actor actor, Dali::TapGesture tap)
+void TextInput::OnTextTap(Dali::Actor actor, const Dali::TapGesture& tap)
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "OnTap mPreEditFlag[%s] mEditOnTouch[%s] mEditModeActive[%s] ", (mPreEditFlag)?"true":"false"
                                                                                                            , (mEditOnTouch)?"true":"false"
@@ -1519,7 +1518,7 @@ void TextInput::OnTextTap(Dali::Actor actor, Dali::TapGesture tap)
   }
 }
 
-void TextInput::OnLongPress(Dali::Actor actor, Dali::LongPressGesture longPress)
+void TextInput::OnLongPress(Dali::Actor actor, const Dali::LongPressGesture& longPress)
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "OnLongPress\n" );
 
@@ -4177,7 +4176,7 @@ bool TextInput::ReturnClosestIndex(const Vector2& source, std::size_t& closestIn
         ++closestIndex;
       }
     }
-    else if( closestIndex == numeric_limits<std::size_t>::max() ) // -1 RTL (after last arabic character on line)
+    else if( closestIndex == std::numeric_limits<std::size_t>::max() ) // -1 RTL (after last arabic character on line)
     {
       closestIndex = mTextLayoutInfo.mCharacterVisualToLogicalMap.size();
     }