Exemplo n.º 1
0
CString
CMSWindowsClipboardAnyTextConverter::toIClipboard(HANDLE data) const
{
	// get datator
	const char* src = (const char*)GlobalLock(data);
	UInt32 srcSize = (UInt32)GlobalSize(data);
	if (src == NULL || srcSize <= 1) {
		return CString();
	}

	// convert text
	CString text = doToIClipboard(CString(src, srcSize));

	// release handle
	GlobalUnlock(data);

	// convert newlines
	return convertLinefeedToUnix(text);
}
CString
COSXClipboardAnyTextConverter::toIClipboard(const CString& data) const
{
	// convert text then newlines
	return convertLinefeedToUnix(doToIClipboard(data));
}
String
OSXClipboardAnyBitmapConverter::toIClipboard(const String& data) const
{
	return doToIClipboard(data);
}