X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/66bf55ca85742f562bf5f6039bed7b4d69231be1..1be06faf7318abf88a35b299b90ceb2a49c0353b:/src/html/m_pre.cpp diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp index 5a5a3ecb01..df51c4246a 100644 --- a/src/html/m_pre.cpp +++ b/src/html/m_pre.cpp @@ -14,7 +14,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop #endif @@ -140,9 +140,14 @@ TAG_HANDLER_BEGIN(PRE, "PRE") { wxString cit; wxEncodingConverter *encconv = m_WParser -> GetEncodingConverter(); - cit = m_WParser -> GetSource() -> Mid(tag.GetBeginPos(), tag.GetEndPos1() - tag.GetBeginPos()); - wxString cit2(encconv ? encconv -> Convert(cit) : cit); - c -> InsertCell(new wxHtmlPRECell(cit2, *(m_WParser -> GetDC()))); + cit = m_WParser -> GetSource() -> Mid(tag.GetBeginPos(), + tag.GetEndPos1() - tag.GetBeginPos()); + if (encconv) + c -> InsertCell(new wxHtmlPRECell(encconv -> Convert(cit), + *(m_WParser -> GetDC()))); + else + c -> InsertCell(new wxHtmlPRECell(cit, + *(m_WParser -> GetDC()))); } m_WParser -> SetFontUnderlined(underlined);