X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b601c243f14c7e8f3f1c784d962fed81d118e1a..83911a5a4d3be63141419b4401259093514794a3:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 5d9e131157..6aa1b39762 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -39,16 +39,12 @@ #include "wx/msw/private.h" // includes -#if wxUSE_NORLANDER_HEADERS +// for some compilers, the entire ole2.h must be included, not only oleauto.h +#if wxUSE_NORLANDER_HEADERS || defined(__WATCOMC__) #include #endif -#include - -#ifndef __WIN32__ - #include - #include -#endif +#include #include #include "wx/msw/ole/oleutils.h" @@ -91,6 +87,8 @@ private: CLIPFORMAT *m_formats; // formats we can provide data in ULONG m_nCount, // number of formats we support m_nCurrent; // current enum position + + DECLARE_NO_COPY_CLASS(wxIEnumFORMATETC) }; // ---------------------------------------------------------------------------- @@ -125,6 +123,8 @@ private: wxDataObject *m_pDataObject; // pointer to C++ class we belong to bool m_mustDelete; + + DECLARE_NO_COPY_CLASS(wxIDataObject) }; // ============================================================================ @@ -470,7 +470,7 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc, || ( defined(__MWERKS__) && defined(__WXMSW__) ) size = std::wcslen((const wchar_t *)pBuf) * sizeof(wchar_t); #else - size = ::wcslen((const wchar_t *)pBuf) * sizeof(wchar_t); + size = wxWcslen((const wchar_t *)pBuf) * sizeof(wchar_t); #endif break; #endif @@ -1063,7 +1063,6 @@ bool wxFileDataObject::GetDataHere(void *pData) const // wxURLDataObject // ---------------------------------------------------------------------------- - class CFSTR_SHELLURLDataObject : public wxCustomDataObject { public: @@ -1095,7 +1094,7 @@ protected: // CFSTR_SHELLURL is _always_ ANSI! wxCharBuffer char_buffer( GetDataSize() ); wxCustomDataObject::GetDataHere( (void*)char_buffer.data() ); - wxString unicode_buffer( char_buffer ); + wxString unicode_buffer( char_buffer, wxConvLibc ); memcpy( buffer, unicode_buffer.c_str(), ( unicode_buffer.length() + 1 ) * sizeof(wxChar) );