Applied [ 857819 ] STC CopyToClipboard uses LF on win32

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-12-11 11:32:44 +00:00
parent 19d821c536
commit a55f5a1136
2 changed files with 4 additions and 2 deletions

View File

@@ -19,6 +19,7 @@
#include "ExternalLexer.h" #include "ExternalLexer.h"
#include "wx/stc/stc.h" #include "wx/stc/stc.h"
#include "PlatWX.h" #include "PlatWX.h"
#include <wx/textbuf.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Helper classes // Helper classes
@@ -384,7 +385,7 @@ void ScintillaWX::Paste() {
void ScintillaWX::CopyToClipboard(const SelectionText& st) { void ScintillaWX::CopyToClipboard(const SelectionText& st) {
if (wxTheClipboard->Open()) { if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(FALSE); wxTheClipboard->UsePrimarySelection(FALSE);
wxString text = stc2wx(st.s, st.len); wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
wxTheClipboard->SetData(new wxTextDataObject(text)); wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close(); wxTheClipboard->Close();
} }

View File

@@ -19,6 +19,7 @@
#include "ExternalLexer.h" #include "ExternalLexer.h"
#include "wx/stc/stc.h" #include "wx/stc/stc.h"
#include "PlatWX.h" #include "PlatWX.h"
#include <wx/textbuf.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Helper classes // Helper classes
@@ -384,7 +385,7 @@ void ScintillaWX::Paste() {
void ScintillaWX::CopyToClipboard(const SelectionText& st) { void ScintillaWX::CopyToClipboard(const SelectionText& st) {
if (wxTheClipboard->Open()) { if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(FALSE); wxTheClipboard->UsePrimarySelection(FALSE);
wxString text = stc2wx(st.s, st.len); wxString text = wxTextBuffer::Translate(stc2wx(st.s, st.len));
wxTheClipboard->SetData(new wxTextDataObject(text)); wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close(); wxTheClipboard->Close();
} }