Commit Graph

422 Commits

Author SHA1 Message Date
Alexandre Julliard 99ef0d6ff0 makefiles: Get rid of the MAKE_TEST_RULES variable. 2014-01-02 12:13:16 +01:00
Frédéric Delanoy 57d7f74d34 Assorted spelling fixes. 2013-11-21 19:44:46 +01:00
Huw Davies 58e83ebdea riched20: Revert to the default paragraph style when all text is deleted. 2013-11-04 17:41:12 +01:00
André Hentschel 86a30afeb5 riched20/tests: Fix txtsrv tests compilation with __WINESRC__ defined. 2013-10-28 20:07:21 +01:00
André Hentschel 27fb62621a riched20/tests: Fix richole tests compilation with __WINESRC__ defined. 2013-10-28 20:07:10 +01:00
André Hentschel 1431b1e9c4 riched20/tests: Fix editor tests compilation with __WINESRC__ defined. 2013-10-28 20:07:02 +01:00
Frédéric Delanoy c388cce8aa riched20/tests: Use BOOL type where appropriate. 2013-10-08 09:09:28 +02:00
Piotr Caban e660bf676c riched20: Set control content in WM_CREATE message. 2013-10-07 19:52:44 +02:00
Michael Stefaniuc 0e681027a2 tests: Compile the tests by default with -D__WINESRC__. 2013-10-02 11:04:02 +02:00
Michael Stefaniuc 9463dba830 tests: Use the explicit LoadLibraryA function. 2013-10-02 11:02:21 +02:00
Andrew Eikum 360afb93b5 riched20: Continue interpreting data as UTF-8 after the first chunk boundary. 2013-10-02 11:01:33 +02:00
Jactry Zeng 5520dcab8a riched20/tests: Add UTF8 BOM tests for EM_SETTEXTEX. 2013-09-27 10:43:00 +02:00
Jactry Zeng a8d87afe1c riched20/tests: Add tests of ITextDocument_Open. 2013-09-05 13:25:34 +02:00
Andrew Eikum 3f02c24163 riched20: EM_FINDTEXT implementation should match richedit character type. 2013-03-25 14:07:19 +01:00
Michael Stefaniuc 87cdc7341d riched20/tests: Remove a superfluous function pointer cast. 2012-11-30 19:12:16 +01:00
Nikolay Sivov 28821a924c riched20/tests: Use proper method macros. 2012-08-24 11:32:59 +02:00
Qian Hong cb8c500ee6 riched20: Added support for UTF8 BOM stream. 2012-08-17 13:58:11 +02:00
Qian Hong 7839d134e9 riched20/tests: Fixed typo in test_EM_STREAMIN. 2012-08-16 13:46:20 +02:00
Qian Hong 01ebba0fc4 riched20/tests: Added UTF8 BOM test. 2012-08-16 13:07:02 +02:00
Michael Stefaniuc 8660d5e77f riched20/tests: Check the correct return value. 2012-05-25 13:45:01 +02:00
Michael Stefaniuc 306b3510a9 riched20/tests: Remove duplicated ok() call. 2012-05-17 10:18:15 +02:00
Michael Stefaniuc 25ed3b9572 riched20/tests: Don't cast NULL to an integer. 2012-04-16 12:07:11 +02:00
Michael Stefaniuc 39f416cd9d riched20/tests: Add COM aggregation tests for CreateTextServices(). 2012-03-28 11:39:12 +02:00
Michael Stefaniuc 67389533bc riched20/tests: Get the CreateTextServices() pointer only once. 2012-03-28 11:39:04 +02:00
Jason Edmeades efbde389c7 richedit: v1.0 richedit uses CR and LF for enter. 2012-01-23 16:07:41 +01:00
Thomas Faber 3ac36cb50f riched20/tests: Test format rect adaption to window size and behavior with zero-sized windows. 2011-10-24 19:54:08 +02:00
Francois Gouget 3de330db54 tests: Remove unneeded assert.h includes. 2011-09-27 10:59:56 +02:00
Dylan Smith 9d2da7fa66 riched20/tests: Remove unnecessary SetFocus calls. 2011-09-26 12:19:43 +02:00
Dylan Smith fdb2bc4be9 riched20/tests: Avoid using flaky method of simulating typing. 2011-09-26 12:19:40 +02:00
Dylan Smith f61d417a34 richedit: Return number of chars inserted for EM_STREAMIN with SF_RTF. 2011-09-26 12:16:59 +02:00
Dylan Smith e060272de7 richedit: Return number of bytes read for EM_STREAMIN with SF_TEXT. 2011-09-26 12:16:56 +02:00
Francois Gouget c992ca277d Assorted spelling fixes. 2011-08-24 19:07:46 +02:00
Dan Kegel 28b2d03a8c riched20/tests: Fix test_EM_FINDWORDBREAK comments. 2011-08-01 18:26:25 +02:00
Dan Kegel dafd6fecd1 riched20/tests: Add test for WB_ISDELIMITER. 2011-07-20 19:23:05 +02:00
Dylan Smith 82da77c0a6 richedit: Fix incorrect GUID values for ITextHost and ITextHost2. 2011-07-05 14:44:43 +02:00
Dylan Smith 819e1a899a riched20/tests: Test the text services IIDs. 2011-07-05 14:44:33 +02:00
Marcus Meissner 2b53df89cb riched20: Fixed some lParams with keycodes (Coverity). 2011-05-06 14:23:46 +02:00
Francois Gouget cc2cd5a525 riched20/tests: Add a '\n' to an ok() call. 2011-03-07 11:09:27 +01:00
Austin English c17df92e5d riched20/tests: Remove win9x hacks. 2011-02-28 13:13:33 +01:00
Austin English 75e4e607c6 riched20/tests: Make sure return value is used (LLVM/Clang). 2011-02-09 09:25:58 -06:00
Greg Geldorp 997a681300 riched20/tests: Fix editor tests. 2011-01-24 14:43:27 +01:00
Greg Geldorp bee48efdce riched20/tests: Skip some tests on non-English platforms. 2011-01-19 16:54:02 +01:00
André Hentschel cea221caa0 riched20/tests: Don't test function directly when reporting GetLastError(). 2010-12-30 15:00:58 +01:00
Michael Stefaniuc 0acf4a297b riched20/tests: Use an iface instead of a vtbl pointer in ITextHostTestImpl. 2010-12-09 12:28:41 +01:00
Austin Lund b20e75f5e9 riched20/tests: Cleaned up ITextServices::TxGetNaturalSize test and fixed test failures. 2010-10-13 17:45:23 +02:00
Austin Lund d08fc66732 riched20/tests: Plug a few memory leaks and make failure messages more meaningful. 2010-10-06 20:46:49 +02:00
Alexandre Julliard 95c1bd4da9 riched20/tests: Make some variables static. 2010-10-01 13:40:29 +02:00
Alexandre Julliard 81b8ee863e makefiles: Add a standard header for all makefiles to replace the common variable initializations. 2010-09-19 12:36:48 +02:00
Dylan Smith 75eef41881 richedit: Return correct values when EM_SETTEXTMODE fails.
The checks for the text length and invalid parameters needed to be swapped,
and the code could be easily simplified.
2010-07-30 11:36:01 +02:00
Alexandre Julliard b86d515ed6 dlls: Remove explicit imports of kernel32 and ntdll. 2010-07-21 17:38:36 +02:00
Michael Stefaniuc cf13e8a390 riched20: Avoid using long. 2010-05-17 12:42:33 +02:00
Alexandre Julliard bef5645eb1 makefiles: Remove the no longer needed explicit separators for dependencies. 2010-03-16 13:28:19 +01:00
David Hedberg 534398a57e richedit: GTL_PRECISE to GETTEXTLENGTHEX implies GTL_NUMBYTES.
If GTL_PRECISE is passed without specifying either GTL_NUMCHARS or
GTL_NUMBYTES, behave as if GTL_NUMBYTES was passed.
2010-03-01 11:33:01 +01:00
Dylan Smith fe9933ae4d richedit: Added some extra tests for EM_FORMATRANGE.
The existing tests were not properly testing the return value for the case
where all the text fits in the page rect, so this patch adds a couple of
simple tests for this case.
2010-02-22 12:03:09 +01:00
Alexandre Julliard 6164ce2d82 makefiles: Use the standard C_SRCS variable as the list of test files.
This enables it to be auto-updated by make_makefiles.
2010-02-22 10:47:11 +01:00
Michael Stefaniuc 3b45ababfb riched20: Remove some explicit LPARAM/WPARAM casts. 2009-12-28 12:27:13 +01:00
Nikolay Sivov c6ff530ad6 riched20/tests: Don't leak string in test. 2009-11-30 12:56:58 +01:00
Sergey Khodych 12a417de8a riched20: Implement handling of WM_KEYDOWN VK_TAB in the dialog mode. 2009-10-13 12:38:58 +02:00
Sergey Khodych a50ca4ace0 riched20: Implement handling of WM_KEYDOWN VK_ESCAPE in the dialog mode. 2009-10-13 12:38:54 +02:00
Sergey Khodych 8fb119ba8b riched20: Implement handling of WM_KEYDOWN VK_RETURN in the dialog mode. 2009-10-13 12:38:49 +02:00
Dylan Smith 3fe20bdc7e richedit: Handle to parent window is cached.
The parent window for the richedit control on creation is the one that
receives notify messages, even after the parent has been changed using
SetParent.
2009-09-30 17:41:06 +02:00
Dylan Smith 992381b36e richedit: Added test to show that handle to parent is cached. 2009-09-30 17:40:59 +02:00
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
Dylan Smith 242b1bc109 richedit: Fixed pointer syntax in helper functions for tests. 2008-10-23 12:10:08 +02:00
Dylan Smith 46d79b0363 richedit: Fixed EM_POSFROMCHAR for pos of text length.
For some reason EM_POSFROMCHAR was returning 0 when the position was
equal to the end of the text, or beyond the end of the text. Instead
it should use the position at the end of the text for both these
cases.  The x value was also seen to be offset by 1 according to the
tests.
2008-10-22 13:54:54 +02:00
Dylan Smith 31951a099d richedit: Added tests for EM_POSFROMCHAR for pos around end of text. 2008-10-22 13:54:54 +02:00
Dylan Smith 5bcb15dd7f richedit: Handle ctrl-key shortcuts on WM_KEYDOWN. 2008-10-22 13:54:53 +02:00
Dylan Smith aa3b75f6b7 richedit: Added tests for ctrl-key shortcut handling in WM_KEYDOWN.
Previously the shortcuts for cut, copy, paste, undo, redo, and select
all were being handled during the WM_CHAR message.  These tests show
that these shortcuts should be handled with the WM_KEYDOWN message
instead.
2008-10-22 13:54:53 +02:00
Francois Gouget 5eb8ab3deb riched20/tests: Add a trailing '\n' to an ok() call. 2008-10-20 11:37:27 +02:00
Dylan Smith c70f6a3933 richedit: Use the DefWindowProc to implement WM_SETREDRAW. 2008-10-20 11:37:27 +02:00
Dylan Smith ae3394271d richedit: Prevent EN_UPDATE notifications when window isn't visible. 2008-10-20 11:37:27 +02:00
Dylan Smith 30ebfa6d74 richedit: Test to see if WM_SETREDRAW removes the windows visibility. 2008-10-20 11:37:27 +02:00
Dylan Smith b5f59b9962 richedit: Test for EN_UPDATE notification when window isn't visible. 2008-10-20 11:37:26 +02:00
Dylan Smith f24678b285 richedit: Scroll cursor into view even with redraw turned off. 2008-10-18 19:32:43 +02:00
Dylan Smith 582bdadeff richedit: Test changes in scrollbar's visibility with redraw disabled.
Test to verify that the scrollbar does need to be shown or hidden while
redraw is disabled.
2008-10-18 19:32:33 +02:00
Dylan Smith bb4e38665a richedit: Test to see if wrapping happens with redraw disabled. 2008-10-18 19:32:27 +02:00
Dylan Smith a959f7d74b richedit: Tests for notifications while redraw is disabled.
There were some notifications that weren't sent in ME_UpdateRepaint
while redraw was disabled, so this verifies that they are not sent
with redraw disabled.
2008-10-18 19:32:18 +02:00
Dylan Smith 2271226bfd richedit: Added test for auto scroll behaviour with redraw disabled. 2008-10-18 19:26:54 +02:00
Michael Stefaniuc b9f3e3626d riched20: Remove superfluous backslashes at end of lines. 2008-10-16 11:29:04 +02:00
Dylan Smith e6b16cce77 richedit: Added test for word wrapping behaviour. 2008-10-13 11:42:22 +02:00
Dylan Smith 440db38eba richedit: Moved optional message loop in tests to its own function. 2008-10-13 11:42:16 +02:00
Dylan Smith b8fe020077 richedit: Added DestroyWindow call to clean up the end of a test. 2008-10-13 11:42:01 +02:00
Dylan Smith bdf181b4d3 richedit: Use RTF reader for text starting with {\urtf. 2008-10-06 13:49:12 +02:00
Dylan Smith af47ac09d5 richedit: Avoided testing for undocumented behaviour causing test to fail.
The test for EM_GETLINE was testing to make sure the null terminating
character was written at the end of the text as long as the buffer was
long enough, and also tested to make sure that no other bytes were
written after this null terminating character.  This is consistent with
Windows 2000 and up, but not for previous versions of Windows.
2008-10-06 13:06:13 +02:00
Dylan Smith 0589b61848 richedit: Swapped the expected and destination buffers in a test. 2008-10-06 13:06:04 +02:00
Dylan Smith 5157798836 richedit: Print hex string for strcmp test failing on Windows 95, 98 & NT4. 2008-10-02 10:41:02 -05:00
Dylan Smith 0699332b37 richedit: Fixed test failing on windows version with larger font sizes. 2008-09-30 10:18:02 -05:00
Dylan Smith c13fd6a44b richedit: Fixed test failure that happend on older builds of riched20.dll. 2008-09-30 10:16:27 -05:00
James Hawkins ce8e69d4b1 riched20: Fix two typos that cause a failing test. 2008-09-09 11:46:14 +02:00
Reece Dunn 5740ad6432 richedit20: Fixed building the tests on msvc. 2008-09-08 14:08:21 +02:00
James Hawkins 898dd57f5d riched20: Fix several failing test across several platforms. 2008-09-08 12:47:22 +02:00
James Hawkins 6b1c6eebab riched20: Trace the result of a failing test. 2008-09-03 13:14:51 +02:00
Dylan Smith a382e35600 richedit: EM_[SG]ETPARAFORMAT returned the wrong value.
The values returned by EM_SETPARAFORMAT and EM_GETPARAFORMAT previously
indicated an error, and the included tests shows that Windows behaves as
documented.
2008-08-18 17:15:57 +02:00
Dustin Brody 3a805d289e riched20: EM_SETTEXTTEX obeys ST_SELECTION with RTF inputs. 2008-07-29 12:50:35 +02:00
Alex Villacís Lasso acfb6ea210 richedit: Do not read actual scrollbar state for scrollbar update, use internal state instead. 2008-07-23 13:05:27 +02:00
Alex Villacís Lasso 9d39754e93 richedit: Tests for WM_SIZE/scrollbar recursion bug, with todo_wine.
This is a minimal model of what happens in Corman Lisp 3.0 -
subclassed window class that unconditionally calls ShowScrollBar() to
force scrollbar visibility.
2008-07-23 13:04:56 +02:00
Alex Villacís Lasso 47871f69a1 richedit: More tests for visibility behavior of richedit scrollbars, with todo_wine.
Alternate method of forcing (in)visibility of scrollbars, with SetWindowLongA().
2008-07-23 13:04:41 +02:00
Alex Villacís Lasso 86e9e0720c richedit: Tests for visibility behavior of richedit scrollbars, with todo_wine.
Some applications have never heard of ES_DISABLENOSCROLL and attempt
to force scrollbars to be always shown (with ShowScrollBar() or
similar) when otherwise richedit would hide them. If richedit attempts
to wrestle control back, a recursive loop of requests can result if
app overrides WM_SIZE behavior. Apparently native never reads the
scrollbar state, and operates from some sort of internal state, so
that scrollbars can be modified externally without native trying to
wrestle back control. This is confirmed by attached tests. An
exception: EM_SCROLL will restore visibility to a scrollbar that was
forcibly hidden.
2008-07-23 13:04:30 +02:00
Alex Villacís Lasso 43cf3b80af richedit: Shorten EM_AUTOURLDETECT tests.
EM_AUTOURLDETECT tests are taking too much time, so this patch tests
just one URL and one non-URL for all messages but WM_SETTEXT. Also,
remove one trace that spams the output needlessly.
2008-07-22 13:01:57 +02:00
Dylan Smith e3efa88c45 richedit: Cannot undo setting of default character format.
This also reverts commit 2b52dd845097f16076c0185b02a003f63898dcab:
wordpad: Empty the richedit undo buffer on creation.

The reverted commit I created to fix an issue that only applied to Wine,
but it just masked the issue which was in richedit controls.  The
default character format was set in two places while wordpad was
starting up, and caused wordpad to have two undo items at startup.
2008-07-14 12:22:44 +02:00
Aurimas Fischer 88c25518d5 richedit: Spelling fixes. 2008-07-14 12:21:55 +02:00
Francois Gouget dbaec0a101 Assorted spelling fixes. 2008-07-10 13:40:15 +02:00
Alexandre Julliard 79c64acc7b tests: Don't depend on the static uuid libraries in the tests.
This avoids trouble with the broken MingW libraries when
cross-compiling the tests.
2008-07-08 17:51:45 +02:00
Dylan Smith 31a2d64fa4 richedit: Fixed simulated keyboard events on tests. 2008-07-03 13:07:45 +02:00
Dylan Smith 2a139746cc richedit: Added missing DestroyWindow in a test. 2008-07-01 13:47:03 +02:00
Dylan Smith 66f948c010 richedit: Clicking below end of text now selects closest character.
Before the end of the text was selected when clicking below the end of
the text, rather than using the x position to find the appropriate
character on the last row that is closest to the pixel position.
2008-06-30 12:10:02 +02:00
Dylan Smith d1f1346f54 richedit: Implemented undo coalescing to group typing events.
Consecutively typed characters are grouped together to be undone
together.  The grouping of typed characters can be stopped by certain
events that are mentioned in MSDN's remarks on the EM_STOPGROUPTYPING
message, which is also implemented by this patch.
2008-06-26 21:18:50 +02:00
Dylan Smith 903423286c richedit: Added tests reveal a problem with EM_SETCHARFORMAT's affect on the undo stack. 2008-06-26 21:17:44 +02:00
Dylan Smith 6d76d43718 richedit: Fixed a bug preventing NULL pointers from being in text.
Opening a text file with a NULL terminated character in it was causing
an assertion error after a run was being split due to word wrap.
Windows allows NULL terminated characters to be in the text.
2008-06-26 21:16:56 +02:00
Dylan Smith ba747f4514 richedit: Fixed the forward word movement bug.
Using Ctrl-RightArrow to move to the start of the next word did not
previously work when at the start of a word.  This means that
Ctrl-RightArrow would not work twice in a row since it should move to
the start of the next word.
2008-06-26 21:16:29 +02:00
Dan Hipschman 36aa6c4c44 riched20: Implement ITextDocument_fnGetSelection. 2008-06-26 21:07:31 +02:00
Alex Villacís Lasso c774d681ce richedit: Fix failing EM_GETCHARFORMAT test on all platforms.
Default richedit font (System) in Windows causes richedit to report
CFM_BOLD as always set. Switch to Courier New in order to see that
richedit really sets the CFM_BOLD attribute in the correct selection.
2008-06-26 10:51:07 +02:00
Dylan Smith 88a9ca7c41 richedit: Tests for undo coalescing.
Tests for undo coalescing from previous patches sent as suggested by
Alex Villacís Lasso.
2008-06-25 11:25:32 +02:00
Alex Villacís Lasso 163e9d1d02 richedit: Revert patch that introduced a test that fails on all platforms. 2008-06-25 11:14:13 +02:00
Alex Villacís Lasso acec891ac2 richedit: EM_POSFROMCHAR should take into account scrollbar position. With tests. 2008-06-24 11:44:37 +02:00
Alex Villacís Lasso 3cc6e2365a richedit: When returning position through wParam pointer, EM_POSFROMCHAR must return 0 as LRESULT.
Add tests for EM_POSFROMCHAR for 1.0 and 2.0.
2008-06-24 11:43:42 +02:00
Dan Hipschman 9615e2977d riched20/tests: Add a test for creating ITextDocument. 2008-06-23 12:39:46 +02:00
Dan Hipschman 76ee788afa riched20/tests: Add tests for OLE interface. 2008-06-23 12:39:41 +02:00
Alex Villacís Lasso 0e9ed5c10e richedit: Empty text should result in a scroll range of 0. Tests for this behavior. 2008-06-19 12:10:21 +02:00
Alex Villacís Lasso c7873afbb2 richedit: Insertion style must NOT be cleared unless selection actually changed. 2008-06-19 12:10:13 +02:00
Alex Villacís Lasso d2900a53e1 richedit: Add tests for URL autodetection for EM_REPLACESEL, make them pass under Wine. 2008-06-19 12:10:00 +02:00
Alex Villacís Lasso 892a0b5f1e richedit: Add tests for URL autodetection for EM_SETTEXTEX, make them pass under Wine. 2008-06-19 12:09:46 +02:00
Alex Villacís Lasso f213af3795 richedit: Fix for the semantics of the flags for some effects reported by EM_GETCHARFORMAT.
Remove workaround put in place by a previous patch, due to buggy flag reporting.
Tests to verify fixed behavior.
2008-06-19 12:08:30 +02:00
Alex Villacís Lasso 4a5d100097 richedit: Add more tests for URL autodetection on WM_CHAR, make them pass under Wine. 2008-06-19 12:07:36 +02:00
Alex Villacís Lasso 38d7ba6eff richedit: WM_SETTEXT must immediately autodetect URLs, without waiting for a WM_CHAR. 2008-06-19 11:59:04 +02:00
Alex Villacís Lasso 60c42bd3db richedit: Fix misreporting of match offset for EM_FINDTEXT and EM_FINDTEXTEX. 2008-06-19 11:55:27 +02:00
Francois Gouget 42a61d7ed7 Assorted spelling fixes. 2008-05-06 16:10:20 +02:00
Alexandre Julliard 13ab99b404 richedit: Avoid strlen in traces. 2008-05-02 13:59:06 +02:00
Alex Villacís Lasso 2a4fc97c4c richedit: Add tests for EM_FINDTEXT in 1.0 emulation, make them pass under Wine. 2008-05-01 10:57:34 +02:00
Alex Villacís Lasso 2ab63774f1 richedit: On failure to parse incoming text as RTF, EM_STREAMIN must set dwError to -16. 2008-04-30 10:22:42 +02:00
Alex Villacís Lasso 829940458f richedit: Private movement of cursors in text insertion should not cause WM_NOTIFY to be sent.
As text is inserted, the cursor is moved to the end, and then back to
offset 0. A reordering of operations prevents a WM_NOTIFY from being
sent on cursor being moved to the end, and another by being moved
back to the beginning. If the cursor was not at offset 0, then
exactly one WM_NOTIFY must be sent, for the movement from previous
position to the beginning.  With tests to prove this change and the
previous one (modify flag should be off on WM_SETTEXT-caused
WM_NOTIFY).
2008-04-29 14:57:03 +02:00
Alex Villacís Lasso 3cad256d54 richedit: Fix modify step setting in EM_SETCHARFORMAT.
EM_SETCHARFORMAT with wParam==0 sets default char format and does NOT set modify step flag.
EM_SETCHARFORMAT with wParam==SCF_SELECTION only sets modify step flag when selection is nonempty.
EM_GETMODIFY returns -1, not 1, when modify flag is set.
Tests for the above behavior.
2008-04-29 14:56:23 +02:00
Alex Villacís Lasso 3a271386ec richedit: Remove indication for bCRLF, now that ME_GetTextW() knows how to honor CR and LF counters.
EM_GETTEXTRANGE and EM_GETSELTEXT are affected by this, so include tests to ensure no behavior was broken.
2008-04-29 14:54:59 +02:00
Alex Villacís Lasso d95cbeef67 richedit: EM_LINELENGTH: honor CR and LF counters.
Add fixup to ME_FindItemAtOffset(), fixes crash by null-pointer access.
Add tests for EM_LINELENGTH.
2008-04-29 14:54:29 +02:00
Alex Villacís Lasso 8d37388fe7 richedit: Fixups to move over to reliance on CR and LF counters.
Text streamout now honors CR and LF counters.
Tests to pin down required EM_STREAMOUT behavior.
2008-04-29 14:54:05 +02:00
Alex Villacís Lasso 4f95cf7072 riched20: Reject RTF that is recognized as invalid. 2008-04-24 22:12:13 +02:00
Alex Villacís Lasso 7148f92c4c riched20: Implement ignoring of last \par for EM_STREAMIN. 2008-04-24 22:11:58 +02:00
James Hawkins ead42d7f7f riched20: Fix a few tests that fail in XP and up. 2008-04-24 11:51:21 +02:00
Alex Villacís Lasso a9caca3eda riched20: Yet more tests for EM_STREAMIN. 2008-04-24 11:49:14 +02:00
Alex Villacís Lasso 2353e1d280 richedit: EM_STREAMIN tests for richedit 2.0. 2008-04-22 11:55:12 +02:00
Alex Villacís Lasso 46ff4a6f16 riched20: EM_SETTEXTEX supports RTF strings, with tests. 2008-04-21 20:27:17 +02:00
Alex Villacís Lasso dfcebfb22e riched20: Fix behavior of EM_REPLACESEL with painting disabled. 2008-04-21 20:26:54 +02:00
Austin English 313a85f163 Spelling fixes. 2008-04-17 12:25:57 +02:00
Francois Gouget 1552f22acf riched20: Fix the name of the lpUsedDefChar field of GETTEXTEX. 2008-02-06 12:43:53 +01:00
Alexandre Julliard f0c4fdbad9 riched20/tests: Avoid using size_t in traces. 2007-12-14 14:31:35 +01:00
Alexandre Julliard c0b12351e0 Avoid size_t types in traces. 2007-12-07 18:49:18 +01:00
Alex Villacís Lasso f945f16de2 riched20: WM_GETTEXTLENGTH should include CRLF conversions in returned count. 2007-12-07 17:36:01 +01:00
Alex Villacís Lasso 3b636b58ba riched20: EM_GETTEXTLENGTHEX must not count last paragraph break if GTL_USECRLF. 2007-12-07 17:36:01 +01:00
Alex Villacís Lasso 99f0dc4ff4 riched20: WM_GETTEXT should return 0 on overflow but fill buffer anyway. 2007-12-07 17:06:53 +01:00
Alex Villacís Lasso 4545f1944e riched20: EM_GETTEXTEX with GT_USECRLF should not leave a single CR when running out of space. 2007-12-07 17:06:45 +01:00
Alexandre Julliard ad9396302d Removed some unneeded imports. 2007-12-06 21:24:24 +01:00