Revert "[4.0] Fix Set and Get InputPanelUserData()" 33/153333/1
authorJinho, Lee <jeano.lee@samsung.com>
Thu, 28 Sep 2017 04:36:42 +0000 (13:36 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Thu, 28 Sep 2017 04:36:43 +0000 (13:36 +0900)
This reverts commit 9ef8f766f6ab4ff62b6d225c592aa84e40c7a38c.

Change-Id: Icbdde83c35d172e906cc09831920e34066e258ad

adaptors/ecore/wayland/imf-manager-impl-ecore-wl.cpp
adaptors/x11/imf-manager-impl-x.cpp

index e566ab9..edd8899 100644 (file)
@@ -763,7 +763,7 @@ void ImfManager::SetInputPanelUserData( const std::string& data )
   if( mIMFContext )
   {
     int length = data.length();
-    ecore_imf_context_input_panel_imdata_set( mIMFContext, data.c_str(), length );
+    ecore_imf_context_input_panel_imdata_set( mIMFContext, &data, length );
   }
 }
 
@@ -773,14 +773,8 @@ void ImfManager::GetInputPanelUserData( std::string& data )
 
   if( mIMFContext )
   {
-    int length = 256;
-    char* buffer = reinterpret_cast< char* >( calloc ( 1, length * sizeof ( char ) ) );
-    if( buffer != NULL )
-    {
-      ecore_imf_context_input_panel_imdata_get( mIMFContext, buffer, &length );
-      data = buffer;
-      free( buffer );
-    }
+    int* length = NULL;
+    ecore_imf_context_input_panel_imdata_get( mIMFContext, &data, length );
   }
 }
 
index cdae0be..c9bef9c 100644 (file)
@@ -597,7 +597,7 @@ void ImfManager::SetInputPanelUserData( const std::string& data )
   if( mIMFContext )
   {
     int length = data.length();
-    ecore_imf_context_input_panel_imdata_set( mIMFContext, data.c_str(), length );
+    ecore_imf_context_input_panel_imdata_set( mIMFContext, &data, length );
   }
 }
 
@@ -607,14 +607,8 @@ void ImfManager::GetInputPanelUserData( std::string& data )
 
   if( mIMFContext )
   {
-    int length = 256;
-    char* buffer = reinterpret_cast< char* >( calloc ( 1, length * sizeof ( char ) ) );
-    if( buffer != NULL )
-    {
-      ecore_imf_context_input_panel_imdata_get( mIMFContext, buffer, &length );
-      data = buffer;
-      free( buffer );
-    }
+    int* length = NULL;
+    ecore_imf_context_input_panel_imdata_get( mIMFContext, &data, length );
   }
 }