]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmprint.cpp
Updated version
[wxWidgets.git] / src / html / htmprint.cpp
index 117e2261c4a2dcf903ea3b81e390fccdb204c0da..a2dfa82097ab880c1735d8500d2e628584a1c0da 100644 (file)
@@ -269,9 +269,6 @@ void wxHtmlPrintout::SetHtmlText(const wxString& html, const wxString &basepath,
     m_BasePathIsDir = isdir;
 }
 
-// defined in htmlfilt.cpp
-void wxPrivate_ReadString(wxString& str, wxInputStream* s);
-
 void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
 {
     wxFileSystem fs;
@@ -283,13 +280,11 @@ void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
         return;
     }
 
-    wxInputStream *st = ff->GetStream();
-    wxString doc;
-    wxPrivate_ReadString(doc, st);
-
-    delete ff;
-
+    wxHtmlFilterHTML filter;
+    wxString doc = filter.ReadFile(*ff);
+    
     SetHtmlText(doc, htmlfile, FALSE);
+    delete ff;
 }