Changeset 85828 in vbox for trunk/src/VBox/Additions/darwin/VBoxClient
- Timestamp:
- Aug 19, 2020 9:12:33 AM (4 years ago)
- Location:
- trunk/src/VBox/Additions/darwin/VBoxClient
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp
r82968 r85828 222 222 223 223 size_t cwcActual; /* (includes a schwarzenegger character) */ 224 int rc = ShClUtf16 GetWinSize(pwszData, cbData / sizeof(RTUTF16), &cwcActual);224 int rc = ShClUtf16LFLenUtf8(pwszData, cbData / sizeof(RTUTF16), &cwcActual); 225 225 AssertReturn(RT_SUCCESS(rc), rc); 226 226 … … 228 228 AssertReturn(pwszWinTmp, VERR_NO_MEMORY); 229 229 230 rc = ShCl Utf16LinToWin(pwszData, cbData / sizeof(RTUTF16), pwszWinTmp, cwcActual);230 rc = ShClConvUtf16LFToCRLF(pwszData, cbData / sizeof(RTUTF16), pwszWinTmp, cwcActual); 231 231 if (RT_SUCCESS(rc)) 232 232 rc = vbclClipboardHostPasteData(u32ClientId, VBOX_SHCL_FMT_UNICODETEXT, -
trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp
r82968 r85828 169 169 170 170 /* Convert END-OF-LINE */ 171 rc = ShClUtf16 GetLinSize((RTUTF16 *)pData, cbDataSize / 2, &cbActualLen);171 rc = ShClUtf16CRLFLenUtf8((RTUTF16 *)pData, cbDataSize / sizeof(RTUTF16), &cbActualLen); 172 172 AssertReturn(RT_SUCCESS(rc), rc); 173 pDataInternal = (RTUTF16 *)RTMemAlloc(cbActualLen * 2);173 pDataInternal = (RTUTF16 *)RTMemAlloc(cbActualLen * sizeof(RTUTF16)); 174 174 AssertReturn(pDataInternal, VERR_NO_MEMORY); 175 rc = ShCl Utf16WinToLin((RTUTF16 *)pData, cbDataSize / 2, pDataInternal, cbActualLen);175 rc = ShClConvUtf16CRLFToLF((RTUTF16 *)pData, cbDataSize / sizeof(RTUTF16), pDataInternal, cbActualLen); 176 176 177 177 /* Do actual paste */
Note:
See TracChangeset
for help on using the changeset viewer.