X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f480da37ca0840ddbe48b908d511d2e9fc20bf4..21d72d1755620c0017e872a5bc5a61fdea492c52:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 9beda80895..1b3c066a8b 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -27,18 +27,23 @@ #if defined(__BORLANDC__) #pragma hdrstop #endif - +#ifndef WX_PRECOMP +#include "wx/intl.h" +#endif #include "wx/defs.h" -#if defined(__WIN32__) && !defined(__GNUWIN32__) +#if defined(__WIN32__) && !defined(__GNUWIN32__) || defined(wxUSE_NORLANDER_HEADERS) #include "wx/log.h" #include "wx/dataobj.h" #include +#ifdef wxUSE_NORLANDER_HEADERS + #include +#endif #include -#ifndef __WIN32__ +#ifndef __WIN32__ #include #include #endif @@ -160,7 +165,7 @@ STDMETHODIMP wxIEnumFORMATETC::Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched) { - wxLogTrace("wxIEnumFORMATETC::Next"); + wxLogTrace(_T("wxIEnumFORMATETC::Next")); if ( celt > 1 ) return S_FALSE; @@ -177,7 +182,7 @@ STDMETHODIMP wxIEnumFORMATETC::Next(ULONG celt, STDMETHODIMP wxIEnumFORMATETC::Skip(ULONG celt) { - wxLogTrace("wxIEnumFORMATETC::Skip"); + wxLogTrace(_T("wxIEnumFORMATETC::Skip")); if ( m_nCurrent == 0 ) m_nCurrent++; @@ -187,7 +192,7 @@ STDMETHODIMP wxIEnumFORMATETC::Skip(ULONG celt) STDMETHODIMP wxIEnumFORMATETC::Reset() { - wxLogTrace("wxIEnumFORMATETC::Reset"); + wxLogTrace(_T("wxIEnumFORMATETC::Reset")); m_nCurrent = 0; @@ -196,7 +201,7 @@ STDMETHODIMP wxIEnumFORMATETC::Reset() STDMETHODIMP wxIEnumFORMATETC::Clone(IEnumFORMATETC **ppenum) { - wxLogTrace("wxIEnumFORMATETC::Clone"); + wxLogTrace(_T("wxIEnumFORMATETC::Clone")); wxIEnumFORMATETC *pNew = new wxIEnumFORMATETC(m_format.cfFormat); pNew->AddRef(); @@ -225,7 +230,7 @@ wxIDataObject::wxIDataObject(wxDataObject *pDataObject) // get data functions STDMETHODIMP wxIDataObject::GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium) { - wxLogTrace("wxIDataObject::GetData"); + wxLogTrace(_T("wxIDataObject::GetData")); // is data is in our format? HRESULT hr = QueryGetData(pformatetcIn); @@ -257,7 +262,7 @@ STDMETHODIMP wxIDataObject::GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium) STDMETHODIMP wxIDataObject::GetDataHere(FORMATETC *pformatetc, STGMEDIUM *pmedium) { - wxLogTrace("wxIDataObject::GetDataHere"); + wxLogTrace(_T("wxIDataObject::GetDataHere")); // put data in caller provided medium if ( pmedium->tymed != TYMED_HGLOBAL ) @@ -266,7 +271,7 @@ STDMETHODIMP wxIDataObject::GetDataHere(FORMATETC *pformatetc, // copy data void *pBuf = GlobalLock(pmedium->hGlobal); if ( pBuf == NULL ) { - wxLogLastError("GlobalLock"); + wxLogLastError(_T("GlobalLock")); return E_OUTOFMEMORY; } @@ -282,7 +287,7 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc, STGMEDIUM *pmedium, BOOL fRelease) { - wxLogTrace("wxIDataObject::SetData"); + wxLogTrace(_T("wxIDataObject::SetData")); return E_NOTIMPL; } @@ -291,39 +296,39 @@ STDMETHODIMP wxIDataObject::QueryGetData(FORMATETC *pformatetc) { // do we accept data in this format? if ( pformatetc == NULL ) { - wxLogTrace("wxIDataObject::QueryGetData: invalid ptr."); + wxLogTrace(_T("wxIDataObject::QueryGetData: invalid ptr.")); return E_INVALIDARG; } // the only one allowed by current COM implementation if ( pformatetc->lindex != -1 ) { - wxLogTrace("wxIDataObject::QueryGetData: bad lindex %d", + wxLogTrace(_T("wxIDataObject::QueryGetData: bad lindex %d"), pformatetc->lindex); return DV_E_LINDEX; } // we don't support anything other (THUMBNAIL, ICON, DOCPRINT...) if ( pformatetc->dwAspect != DVASPECT_CONTENT ) { - wxLogTrace("wxIDataObject::QueryGetData: bad dwAspect %d", + wxLogTrace(_T("wxIDataObject::QueryGetData: bad dwAspect %d"), pformatetc->dwAspect); return DV_E_DVASPECT; } // @@ we only transfer data by global memory (bad for large amounts of it!) if ( !(pformatetc->tymed & TYMED_HGLOBAL) ) { - wxLogTrace("wxIDataObject::QueryGetData: %s != TYMED_HGLOBAL.", + wxLogTrace(_T("wxIDataObject::QueryGetData: %s != TYMED_HGLOBAL."), GetTymedName(pformatetc->tymed)); return DV_E_TYMED; } // and now check the type of data requested if ( m_pDataObject->IsSupportedFormat((wxDataFormatId)pformatetc->cfFormat) ) { - wxLogTrace("wxIDataObject::QueryGetData: %s ok", + wxLogTrace(_T("wxIDataObject::QueryGetData: %s ok"), wxDataObject::GetFormatName((wxDataFormatId)pformatetc->cfFormat)); return S_OK; } else { - wxLogTrace("wxIDataObject::QueryGetData: %s unsupported", + wxLogTrace(_T("wxIDataObject::QueryGetData: %s unsupported"), wxDataObject::GetFormatName((wxDataFormatId)pformatetc->cfFormat)); return DV_E_FORMATETC; } @@ -332,7 +337,7 @@ STDMETHODIMP wxIDataObject::QueryGetData(FORMATETC *pformatetc) STDMETHODIMP wxIDataObject::GetCanonicalFormatEtc(FORMATETC *pFormatetcIn, FORMATETC *pFormatetcOut) { - wxLogTrace("wxIDataObject::GetCanonicalFormatEtc"); + wxLogTrace(_T("wxIDataObject::GetCanonicalFormatEtc")); // @@ implementation is trivial, we might want something better here if ( pFormatetcOut != NULL ) @@ -343,7 +348,7 @@ STDMETHODIMP wxIDataObject::GetCanonicalFormatEtc(FORMATETC *pFormatetcIn, STDMETHODIMP wxIDataObject::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) { - wxLogTrace("wxIDataObject::EnumFormatEtc"); + wxLogTrace(_T("wxIDataObject::EnumFormatEtc")); if ( dwDirection == DATADIR_SET ) { // we don't allow setting of data anyhow