]> git.saurik.com Git - wxWidgets.git/commitdiff
Removed a method using wxColour from non-GUI benchmark code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Aug 2013 17:41:13 +0000 (17:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Aug 2013 17:41:13 +0000 (17:41 +0000)
No idea how could this work before but the presence of this code in the
non-GUI benchmark project prevented it from building. As it's not used anyhow,
just remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/benchmarks/htmlparser/htmltag.cpp
tests/benchmarks/htmlparser/htmltag.h

index d8a8f14d8b5d5a2f0ad4b85e9bfbc880244d96d0..926db2d2a7966324681f0efccef8238f0ea02079 100644 (file)
 
 #include "htmltag.h"
 
-#ifndef WXPRECOMP
-    #include "wx/colour.h"
-#endif
-
 #include "htmlpars.h"
 #include <stdio.h> // for vsscanf
 #include <stdarg.h>
@@ -406,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, wxT("invalid colour argument") );
-
-    wxString str = GetParam(par);
-
-    // handle colours defined in HTML 4.0 first:
-    if (str.length() > 1 && str[0] != wxT('#'))
-    {
-        #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) )
index ec2163362458637f765f02779b06991627ea8632..a371f3cd1d5ed24b87ee1d413f37d8b441040d14 100644 (file)
@@ -14,7 +14,6 @@
 #include "wx/object.h"
 #include "wx/arrstr.h"
 
-class  wxColour;
 class  wx28HtmlEntitiesParser;
 
 //-----------------------------------------------------------------------------
@@ -91,8 +90,6 @@ public:
     //                           (or ("WhaT.jpg") if with_commas == true)
     wxString GetParam(const wxString& par, bool with_commas = false) const;
 
-    // Convenience functions:
-    bool GetParamAsColour(const wxString& par, wxColour *clr) const;
     bool GetParamAsInt(const wxString& par, int *clr) const;
 
     // Scans param like scanf() functions family does.