X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31e24645c0318d043a9b7f071e4aa26fc8d483d0..5f9fd7ea86d211e3681a71c9f70303aa72b5de3c:/src/html/m_pre.cpp diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp index e073b69a35..b7f283a224 100644 --- a/src/html/m_pre.cpp +++ b/src/html/m_pre.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: mod_pre.cpp +// Name: m_pre.cpp // Purpose: wxHtml module for
...tag (code citation) // Author: Vaclav Slavik // RCS-ID: $Id$ @@ -29,8 +29,9 @@ #include "wx/html/htmlcell.h" #include "wx/tokenzr.h" +#include "wx/encconv.h" -FORCE_LINK_ME(mod_pre) +FORCE_LINK_ME(m_pre) //----------------------------------------------------------------------------- @@ -133,13 +134,20 @@ TAG_HANDLER_BEGIN(PRE, "PRE") m_WParser -> SetFontBold(FALSE); m_WParser -> SetFontItalic(FALSE); m_WParser -> SetFontFixed(TRUE); - m_WParser -> SetFontSize(0); + m_WParser -> SetFontSize(3); c -> InsertCell(new wxHtmlFontCell(m_WParser -> CreateCurrentFont())); { wxString cit; - cit = m_WParser -> GetSource() -> Mid(tag.GetBeginPos(), tag.GetEndPos1() - tag.GetBeginPos()); - c -> InsertCell(new wxHtmlPRECell(cit, *(m_WParser -> GetDC()))); + wxEncodingConverter *encconv = m_WParser -> GetEncodingConverter(); + 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);