Commit Graph

210 Commits

Author SHA1 Message Date
Dylan Smith 2da0d8e933 richedit: Use ME_Cursor instead of offsets for ME_SetCharFormat.
The test that succeeded from this change was as a result of allowing the
end of the character format change be specified using NULL as the rest
of the text.  Before, the end paragraph run at the end of the text was
not being set for this case, when all the text was supposed to have its
character format changed.
2009-08-12 17:35:50 +02:00
Dylan Smith e7fd0b46b0 richedit: Add more tests for WM_SETTEXT RTF support. 2009-07-13 10:48:05 +02:00
Austin Lund 1643679476 riched20/test: Added a test for TxDraw. 2009-06-03 16:04:49 +02:00
Francois Gouget 8a46d0eaf5 Assorted spelling fixes. 2009-05-04 12:53:29 +02:00
Massimo Del Fedele 078989d463 richedit20: Test for fonttbl streamout. 2009-04-27 13:24:27 +02:00
Michael Stefaniuc b747284797 riched20/tests: Use better types than long. 2009-04-20 14:12:29 +02:00
Paul Vriens 30041c283a riched20/tests: Remove the todo_wine logic where appropriate. 2009-04-03 17:06:41 +02:00
Paul Vriens e96fb0fa50 riched20/tests: Fix and extend EM_FORMATRANGE tests. 2009-03-24 12:58:26 +01:00
Dylan Smith caca486029 richedit: Add bounds checks for EM_GETTEXTRANGE with tests.
Wine was not doing bounds checks for EM_GETTEXTRANGE, which was causing
a crash in Bug 17822.  The added tests would cause a crash without the
added bounds checks in the richedit code.

The bounds checks I put in HandleMessage, since ME_GetTextRange is also
called for ME_GETSELTEXT which should not have bounds checks, since it
uses the selection range.

When the ME_GETTEXTRANGE message returns 0, no text is copied, not even
the NULL terminating charter.  This differs from EM_GETSELTEXT which
will copy the NULL terminating character when no text is selected.  This
behaviour is consistent with native richedit controls.
2009-03-23 13:26:28 +01:00
Francois Gouget 96848a0605 Remove spaces before '\n's. 2009-03-09 12:05:58 +01:00
Dylan Smith 1a3551b630 richedit: Use width from EM_SETTARGETDEVICE for wrapping.
The width for EM_SETTARGETDEVICE is used by some applications to set the
wrapping width to a certain distance in twips.  This can be used even
though the target device is ignored.
2009-02-02 15:21:44 +01:00
Michael Stefaniuc d1a7e41b71 riched20: Remove superfluous pointer casts. 2009-01-30 11:45:23 +01:00
Alasdair Sinclair 0e543a715c riched20/tests: Fix missing void in empty parameter list. 2009-01-30 11:43:31 +01:00
Dylan Smith 9b7825f6f6 richedit: Added test for scroll position after EM_SETTEXTEX. 2009-01-22 15:28:22 +01:00
Francois Gouget 30ad4c9eb0 riched20/tests: Make test_TxGetNaturalSize() static. 2009-01-22 12:04:04 +01:00
Dylan Smith 20d6bc8ac7 richedit: Implemented ITextServices TxGetText and TxSetText. 2009-01-21 11:55:36 +01:00
Paul Vriens bd607b64fd riched20/tests: Fix a test failure on Win9x. 2009-01-20 12:23:20 +01:00
Austin Lund 80e71e63f2 riched20/tests: Added ITextServices::TxGetNaturalSize test. 2009-01-19 14:36:06 +01:00
Dylan Smith d29a301ccd richedit: Prevent sending Ctrl-C to console and ending tests. 2009-01-19 12:46:41 +01:00
Dylan Smith b4babc16bb richedit: EM_SETTEXTEX detects ascii richtext with Unicode codepage. 2009-01-19 12:46:41 +01:00
Dylan Smith 164778452c richedit: Added test for detecting ascii rtf with Unicode codepage. 2009-01-19 12:46:41 +01:00
Dylan Smith 89f88a49a4 richedit: Store an internal copy of the window style flags. 2009-01-16 12:35:28 +01:00
Dylan Smith 9a902f358b richedit: Added tests for initial options.
Using the WS_VSCROLL style causes the ES_AUTOVSCROLL option to be set,
and using the WS_HSCROLL style causes the ES_AUTOHSCROLL flag to be
set (except with richedit v1.0).
2009-01-16 12:35:17 +01:00
Dylan Smith e6fedf879c richedit: Implemented the horizontal scrollbar. 2009-01-15 14:13:38 +01:00
Dylan Smith b81144b350 richedit: Correct limitations on values for setting zoom ratio. 2009-01-14 14:22:43 +01:00
Dylan Smith fcabbbf30f richedit: Zoom in and out with mouse wheel with control held. 2009-01-14 14:22:37 +01:00
Dylan Smith b70b3e893f richedit: Added tests for zooming.
The contents of the text can be zoomed in with EM_SETZOOM, or with the
mouse wheel.  EM_SETZOOM is implemented, but these tests show bugs in
the implementation, and zooming using the mouse wheel isn't
implemented at all yet.
2009-01-14 14:22:26 +01:00
Austin Lund c607ab96b6 riched20/tests: Added ITextServices::TxSetText test. 2009-01-12 16:53:18 +01:00
Dylan Smith 576ff4b104 richedit: Tested EM_CHARFROMPOS with position outside of control. 2009-01-12 14:38:57 +01:00
Dylan Smith 55d9e95892 richedit: Added tests for autoscrolling options based on WS_V/HSCROLL. 2009-01-12 14:38:36 +01:00
Dylan Smith a1aaf97c11 richedit: Added tests to show that options are stored internally. 2009-01-12 14:38:17 +01:00
Dylan Smith 573102ee88 richedit: Fixed implementation of WM_GETDLGCODE message.
This fixes inconsistencies shown in the tests I added for the
WM_GETDLGCODE.  The tests covered different cases handled by the
current implementation in order to show that the native implementation
is simpler for all these cases.
2009-01-08 13:35:05 +01:00
Dylan Smith c636b59bcf richedit: Added tests for WM_GETDLGCODE message. 2009-01-08 13:34:53 +01:00
Alexandre Julliard 139ba41458 riched20/tests: Move the itextServicesStdcallVtbl definition to avoid a compiler warning. 2009-01-04 14:59:54 +01:00
Paul Vriens 5e66808ad3 riched20/tests: Fix tests on Win9x by using A-calls. 2008-12-19 17:16:19 +01:00
Dylan Smith 297716e01c richedit: Made sure text is offset by formatting rectangle.
The formatting rectangle is set with EM_SETRECT, and retrieved with
EM_GETRECT, so it corresponds to rcFormat in the code.  This defines the
area that the richedit control should draw the text so that it is
offset by the top-left corner of the formatting rectangle, and clipped
so that it doesn't draw past the bottom or right hand side.  Thus this
is important for implementing windowless richedit controls to not
interfere with the rest of the window.
2008-12-18 14:19:40 +01:00
Dylan Smith ced9bde4c0 richedit: Added tests for the formatting rectangle.
These tests show that there are problems with the way formatting
rectangles are currently implemented in wine.
2008-12-18 14:19:40 +01:00
Dylan Smith 62db58545e richedit: Fixed ITextHostImpl return values for tests.
There were several methods that do not have a HRESULT for a return
value, so returning E_NOTIMPL is not appropriate. For all the BOOL
return values FALSE was returned to indicate the operation was not
performed.
2008-12-18 14:19:40 +01:00
Paul Vriens 9bc409cfcb riched20/tests: Fix test failures on Win9x, WinMe and Wine in win9x mode. 2008-12-16 12:51:31 +01:00
Dylan Smith 6fa7b49825 richedit: Missing capitalization on TxGetScrollBars. 2008-12-15 13:20:09 +01:00
Francois Gouget 82f6b6ff41 riched20/tests: Make keep_responsive() and customWordBreakProc() static. 2008-12-15 12:25:28 +01:00
Paul Vriens 696512b6cb riched20/tests: Remove the todo_wine logic where appropriate. 2008-12-10 14:32:07 +01:00
Dylan Smith e4ef9c5c15 richedit: Initial testing of ITextServices methods. 2008-11-13 13:08:46 +01:00
Dylan Smith cc1cbadeb2 richedit: Created initial tests for windowless richedit controls. 2008-11-12 13:33:41 +01:00
Michael Stefaniuc 2ae8511980 riched20: Use MAKELPARAM instead of "(LPARAM) MAKELONG". 2008-11-03 13:39:35 +01:00
Michael Stefaniuc 9f92f6bc10 riched20: Do not cast NULL. 2008-11-03 13:38:58 +01:00
Dylan Smith 09802e2c76 richedit: Handle negative position given to EM_POSFROMCHAR. 2008-10-29 11:52:18 +01:00
Paul Vriens 5e05a7b9eb riched20/tests: Skip some tests on Win9x and WinMe. 2008-10-24 14:25:00 +02:00
Dylan Smith 503972980e richedit: Fixed the call to the EditWordBreakProc. 2008-10-23 15:30:14 +02:00
Dylan Smith 00fd6b62d3 richedit: Added test for correct behaviour for calling EditWordBreakProc.
EditWordBreakProc documented the third parameter as being the number
of unicode characters in the string for richedit 2.0 and up.  It turns
out that it should actually be the number of bytes in the string.
2008-10-23 15:30:06 +02:00