X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/219b657fbe238ab34cf41394162b87bb5ada3456..967d3d97839afc098999cee27e0c8c70fa42294c:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index d4ec164a93..3831f98b1a 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -28,6 +28,7 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/wxcrtvararg.h" #endif #include "wx/dataobj.h" @@ -136,9 +137,9 @@ private: // wxDataFormat // ---------------------------------------------------------------------------- -void wxDataFormat::SetId(const wxChar *format) +void wxDataFormat::SetId(const wxString& format) { - m_format = (wxDataFormat::NativeFormat)::RegisterClipboardFormat(format); + m_format = (wxDataFormat::NativeFormat)::RegisterClipboardFormat(format.wx_str()); if ( !m_format ) { wxLogError(_("Couldn't register clipboard format '%s'."), format); @@ -159,6 +160,7 @@ wxString wxDataFormat::GetId() const if ( !len ) { wxLogError(_("The clipboard format '%d' doesn't exist."), m_format); + return wxEmptyString; } return s; @@ -1080,7 +1082,7 @@ size_t wxFileDataObject::GetDataSize() const size_t len; #if wxUSE_UNICODE_MSLU if ( sizeOfChar == sizeof(char) ) - len = strlen(wxConvFileName->cWC2MB(m_filenames[i])); + len = strlen(m_filenames[i].mb_str(*wxConvFileName)); else #endif // wxUSE_UNICODE_MSLU len = m_filenames[i].length(); @@ -1129,7 +1131,7 @@ bool wxFileDataObject::GetDataHere(void *WXUNUSED_IN_WINCE(pData)) const #if wxUSE_UNICODE_MSLU if ( sizeOfChar == sizeof(char) ) { - wxCharBuffer buf(wxConvFileName->cWC2MB(m_filenames[i])); + wxCharBuffer buf(m_filenames[i].mb_str(*wxConvFileName)); len = strlen(buf); memcpy(pbuf, buf, len*sizeOfChar); }