- if (i % 10 == 0) m_Text = (wxString**) realloc(m_Text, sizeof(wxString*) * (i + 10));
- tmp = tokenizer.NextToken();
- tmp.Replace(wxT("©"), wxT("(c)"), TRUE);
- tmp.Replace(wxT(" "), wxT(" "), TRUE);
- tmp.Replace(wxT("""), wxT("\""), TRUE);
- tmp.Replace(wxT("<"), wxT("<"), TRUE);
- tmp.Replace(wxT(">"), wxT(">"), TRUE);
- tmp.Replace(wxT("&"), wxT("&"), TRUE);
- tmp.Replace(wxT("\t"), wxT(" "), TRUE);
- tmp.Replace(wxT("\r"), wxT(""), TRUE);
- m_Text[i++] = new wxString(tmp);
-
- dc.GetTextExtent(tmp, &x, &z, &z);
- if (x > m_Width) m_Width = x;
- m_Height += m_LineHeight;
- m_LinesCnt++;
+ switch (str[i])
+ {
+ case wxT('<'):
+ while (i < len && str[i] != wxT('>'))
+ {
+ out << str[i++];
+ linepos++;
+ }
+ out << wxT('>');
+ linepos++;
+ break;
+ case wxT(' '):
+ out << wxT(" ");
+ linepos++;
+ break;
+ case wxT('\n'):
+ out << wxT("<br>");
+ linepos = 0;
+ break;
+ case wxT('\t'):
+ {
+ for (size_t j = 8 - linepos % 8; j > 0; j--)
+ out << wxT(" ");
+ linepos += 8 - linepos % 8;
+ }
+ break;
+ default:
+ out << str[i];
+ linepos++;
+ break;
+ }