Commit c8fd7831 authored by Alexandre Julliard's avatar Alexandre Julliard

oleaut32: Use the locale leading zero flag instead of hardcoding it.

parent f91f4348
......@@ -6512,12 +6512,14 @@ static BSTR VARIANT_BstrReplaceDecimal(const WCHAR * buff, LCID lcid, ULONG dwFl
NUMBERFMTW minFormat;
minFormat.NumDigits = 0;
minFormat.LeadingZero = 0;
minFormat.Grouping = 0;
minFormat.lpDecimalSep = lpDecimalSep;
minFormat.lpThousandSep = empty;
minFormat.NegativeOrder = 1; /* NLS_NEG_LEFT */
GetLocaleInfoW(lcid, LOCALE_ILZERO | LOCALE_RETURN_NUMBER | (dwFlags & LOCALE_NOUSEROVERRIDE),
(WCHAR *)&minFormat.LeadingZero, sizeof(DWORD)/sizeof(WCHAR) );
/* count number of decimal digits in string */
p = wcschr( buff, '.' );
if (p) minFormat.NumDigits = lstrlenW(p + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment