- // translate everything to the current (platform-dependent) line
- // termination character
- str = wxTextBuffer::Translate(str);
-
- wxMemoryText memText;
-
- // Now we can add the text to the memory text. To do this we extract line
- // by line from the translated string, until we've reached the end.
- //
- // VZ: all this is horribly inefficient, we should do the translation on
- // the fly in one pass saving both memory and time (TODO)
-
- const wxChar *pEOL = wxTextBuffer::GetEOL(wxTextBuffer::typeDefault);
- const size_t EOLLen = wxStrlen(pEOL);
-
- int posLineStart = str.Find(pEOL);
- while ( posLineStart != -1 )