patch 1352744
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -60,10 +60,8 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
||||
case wxDF_METAFILE :
|
||||
break ;
|
||||
default:
|
||||
{
|
||||
wxLogError(_("Unsupported clipboard format."));
|
||||
return NULL;
|
||||
}
|
||||
// custom datatype
|
||||
break ;
|
||||
}
|
||||
|
||||
#if TARGET_CARBON
|
||||
@@ -226,12 +224,12 @@ bool wxClipboard::AddData( wxDataObject *data )
|
||||
|
||||
wxCHECK_MSG( data, false, wxT("data is invalid") );
|
||||
|
||||
/* we can only store one wxDataObject */
|
||||
// we can only store one wxDataObject
|
||||
Clear();
|
||||
|
||||
m_data = data;
|
||||
|
||||
/* get formats from wxDataObjects */
|
||||
// get formats from wxDataObjects
|
||||
wxDataFormat *array = new wxDataFormat[ m_data->GetFormatCount() ];
|
||||
m_data->GetAllFormats( array );
|
||||
|
||||
@@ -272,6 +270,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
||||
mactype = kScrapFlavorTypePicture ;
|
||||
break ;
|
||||
default:
|
||||
mactype = (OSType)(array[i].GetFormatId());
|
||||
break ;
|
||||
}
|
||||
UMAPutScrap( sz , mactype , buf ) ;
|
||||
@@ -297,7 +296,6 @@ void wxClipboard::Close()
|
||||
delete m_data;
|
||||
m_data = (wxDataObject*) NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool wxClipboard::IsSupported( const wxDataFormat &dataFormat )
|
||||
@@ -373,7 +371,8 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
}
|
||||
}
|
||||
}
|
||||
/* get formats from wxDataObjects */
|
||||
|
||||
// get formats from wxDataObjects
|
||||
if ( !transferred )
|
||||
{
|
||||
for (size_t i = 0; !transferred && i < formatcount ; i++)
|
||||
@@ -382,11 +381,13 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
|
||||
switch ( format.GetType() )
|
||||
{
|
||||
// NOTE: this is usable for all data types
|
||||
case wxDF_TEXT :
|
||||
case wxDF_UNICODETEXT:
|
||||
case wxDF_OEMTEXT :
|
||||
case wxDF_BITMAP :
|
||||
case wxDF_METAFILE :
|
||||
default :
|
||||
{
|
||||
long len ;
|
||||
char* s = (char*)wxGetClipboardData(format, &len );
|
||||
@@ -399,9 +400,6 @@ bool wxClipboard::GetData( wxDataObject& data )
|
||||
}
|
||||
}
|
||||
break ;
|
||||
|
||||
default :
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user