Author: akhaldi Date: Fri Nov 27 22:45:32 2015 New Revision: 70165
URL: http://svn.reactos.org/svn/reactos?rev=70165&view=rev Log: [USER32] Sync edit.c with Wine Staging 1.7.55. CORE-10536
Modified: trunk/reactos/media/doc/README.WINE trunk/reactos/win32ss/user/user32/controls/edit.c
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=7... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Nov 27 22:45:32 2015 @@ -295,7 +295,7 @@ User32 - reactos/win32ss/user/user32/controls/button.c # Synced to WineStaging-1.7.37 reactos/win32ss/user/user32/controls/combo.c # Synced to WineStaging-1.7.37 - reactos/win32ss/user/user32/controls/edit.c # Synced to WineStaging-1.7.37 + reactos/win32ss/user/user32/controls/edit.c # Synced to WineStaging-1.7.55 reactos/win32ss/user/user32/controls/icontitle.c # Synced to WineStaging-1.7.37 reactos/win32ss/user/user32/controls/listbox.c # Synced to Wine-1_1_39 reactos/win32ss/user/user32/controls/scrollbar.c # Forked
Modified: trunk/reactos/win32ss/user/user32/controls/edit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/control... ============================================================================== --- trunk/reactos/win32ss/user/user32/controls/edit.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/controls/edit.c [iso-8859-1] Fri Nov 27 22:45:32 2015 @@ -511,7 +511,7 @@ LINEDEF *current_line; LINEDEF *previous_line; LINEDEF *start_line; - INT line_index = 0, nstart_line = 0, nstart_index = 0; + INT line_index = 0, nstart_line, nstart_index; INT line_count = es->line_count; INT orig_net_length; RECT rc; @@ -1097,7 +1097,7 @@ INT x = 0; INT y = 0; INT w; - INT lw = 0; + INT lw; LINEDEF *line_def;
index = min(index, len); @@ -2235,12 +2235,9 @@ ret = (INT)LOWORD(TabbedTextOutW(dc, x, y, es->text + li + col, count, es->tabs_count, es->tabs, es->format_rect.left - es->x_offset)); } else { - LPWSTR text = es->text; - TextOutW(dc, x, y, text + li + col, count); - GetTextExtentPoint32W(dc, text + li + col, count, &size); + TextOutW(dc, x, y, es->text + li + col, count); + GetTextExtentPoint32W(dc, es->text + li + col, count, &size); ret = size.cx; - if (es->style & ES_PASSWORD) - HeapFree(GetProcessHeap(), 0, text); } if (rev) { if (es->composition_len == 0) @@ -2621,7 +2618,7 @@ LPWSTR p; HRGN hrgn = 0; LPWSTR buf = NULL; - UINT bufl = 0; + UINT bufl;
TRACE("%s, can_undo %d, send_update %d\n", debugstr_w(lpsz_replace), can_undo, send_update); @@ -2770,8 +2767,7 @@ EDIT_EM_EmptyUndoBuffer(es); }
- if (bufl) - HeapFree(GetProcessHeap(), 0, buf); + HeapFree(GetProcessHeap(), 0, buf);
s += strl;
@@ -2927,7 +2923,7 @@ */ static int calc_min_set_margin_size(HDC dc, INT left, INT right) { - WCHAR magic_string[] = {''','*','*',''', 0}; + static const WCHAR magic_string[] = {''','*','*',''', 0}; SIZE sz;
GetTextExtentPointW(dc, magic_string, sizeof(magic_string)/sizeof(WCHAR) - 1, &sz); @@ -3995,12 +3991,11 @@ * WM_SIZE * */ -static void EDIT_WM_Size(EDITSTATE *es, UINT action, INT width, INT height) +static void EDIT_WM_Size(EDITSTATE *es, UINT action) { if ((action == SIZE_MAXIMIZED) || (action == SIZE_RESTORED)) { RECT rc; - TRACE("width = %d, height = %d\n", width, height); - SetRect(&rc, 0, 0, width, height); + GetClientRect(es->hwndSelf, &rc); EDIT_SetRectNP(es, &rc); EDIT_UpdateText(es, NULL, TRUE); } @@ -4373,7 +4368,7 @@ static void EDIT_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es) { LONG buflen; - LPWSTR lpCompStr = NULL; + LPWSTR lpCompStr; LPSTR lpCompStrAttr = NULL; DWORD dwBufLenAttr;
@@ -4416,8 +4411,6 @@ dwBufLenAttr); lpCompStrAttr[dwBufLenAttr] = 0; } - else - lpCompStrAttr = NULL; }
/* check for change in composition start */ @@ -5193,7 +5186,7 @@ break;
case WM_SIZE: - EDIT_WM_Size(es, (UINT)wParam, LOWORD(lParam), HIWORD(lParam)); + EDIT_WM_Size(es, (UINT)wParam); break;
case WM_STYLECHANGED: