use dynamic array for the page breaks positions (patch 1483976)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -219,7 +219,8 @@ wxCursor wxHtmlCell::GetMouseCursor(wxHtmlWindowInterface *window) const
|
||||
}
|
||||
|
||||
|
||||
bool wxHtmlCell::AdjustPagebreak(int *pagebreak, int* WXUNUSED(known_pagebreaks), int WXUNUSED(number_of_pages)) const
|
||||
bool wxHtmlCell::AdjustPagebreak(int *pagebreak,
|
||||
wxArrayInt& WXUNUSED(known_pagebreaks)) const
|
||||
{
|
||||
if ((!m_CanLiveOnPagebreak) &&
|
||||
m_PosY < *pagebreak && m_PosY + m_Height > *pagebreak)
|
||||
@@ -699,32 +700,28 @@ int wxHtmlContainerCell::GetIndentUnits(int ind) const
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool wxHtmlContainerCell::AdjustPagebreak(int *pagebreak, int* known_pagebreaks, int number_of_pages) const
|
||||
bool wxHtmlContainerCell::AdjustPagebreak(int *pagebreak,
|
||||
wxArrayInt& known_pagebreaks) const
|
||||
{
|
||||
if (!m_CanLiveOnPagebreak)
|
||||
return wxHtmlCell::AdjustPagebreak(pagebreak, known_pagebreaks, number_of_pages);
|
||||
return wxHtmlCell::AdjustPagebreak(pagebreak, known_pagebreaks);
|
||||
|
||||
else
|
||||
wxHtmlCell *c = GetFirstChild();
|
||||
bool rt = false;
|
||||
int pbrk = *pagebreak - m_PosY;
|
||||
|
||||
while (c)
|
||||
{
|
||||
wxHtmlCell *c = GetFirstChild();
|
||||
bool rt = false;
|
||||
int pbrk = *pagebreak - m_PosY;
|
||||
|
||||
while (c)
|
||||
{
|
||||
if (c->AdjustPagebreak(&pbrk, known_pagebreaks, number_of_pages))
|
||||
rt = true;
|
||||
c = c->GetNext();
|
||||
}
|
||||
if (rt)
|
||||
*pagebreak = pbrk + m_PosY;
|
||||
return rt;
|
||||
if (c->AdjustPagebreak(&pbrk, known_pagebreaks))
|
||||
rt = true;
|
||||
c = c->GetNext();
|
||||
}
|
||||
if (rt)
|
||||
*pagebreak = pbrk + m_PosY;
|
||||
return rt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlContainerCell::Layout(int w)
|
||||
{
|
||||
wxHtmlCell::Layout(w);
|
||||
|
Reference in New Issue
Block a user