fixed bug that caused assertion failure during HTML printing under wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
1999-10-30 21:36:48 +00:00
parent 354aa1e366
commit 2a0eb92258
2 changed files with 5 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ class WXDLLEXPORT wxHtmlPrintout : public wxPrintout
bool OnPrintPage(int page); bool OnPrintPage(int page);
bool HasPage(int page); bool HasPage(int page);
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
void OnBeginPrinting(); bool OnBeginDocument(int startPage, int endPage);
private: private:

View File

@@ -1,3 +1,4 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: htmprint.cpp // Name: htmprint.cpp
// Purpose: html printing classes // 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; int pageWidth, pageHeight, mm_w, mm_h;
float ppmm_h, ppmm_v; float ppmm_h, ppmm_v;
wxPrintout::OnBeginPrinting(); if (!wxPrintout::OnBeginDocument(startPage, endPage)) return FALSE;
GetPageSizePixels(&pageWidth, &pageHeight); GetPageSizePixels(&pageWidth, &pageHeight);
GetPageSizeMM(&mm_w, &mm_h); GetPageSizeMM(&mm_w, &mm_h);
@@ -227,6 +228,7 @@ void wxHtmlPrintout::OnBeginPrinting()
); );
m_Renderer -> SetHtmlText(m_Document, m_BasePath, m_BasePathIsDir); m_Renderer -> SetHtmlText(m_Document, m_BasePath, m_BasePathIsDir);
CountPages(); CountPages();
return TRUE;
} }