git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72114
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxDataObject::GetFromPasteboard( void * pb )
{
PasteboardRef pasteboard = (PasteboardRef) pb;
bool wxDataObject::GetFromPasteboard( void * pb )
{
PasteboardRef pasteboard = (PasteboardRef) pb;
- size_t formatcount = GetFormatCount() + 1;
+
+ size_t formatcount = GetFormatCount(wxDataObject::Set);
wxDataFormat *array = new wxDataFormat[ formatcount ];
wxDataFormat *array = new wxDataFormat[ formatcount ];
- array[0] = GetPreferredFormat();
- GetAllFormats( &array[1] );
+ GetAllFormats(array, wxDataObject::Set);
+
ItemCount itemCount = 0;
wxString filenamesPassed;
bool transferred = false;
ItemCount itemCount = 0;
wxString filenamesPassed;
bool transferred = false;
bool wxDataObject::HasDataInPasteboard( void * pb )
{
PasteboardRef pasteboard = (PasteboardRef) pb;
bool wxDataObject::HasDataInPasteboard( void * pb )
{
PasteboardRef pasteboard = (PasteboardRef) pb;
- size_t formatcount = GetFormatCount() + 1;
+ size_t formatcount = GetFormatCount(wxDataObject::Set);
wxDataFormat *array = new wxDataFormat[ formatcount ];
wxDataFormat *array = new wxDataFormat[ formatcount ];
- array[0] = GetPreferredFormat();
- GetAllFormats( &array[1] );
+ GetAllFormats(array, wxDataObject::Set);
ItemCount itemCount = 0;
bool hasData = false;
ItemCount itemCount = 0;
bool hasData = false;
void wxDataObject::AddSupportedTypes( void* cfarray)
{
void wxDataObject::AddSupportedTypes( void* cfarray)
{
- wxDataFormat *array = new wxDataFormat[ GetFormatCount() ];
- GetAllFormats( array );
+ size_t nFormats = GetFormatCount(wxDataObject::Set);
+ wxDataFormat *array = new wxDataFormat[nFormats];
+ GetAllFormats(array, wxDataObject::Set);
- for (size_t i = 0; i < GetFormatCount(); i++)
+ for (size_t i = 0; i < nFormats; i++)
{
wxDataFormat dataFormat = array[ i ];
{
wxDataFormat dataFormat = array[ i ];