Author: pschweitzer Date: Fri Dec 26 11:02:47 2014 New Revision: 65829 URL: http://svn.reactos.org/svn/reactos?rev=65829&view=rev Log: [CHARMAP] Fix the following issues: - Skip rotated font (font name starting with "@" char) - Fix a comment (misspelled "Richedit") - Fix enlarged preview font in font name is long (it truncated font name in 31 chars when copying) - Fix 2 magic values (255 here is not meaningful, and it doesn't even entirely showing Unicode Plane 0)
Patch by Roy Tam. CORE-8966 #resolve #comment Thanks. Commited in r65829. Modified: trunk/reactos/base/applications/charmap/charmap.c trunk/reactos/base/applications/charmap/lrgcell.c trunk/reactos/base/applications/charmap/map.c Modified: trunk/reactos/base/applications/charmap/charmap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/charmap.c?rev=65829&r1=65828&r2=65829&view=diff ============================================================================== --- trunk/reactos/base/applications/charmap/charmap.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/charmap/charmap.c [iso-8859-1] Fri Dec 26 11:02:47 2014 @@ -33,6 +33,9 @@ { HWND hwndCombo = (HWND)lParam; LPWSTR pszName = lpelfe->elfLogFont.lfFaceName; + + /* Skip rotated font */ + if(pszName[0] == L'@') return 1; /* make sure font doesn't already exist in our list */ if(SendMessageW(hwndCombo, @@ -321,7 +324,7 @@ ChangeMapFont(hDlg); - // Configure Richedi control for sending notification changes. + // Configure Richedit control for sending notification changes. evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0); evMask |= ENM_CHANGE; SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_SETEVENTMASK, 0, (LPARAM)evMask); Modified: trunk/reactos/base/applications/charmap/lrgcell.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/lrgcell.c?rev=65829&r1=65828&r2=65829&view=diff ============================================================================== --- trunk/reactos/base/applications/charmap/lrgcell.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/charmap/lrgcell.c [iso-8859-1] Fri Dec 26 11:02:47 2014 @@ -35,7 +35,7 @@ { SendMessageW(hCombo, WM_GETTEXT, - 31, + Len + 1, (LPARAM)lpFontName); ZeroMemory(&lf, Modified: trunk/reactos/base/applications/charmap/map.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/map.c?rev=65829&r1=65828&r2=65829&view=diff ============================================================================== --- trunk/reactos/base/applications/charmap/map.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/charmap/map.c [iso-8859-1] Fri Dec 26 11:02:47 2014 @@ -13,6 +13,8 @@ static const WCHAR szMapWndClass[] = L"FontMapWnd"; static const WCHAR szLrgCellWndClass[] = L"LrgCellWnd"; + +#define MAX_ROWS (0xFFFF / XCELLS) + 1 - YCELLS static VOID @@ -377,7 +379,7 @@ SetGrid(infoPtr); - SetScrollRange(hwnd, SB_VERT, 0, 255, FALSE); + SetScrollRange(hwnd, SB_VERT, 0, MAX_ROWS, FALSE); SetScrollPos(hwnd, SB_VERT, 0, TRUE); Ret = TRUE; @@ -423,7 +425,7 @@ } infoPtr->iYStart = max(0, - min(infoPtr->iYStart, 255*16)); + min(infoPtr->iYStart, MAX_ROWS)); iYDiff = iOldYStart - infoPtr->iYStart; if (iYDiff)