+bool wxHtmlCell::AdjustPagebreak(int *pagebreak)
+{
+
+ if ((!m_CanLiveOnPagebreak) &&
+ m_PosY < *pagebreak && m_PosY + m_Height > *pagebreak) {
+ *pagebreak = m_PosY;
+ if (m_Next != NULL) m_Next -> AdjustPagebreak(pagebreak);
+ return TRUE;
+ }
+
+ else {
+ if (m_Next != NULL) return m_Next -> AdjustPagebreak(pagebreak);
+ else return FALSE;
+ }
+}
+
+
+
+
//-----------------------------------------------------------------------------
// wxHtmlWordCell
//-----------------------------------------------------------------------------
m_Word.Replace(">", ">", TRUE);
m_Word.Replace("&", "&", TRUE);
dc.GetTextExtent(m_Word, &m_Width, &m_Height, &m_Descent);
+ SetCanLiveOnPagebreak(FALSE);
}
+bool wxHtmlContainerCell::AdjustPagebreak(int *pagebreak)
+{
+ if (!m_CanLiveOnPagebreak)
+ return wxHtmlCell::AdjustPagebreak(pagebreak);
+
+ else {
+ wxHtmlCell *c = GetFirstCell();
+ bool rt = FALSE;
+ int pbrk = *pagebreak - m_PosY;
+
+ while (c) {
+ if (c -> AdjustPagebreak(&pbrk)) rt = TRUE;
+ c = c -> GetNext();
+ }
+ if (rt) *pagebreak = pbrk + m_PosY;
+ return rt;
+ }
+}
+
+
+
void wxHtmlContainerCell::Layout(int w)
{
wxHtmlCell *cell = m_Cells, *line = m_Cells;