]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmprint.cpp
Crash fix under VC++
[wxWidgets.git] / src / html / htmprint.cpp
index e3c7c829484c50604794ecf65cfe01d20bab2f97..ce67a52c691dfc473a11c1f9bb24f54ddd632eb4 100644 (file)
@@ -112,7 +112,9 @@ void wxHtmlDCRenderer::SetStandardFonts(int size,
 }
 
 
-int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render, int to, int *known_pagebreaks, int number_of_pages)
+int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render,
+                             int maxHeight,
+                             int *known_pagebreaks, int number_of_pages)
 {
     int pbreak, hght;
 
@@ -121,8 +123,8 @@ int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render, int to, in
     pbreak = (int)(from + m_Height);
     while (m_Cells->AdjustPagebreak(&pbreak, known_pagebreaks, number_of_pages)) {}
     hght = pbreak - from;
-    if(to < hght)
-        hght = to;
+    if (maxHeight < hght)
+        hght = maxHeight;
 
     if (!dont_render)
     {
@@ -591,18 +593,6 @@ bool wxHtmlEasyPrinting::DoPrint(wxHtmlPrintout *printout)
 
 
 
-void wxHtmlEasyPrinting::PrinterSetup()
-{
-    wxPrintDialogData printDialogData(*GetPrintData());
-    wxPrintDialog printerDialog(m_ParentWindow, &printDialogData);
-
-    printerDialog.GetPrintDialogData().SetSetupDialog(true);
-
-    if (printerDialog.ShowModal() == wxID_OK)
-        (*GetPrintData()) = printerDialog.GetPrintDialogData().GetPrintData();
-}
-
-
 
 void wxHtmlEasyPrinting::PageSetup()
 {