Author: winesync Date: Fri Apr 4 07:21:42 2008 New Revision: 32840
URL: http://svn.reactos.org/svn/reactos?rev=32840&view=rev Log: Autosyncing with Wine HEAD
Added: trunk/reactos/dll/win32/hhctrl.ocx/El.rc (with props) trunk/reactos/dll/win32/hhctrl.ocx/Ru.rc (with props) Removed: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx_ros.diff Modified: trunk/reactos/dll/win32/hhctrl.ocx/chm.c trunk/reactos/dll/win32/hhctrl.ocx/help.c trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.rc
Added: trunk/reactos/dll/win32/hhctrl.ocx/El.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/El.rc?... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/El.rc (added) +++ trunk/reactos/dll/win32/hhctrl.ocx/El.rc [iso-8859-1] Fri Apr 4 07:21:42 2008 @@ -1,0 +1,58 @@ +/* + * HTML Help resources + * Greek Language Support + * + * Copyright 2008 Apostolos Alexiadis + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_GREEK, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_CONTENTS "&Ðåñéå÷üìåíá" + IDS_INDEX "I&ndex" + IDS_SEARCH "&ÁíáæÞôçóç" + IDS_FAVORITES "Á&ãáðçìÝíá" +END + +STRINGTABLE +BEGIN + IDTB_EXPAND "ÅìöÜíéóç" + IDTB_CONTRACT "Áðüêñõøç" + IDTB_STOP "Ôåñìáôéóìüò" + IDTB_REFRESH "ÁíáíÝùóç" + IDTB_BACK "Ðßóù" + IDTB_HOME "Home" + IDTB_SYNC "Sync" + IDTB_PRINT "Åêôýðùóç" + IDTB_OPTIONS "ÅðéëïãÝò" + IDTB_FORWARD "Forward" + IDTB_NOTES "IDTB_NOTES" + IDTB_BROWSE_FWD "IDTB_BROWSE_FWD" + IDTB_BROWSE_BACK "IDT_BROWSE_BACK" + IDTB_CONTENTS "IDTB_CONTENTS" + IDTB_INDEX "IDTB_INDEX" + IDTB_SEARCH "IDTB_SEARCH" + IDTB_HISTORY "IDTB_HISTORY" + IDTB_FAVORITES "IDTB_FAVORITES" + IDTB_JUMP1 "Jump1" + IDTB_JUMP2 "Jump2" + IDTB_CUSTOMIZE "Customize" + IDTB_ZOOM "Zoom" + IDTB_TOC_NEXT "IDTB_TOC_NEXT" + IDTB_TOC_PREV "IDTB_TOC_PREV" +END
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/El.rc ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/win32/hhctrl.ocx/Ru.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/Ru.rc?... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/Ru.rc (added) +++ trunk/reactos/dll/win32/hhctrl.ocx/Ru.rc [iso-8859-1] Fri Apr 4 07:21:42 2008 @@ -1,0 +1,58 @@ +/* + * HTML Help resources + * Russia Language Support + * + * Copyright 2008 Vitaliy Margolen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_CONTENTS "&Ñîäåðæàíèå" + IDS_INDEX "&Îãëàâëåíèå" + IDS_SEARCH "&Ïîèñê" + IDS_FAVORITES "&Èçáðàííîå" +END + +STRINGTABLE +BEGIN + IDTB_EXPAND "Ïîêàçàòü" + IDTB_CONTRACT "Ñïðÿòàòü" + IDTB_STOP "Îñòàíîâèòü" + IDTB_REFRESH "Îáíîâèòü" + IDTB_BACK "Íàçàä" + IDTB_HOME " íà÷àëî" + IDTB_SYNC "Ñèíõðîíèçèðîâàòü" + IDTB_PRINT "Ïå÷ÿòü" + IDTB_OPTIONS "Íàñòðîéêè" + IDTB_FORWARD " ïåð¸ä" + IDTB_NOTES "Çàïèñêè" + IDTB_BROWSE_FWD "Ïðîñìîòð â ïåð¸ä" + IDTB_BROWSE_BACK "Ïðîñìîòð íàçàä" + IDTB_CONTENTS "Ñîäåðæàíèå" + IDTB_INDEX "Îãëàâëåíèå" + IDTB_SEARCH "Ïîèñê" + IDTB_HISTORY "Èñòîðèÿ" + IDTB_FAVORITES "Èçáðàííîå" + IDTB_JUMP1 "Ïåðåõîä 1" + IDTB_JUMP2 "Ïåðåõîä 2" + IDTB_CUSTOMIZE "Ïåðñîíàëèçîâàòü" + IDTB_ZOOM "Ìàñøòàá" + IDTB_TOC_NEXT "Ñëåäóþùàÿ ãëàâà" + IDTB_TOC_PREV "Ïðåäûäóùàÿ ãëàâà" +END
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/Ru.rc ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/dll/win32/hhctrl.ocx/chm.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/chm.c?... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/chm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/chm.c [iso-8859-1] Fri Apr 4 07:21:42 2008 @@ -113,11 +113,20 @@ break;
switch(entry.code) { + case 0x0: + TRACE("TOC is %s\n", debugstr_an(buf, entry.len)); + heap_free(chm->defToc); + chm->defToc = strdupnAtoW(buf, entry.len); + break; case 0x2: TRACE("Default topic is %s\n", debugstr_an(buf, entry.len)); + heap_free(chm->defTopic); + chm->defTopic = strdupnAtoW(buf, entry.len); break; case 0x3: TRACE("Title is %s\n", debugstr_an(buf, entry.len)); + heap_free(chm->defTitle); + chm->defTitle = strdupnAtoW(buf, entry.len); break; case 0x5: TRACE("Default window is %s\n", debugstr_an(buf, entry.len)); @@ -212,7 +221,26 @@
hr = IStorage_OpenStream(pStorage, windowsW, NULL, STGM_READ, 0, &pStream); if (FAILED(hr)) - return FALSE; + { + /* no defined window types so use (hopefully) sane defaults */ + static const WCHAR defaultwinW[] = {'d','e','f','a','u','l','t','w','i','n','\0'}; + static const WCHAR null[] = {0}; + memset((void*)&(info->WinType), 0, sizeof(info->WinType)); + info->WinType.cbStruct=sizeof(info->WinType); + info->WinType.fUniCodeStrings=TRUE; + info->WinType.pszType=strdupW(defaultwinW); + info->WinType.pszToc = strdupW(info->pCHMInfo->defToc); + info->WinType.pszIndex = strdupW(null); + info->WinType.fsValidMembers=0; + info->WinType.fsWinProperties=HHWIN_PROP_TRI_PANE; + info->WinType.pszCaption=strdupW(info->pCHMInfo->defTitle); + info->WinType.dwStyles=WS_POPUP; + info->WinType.dwExStyles=0; + info->WinType.nShowState=SW_SHOW; + info->WinType.pszFile=strdupW(info->pCHMInfo->defTopic); + info->WinType.curNavType=HHWIN_NAVTYPE_TOC; + return TRUE; + }
/* jump past the #WINDOWS header */ liOffset.QuadPart = sizeof(DWORD) * 2; @@ -304,7 +332,7 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file) { IStorage *storage; - IStream *stream; + IStream *stream = NULL; HRESULT hres;
TRACE("%s (%s :: %s)\n", debugstr_w(parent_chm), debugstr_w(chm_file->chm_file), @@ -342,7 +370,7 @@
CHMInfo *ret = heap_alloc_zero(sizeof(CHMInfo));
- res = GetFullPathNameW(szFile, sizeof(file), file, NULL); + res = GetFullPathNameW(szFile, sizeof(file)/sizeof(file[0]), file, NULL); ret->szFile = strdupW(file);
hres = CoCreateInstance(&CLSID_ITStorage, NULL, CLSCTX_INPROC_SERVER, @@ -393,6 +421,9 @@ }
heap_free(chm->strings); + heap_free(chm->defTitle); + heap_free(chm->defTopic); + heap_free(chm->defToc); heap_free(chm);
return NULL;
Modified: trunk/reactos/dll/win32/hhctrl.ocx/help.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/help.c... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/help.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/help.c [iso-8859-1] Fri Apr 4 07:21:42 2008 @@ -51,13 +51,14 @@ static LPWSTR HH_LoadString(DWORD dwID) { LPWSTR string = NULL; + LPCWSTR stringresource; int iSize;
- iSize = LoadStringW(hhctrl_hinstance, dwID, NULL, 0); - iSize += 2; /* some strings (tab text) needs double-null termination */ - - string = heap_alloc(iSize * sizeof(WCHAR)); - LoadStringW(hhctrl_hinstance, dwID, string, iSize); + iSize = LoadStringW(hhctrl_hinstance, dwID, (LPWSTR)&stringresource, 0); + + string = heap_alloc((iSize + 2) * sizeof(WCHAR)); /* some strings (tab text) needs double-null termination */ + memcpy(string, stringresource, iSize*sizeof(WCHAR)); + string[iSize] = 0;
return string; } @@ -115,7 +116,7 @@ if (!info->web_browser) return FALSE;
- if(!GetFullPathNameW(file, sizeof(full_path), full_path, NULL)) { + if(!GetFullPathNameW(file, sizeof(full_path)/sizeof(full_path[0]), full_path, NULL)) { WARN("GetFullPathName failed: %u\n", GetLastError()); return FALSE; }
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c [iso-8859-1] Fri Apr 4 07:21:42 2008 @@ -114,6 +114,7 @@ memcpy(chm_file, filename, (index-filename)*sizeof(WCHAR)); chm_file[index-filename] = 0; filename = chm_file; + index += 2; /* advance beyond "::" for calling NavigateToChm() later */ } else {
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h [iso-8859-1] Fri Apr 4 07:21:42 2008 @@ -74,6 +74,10 @@ IStream *strings_stream; char **strings; DWORD strings_size; + + WCHAR *defTopic; + WCHAR *defTitle; + WCHAR *defToc; } CHMInfo;
#define TAB_CONTENTS 0 @@ -177,7 +181,7 @@ return ret; }
-static inline LPWSTR strdupAtoW(LPCSTR str) +static inline LPWSTR strdupnAtoW(LPCSTR str, LONG lenA) { LPWSTR ret; DWORD len; @@ -185,12 +189,27 @@ if(!str) return NULL;
- len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); + if (lenA > 0) + { + /* find length of string */ + LPCSTR eos = memchr(str, 0, lenA); + if (eos) lenA = eos - str; + } + + len = MultiByteToWideChar(CP_ACP, 0, str, lenA, NULL, 0)+1; /* +1 for null pad */ ret = heap_alloc(len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); + MultiByteToWideChar(CP_ACP, 0, str, lenA, ret, len); + ret[len-1] = 0;
return ret; } + +static inline LPWSTR strdupAtoW(LPCSTR str) +{ + return strdupnAtoW(str, -1); +} + +
extern HINSTANCE hhctrl_hinstance; extern BOOL hh_process;
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild [iso-8859-1] Fri Apr 4 07:21:42 2008 @@ -6,11 +6,17 @@ <importlibrary definition="hhctrl.ocx.spec.def" /> <include base="hhctrl">.</include> <include base="ReactOS">include/reactos/wine</include> - <include base="ReactOS" root="intermediate">include/reactos</include> <define name="__WINESRC__" /> <define name="WINVER">0x600</define> <define name="_WIN32_WINNT">0x600</define> - <dependency>wineheaders</dependency> + <file>chm.c</file> + <file>content.c</file> + <file>help.c</file> + <file>hhctrl.c</file> + <file>regsvr.c</file> + <file>webbrowser.c</file> + <file>hhctrl.rc</file> + <file>hhctrl.ocx.spec</file> <library>wine</library> <library>advapi32</library> <library>comctl32</library> @@ -22,13 +28,5 @@ <library>kernel32</library> <library>uuid</library> <library>ntdll</library> - <file>chm.c</file> - <file>content.c</file> - <file>help.c</file> - <file>hhctrl.c</file> - <file>regsvr.c</file> - <file>webbrowser.c</file> - <file>hhctrl.rc</file> - <file>hhctrl.ocx.spec</file> </module> </group>
Removed: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx_ros.diff URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx_ros.diff (removed) @@ -1,16 +1,0 @@ -Index: hhctrl.ocx.rbuild -=================================================================== ---- hhctrl.ocx.rbuild (revision 27782) -+++ hhctrl.ocx.rbuild (working copy) -@@ -5,9 +5,11 @@ - <importlibrary definition="hhctrl.ocx.spec.def" /> - <include base="hhctrl">.</include> - <include base="ReactOS">include/reactos/wine</include> -+ <include base="ReactOS" root="intermediate">include/reactos</include> - <define name="__WINESRC__" /> - <define name="WINVER">0x600</define> - <define name="_WIN32_WINNT">0x600</define> -+ <dependency>wineheaders</dependency> - <library>wine</library> - <library>advapi32</library> - <library>comctl32</library>
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.rc [iso-8859-1] Fri Apr 4 07:21:42 2008 @@ -31,6 +31,7 @@
#include "Cs.rc" #include "De.rc" +#include "El.rc" #include "En.rc" #include "Fr.rc" #include "Fi.rc" @@ -39,5 +40,6 @@ #include "Nl.rc" #include "No.rc" #include "Pl.rc" +#include "Ru.rc" #include "Sv.rc" #include "Tr.rc"