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 )
else
{
m_type = wxDF_PRIVATE;
- m_id = wxMacCFStringHolder( (CFStringRef) CFRetain((CFStringRef) format )).AsString();
+ m_id = wxCFStringRef( (CFStringRef) CFRetain((CFStringRef) format )).AsString();
}
}
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
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");
}
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 );