Author: rnaumann
Date: Sun Nov 8 15:44:18 2015
New Revision: 69851
URL:
http://svn.reactos.org/svn/reactos?rev=69851&view=rev
Log:
[BROWSEUI] Pass the Resource string directly instead of using an additional buffer. Remove
the NULL characters from the strings. Fix return value handling of LoadStringW()
Modified:
trunk/reactos/dll/win32/browseui/lang/bg-BG.rc
trunk/reactos/dll/win32/browseui/lang/de-DE.rc
trunk/reactos/dll/win32/browseui/lang/en-US.rc
trunk/reactos/dll/win32/browseui/lang/es-ES.rc
trunk/reactos/dll/win32/browseui/lang/he-IL.rc
trunk/reactos/dll/win32/browseui/lang/it-IT.rc
trunk/reactos/dll/win32/browseui/lang/pl-PL.rc
trunk/reactos/dll/win32/browseui/lang/ro-RO.rc
trunk/reactos/dll/win32/browseui/lang/ru-RU.rc
trunk/reactos/dll/win32/browseui/lang/sq-AL.rc
trunk/reactos/dll/win32/browseui/lang/tr-TR.rc
trunk/reactos/dll/win32/browseui/lang/uk-UA.rc
trunk/reactos/dll/win32/browseui/lang/zh-CN.rc
trunk/reactos/dll/win32/browseui/travellog.cpp
Modified: trunk/reactos/dll/win32/browseui/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/bg…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/bg-BG.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -264,8 +264,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/de…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/de-DE.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -282,8 +282,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Zurück zu %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Zurück zu %s"
+ IDS_FORWARD "Forward to %s"
END
Modified: trunk/reactos/dll/win32/browseui/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/en…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/en-US.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -282,8 +282,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/es…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/es-ES.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -265,8 +265,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Volver a %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Volver a %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/he-IL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/he…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/he-IL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/he-IL.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -266,8 +266,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/it…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/it-IT.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -264,8 +264,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/pl…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/pl-PL.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -272,8 +272,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/ro…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/ro-RO.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -266,8 +266,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Ãnapoi la %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Ãnapoi la %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/ru…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/ru-RU.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -266,8 +266,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/sq-AL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/sq…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/sq-AL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/sq-AL.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -283,8 +283,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/tr…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/tr-TR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/tr-TR.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -264,8 +264,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/uk…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/uk-UA.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -266,8 +266,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/lang/zh…
==============================================================================
--- trunk/reactos/dll/win32/browseui/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/lang/zh-CN.rc [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -284,8 +284,8 @@
STRINGTABLE
BEGIN
- IDS_BACK "Back to %s\0"
- IDS_FORWARD "Forward to %s\0"
+ IDS_BACK "Back to %s"
+ IDS_FORWARD "Forward to %s"
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/browseui/travellog.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/travell…
==============================================================================
--- trunk/reactos/dll/win32/browseui/travellog.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/travellog.cpp [iso-8859-1] Sun Nov 8 15:44:18 2015
@@ -428,7 +428,6 @@
CTravelEntry *destinationEntry;
wchar_t tempString[MAX_PATH];
wchar_t templateString[200];
- wchar_t *resourceString;
HRESULT hResult;
if (pwzText == NULL)
@@ -443,19 +442,16 @@
return hResult;
if (iOffset < 0)
{
- hResult = LoadStringW(_AtlBaseModule.GetResourceInstance(),
- IDS_BACK, (wchar_t*)&resourceString, 0);
- if (FAILED_UNEXPECTEDLY(hResult))
- return hResult;
+ if(LoadStringW(_AtlBaseModule.GetResourceInstance(),
+ IDS_BACK, templateString, sizeof(templateString) /
sizeof(wchar_t)) == 0)
+ return HRESULT_FROM_WIN32(GetLastError());
}
else
{
- hResult = LoadStringW(_AtlBaseModule.GetResourceInstance(),
- IDS_FORWARD, (wchar_t*)&resourceString, 0);
- if (FAILED_UNEXPECTEDLY(hResult))
- return hResult;
- }
- wcscpy(templateString, resourceString);
+ if(LoadStringW(_AtlBaseModule.GetResourceInstance(),
+ IDS_FORWARD, templateString, sizeof(templateString) /
sizeof(wchar_t)) == 0)
+ return HRESULT_FROM_WIN32(GetLastError());
+ }
_snwprintf(pwzText, cchText, templateString, tempString);
TRACE("CTravelLog::GetToolTipText for IUnknown punk=%p at offset=%d returning
L\"%S\"\n", punk, iOffset, pwzText);