X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/efba2b89f15ba8757a722fc56c67f434cf960482..354aa1e366a57d896e2cf0943c687b24e8db688c:/src/html/htmprint.cpp diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 612566ed11..5863e4bd88 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -16,6 +16,8 @@ // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" +#include "wx/defs.h" + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -24,7 +26,7 @@ #include "wx/wx.h" #endif -#if wxUSE_PRINTING_ARCHITECTURE +#if wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE #include "wx/print.h" #include "wx/printdlg.h" @@ -368,11 +370,11 @@ wxString wxHtmlPrintout::TranslateHeader(const wxString& instr, int page) wxString r = instr; wxString num; - num.Printf("%i", page); - r.Replace("@PAGENUM@", num); + num.Printf(wxT("%i"), page); + r.Replace(wxT("@PAGENUM@"), num); - num.Printf("%i", m_NumPages); - r.Replace("@PAGESCNT@", num); + num.Printf(wxT("%i"), m_NumPages); + r.Replace(wxT("@PAGESCNT@"), num); return r; } @@ -403,16 +405,15 @@ 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; m_PageSetupData -> EnableMargins(TRUE); m_PageSetupData -> SetMarginTopLeft(wxPoint(25, 25)); m_PageSetupData -> SetMarginBottomRight(wxPoint(25, 25)); - -#if defined(__WXGTK__) || defined(__WXMOTIF__) - m_PrintData -> SetPrinterCommand("lpr"); -#endif } @@ -565,4 +566,4 @@ wxHtmlPrintout *wxHtmlEasyPrinting::CreatePrintout() -#endif // wxUSE_PRINTING_ARCHITECTURE +#endif // wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE