X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/110a0fea88321caaac0a6fa44901c7fb731416a8..69659fd770f615210efac4b4fa741b3ad6223616:/src/msw/clipbrd.cpp diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 96813f8f58..2369d769fb 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: clipbrd.cpp +// Name: src/msw/clipbrd.cpp // Purpose: Clipboard functionality // Author: Julian Smart // Modified by: @@ -17,10 +17,6 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "clipbrd.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -28,12 +24,10 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP - #include "wx/setup.h" -#endif - #if wxUSE_CLIPBOARD +#include "wx/clipbrd.h" + #ifndef WX_PRECOMP #include "wx/object.h" #include "wx/event.h" @@ -42,31 +36,28 @@ #include "wx/bitmap.h" #include "wx/utils.h" #include "wx/intl.h" + #include "wx/log.h" + #include "wx/dataobj.h" #endif #if wxUSE_METAFILE #include "wx/metafile.h" #endif -#include "wx/log.h" -#include "wx/clipbrd.h" #include #include "wx/msw/private.h" +#include "wx/msw/ole/oleutils.h" #if wxUSE_WXDIB -#include "wx/msw/dib.h" + #include "wx/msw/dib.h" #endif // wxDataObject is tied to OLE/drag and drop implementation, therefore so are // the functions using wxDataObject in wxClipboard //#define wxUSE_DATAOBJ wxUSE_DRAG_AND_DROP -#if wxUSE_DATAOBJ - #include "wx/dataobj.h" -#endif - #if wxUSE_OLE && !defined(__WXWINCE__) // use OLE clipboard #define wxUSE_OLE_CLIPBOARD 1 @@ -301,8 +292,8 @@ bool wxSetClipboardData(wxDataFormat dataFormat, handle = SetClipboardData(dataFormat, hGlobalMemory); break; } - // Only tested with non-Unicode, Visual C++ 6.0 so far -#if defined(__VISUALC__) && !defined(UNICODE) + // Only tested with Visual C++ 6.0 so far +#if defined(__VISUALC__) case wxDF_HTML: { char* html = (char *)data; @@ -339,19 +330,19 @@ bool wxSetClipboardData(wxDataFormat dataFormat, // string when you overwrite it so you follow up with code to replace // the 0 appended at the end with a '\r'... char *ptr = strstr(buf, "StartHTML"); - wsprintf(ptr+10, "%08u", strstr(buf, "") - buf); + sprintf(ptr+10, "%08u", strstr(buf, "") - buf); *(ptr+10+8) = '\r'; ptr = strstr(buf, "EndHTML"); - wsprintf(ptr+8, "%08u", strlen(buf)); + sprintf(ptr+8, "%08u", strlen(buf)); *(ptr+8+8) = '\r'; ptr = strstr(buf, "StartFragment"); - wsprintf(ptr+14, "%08u", strstr(buf, "