finished COSXClipboardTests

This commit is contained in:
Nick Bolton
2011-04-24 17:37:15 +00:00
parent 7cd8980f7f
commit 3e70306f08
4 changed files with 176 additions and 1 deletions

View File

@@ -102,7 +102,12 @@ COSXClipboard::add(EFormat format, const CString & data)
CString osXData = converter->fromIClipboard(data);
CFStringRef flavorType = converter->getOSXFormat();
CFDataRef dataRef = CFDataCreate(kCFAllocatorDefault, (UInt8 *)osXData.data(), osXData.size());
// integ tests showed that if you call add(...) twice, then the
// second call will actually fail to set clipboard data. calling
// empty() seems to solve this problem.
empty();
PasteboardPutItemFlavor(
m_pboard,
(PasteboardItemID) 0,