removal of pc-mac charset conversion for wxMac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-09-14 18:40:43 +00:00
parent a2b436fb40
commit 939fba6c17
26 changed files with 131 additions and 572 deletions

View File

@@ -136,18 +136,14 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
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 ;
char * buf = (char*) data ;
while( (buf=strchr(buf,0x0a)) != NULL )
{
*buf = 13 ;
buf++ ;
}
}
return data;
@@ -252,8 +248,7 @@ bool wxClipboard::AddData( wxDataObject *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 ;