X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/269a5a34a6eb0f1eab66c5e09c667b66f0ac90a3..a8f2578758be3956d1cb55503c8cb773c7c96322:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index c2d512d673..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,24 +28,28 @@ #pragma hdrstop #endif -#include -#include -#include +#include + +#if defined(__WIN32__) && !defined(__GNUWIN32__) + +#include +#include + +#include +#include #ifndef __WIN32__ #include #include #endif +#include + // ---------------------------------------------------------------------------- // functions // ---------------------------------------------------------------------------- -#ifdef __DEBUG__ - static const char *GetTymedName(DWORD tymed); -#else - #define GetTymedName(tymed) "" -#endif +static const char *GetTymedName(DWORD tymed); // ---------------------------------------------------------------------------- // wxIEnumFORMATETC interface implementation @@ -280,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; } } @@ -313,7 +317,7 @@ STDMETHODIMP wxIDataObject::EnumFormatEtc(DWORD dwDirection, return E_NOTIMPL; } - wxIEnumFORMATETC *pEnum = + wxIEnumFORMATETC *pEnum = new wxIEnumFORMATETC(m_pDataObject->GetPreferredFormat()); pEnum->AddRef(); *ppenumFormatEtc = pEnum; @@ -355,10 +359,14 @@ wxDataObject::~wxDataObject() m_pIDataObject->Release(); } -#ifdef __DEBUG__ - const char *wxDataObject::GetFormatName(wxDataFormat format) { +#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"; @@ -381,6 +389,14 @@ const char *wxDataObject::GetFormatName(wxDataFormat format) sprintf(s_szBuf, "clipboard format %d (unknown)", format); return s_szBuf; } + + #ifdef __VISUALC__ + #pragma warning(default:4063) + #endif // VC++ + +#else // !Debug + return ""; +#endif // Debug } // ---------------------------------------------------------------------------- @@ -403,4 +419,7 @@ static const char *GetTymedName(DWORD tymed) } } -#endif //DEBUG \ No newline at end of file +// TODO: OLE parts of wxBitmap/File/MetafileDataObject + +#endif +