X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/939fba6c17da245488a77a3f58e983180fc5de91..fadb227e012ef07927f8548b9753b42dcc13b700:/src/mac/carbon/clipbrd.cpp diff --git a/src/mac/carbon/clipbrd.cpp b/src/mac/carbon/clipbrd.cpp index 5ef8fdb107..6cbc655fc6 100644 --- a/src/mac/carbon/clipbrd.cpp +++ b/src/mac/carbon/clipbrd.cpp @@ -138,12 +138,7 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len) if ( dataFormat.GetType() == wxDF_TEXT ) { - char * buf = (char*) data ; - while( (buf=strchr(buf,0x0a)) != NULL ) - { - *buf = 13 ; - buf++ ; - } + wxMacConvertNewlines10To13( (char*) data ) ; } return data; @@ -303,6 +298,15 @@ bool wxClipboard::AddData( wxDataObject *data ) void wxClipboard::Close() { m_open = false ; + + // Get rid of cached object. If this is not done copying from another application will + // only work once + if (m_data) + { + delete m_data; + m_data = (wxDataObject*) NULL; + } + } bool wxClipboard::IsSupported( const wxDataFormat &dataFormat )