bool wxDataObject::IsSupportedFormat(const wxDataFormat& format, Direction dir) const
{
size_t nFormatCount = GetFormatCount(dir);
- if ( nFormatCount == 1 ) {
+ if ( nFormatCount == 1 )
+ {
return format == GetPreferredFormat();
}
- else {
+ else
+ {
wxDataFormat *formats = new wxDataFormat[nFormatCount];
GetAllFormats(formats,dir);
size_t n;
- for ( n = 0; n < nFormatCount; n++ ) {
+ for ( n = 0; n < nFormatCount; n++ )
+ {
if ( formats[n] == format )
break;
}
{
Clear();
+#if wxUSE_LIBPNG
m_pngSize = size;
m_pngData = malloc(m_pngSize);
m_bitmap = image.ConvertToBitmap();
return m_bitmap.Ok();
+#else
+ return FALSE;
+#endif
}
void wxBitmapDataObject::DoConvertToPng()
{
+#if wxUSE_LIBPNG
if (!m_bitmap.Ok())
return;
wxMemoryOutputStream mstream( (char*) m_pngData, m_pngSize );
handler.SaveFile( &image, mstream );
+#endif
}