Handle wxLOCALE_DECIMAL_POINT in wxLOCALE_CAT_MONEY correctly in wxMSW.

Use LOCALE_SMONDECIMALSEP and not LOCALE_SDECIMAL when querying for the
decimal separator in money category, it can be different from the usual
numeric one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-11-03 16:29:13 +00:00
parent f4f3c8f3bb
commit 53250e3afa

View File

@@ -1407,7 +1407,7 @@ LCTYPE GetLCTYPEFormatFromLocalInfo(wxLocaleInfo index)
} // anonymous namespace
/* static */
wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory cat)
{
wxUint32 lcid = LOCALE_USER_DEFAULT;
if ( wxGetLocale() )
@@ -1431,7 +1431,12 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
break;
case wxLOCALE_DECIMAL_POINT:
if ( ::GetLocaleInfo(lcid, LOCALE_SDECIMAL, buf, WXSIZEOF(buf)) )
if ( ::GetLocaleInfo(lcid,
cat == wxLOCALE_CAT_MONEY
? LOCALE_SMONDECIMALSEP
: LOCALE_SDECIMAL,
buf,
WXSIZEOF(buf)) )
str = buf;
break;