X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5260b1c582632afeb8f25db7f10697c8d45461b4..2165ad93a2fc73d74d933570e095191281b9045f:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 941748b092..2d202e39eb 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -30,7 +30,7 @@ #include -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__GNUWIN32__) #include #include @@ -280,14 +280,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; } } @@ -357,7 +357,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 _MSC_VER + #pragma warning(disable:4063) + #endif // VC++ + static char s_szBuf[128]; switch ( format ) { case CF_TEXT: return "CF_TEXT"; @@ -380,9 +385,14 @@ const char *wxDataObject::GetFormatName(wxDataFormat format) sprintf(s_szBuf, "clipboard format %d (unknown)", format); return s_szBuf; } - #else + + #ifdef _MSC_VER + #pragma warning(default:4063) + #endif // VC++ + +#else // !Debug return ""; -#endif +#endif // Debug } // ---------------------------------------------------------------------------- @@ -405,5 +415,7 @@ static const char *GetTymedName(DWORD tymed) } } +// TODO: OLE parts of wxBitmap/File/MetafileDataObject + #endif