]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/benchmarks/htmlparser/htmltag.cpp
Add missing XRC format docs for wxComboCtrl and wxEditableListBox.
[wxWidgets.git] / tests / benchmarks / htmlparser / htmltag.cpp
index d8a0a31b21d4965dfa8d681c13db12ebf9c15e47..926db2d2a7966324681f0efccef8238f0ea02079 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/html/htmltag.cpp
 // Purpose:     wx28HtmlTag class (represents single tag)
 // Author:      Vaclav Slavik
-// RCS-ID:      $Id$
 // Copyright:   (c) 1999 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "htmltag.h"
 
-#ifndef WXPRECOMP
-    #include "wx/colour.h"
-#endif
-
 #include "htmlpars.h"
 #include <stdio.h> // for vsscanf
 #include <stdarg.h>
@@ -52,8 +47,8 @@ IMPLEMENT_CLASS(wx28HtmlTagsCache,wxObject)
 
 bool wxIsCDATAElement(const wxChar *tag)
 {
-    return (wxStrcmp(tag, _T("SCRIPT")) == 0) ||
-           (wxStrcmp(tag, _T("STYLE")) == 0);
+    return (wxStrcmp(tag, wxT("SCRIPT")) == 0) ||
+           (wxStrcmp(tag, wxT("STYLE")) == 0);
 }
 
 wx28HtmlTagsCache::wx28HtmlTagsCache(const wxString& source)
@@ -85,7 +80,7 @@ wx28HtmlTagsCache::wx28HtmlTagsCache(const wxString& source)
             {
                 tagBuffer[i] = (wxChar)wxToupper(src[pos]);
             }
-            tagBuffer[i] = _T('\0');
+            tagBuffer[i] = wxT('\0');
 
             m_Cache[tg].Name = new wxChar[i+1];
             memcpy(m_Cache[tg].Name, tagBuffer, (i+1)*sizeof(wxChar));
@@ -407,47 +402,6 @@ int wx28HtmlTag::ScanParam(const wxString& par,
     return wxSscanf(parval, format, param);
 }
 
-bool wx28HtmlTag::GetParamAsColour(const wxString& par, wxColour *clr) const
-{
-    wxCHECK_MSG( clr, false, _T("invalid colour argument") );
-
-    wxString str = GetParam(par);
-
-    // handle colours defined in HTML 4.0 first:
-    if (str.length() > 1 && str[0] != _T('#'))
-    {
-        #define HTML_COLOUR(name, r, g, b)              \
-            if (str.IsSameAs(wxT(name), false))         \
-                { clr->Set(r, g, b); return true; }
-        HTML_COLOUR("black",   0x00,0x00,0x00)
-        HTML_COLOUR("silver",  0xC0,0xC0,0xC0)
-        HTML_COLOUR("gray",    0x80,0x80,0x80)
-        HTML_COLOUR("white",   0xFF,0xFF,0xFF)
-        HTML_COLOUR("maroon",  0x80,0x00,0x00)
-        HTML_COLOUR("red",     0xFF,0x00,0x00)
-        HTML_COLOUR("purple",  0x80,0x00,0x80)
-        HTML_COLOUR("fuchsia", 0xFF,0x00,0xFF)
-        HTML_COLOUR("green",   0x00,0x80,0x00)
-        HTML_COLOUR("lime",    0x00,0xFF,0x00)
-        HTML_COLOUR("olive",   0x80,0x80,0x00)
-        HTML_COLOUR("yellow",  0xFF,0xFF,0x00)
-        HTML_COLOUR("navy",    0x00,0x00,0x80)
-        HTML_COLOUR("blue",    0x00,0x00,0xFF)
-        HTML_COLOUR("teal",    0x00,0x80,0x80)
-        HTML_COLOUR("aqua",    0x00,0xFF,0xFF)
-        #undef HTML_COLOUR
-    }
-
-    // then try to parse #rrggbb representations or set from other well
-    // known names (note that this doesn't strictly conform to HTML spec,
-    // but it doesn't do real harm -- but it *must* be done after the standard
-    // colors are handled above):
-    if (clr->Set(str))
-        return true;
-
-    return false;
-}
-
 bool wx28HtmlTag::GetParamAsInt(const wxString& par, int *clr) const
 {
     if ( !HasParam(par) )