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:
@@ -1407,7 +1407,7 @@ LCTYPE GetLCTYPEFormatFromLocalInfo(wxLocaleInfo index)
|
|||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
|
wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory cat)
|
||||||
{
|
{
|
||||||
wxUint32 lcid = LOCALE_USER_DEFAULT;
|
wxUint32 lcid = LOCALE_USER_DEFAULT;
|
||||||
if ( wxGetLocale() )
|
if ( wxGetLocale() )
|
||||||
@@ -1431,7 +1431,12 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case wxLOCALE_DECIMAL_POINT:
|
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;
|
str = buf;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user