#include "wx/mstream.h"
#include "wx/image.h"
#include "wx/mac/private.h"
-#include "Scrap.h"
+#include <Scrap.h>
// ----------------------------------------------------------------------------
// functions
{
wxFAIL_MSG( wxT("invalid dataformat") );
- m_format = '????';
+ // this is '????' but it can't be used in the code because ??' is
+ // parsed as a trigraph!
+ m_format = 0x3f3f3f3f;
}
}
}
}
+// ----------------------------------------------------------------------------
+// wxTextDataObject
+// ----------------------------------------------------------------------------
+
+#if wxUSE_UNICODE
+void wxTextDataObject::GetAllFormats(wxDataFormat *formats, wxDataObjectBase::Direction dir) const
+{
+ *formats++ = wxDataFormat( wxDF_TEXT );
+ *formats = wxDataFormat( wxDF_UNICODETEXT );
+}
+
+#endif
+
// ----------------------------------------------------------------------------
// wxFileDataObject
// ----------------------------------------------------------------------------
{
m_filenames.Empty();
- AddFile(wxString::FromAscii((char*)pBuf));
+ // only add if this is not an empty string
+ // we can therefore clear the list by just setting an empty string
+ if ( (*(char*)pBuf) != 0 )
+ AddFile(wxString::FromAscii((char*)pBuf));
return TRUE;
}