]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_pre.cpp
1. status bar can now be positioned on top (and anywhere, in fact)
[wxWidgets.git] / src / html / m_pre.cpp
index 5a5a3ecb0167c8e1fd4f7532dc34c0a1f8de4e88..b7f283a2245d0cd115cda89ece2cf232d136c3e9 100644 (file)
@@ -140,9 +140,14 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
         {
             wxString cit;
             wxEncodingConverter *encconv = m_WParser -> GetEncodingConverter();
         {
             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);
         }
 
         m_WParser -> SetFontUnderlined(underlined);