Changeset 22191 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- Aug 11, 2009 9:18:42 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50977
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp ¶
r22190 r22191 1048 1048 XtPointer *pValReturn, 1049 1049 unsigned long *pcLenReturn, 1050 1050 int *piFormatReturn) 1051 1051 { 1052 1052 char *pszTmp = NULL, *pszTmp2 = NULL; … … 1133 1133 atomTypeReturn, pValReturn, 1134 1134 pcLenReturn, piFormatReturn); 1135 /* Our conversion functions add nul terminators if they are missing. 1136 * Remove them again. */ 1137 if (RT_SUCCESS(rc) && ((PRTUTF16)pv)[cb / 2 - 1] != 0) 1138 --(*pcLenReturn); 1135 1139 RTMemFree(pv); 1136 1140 } … … 1559 1563 rc = VERR_INVALID_PARAMETER; 1560 1564 } 1565 /* Our conversion functions add nul terminators if they are missing. 1566 * Remove them again. */ 1567 if (RT_SUCCESS(rc) && ((const char *)pvSrc)[cbSrc - 1] != '\0') 1568 cbDest -= 2; 1561 1569 } 1562 1570 else … … 2337 2345 clipSetSelectionValues("TEXT", XA_STRING, 2338 2346 "hello world", sizeof("hello world") - 1, 8); 2339 //testStringFromX11(hTest, pCtx, "hello world", VINF_SUCCESS,2340 //sizeof("hello world") * 2 - 2);2347 testStringFromX11(hTest, pCtx, "hello world", VINF_SUCCESS, 2348 sizeof("hello world") * 2 - 2); 2341 2349 2342 2350 /*** COMPOUND TEXT from X11 ***/ … … 2365 2373 clipSetSelectionValues("COMPOUND_TEXT", XA_STRING, 2366 2374 "hello world", sizeof("hello world") - 1, 8); 2367 //testStringFromX11(hTest, pCtx, "hello world", VINF_SUCCESS,2368 //sizeof("hello world") * 2 - 2);2375 testStringFromX11(hTest, pCtx, "hello world", VINF_SUCCESS, 2376 sizeof("hello world") * 2 - 2); 2369 2377 2370 2378 /*** Latin1 from X11 ***/ … … 2390 2398 "Georges Dupr\xEA!", 2391 2399 sizeof("Georges Dupr\xEA!") - 1, 8); 2392 //testLatin1FromX11(hTest, pCtx, "Georges Dupr\xEA!", VINF_SUCCESS,2393 //sizeof("Georges Dupr\xEA!") * 2 - 2);2400 testLatin1FromX11(hTest, pCtx, "Georges Dupr\xEA!", VINF_SUCCESS, 2401 sizeof("Georges Dupr\xEA!") * 2 - 2); 2394 2402 2395 2403 /*** Unknown X11 format ***/ … … 2497 2505 clipSetVBoxUtf16(pCtx, VINF_SUCCESS, "hello world", 2498 2506 sizeof("hello world") * 2 - 2); 2499 // testStringFromVBox(hTest, pCtx, "TEXT", 2500 // clipGetAtom(NULL, "TEXT"), 2501 // "hello world", sizeof("hello world") - 1); 2507 testStringFromVBox(hTest, pCtx, "TEXT", clipGetAtom(NULL, "TEXT"), 2508 "hello world", sizeof("hello world") - 1); 2502 2509 2503 2510 /*** COMPOUND TEXT from VBox ***/ … … 2535 2542 clipSetVBoxUtf16(pCtx, VINF_SUCCESS, "hello world", 2536 2543 sizeof("hello world") * 2 - 2); 2537 //testStringFromVBox(hTest, pCtx, "COMPOUND_TEXT",2538 //clipGetAtom(NULL, "COMPOUND_TEXT"),2539 //"hello world", sizeof("hello world") - 1);2544 testStringFromVBox(hTest, pCtx, "COMPOUND_TEXT", 2545 clipGetAtom(NULL, "COMPOUND_TEXT"), 2546 "hello world", sizeof("hello world") - 1); 2540 2547 2541 2548 /*** Timeout from VBox ***/
Note:
See TracChangeset
for help on using the changeset viewer.