X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40e1a9c025bc6098fbba2f188ef207cc68c100b3..50ef256ed3e52defe91655da5e3f6a9e913c9e2a:/src/msw/ole/dataobj.cpp?ds=sidebyside diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 708fc1767b..d32806d9a0 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -2,7 +2,7 @@ // Name: msw/ole/dataobj.cpp // Purpose: implementation of wx[I]DataObject class // Author: Vadim Zeitlin -// Modified by: +// Modified by: // Created: 10.05.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin @@ -28,15 +28,23 @@ #pragma hdrstop #endif -#include -#include -#include +#include + +#if defined(__WIN32__) && !defined(__GNUWIN32__) + +#include +#include + +#include +#include #ifndef __WIN32__ #include #include #endif +#include + // ---------------------------------------------------------------------------- // functions // ---------------------------------------------------------------------------- @@ -276,14 +284,14 @@ STDMETHODIMP wxIDataObject::QueryGetData(FORMATETC *pformatetc) } // and now check the type of data requested - if ( m_pDataObject->IsSupportedFormat(pformatetc->cfFormat) ) { + if ( m_pDataObject->IsSupportedFormat((wxDataFormat) pformatetc->cfFormat) ) { wxLogTrace("wxIDataObject::QueryGetData: %s ok", - wxDataObject::GetFormatName(pformatetc->cfFormat)); + wxDataObject::GetFormatName((wxDataFormat) pformatetc->cfFormat)); return S_OK; } else { wxLogTrace("wxIDataObject::QueryGetData: %s unsupported", - wxDataObject::GetFormatName(pformatetc->cfFormat)); + wxDataObject::GetFormatName((wxDataFormat) pformatetc->cfFormat)); return DV_E_FORMATETC; } } @@ -309,7 +317,7 @@ STDMETHODIMP wxIDataObject::EnumFormatEtc(DWORD dwDirection, return E_NOTIMPL; } - wxIEnumFORMATETC *pEnum = + wxIEnumFORMATETC *pEnum = new wxIEnumFORMATETC(m_pDataObject->GetPreferredFormat()); pEnum->AddRef(); *ppenumFormatEtc = pEnum; @@ -353,7 +361,12 @@ wxDataObject::~wxDataObject() const char *wxDataObject::GetFormatName(wxDataFormat format) { -#ifdef __DEBUG__ +#ifdef __WXDEBUG__ + // case 'xxx' is not a valid value for switch of enum 'wxDataFormat' + #ifdef __VISUALC__ + #pragma warning(disable:4063) + #endif // VC++ + static char s_szBuf[128]; switch ( format ) { case CF_TEXT: return "CF_TEXT"; @@ -376,9 +389,14 @@ const char *wxDataObject::GetFormatName(wxDataFormat format) sprintf(s_szBuf, "clipboard format %d (unknown)", format); return s_szBuf; } - #else + + #ifdef __VISUALC__ + #pragma warning(default:4063) + #endif // VC++ + +#else // !Debug return ""; -#endif +#endif // Debug } // ---------------------------------------------------------------------------- @@ -400,3 +418,8 @@ static const char *GetTymedName(DWORD tymed) return s_szBuf; } } + +// TODO: OLE parts of wxBitmap/File/MetafileDataObject + +#endif +