Changeset 83621 in vbox for trunk/src/VBox/HostServices/SharedClipboard
- Timestamp:
- Apr 8, 2020 3:02:16 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137049
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r82894 r83621 1209 1209 while (fFormats) 1210 1210 { 1211 SHCLFORMAT fFormat = VBOX_SHCL_FMT_NONE; 1212 1211 /* Pick the next format to get from the mask: */ 1213 1212 /** @todo Make format reporting precedence configurable? */ 1213 SHCLFORMAT fFormat; 1214 1214 if (fFormats & VBOX_SHCL_FMT_UNICODETEXT) 1215 1215 fFormat = VBOX_SHCL_FMT_UNICODETEXT; … … 1219 1219 fFormat = VBOX_SHCL_FMT_HTML; 1220 1220 else 1221 AssertStmt(fFormats == VBOX_SHCL_FMT_NONE, fFormat = VBOX_SHCL_FMT_NONE); 1222 1223 if (fFormat == VBOX_SHCL_FMT_NONE) 1224 break; 1225 1226 /* Remove format from format list. */ 1221 AssertMsgFailedBreak(("%#x\n", fFormats)); 1222 1223 /* Remove it from the mask. */ 1227 1224 fFormats &= ~fFormat; 1228 1225 … … 1343 1340 int ShClSvcHostReportFormats(PSHCLCLIENT pClient, SHCLFORMATS fFormats) 1344 1341 { 1345 LogFlowFunc Enter();1346 AssertPtrReturn(pClient, 1342 LogFlowFunc(("fFormats=%#x\n", fFormats)); 1343 AssertPtrReturn(pClient, VERR_INVALID_POINTER); 1347 1344 1348 1345 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS -
trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
r82968 r83621 85 85 int queryNewPasteboardFormats(PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged) 86 86 { 87 Log(("queryNewPasteboardFormats\n"));88 89 87 OSStatus err = noErr; 88 *pfFormats = 0; 90 89 *pfChanged = true; 91 90 … … 97 96 { 98 97 *pfChanged = false; 98 Log2(("queryNewPasteboardFormats: no change\n")); 99 99 return VINF_SUCCESS; 100 100 } … … 104 104 err = PasteboardGetItemCount(pPasteboard, &itemCount); 105 105 if (itemCount < 1) 106 { 107 Log(("queryNewPasteboardFormats: changed: No items on the pasteboard\n")); 106 108 return VINF_SUCCESS; 109 } 107 110 108 111 /* The id of the first element in the pasteboard */ … … 121 124 { 122 125 CFStringRef flavorType; 123 flavorType = static_cast <CFStringRef>(CFArrayGetValueAtIndex(flavorTypeArray, 124 flavorIndex)); 126 flavorType = static_cast <CFStringRef>(CFArrayGetValueAtIndex(flavorTypeArray, flavorIndex)); 125 127 /* Currently only unicode supported */ 126 if ( UTTypeConformsTo(flavorType, kUTTypeUTF8PlainText) ||127 UTTypeConformsTo(flavorType, kUTTypeUTF16PlainText))128 { 129 Log((" Unicode flavor detected.\n"));128 if ( UTTypeConformsTo(flavorType, kUTTypeUTF8PlainText) 129 || UTTypeConformsTo(flavorType, kUTTypeUTF16PlainText)) 130 { 131 Log(("queryNewPasteboardFormats: Unicode flavor detected.\n")); 130 132 *pfFormats |= VBOX_SHCL_FMT_UNICODETEXT; 131 133 } 132 134 else if (UTTypeConformsTo(flavorType, kUTTypeBMP)) 133 135 { 134 Log((" BMP flavor detected.\n"));136 Log(("queryNewPasteboardFormats: BMP flavor detected.\n")); 135 137 *pfFormats |= VBOX_SHCL_FMT_BITMAP; 136 138 } … … 140 142 } 141 143 142 Log(("queryNewPasteboardFormats: rc = %02X\n", rc));144 Log(("queryNewPasteboardFormats: changed: *pfFormats=%#x\n", *pfFormats)); 143 145 return rc; 144 146 }
Note:
See TracChangeset
for help on using the changeset viewer.