X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69941f05864fa8b37856ccc1338124bfac756a2b..0240e8b1aa935d43689b0b8ec36de3c06c1a4758:/src/html/m_pre.cpp?ds=sidebyside diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp index 25e24cf402..e073b69a35 100644 --- a/src/html/m_pre.cpp +++ b/src/html/m_pre.cpp @@ -11,15 +11,16 @@ #pragma implementation #endif -#include +#include "wx/wxprec.h" +#include "wx/defs.h" #if wxUSE_HTML #ifdef __BORDLANDC__ #pragma hdrstop #endif #ifndef WXPRECOMP -#include +#include "wx/wx.h" #endif @@ -27,7 +28,7 @@ #include "wx/html/m_templ.h" #include "wx/html/htmlcell.h" -#include +#include "wx/tokenzr.h" FORCE_LINK_ME(mod_pre) @@ -66,20 +67,17 @@ wxHtmlPRECell::wxHtmlPRECell(const wxString& s, wxDC& dc) : wxHtmlCell() m_Width = m_Height = 0; i = 0; -#if (wxVERSION_NUMBER < 2100) - while (tokenizer.HasMoreToken()) { -#else while (tokenizer.HasMoreTokens()) { -#endif if (i % 10 == 0) m_Text = (wxString**) realloc(m_Text, sizeof(wxString*) * (i + 10)); tmp = tokenizer.NextToken(); - tmp.Replace(" ", " ", TRUE); - tmp.Replace(""", "\"", TRUE); - tmp.Replace("<", "<", TRUE); - tmp.Replace(">", ">", TRUE); - tmp.Replace("&", "&", TRUE); - tmp.Replace("\t", " ", TRUE); - tmp.Replace("\r", "", TRUE); + 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); @@ -128,8 +126,8 @@ TAG_HANDLER_BEGIN(PRE, "PRE") m_WParser -> CloseContainer(); c = m_WParser -> OpenContainer(); - c -> SetAlignHor(HTML_ALIGN_LEFT); - c -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_VERTICAL); + c -> SetAlignHor(wxHTML_ALIGN_LEFT); + c -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_VERTICAL); m_WParser -> SetFontUnderlined(FALSE); m_WParser -> SetFontBold(FALSE);