X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f9297b0eead20a0bfee71df18e0d8f0cbc402fb..4b7b750dd1ffd0d26b78728adb613b282a37c058:/src/html/htmprint.cpp diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index f79156b31a..4000a2e719 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -192,7 +192,7 @@ bool wxHtmlPrintout::OnBeginDocument(int startPage, int endPage) /* prepare headers/footers renderer: */ m_RendererHdr->SetDC(GetDC(), (double)ppiPrinterY / (double)ppiScreenY); - m_RendererHdr->SetSize((int) (ppmm_h * (mm_w - m_MarginLeft - m_MarginTop)), + m_RendererHdr->SetSize((int) (ppmm_h * (mm_w - m_MarginLeft - m_MarginRight)), (int) (ppmm_v * (mm_h - m_MarginTop - m_MarginBottom))); if (m_Headers[0] != wxEmptyString) { @@ -217,7 +217,7 @@ bool wxHtmlPrintout::OnBeginDocument(int startPage, int endPage) /* prepare main renderer: */ m_Renderer->SetDC(GetDC(), (double)ppiPrinterY / (double)ppiScreenY); - m_Renderer->SetSize((int) (ppmm_h * (mm_w - m_MarginLeft - m_MarginTop)), + m_Renderer->SetSize((int) (ppmm_h * (mm_w - m_MarginLeft - m_MarginRight)), (int) (ppmm_v * (mm_h - m_MarginTop - m_MarginBottom) - m_FooterHeight - m_HeaderHeight - ((m_HeaderHeight == 0) ? 0 : m_MarginSpace * ppmm_v) - @@ -471,7 +471,9 @@ bool wxHtmlEasyPrinting::PrintFile(const wxString &htmlfile) { wxHtmlPrintout *p = CreatePrintout(); p->SetHtmlFile(htmlfile); - return DoPrint(p); + bool ret = DoPrint(p); + delete p; + return ret; } @@ -480,7 +482,9 @@ bool wxHtmlEasyPrinting::PrintText(const wxString &htmltext, const wxString &bas { wxHtmlPrintout *p = CreatePrintout(); p->SetHtmlText(htmltext, basepath, TRUE); - return DoPrint(p); + bool ret = DoPrint(p); + delete p; + return ret; }