- wxLogTrace( TRACE_CLIPBOARD,
- wxT("wxClipboard now supports atom %s"),
- array[i].GetId().c_str() );
-
- size_t sz = data->GetDataSize( array[i] ) ;
- void* buf = malloc( sz + 1 ) ;
- if ( buf )
- {
- data->GetDataHere( array[i] , buf ) ;
- OSType mactype = 0 ;
+ if (array[i].IsStandard())
+ {
+ wxLogTrace( TRACE_CLIPBOARD,
+ wxT("wxClipboard now supports standard atom type %d"),
+ array[i].GetType() );
+ }
+ else
+ {
+ wxLogTrace( TRACE_CLIPBOARD,
+ wxT("wxClipboard now supports atom %s"),
+ array[i].GetId().c_str() );
+ }
+
+ size_t sz = data->GetDataSize( array[ i ] );
+ void* buf = malloc( sz + 1 );
+ if ( buf != NULL )
+ {
+ // empty the buffer because in some case GetDataHere does not fill buf
+ memset( buf, 0, sz + 1 );
+ data->GetDataHere( array[ i ], buf );
+ OSType mactype = 0;