]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed bug that caused assertion failure during HTML printing under wxGTK
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 30 Oct 1999 21:36:48 +0000 (21:36 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 30 Oct 1999 21:36:48 +0000 (21:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/html/htmprint.h
src/html/htmprint.cpp

index 362bb5a9a560777f844104af8299b79854cc40bd..e7d6dc59e81de018bc7796ff531d3c29cb9bb006 100644 (file)
@@ -138,7 +138,7 @@ class WXDLLEXPORT wxHtmlPrintout : public wxPrintout
         bool OnPrintPage(int page);
         bool HasPage(int page);
         void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
-        void OnBeginPrinting();
+        bool OnBeginDocument(int startPage, int endPage);
         
     private:
 
index 5863e4bd8840000717f2cae84810f2ac8e7e84f5..85614f0928446d7d939954c4e78e917f09c73497 100644 (file)
@@ -1,3 +1,4 @@
+
 /////////////////////////////////////////////////////////////////////////////
 // Name:        htmprint.cpp
 // Purpose:     html printing classes
@@ -183,12 +184,12 @@ wxHtmlPrintout::~wxHtmlPrintout()
 
 
 
-void wxHtmlPrintout::OnBeginPrinting()
+bool wxHtmlPrintout::OnBeginDocument(int startPage, int endPage)
 {
     int pageWidth, pageHeight, mm_w, mm_h;
     float ppmm_h, ppmm_v;
     
-    wxPrintout::OnBeginPrinting();
+    if (!wxPrintout::OnBeginDocument(startPage, endPage)) return FALSE;
 
     GetPageSizePixels(&pageWidth, &pageHeight);
     GetPageSizeMM(&mm_w, &mm_h);
@@ -227,6 +228,7 @@ void wxHtmlPrintout::OnBeginPrinting()
                           );
     m_Renderer -> SetHtmlText(m_Document, m_BasePath, m_BasePathIsDir);
     CountPages();
+    return TRUE;
 }