wxHTML now supports not only " "-like specials but "&nbsp " as well

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 1999-11-03 22:39:51 +00:00
parent c32bfc1090
commit 12909796a5

View File

@ -73,11 +73,19 @@ bool wxHtmlCell::AdjustPagebreak(int *pagebreak)
wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell() wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell()
{ {
m_Word = word; m_Word = word;
m_Word.Replace(wxT(" "), wxT(" "), TRUE); m_Word.Replace(wxT(" "), wxT(" "), TRUE);
m_Word.Replace(wxT("""), wxT("\""), TRUE); m_Word.Replace(wxT("""), wxT("\""), TRUE);
m_Word.Replace(wxT("&lt;"), wxT("<"), TRUE); m_Word.Replace(wxT("&lt;"), wxT("<"), TRUE);
m_Word.Replace(wxT("&gt;"), wxT(">"), TRUE); m_Word.Replace(wxT("&gt;"), wxT(">"), TRUE);
m_Word.Replace(wxT("&amp;"), wxT("&"), TRUE); m_Word.Replace(wxT("&amp;"), wxT("&"), TRUE);
m_Word.Replace(wxT("&nbsp "), wxT(" "), TRUE);
m_Word.Replace(wxT("&quot "), wxT("\""), TRUE);
m_Word.Replace(wxT("&lt "), wxT("<"), TRUE);
m_Word.Replace(wxT("&gt "), wxT(">"), TRUE);
m_Word.Replace(wxT("&amp "), wxT("&"), TRUE);
dc.GetTextExtent(m_Word, &m_Width, &m_Height, &m_Descent); dc.GetTextExtent(m_Word, &m_Width, &m_Height, &m_Descent);
SetCanLiveOnPagebreak(FALSE); SetCanLiveOnPagebreak(FALSE);
} }