X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57f59026216c2ea4ff8c080c7301292dcb69001b..80a24267cbc17d85e278e1f10cdfdaea12199639:/src/html/m_pre.cpp diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp index f4999ee76b..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,10 +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()); - c -> InsertCell(new wxHtmlPRECell( - encconv ? encconv -> Convert(cit) : cit, - *(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);