]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dataobj.cpp
switching from native rtti to wxrtti
[wxWidgets.git] / src / mac / carbon / dataobj.cpp
index 9e42e47a4960b2ad0733f095dddf81fe7911fc79..fb73241ed9b61dcc8d2c81742c579ac3e49fadcc 100644 (file)
 
 #if wxUSE_DATAOBJ
 
+#include "wx/dataobj.h"
+
 #ifndef WX_PRECOMP
-#include "wx/intl.h"
+    #include "wx/intl.h"
+    #include "wx/log.h"
+    #include "wx/dcmemory.h"
+    #include "wx/image.h"
 #endif
 
-#include "wx/log.h"
-#include "wx/dataobj.h"
-#include "wx/dcmemory.h"
 #include "wx/mstream.h"
-#include "wx/image.h"
 #include "wx/metafile.h"
 #include "wx/tokenzr.h"
 
@@ -250,7 +251,7 @@ bool wxFileDataObject::SetData( size_t nSize, const void *pBuf )
 #if wxUSE_UNICODE
     filenames = wxString( (const char*)pBuf, *wxConvFileName );
 #else
-    filenames = wxString( wxConvFileName->cMB2WX( pBuf ), wxConvLocal );
+    filenames = wxString (wxConvLocal.cWC2WX(wxConvFileName->cMB2WC( (const char*)pBuf)));
 #endif
 
     m_filenames = wxStringTokenize( filenames, wxT("\n"), wxTOKEN_STRTOK );
@@ -310,8 +311,10 @@ void wxBitmapDataObject::Clear()
 {
     if (m_pictHandle != NULL)
     {
+#ifndef __LP64__
         if (m_pictCreated)
             KillPicture( (PicHandle)m_pictHandle );
+#endif
         m_pictHandle = NULL;
     }
 
@@ -355,16 +358,21 @@ bool wxBitmapDataObject::SetData( size_t nSize, const void *pBuf )
 
     // ownership is transferred to the bitmap
     m_pictCreated = false;
+#ifndef __LP64__
     Rect frame;
     wxMacGetPictureBounds( picHandle, &frame );
-
+#if wxUSE_METAFILE
     wxMetafile mf;
     mf.SetHMETAFILE( (WXHMETAFILE)m_pictHandle );
+#endif
     wxMemoryDC mdc;
     m_bitmap.Create( frame.right - frame.left, frame.bottom - frame.top );
     mdc.SelectObject( m_bitmap );
+#if wxUSE_METAFILE  
     mf.Play( &mdc );
+#endif
     mdc.SelectObject( wxNullBitmap );
+#endif
 
     return m_bitmap.Ok();
 }