X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6e4ae332ac7d85be3592640ffef56a60924cc1c9..b53aea81d2e102224b452ef5bf7aee1132f37c6f:/src/common/xlocale.cpp?ds=sidebyside diff --git a/src/common/xlocale.cpp b/src/common/xlocale.cpp index 1f00c13c98..b04288c648 100644 --- a/src/common/xlocale.cpp +++ b/src/common/xlocale.cpp @@ -71,12 +71,14 @@ wxXLocale& wxXLocale::GetCLocale() { if ( !gs_cLocale ) { - gs_cLocale = new wxXLocale(wx_static_cast(wxXLocaleCTag *, NULL)); + gs_cLocale = new wxXLocale(static_cast(NULL)); } return *gs_cLocale; } +#ifdef wxHAS_XLOCALE_SUPPORT + wxXLocale::wxXLocale(wxLanguage lang) { const wxLanguageInfo * const info = wxLocale::GetLanguageInfo(lang); @@ -86,12 +88,10 @@ wxXLocale::wxXLocale(wxLanguage lang) } else { - Init(info->CanonicalName); + Init(info->GetLocaleName().c_str()); } } -#ifdef wxHAS_XLOCALE_SUPPORT - #if wxCHECK_VISUALC_VERSION(8) // ---------------------------------------------------------------------------- @@ -199,11 +199,11 @@ GEN_ISFUNC(wxIsspace_l, CTYPE_SPACE) GEN_ISFUNC(wxIsupper_l, CTYPE_UPPER) GEN_ISFUNC(wxIsxdigit_l, CTYPE_XDIGIT) -wxUniChar wxTolower_l(const wxUniChar& c, const wxXLocale& loc) +int wxTolower_l(const wxUniChar& c, const wxXLocale& loc) { wxCHECK(loc.IsOk(), false); - if(CTYPE_TEST(c, CTYPE_UPPER)) + if(CTYPE_TEST(c.GetValue(), CTYPE_UPPER)) { return c - 'A' + 'a'; } @@ -211,11 +211,11 @@ wxUniChar wxTolower_l(const wxUniChar& c, const wxXLocale& loc) return c; } -wxUniChar wxToupper_l(const wxUniChar& c, const wxXLocale& loc) +int wxToupper_l(const wxUniChar& c, const wxXLocale& loc) { wxCHECK(loc.IsOk(), false); - if(CTYPE_TEST(c, CTYPE_LOWER)) + if(CTYPE_TEST(c.GetValue(), CTYPE_LOWER)) { return c - 'a' + 'A'; }