return NULL ;
}
- if ( dataFormat.GetType() == wxDF_TEXT && wxApp::s_macDefaultEncodingIsPC )
+ if ( dataFormat.GetType() == wxDF_TEXT )
{
- wxString st = wxMacMakeStringFromCString( (char*) data ) ;
-#if wxUSE_UNICODE
- wxCharBuffer buf = st.ToAscii() ;
-#else
- const char* buf = st ;
-#endif
- char* newdata = new char[strlen(buf)+1] ;
- memcpy( newdata , buf , strlen(buf)+1 ) ;
- delete[] ((char*) data ) ;
- data = newdata ;
+ wxMacConvertNewlines10To13( (char*) data ) ;
}
return data;
case wxDF_OEMTEXT:
{
wxTextDataObject* textDataObject = (wxTextDataObject*) data;
- wxString str(textDataObject->GetText());
- wxCharBuffer buf = wxMacStringToCString( str ) ;
+ wxCharBuffer buf = textDataObject->GetText().mb_str() ;
err = UMAPutScrap( strlen(buf) , kScrapFlavorTypeText , (void*) buf.data() ) ;
}
break ;