Author: hbelusca
Date: Wed Jan 11 20:02:14 2017
New Revision: 73524
URL:
http://svn.reactos.org/svn/reactos?rev=73524&view=rev
Log:
[SHELL32]: Partly restore code (AddCommasW function) that was implemented in r33953 but
removed in the next revision r33954.
Modified:
trunk/reactos/dll/win32/shell32/shell32.cpp
trunk/reactos/dll/win32/shell32/stubs.cpp
Modified: trunk/reactos/dll/win32/shell32/shell32.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] Wed Jan 11 20:02:14 2017
@@ -24,6 +24,45 @@
#include "shell32_version.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
+
+/*
+ * Implemented
+ */
+EXTERN_C LPWSTR
+WINAPI
+AddCommasW(DWORD lValue, LPWSTR lpNumber)
+{
+ WCHAR szValue[MAX_PATH], szSeparator[8 + 1];
+ NUMBERFMTW numFormat;
+
+ GetLocaleInfoW(LOCALE_USER_DEFAULT,
+ LOCALE_STHOUSAND,
+ szSeparator,
+ ARRAYSIZE(szSeparator));
+
+ numFormat.NumDigits = 0;
+ numFormat.LeadingZero = 0;
+ numFormat.Grouping = 0; // FIXME! Use GetLocaleInfoW with LOCALE_SGROUPING and
interpret the result.
+ numFormat.lpDecimalSep = szSeparator;
+ numFormat.lpThousandSep = szSeparator;
+ numFormat.NegativeOrder = 0;
+
+ swprintf(szValue, L"%llu", lValue);
+ //_ultow(lValue, szValue, 10);
+
+ if (GetNumberFormatW(LOCALE_USER_DEFAULT,
+ 0,
+ szValue,
+ &numFormat,
+ lpNumber,
+ wcslen(lpNumber)) != 0)
+ {
+ return lpNumber;
+ }
+
+ wcscpy(lpNumber, szValue);
+ return lpNumber;
+}
/**************************************************************************
* Default ClassFactory types
Modified: trunk/reactos/dll/win32/shell32/stubs.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/stubs.cp…
==============================================================================
--- trunk/reactos/dll/win32/shell32/stubs.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/stubs.cpp [iso-8859-1] Wed Jan 11 20:02:14 2017
@@ -13,19 +13,6 @@
#include "precomp.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
-
-/*
- * Unimplemented
- */
-EXTERN_C LPWSTR
-WINAPI
-AddCommasW(DWORD dwUnknown, LPWSTR lpNumber)
-{
- LPCWSTR lpRetBuf = L"0";
-
- FIXME("AddCommasW() stub\n");
- return const_cast<LPWSTR>(lpRetBuf);
-}
/*
* Unimplemented