]> git.saurik.com Git - wxWidgets.git/commitdiff
removed wxSTRING_TEXT() macro in favour of wxS()
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 2 Jan 2008 17:33:31 +0000 (17:33 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 2 Jan 2008 17:33:31 +0000 (17:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h
src/html/htmlpars.cpp
src/html/htmltag.cpp

index 8312c04a85778b8fb48a94f54ec2b46e8cc9346f..aef07e6885a494d3e6ab6096250aec92dcdae3e3 100644 (file)
@@ -78,14 +78,6 @@ class WXDLLIMPEXP_FWD_BASE wxString;
 #define   wxMBSTRINGCAST (char *)(const char *)
 #define   wxWCSTRINGCAST (wchar_t *)(const wchar_t *)
 
-// like _T(), but for literals in wxString's internal representation, i.e.
-// char* in UTF-8 build and wxChar* otherwise:
-#if wxUSE_UNICODE_UTF8
-    #define wxSTRING_TEXT(str) str
-#else
-    #define wxSTRING_TEXT(str) _T(str)
-#endif
-
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
index f89b6f579f561a08ac4d2449f5b71b550299e065..a41e5358d4063f218e00f1089799ed5fcf8962ea 100644 (file)
@@ -564,13 +564,13 @@ wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity) const
         const wxStringCharType *ent_s = entity.wx_str();
         const wxStringCharType *format;
 
-        if (ent_s[1] == wxSTRING_TEXT('x') || ent_s[1] == wxSTRING_TEXT('X'))
+        if (ent_s[1] == wxS('x') || ent_s[1] == wxS('X'))
         {
-            format = wxSTRING_TEXT("%x");
+            format = wxS("%x");
             ent_s++;
         }
         else
-            format = wxSTRING_TEXT("%u");
+            format = wxS("%u");
         ent_s++;
 
         if (wxSscanf(ent_s, format, &code) != 1)
@@ -580,7 +580,7 @@ wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity) const
     {
         // store the literals in wx's internal representation (either char*
         // in UTF-8 or wchar_t*) for best performance:
-        #define ENTITY(name, code) { wxSTRING_TEXT(name), code }
+        #define ENTITY(name, code) { wxS(name), code }
 
         static wxHtmlEntityInfo substitutions[] = {
             ENTITY("AElig", 198),
index d06313704346adb64c43c29d227228e51654d96b..d3e277c1509885adf0fd6ec17e6dbcba49f56eff 100644 (file)
@@ -69,8 +69,8 @@ bool wxIsCDATAElement(const wxChar *tag)
 
 bool wxIsCDATAElement(const wxString& tag)
 {
-    return (wxStrcmp(tag.wx_str(), wxSTRING_TEXT("SCRIPT")) == 0) ||
-           (wxStrcmp(tag.wx_str(), wxSTRING_TEXT("STYLE")) == 0);
+    return (wxStrcmp(tag.wx_str(), wxS("SCRIPT")) == 0) ||
+           (wxStrcmp(tag.wx_str(), wxS("STYLE")) == 0);
 }
 
 wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
@@ -472,8 +472,8 @@ bool wxHtmlTag::GetParamAsColour(const wxString& par, wxColour *clr) const
     // 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(wxSTRING_TEXT(name), false))         \
+        #define HTML_COLOUR(name, r, g, b)              \
+            if (str.IsSameAs(wxS(name), false))         \
                 { clr->Set(r, g, b); return true; }
         HTML_COLOUR("black",   0x00,0x00,0x00)
         HTML_COLOUR("silver",  0xC0,0xC0,0xC0)