Commit 840af642 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

riched20: Handle tomEnd in ITextRange::ScrollIntoView.

parent 06c7d3a9
...@@ -2485,6 +2485,10 @@ static HRESULT WINAPI ITextRange_fnScrollIntoView(ITextRange *me, LONG value) ...@@ -2485,6 +2485,10 @@ static HRESULT WINAPI ITextRange_fnScrollIntoView(ITextRange *me, LONG value)
ME_CursorFromCharOfs(editor, This->start, &cursor); ME_CursorFromCharOfs(editor, This->start, &cursor);
ME_GetCursorCoordinates(editor, &cursor, &x, &y, &height); ME_GetCursorCoordinates(editor, &cursor, &x, &y, &height);
break; break;
case tomEnd:
ME_CursorFromCharOfs(editor, This->end, &cursor);
ME_GetCursorCoordinates(editor, &cursor, &x, &y, &height);
break;
default: default:
FIXME("bStart value %d not handled\n", value); FIXME("bStart value %d not handled\n", value);
return E_NOTIMPL; return E_NOTIMPL;
......
...@@ -853,15 +853,19 @@ static void test_ITextRange_ScrollIntoView(void) ...@@ -853,15 +853,19 @@ static void test_ITextRange_ScrollIntoView(void)
/* Scroll to the top. */ /* Scroll to the top. */
check_range(w, txtDoc, 0, 1, tomStart, 0); check_range(w, txtDoc, 0, 1, tomStart, 0);
check_range(w, txtDoc, 0, 1, tomEnd, 0);
/* Scroll to the bottom. */ /* Scroll to the bottom. */
check_range(w, txtDoc, 19, 20, tomStart, 1); check_range(w, txtDoc, 19, 20, tomStart, 1);
check_range(w, txtDoc, 19, 20, tomEnd, 1);
/* Back up to the top. */ /* Back up to the top. */
check_range(w, txtDoc, 0, 1, tomStart, 0); check_range(w, txtDoc, 0, 1, tomStart, 0);
check_range(w, txtDoc, 0, 1, tomEnd, 0);
/* Large range */ /* Large range */
check_range(w, txtDoc, 0, 20, tomStart, 0); check_range(w, txtDoc, 0, 20, tomStart, 0);
check_range(w, txtDoc, 0, 20, tomEnd, 1);
hres = ITextDocument_Range(txtDoc, 0, 0, &txtRge); hres = ITextDocument_Range(txtDoc, 0, 0, &txtRge);
ok(hres == S_OK, "got 0x%08x\n", hres); ok(hres == S_OK, "got 0x%08x\n", hres);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment