X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4080c40a71a40c54798f2681e22c7cc4701ace07..8ca97ad03c980fa2978a770e228dba6389c5fcac:/src/generic/printps.cpp diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index dcaf5394c5..0e994766b9 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -45,6 +45,7 @@ #include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/generic/prntdlgg.h" +#include "wx/generic/progdlgg.h" #include "wx/paper.h" #include @@ -53,10 +54,8 @@ // wxWin macros // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) -#endif // ============================================================================ // implementation @@ -84,7 +83,12 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro return FALSE; printout->SetIsPreview(FALSE); - printout->OnPreparePrinting(); + + // 4/9/99, JACS: this is a silly place to allow preparation, considering + // the DC and no parameters have been set in the printout object. + // Moved further down. + + // printout->OnPreparePrinting(); // Get some parameters from the printout, if defined int fromPage, toPage; @@ -169,6 +173,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro // Create an abort window wxBeginBusyCursor(); + printout->OnPreparePrinting(); + int pagesPerCopy = m_printDialogData.GetToPage()-m_printDialogData.GetFromPage()+1, totalPages = pagesPerCopy * m_printDialogData.GetNoCopies(), @@ -180,7 +186,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro totalPages, parent, wxPD_CAN_ABORT|wxPD_AUTO_HIDE|wxPD_APP_MODAL); - + printout->OnBeginPrinting(); bool keepGoing = TRUE; @@ -218,8 +224,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro } else { - sm_abortIt = true; - keepGoing = false; + sm_abortIt = TRUE; + keepGoing = FALSE; } } wxYield();