[Title] Create string tightly when retrive string from cbhm
[Issue#] DCM-1658
[Problem] \u0000 null value is inserted at the end of string.
[Cause] Included null value string length is returned when use XGetWindowProperty API.
[Solution] Create string tightly when retrive string from cbhm
Change-Id: Ifc48ac491a33f0953b808029f45841c4a8174751
return String();
}
- String chbmData;
+ String cbhmData;
switch (dataUnitSize) {
case 8:
- chbmData = String::fromUTF8(pData, dataLength);
+ cbhmData = String::fromUTF8(pData);
break;
case 16:
- chbmData = String(reinterpret_cast<UChar*>(pData), dataLength);
+ cbhmData = String(reinterpret_cast<UChar*>(pData), dataLength);
LOG_ERROR("case 16");
break;
case 32:
if (pDataType)
*pDataType = type;
- return chbmData;
+ return cbhmData;
}
bool ClipboardHelper::retrieveClipboardItem(int index, int* format, String* pData)