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:
Vadim Zeitlin
2012-02-07 13:02:32 +00:00
parent d7235613f4
commit 846f4568e5
6 changed files with 50 additions and 18 deletions

View File

@@ -151,7 +151,7 @@ int wxHtmlDCRenderer::Render(int x, int y,
int pbreak, hght;
pbreak = (int)(from + m_Height);
while (m_Cells->AdjustPagebreak(&pbreak, known_pagebreaks)) {}
while (m_Cells->AdjustPagebreak(&pbreak, known_pagebreaks, m_Height)) {}
hght = pbreak - from;
if(to < hght)
hght = to;