X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/936b18ac298f757c460f070411a33445efe40eb2..008a56c968ed7e0694e32e93c2dbf95dde2ba5c8:/src/html/htmprint.cpp diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index fac5d33635..a2dfa82097 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -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; } @@ -425,9 +420,6 @@ wxHtmlEasyPrinting::wxHtmlEasyPrinting(const wxString& name, wxFrame *parent_fra m_Frame = parent_frame; m_Name = name; m_PrintData = new wxPrintData; -#if (defined __WXGTK__) || (defined __WXMOTIF__) - (*m_PrintData) = (*wxThePrintSetupData); -#endif m_PageSetupData = new wxPageSetupDialogData; m_Headers[0] = m_Headers[1] = m_Footers[0] = m_Footers[1] = wxEmptyString;