Merge "Fix the normalization factor calculation for blendshapes" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / controller / text-controller-event-handler.cpp
index 5323d35..e280739 100644 (file)
@@ -39,11 +39,11 @@ Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT
 
 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_TEXT_PERFORMANCE_MARKER, false);
 
-const std::string KEY_C_NAME      = "c";
-const std::string KEY_V_NAME      = "v";
-const std::string KEY_X_NAME      = "x";
-const std::string KEY_A_NAME      = "a";
-const std::string KEY_INSERT_NAME = "Insert";
+const char* KEY_C_NAME      = "c";
+const char* KEY_V_NAME      = "v";
+const char* KEY_X_NAME      = "x";
+const char* KEY_A_NAME      = "a";
+const char* KEY_INSERT_NAME = "Insert";
 
 } // namespace
 
@@ -859,22 +859,10 @@ InputMethodContext::CallbackData Controller::EventHandler::OnInputMethodContextE
 
   std::string    text;
   CharacterIndex cursorPosition      = 0u;
-  Length         numberOfWhiteSpaces = 0u;
 
   if(retrieveCursor)
   {
-    numberOfWhiteSpaces = controller.mImpl->GetNumberOfWhiteSpaces(0u);
-
     cursorPosition = controller.mImpl->GetLogicalCursorPosition();
-
-    if(cursorPosition < numberOfWhiteSpaces)
-    {
-      cursorPosition = 0u;
-    }
-    else
-    {
-      cursorPosition -= numberOfWhiteSpaces;
-    }
   }
 
   if(retrieveText)
@@ -882,7 +870,7 @@ InputMethodContext::CallbackData Controller::EventHandler::OnInputMethodContextE
     if(!controller.mImpl->IsShowingPlaceholderText())
     {
       // Retrieves the normal text string.
-      controller.mImpl->GetText(numberOfWhiteSpaces, text);
+      controller.mImpl->GetText(0u, text);
     }
     else
     {