Fix infinite loop in wxHtmlEasyPrinting page break code.
The code didn't handle cells higher than the page height correctly and entered an infinite loop when trying to adjust page breaks in their presence, e.g. when trying to print a very tall image. Closes #13935. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -71,7 +71,8 @@ public:
|
||||
wxHtmlPageBreakCell() {}
|
||||
|
||||
bool AdjustPagebreak(int* pagebreak,
|
||||
const wxArrayInt& known_pagebreaks) const;
|
||||
const wxArrayInt& known_pagebreaks,
|
||||
int pageHeight) const;
|
||||
|
||||
void Draw(wxDC& WXUNUSED(dc),
|
||||
int WXUNUSED(x), int WXUNUSED(y),
|
||||
@@ -82,7 +83,10 @@ private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxHtmlPageBreakCell);
|
||||
};
|
||||
|
||||
bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, const wxArrayInt& known_pagebreaks) const
|
||||
bool
|
||||
wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak,
|
||||
const wxArrayInt& known_pagebreaks,
|
||||
int WXUNUSED(pageHeight)) const
|
||||
{
|
||||
// When we are counting pages, 'known_pagebreaks' is non-NULL.
|
||||
// That's the only time we change 'pagebreak'. Otherwise, pages
|
||||
|
||||
Reference in New Issue
Block a user