X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/721ab9053804ef63e42f33841e242753f1ed66aa..7e99520bd3fc092bbbcbc38bb699a0236618ea40:/src/html/htmlcell.cpp diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 7b6eb3aacd..820fdd9cc0 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -14,7 +14,8 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML + +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -132,7 +133,7 @@ wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell() if (m_Word.Find(wxT('&')) != -1) { #define ESCSEQ(escape, subst) \ - { wxT("&"escape";"), wxT("&"escape" "), wxT(subst) } + { _T("&") _T(escape) _T(";"), _T("&") _T(escape) _T(" "), _T(subst) } static wxChar* substitutions[][3] = { ESCSEQ("quot", "\""), @@ -439,12 +440,14 @@ void wxHtmlContainerCell::Layout(int w) int counter = 0; int step = (s_width - xpos); if (step < 0) step = 0; - while (line != cell) { + xcnt--; + if (xcnt > 0) while (line != cell) { line -> SetPos(line -> GetPosX() + s_indent + (counter++ * step / xcnt), ypos + line -> GetPosY()); line = line -> GetNext(); } + xcnt++; } ypos += ysizedown;