]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/dataobj.cpp
revert r59246; the window parameter was there by purpose (i.e. for consistency with...
[wxWidgets.git] / src / msw / ole / dataobj.cpp
index f57954158ad0865adfde8f1e9e71c583ae080b19..ba2cb10bc83ef1fff0fff953d1da613aeab14322 100644 (file)
@@ -90,7 +90,7 @@ private:
     ULONG       m_nCount,   // number of formats we support
                 m_nCurrent; // current enum position
 
-    DECLARE_NO_COPY_CLASS(wxIEnumFORMATETC)
+    wxDECLARE_NO_COPY_CLASS(wxIEnumFORMATETC);
 };
 
 // ----------------------------------------------------------------------------
@@ -126,7 +126,7 @@ private:
 
     bool m_mustDelete;
 
-    DECLARE_NO_COPY_CLASS(wxIDataObject)
+    wxDECLARE_NO_COPY_CLASS(wxIDataObject);
 };
 
 // ============================================================================
@@ -693,7 +693,7 @@ const void *wxDataObject::GetSizeFromBuffer(const void *buffer,
     // hack: the third parameter is declared non-const in Wine's headers so
     // cast away the const
     const size_t realsz = ::HeapSize(::GetProcessHeap(), 0,
-                                     wx_const_cast(void*, buffer));
+                                     const_cast<void*>(buffer));
     if ( realsz == (size_t)-1 )
     {
         // note that HeapSize() does not set last error
@@ -1199,7 +1199,7 @@ public:
         { return GetDataHere(buf); }
 #endif
 
-    DECLARE_NO_COPY_CLASS(CFSTR_SHELLURLDataObject)
+    wxDECLARE_NO_COPY_CLASS(CFSTR_SHELLURLDataObject);
 };
 
 
@@ -1249,11 +1249,15 @@ void wxURLDataObject::SetURL(const wxString& url)
     if ( urlMB )
     {
         const size_t len = strlen(urlMB) + 1; // size with trailing NUL
+#if !wxUSE_UNICODE
         SetData(wxDF_TEXT, len, urlMB);
+#endif
         SetData(wxDataFormat(CFSTR_SHELLURL), len, urlMB);
     }
 
+#if wxUSE_UNICODE
     SetData(wxDF_UNICODETEXT, url.length() + 1, url.wc_str());
+#endif
 }
 
 // ----------------------------------------------------------------------------