]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dobjcmn.cpp
Bug fix.
[wxWidgets.git] / src / common / dobjcmn.cpp
index 675ebdf2c08e980da48ba842eb8d352647c3f400..1dbe454bc0f126bf38b716475fdbed8cd23bf362 100644 (file)
 
 #if wxUSE_DATAOBJ
 
+#include "wx/dataobj.h"
+
 #ifndef WX_PRECOMP
     #include "wx/app.h"
-    #include "wx/debug.h"
 #endif
 
-#include "wx/dataobj.h"
-
 // ----------------------------------------------------------------------------
 // lists
 // ----------------------------------------------------------------------------
@@ -86,6 +85,7 @@ bool wxDataObjectBase::IsSupported(const wxDataFormat& format,
 wxDataObjectComposite::wxDataObjectComposite()
 {
     m_preferred = 0;
+    m_receivedFormat = wxFormatInvalid;
 }
 
 wxDataObjectComposite::~wxDataObjectComposite()
@@ -120,6 +120,11 @@ void wxDataObjectComposite::Add(wxDataObjectSimple *dataObject, bool preferred)
     m_dataObjects.Append( dataObject );
 }
 
+wxDataFormat wxDataObjectComposite::GetReceivedFormat() const
+{
+    return m_receivedFormat;
+}
+
 wxDataFormat
 wxDataObjectComposite::GetPreferredFormat(Direction WXUNUSED(dir)) const
 {
@@ -219,6 +224,7 @@ bool wxDataObjectComposite::SetData(const wxDataFormat& format,
     wxCHECK_MSG( dataObj, false,
                  wxT("unsupported format in wxDataObjectComposite"));
 
+    m_receivedFormat = format;
     return dataObj->SetData( len, buf );
 }