X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f2034f1b6e04a39f6d882cf6cdd53c11bf39f5d7..6c3e36af8f9d2d1562bda395ef79e971ae5b7d13:/src/html/m_layout.cpp diff --git a/src/html/m_layout.cpp b/src/html/m_layout.cpp index 15aa9a2fa4..78424023c8 100644 --- a/src/html/m_layout.cpp +++ b/src/html/m_layout.cpp @@ -68,17 +68,23 @@ FORCE_LINK_ME(m_layout) class WXDLLEXPORT wxHtmlPageBreakCell : public wxHtmlCell { - public: +public: wxHtmlPageBreakCell() {} - bool AdjustPagebreak(int* pagebreak, int* known_pagebreaks = NULL, int number_of_pages = 0) const; + bool AdjustPagebreak(int* pagebreak, + int* known_pagebreaks = NULL, + int number_of_pages = 0) const; + void Draw(wxDC& WXUNUSED(dc), + int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(view_y1), int WXUNUSED(view_y2), + wxHtmlRenderingState& WXUNUSED(state)) {} - private: +private: DECLARE_NO_COPY_CLASS(wxHtmlPageBreakCell) }; // Comparison routine for bsearch into an int* array of pagebreaks. -static int integer_compare(void const* i0, void const* i1) +extern "C" int wxCMPFUNC_CONV wxInteger_compare(void const* i0, void const* i1) { return *(int*)i0 - *(int*)i1; } @@ -113,7 +119,7 @@ bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, int* known_pagebreaks, // zero plus one element for each page. int* where = (int*) bsearch(&total_height, known_pagebreaks, 1 + number_of_pages, sizeof(int), - integer_compare); + wxInteger_compare); // Add a pagebreak only if there isn't one already set here. if(NULL != where) { @@ -130,7 +136,7 @@ TAG_HANDLER_BEGIN(P, "P") TAG_HANDLER_PROC(tag) { - if (m_WParser->GetContainer()->GetFirstCell() != NULL) + if (m_WParser->GetContainer()->GetFirstChild() != NULL) { m_WParser->CloseContainer(); m_WParser->OpenContainer(); @@ -171,7 +177,7 @@ TAG_HANDLER_BEGIN(CENTER, "CENTER") wxHtmlContainerCell *c = m_WParser->GetContainer(); m_WParser->SetAlign(wxHTML_ALIGN_CENTER); - if (c->GetFirstCell() != NULL) + if (c->GetFirstChild() != NULL) { m_WParser->CloseContainer(); m_WParser->OpenContainer(); @@ -184,7 +190,7 @@ TAG_HANDLER_BEGIN(CENTER, "CENTER") ParseInner(tag); m_WParser->SetAlign(old); - if (c->GetFirstCell() != NULL) + if (c->GetFirstChild() != NULL) { m_WParser->CloseContainer(); m_WParser->OpenContainer(); @@ -205,9 +211,9 @@ TAG_HANDLER_BEGIN(DIV, "DIV") TAG_HANDLER_PROC(tag) { - if(tag.HasParam("STYLE")) + if(tag.HasParam(wxT("STYLE"))) { - if(tag.GetParam("STYLE").IsSameAs(wxString("PAGE-BREAK-BEFORE:ALWAYS"), FALSE)) + if(tag.GetParam(wxT("STYLE")).IsSameAs(wxT("PAGE-BREAK-BEFORE:ALWAYS"), FALSE)) { m_WParser->CloseContainer(); m_WParser->OpenContainer()->InsertCell(new wxHtmlPageBreakCell); @@ -221,11 +227,11 @@ TAG_HANDLER_BEGIN(DIV, "DIV") return FALSE; } } - else if(tag.HasParam("ALIGN")) + else if(tag.HasParam(wxT("ALIGN"))) { int old = m_WParser->GetAlign(); wxHtmlContainerCell *c = m_WParser->GetContainer(); - if (c->GetFirstCell() != NULL) + if (c->GetFirstChild() != NULL) { m_WParser->CloseContainer(); m_WParser->OpenContainer(); @@ -242,7 +248,7 @@ TAG_HANDLER_BEGIN(DIV, "DIV") ParseInner(tag); m_WParser->SetAlign(old); - if (c->GetFirstCell() != NULL) + if (c->GetFirstChild() != NULL) { m_WParser->CloseContainer(); m_WParser->OpenContainer();