]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dataobj.cpp
BU_EXACTFIT adapted
[wxWidgets.git] / src / mac / carbon / dataobj.cpp
index 64dc8053d0a66b3b17c877793bd3a842dfac4f72..bec4f2bd605d14d75b1c96f681471ddaebefa93a 100644 (file)
@@ -166,6 +166,19 @@ bool wxDataObject::IsSupportedFormat(
     }
 }
 
+// ----------------------------------------------------------------------------
+// wxTextDataObject
+// ----------------------------------------------------------------------------
+
+#if wxUSE_UNICODE
+void wxTextDataObject::GetAllFormats(wxDataFormat *formats, wxDataObjectBase::Direction dir) const
+{
+    *formats++ = wxDataFormat( wxDF_TEXT );
+    *formats = wxDataFormat( wxDF_UNICODETEXT );
+}
+
+#endif
+
 // ----------------------------------------------------------------------------
 // wxFileDataObject
 // ----------------------------------------------------------------------------
@@ -206,7 +219,10 @@ bool wxFileDataObject::SetData(
 {
     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;
 }