Changeset 8268 in vbox
- Timestamp:
- Apr 22, 2008 9:12:54 AM (17 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/clipboard-helper.cpp
r8155 r8268 50 50 for (i = (pwszSrc[0] == UTF16LEMARKER ? 1 : 0); i < cwSrc; ++i, ++cwDest) 51 51 { 52 /* Check for a single line feed */ 52 53 if (pwszSrc[i] == LINEFEED) 54 ++cwDest; 55 /* Check for a single carriage return (MacOS) */ 56 if (pwszSrc[i] == CARRIAGERETURN) 53 57 ++cwDest; 54 58 if (pwszSrc[i] == 0) … … 113 117 } 114 118 } 119 else 120 /* Check for a single carriage return (MacOS) */ 121 if (pwszSrc[i] == CARRIAGERETURN) 122 { 123 /* set cr */ 124 pu16Dest[j] = CARRIAGERETURN; 125 ++j; 126 if (j == cwDest) 127 { 128 LogFlowFunc(("returning VERR_BUFFER_OVERFLOW\n")); 129 return VERR_BUFFER_OVERFLOW; 130 } 131 /* add the lf */ 132 pu16Dest[j] = LINEFEED; 133 continue; 134 } 115 135 pu16Dest[j] = pwszSrc[i]; 116 136 } -
trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
r8155 r8268 167 167 CFDataRef outData; 168 168 PRTUTF16 pwszTmp = NULL; 169 /* Utf-16 is currently broken on more than one line.170 * Has to be investigated. */171 #if 0172 169 /* Try utf-16 first */ 173 170 if (!(err = PasteboardCopyItemFlavorData (pPasteboard, itemID, CFSTR ("public.utf16-plain-text"), &outData))) … … 178 175 /* Second try is utf-8 */ 179 176 else 180 #endif181 177 if (!(err = PasteboardCopyItemFlavorData (pPasteboard, itemID, CFSTR ("public.utf8-plain-text"), &outData))) 182 178 {
Note:
See TracChangeset
for help on using the changeset viewer.