+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;
+
+ while (c) {
+ if (c -> AdjustPagebreak(pagebreak)) rt = TRUE;
+ c = c -> GetNext();
+ }
+ return rt;
+ }
+}
+
+
+
void wxHtmlContainerCell::Layout(int w)
{
wxHtmlCell *cell = m_Cells, *line = m_Cells;