Alexandre Julliard : oleaut32: Use LOCALE_NOUSEROVERRIDE where necessary in variant conversions.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Dec 7 07:08:01 CST 2006


Module: wine
Branch: master
Commit: 478ac3724dd7c47c26a60471beb015b2371a8edf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=478ac3724dd7c47c26a60471beb015b2371a8edf

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Dec  7 14:05:25 2006 +0100

oleaut32: Use LOCALE_NOUSEROVERRIDE where necessary in variant conversions.

---

 dlls/oleaut32/vartype.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c
index 9754e8c..a3e1f1a 100644
--- a/dlls/oleaut32/vartype.c
+++ b/dlls/oleaut32/vartype.c
@@ -4160,7 +4160,7 @@ HRESULT WINAPI VarDecFromR4(FLOAT fltIn,
   WCHAR buff[256];
 
   sprintfW( buff, szFloatFormatW, fltIn );
-  return VarDecFromStr(buff, LOCALE_EN_US, 0, pDecOut);
+  return VarDecFromStr(buff, LOCALE_EN_US, LOCALE_NOUSEROVERRIDE, pDecOut);
 }
 
 /************************************************************************
@@ -4180,7 +4180,7 @@ HRESULT WINAPI VarDecFromR8(double dblIn
   WCHAR buff[256];
 
   sprintfW( buff, szDoubleFormatW, dblIn );
-  return VarDecFromStr(buff, LOCALE_EN_US, 0, pDecOut);
+  return VarDecFromStr(buff, LOCALE_EN_US, LOCALE_NOUSEROVERRIDE, pDecOut);
 }
 
 /************************************************************************
@@ -6070,7 +6070,8 @@ static BSTR VARIANT_BstrReplaceDecimal(W
      the need to replace the decimal separator, and if so, will prepare an
      appropriate NUMBERFMTW structure to do the job via GetNumberFormatW().
    */
-  GetLocaleInfoW(lcid, LOCALE_SDECIMAL, lpDecimalSep, sizeof(lpDecimalSep) / sizeof(WCHAR));
+  GetLocaleInfoW(lcid, LOCALE_SDECIMAL | (dwFlags & LOCALE_NOUSEROVERRIDE),
+                 lpDecimalSep, sizeof(lpDecimalSep) / sizeof(WCHAR));
   if (lpDecimalSep[0] == '.' && lpDecimalSep[1] == '\0')
   {
     /* locale is compatible with English - return original string */
@@ -6095,8 +6096,7 @@ static BSTR VARIANT_BstrReplaceDecimal(W
     if (p) minFormat.NumDigits = strlenW(p + 1);
 
     numbuff[0] = '\0';
-    if (!GetNumberFormatW(lcid, dwFlags & LOCALE_NOUSEROVERRIDE,
-                   buff, &minFormat, numbuff, sizeof(numbuff) / sizeof(WCHAR)))
+    if (!GetNumberFormatW(lcid, 0, buff, &minFormat, numbuff, sizeof(numbuff) / sizeof(WCHAR)))
     {
       WARN("GetNumberFormatW() failed, returning raw number string instead\n");
       bstrOut = SysAllocString(buff);




More information about the wine-cvs mailing list