]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dataobj.cpp
fix compilation after r50329
[wxWidgets.git] / src / mac / carbon / dataobj.cpp
index 1027e0c2862da68af8d31a85aa9d0f0a86c686e7..cdec68b05d7028d784a85c4fa2fe733d446ead98 100644 (file)
@@ -147,10 +147,7 @@ void wxDataFormat::SetType( wxDataFormatId dataType )
 
 wxString wxDataFormat::GetId() const
 {
-    wxCHECK_MSG( !IsStandard(), wxEmptyString,
-                 wxT("name of predefined format cannot be retrieved") );
-
-    return m_id;
+    return wxCFStringRef(wxCFRetain((CFStringRef)m_format)).AsString();
 }
 
 void wxDataFormat::SetId( NativeFormat format )
@@ -184,7 +181,7 @@ void wxDataFormat::SetId( NativeFormat format )
     else 
     {
         m_type = wxDF_PRIVATE;
-        m_id = wxMacCFStringHolder( (CFStringRef) CFRetain((CFStringRef) format )).AsString();
+        m_id = wxCFStringRef( (CFStringRef) CFRetain((CFStringRef) format )).AsString();
     }
 }
 
@@ -198,7 +195,7 @@ void wxDataFormat::SetId( const wxString& zId )
         m_format = 0;
     }
     // since it is private, no need to conform to anything ...
-    m_format = (long) wxMacCFStringHolder(m_id).Detach();
+    m_format = (long) wxCFRetain( (CFStringRef) wxCFStringRef(m_id) );
 }
 
 bool wxDataFormat::operator==(const wxDataFormat& format) const
@@ -423,7 +420,7 @@ bool wxDataObject::GetFromPasteboard( void * pb )
                                 CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, cfString);
                                 CFRelease( cfString );
                                 CFStringNormalize(cfMutableString,kCFStringNormalizationFormC);
-                                wxString path = wxMacCFStringHolder(cfMutableString).AsString();
+                                wxString path = wxCFStringRef(cfMutableString).AsString();
                                 if (!path.empty())
                                     filenamesPassed += path + wxT("\n");
                             }
@@ -647,7 +644,7 @@ void wxBitmapDataObject::SetBitmap( const wxBitmap& rBitmap )
     wxBitmapDataObjectBase::SetBitmap( rBitmap );
     if (m_bitmap.Ok())
     {
-        CGImageRef cgImageRef = (CGImageRef) m_bitmap.CGImageCreate();
+        CGImageRef cgImageRef = (CGImageRef) m_bitmap.CreateCGImage();
 
         CFMutableDataRef data = CFDataCreateMutable(kCFAllocatorDefault, 0);
         CGImageDestinationRef destination = CGImageDestinationCreateWithData( data , kUTTypeTIFF , 1 , NULL );
@@ -745,7 +742,7 @@ bool wxBitmapDataObject::SetData( size_t nSize, const void *pBuf )
         m_bitmap.Create( CGImageGetWidth(cgImageRef)  , CGImageGetHeight(cgImageRef) );
         CGRect r = CGRectMake( 0 , 0 , CGImageGetWidth(cgImageRef)  , CGImageGetHeight(cgImageRef) );
         // since our context is upside down we dont use CGContextDrawImage
-        HIViewDrawCGImage( (CGContextRef) m_bitmap.GetHBITMAP() , &r, cgImageRef ) ;
+        wxMacDrawCGImage( (CGContextRef) m_bitmap.GetHBITMAP() , &r, cgImageRef ) ;
         CGImageRelease(cgImageRef);
         cgImageRef = NULL;
     }