]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_pre.cpp
OS/2 updates for statusbar processing and easier VA debugging
[wxWidgets.git] / src / html / m_pre.cpp
index 5a5a3ecb0167c8e1fd4f7532dc34c0a1f8de4e88..df51c4246ab75b92b95f783e5782a5639e7689e8 100644 (file)
@@ -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);