X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfa4a244f0dabd5319231b281c7b7f11fafc065d..785f5eaa05195f5e44a974861864324667a3326e:/src/html/htmlpars.cpp diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 8c9eca91d3..ae752eafba 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -8,7 +8,7 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "htmlpars.h" #endif @@ -35,6 +35,11 @@ #include "wx/dynarray.h" #include "wx/arrimpl.cpp" + +// DLL options compatibility check: +#include "wx/app.h" +WX_CHECK_BUILD_OPTIONS("wxHTML") + //----------------------------------------------------------------------------- // wxHtmlParser helpers //----------------------------------------------------------------------------- @@ -375,7 +380,12 @@ void wxHtmlParser::PopTagHandler() wxList::compatibility_iterator first; if ( !m_HandlersStack || - (first = m_HandlersStack->GetFirst()) == NULL ) +#if wxUSE_STL + !(first = m_HandlersStack->GetFirst()) +#else // !wxUSE_STL + ((first = m_HandlersStack->GetFirst()) == NULL) +#endif // wxUSE_STL/!wxUSE_STL + ) { wxLogWarning(_("Warning: attempt to remove HTML tag handler from empty stack.")); return; @@ -854,9 +864,14 @@ wxFSFile *wxHtmlParser::OpenURL(wxHtmlURLType WXUNUSED(type), class wxMetaTagParser : public wxHtmlParser { public: + wxMetaTagParser() { } + wxObject* GetProduct() { return NULL; } + protected: virtual void AddText(const wxChar* WXUNUSED(txt)) {} + + DECLARE_NO_COPY_CLASS(wxMetaTagParser) }; class wxMetaTagHandler : public wxHtmlTagHandler @@ -868,6 +883,8 @@ public: private: wxString *m_retval; + + DECLARE_NO_COPY_CLASS(wxMetaTagHandler) }; bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag) @@ -882,7 +899,7 @@ bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag) tag.GetParam(_T("HTTP-EQUIV")).IsSameAs(_T("Content-Type"), false) && tag.HasParam(_T("CONTENT"))) { - wxString content = tag.GetParam(_T("CONTENT")); + wxString content = tag.GetParam(_T("CONTENT")).Lower(); if (content.Left(19) == _T("text/html; charset=")) { *m_retval = content.Mid(19); @@ -903,5 +920,4 @@ wxString wxHtmlParser::ExtractCharsetInformation(const wxString& markup) return charset; } - #endif