X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c892c0b0cf6ef67614413c0d927eeefefe63ece..7af68c666bda771e37812ca37f0c6cc1741fa3ec:/src/html/winpars.cpp?ds=sidebyside diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index 796489d850..4c6943463a 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -9,7 +9,7 @@ #ifdef __GNUG__ -#pragma implementation +#pragma implementation "winpars.h" #endif #include "wx/wxprec.h" @@ -249,7 +249,9 @@ void wxHtmlWinParser::AddText(const wxChar* txt) { temp[templen-1] = wxT(' '); temp[templen] = 0; +#if 0 // VS - WHY was this here?! if (templen == 1) continue; +#endif templen = 0; if (m_EncConv) m_EncConv->Convert(temp); @@ -390,21 +392,21 @@ void wxHtmlWinParser::SetInputEncoding(wxFontEncoding enc) bool availfix, availnorm; // exact match? - availnorm = wxTheFontMapper->IsEncodingAvailable(enc, m_FontFaceNormal); - availfix = wxTheFontMapper->IsEncodingAvailable(enc, m_FontFaceFixed); + availnorm = wxFontMapper::Get()->IsEncodingAvailable(enc, m_FontFaceNormal); + availfix = wxFontMapper::Get()->IsEncodingAvailable(enc, m_FontFaceFixed); if (availnorm && availfix) m_OutputEnc = enc; // alternatives? - else if (wxTheFontMapper->GetAltForEncoding(enc, &altnorm, m_FontFaceNormal, FALSE) && - wxTheFontMapper->GetAltForEncoding(enc, &altfix, m_FontFaceFixed, FALSE) && + else if (wxFontMapper::Get()->GetAltForEncoding(enc, &altnorm, m_FontFaceNormal, FALSE) && + wxFontMapper::Get()->GetAltForEncoding(enc, &altfix, m_FontFaceFixed, FALSE) && altnorm == altfix) m_OutputEnc = altnorm; // at least normal face? else if (availnorm) m_OutputEnc = enc; - else if (wxTheFontMapper->GetAltForEncoding(enc, &altnorm, m_FontFaceNormal, FALSE)) + else if (wxFontMapper::Get()->GetAltForEncoding(enc, &altnorm, m_FontFaceNormal, FALSE)) m_OutputEnc = altnorm; // okay, let convert to ISO_8859-1, available always @@ -443,27 +445,29 @@ void wxHtmlWinParser::SetInputEncoding(wxFontEncoding enc) IMPLEMENT_ABSTRACT_CLASS(wxHtmlWinTagHandler, wxHtmlTagHandler) - - //----------------------------------------------------------------------------- // wxHtmlTagsModule //----------------------------------------------------------------------------- +// NB: This is *NOT* winpars.cpp's initialization and shutdown code!! +// This module is an ancestor for tag handlers modules defined +// in m_*.cpp files with TAGS_MODULE_BEGIN...TAGS_MODULE_END construct. +// +// Do not add any winpars.cpp shutdown or initialization code to it, +// create a new module instead! IMPLEMENT_DYNAMIC_CLASS(wxHtmlTagsModule, wxModule) - bool wxHtmlTagsModule::OnInit() { wxHtmlWinParser::AddModule(this); return TRUE; } - - void wxHtmlTagsModule::OnExit() { wxHtmlWinParser::RemoveModule(this); } + #endif