]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmlpars.cpp
explicit scrollbar style flags needed
[wxWidgets.git] / src / html / htmlpars.cpp
index b205c3305b222f2b14f4e0390953b8a735acd9c1..7cee2a8e061775d50413d7ef1c9830562e680bd6 100644 (file)
@@ -4,11 +4,11 @@
 // Author:      Vaclav Slavik
 // RCS-ID:      $Id$
 // Copyright:   (c) 1999 Vaclav Slavik
-// Licence:     wxWindows Licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "htmlpars.h"
 #endif
 
 #include "wx/dynarray.h"
 #include "wx/arrimpl.cpp"
 
+#ifdef __WXWINCE__
+    #include "wx/msw/wince/missing.h"       // for bsearch()
+#endif
 
 // DLL options compatibility check:
 #include "wx/app.h"
 WX_CHECK_BUILD_OPTIONS("wxHTML")
 
+const wxChar *wxTRACE_HTML_DEBUG = _T("htmldebug");
+
 //-----------------------------------------------------------------------------
 // wxHtmlParser helpers
 //-----------------------------------------------------------------------------
@@ -514,7 +519,9 @@ wxString wxHtmlEntitiesParser::Parse(const wxString& input)
             else
             {
                 output.append(ent_s-1, c-ent_s+2);
-                wxLogDebug(wxT("Unrecognized HTML entity: '%s'"), entity.c_str());
+                wxLogTrace(wxTRACE_HTML_DEBUG,
+                           wxT("Unrecognized HTML entity: '%s'"),
+                           entity.c_str());
             }
         }
     }
@@ -853,7 +860,8 @@ wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity)
 wxFSFile *wxHtmlParser::OpenURL(wxHtmlURLType WXUNUSED(type), 
                                 const wxString& url) const
 {
-    return GetFS()->OpenFile(url);
+    return m_FS ? m_FS->OpenFile(url) : NULL;
+    
 }
 
 
@@ -899,7 +907,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);