Commit Graph

470 Commits

Author SHA1 Message Date
Dylan Smith 2a139746cc richedit: Added missing DestroyWindow in a test. 2008-07-01 13:47:03 +02:00
Juan Lang c40c08b3d3 richedit: Only send update events in 1.0 emulation mode if the event mask specifies it.
Fixes a crash in native cryptui.dll when viewing certificate properties.
2008-07-01 13:45:37 +02:00
Dylan Smith 1bec9bb440 richedit: Calculate tab positions relative to end of selection bar. 2008-06-30 12:10:18 +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 fad2b57cd7 richedit: Ensure caret is seen if moved past end of view over trailing spaces. 2008-06-27 11:09:37 +02:00
Dylan Smith 438d8e1c58 richedit: Caret size must match font size characters to be inserted.
When the caret is at the start of a run, it uses the font of the
previous run for inserting characters.  The caret size previously was
the wrong height for the characters being inserted when the caret was at
the start of a line, but not the start of a paragraph so this patch
fixes this bug.
2008-06-27 11:09:14 +02:00
Dylan Smith ee6b6f338e richedit: Fixed mistake that didn't cause a bug.
The check to see if the dwOutputBuffer is full was performed incorrectly
in RTFPutUnicodeString, however, this mistake was actually harmless
since it would just cause an extra loop that does nothing, then the
check would work properly with the variable fit equal to 0.
2008-06-27 11:09:02 +02:00
Dylan Smith 632015dc62 richedit: Set error codes and stop parsing for some rtf syntax errors.
Checks were added for hexadecimal values that did not have valid
characters, and for EOF received before the final closing brace of the
rich text stream.  The error values were tested on richedit versions 1,
2, 3 & 4.1, and they were all the same for these cases.
2008-06-27 11:08:33 +02:00
Dylan Smith 461830a83d richedit: Removed redundant code for getting the insert style.
The function ME_GetInsertStyle already checks for the case where there
is a selection, so there is no need to duplicate this code for
ME_GetSelectionInsertStyle.
2008-06-27 11:08:19 +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 9b67a38f1a richedit: Make cursor visible when selecting via mouse above/below editor. 2008-06-26 21:18:28 +02:00
Dylan Smith cb1d7becf9 richedit: Fixed bug preventing bold from being set with EM_SETCHARFORMAT.
Previously bold needed to be set by setting CFM_WEIGHT in the
CHARFORMAT2 structure, and then setting the appropriate wWeight value.
This approach isn't even supported in version 3.0 of the richedit
control. Now bold can be set/unset properly for Windows or Wine using
CFE_BOLD in dwEffects and with CFM_BOLD set in the dwMask flag.
2008-06-26 21:18:20 +02:00
Dylan Smith 60757ca6d5 richedit: Corrected the conversion used for the initial font size.
The LOGFONT's lfHeight member is in logical units, and is being used to
set the yHeight member of CHARFORMAT2 which is supposed to be in twips.
2008-06-26 21:18:02 +02:00
Dylan Smith c96a273f91 richedit: Moved function declarations in header to reflect locations of definitions. 2008-06-26 21:17:48 +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
Dylan Smith 67024f0f34 richedit: Prevented an assertion error on startup when run on Windows.
The call to GetClientRect returns 0 values for the returned RECT when
called in WM_NCCREATE in on Windows, which ended up causing an assertion
error when Wine's riched20.dll replaces the native version. Moving the
call to WM_CREATE fixes this problem (probably because NCCALCSIZE is
called in between).
2008-06-26 21:15:54 +02:00
Dylan Smith 1840a5bcad richedit: Prevented NULL value from being used to avoid a page fault. 2008-06-26 21:15:33 +02:00
Dylan Smith 6c2026a348 richedit: Show caret after pasting or streaming in text.
There was a missing call to ShowCaret after the caret was created.
2008-06-26 21:15:11 +02:00
Dylan Smith eaf7becabd richedit: Null pointer check missing on optional parameter.
The function ME_FindRunInRow uses two parameters to return values by
reference, and treated these parameters as if they were optional except
for the start of the function which set *pbCaretAtEnd without checking
to see if was a NULL pointer.
2008-06-26 21:14:52 +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
Dylan Smith 6f9f01f28f richedit: bCaretAtEnd should not be reset from rewrapping text.
The bCaretAtEnd value in ME_TextEditor is used to identify that the
caret is at the end of a wrapped line instead of the start of the next
line in the paragraph since both these positions correspond to the
same position in the document. The bCaretAtEnd value was previously
being set back to FALSE whenever the window was resized.
2008-06-25 11:24:13 +02:00
Dylan Smith c8e2552ad9 richedit: Trailing spaces should not affect alignment shift length. 2008-06-25 11:23:45 +02:00
Dylan Smith 308582b4f5 richedit: Allow cursor to move over trailing spaces in wrapped lines. 2008-06-25 11:23:39 +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
Michael Stefaniuc bc0acd1ac2 riched20: Remove redundant NULL check before heap_free (Smatch). 2008-06-21 11:17:08 +02:00
Andrew Talbot 11f5909368 riched20: Constify some variables. 2008-06-20 12:22:51 +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
Dylan Smith 76029ee9ec richedit: The wrong bits were cleared from wBorders in PARAFORMAT2. 2008-05-05 21:18:19 +02:00
Dylan Smith 6f11b1b354 richedit: Removed useless code. 2008-05-05 21:18:13 +02:00
Alexandre Julliard 13ab99b404 richedit: Avoid strlen in traces. 2008-05-02 13:59:06 +02:00
Dylan Smith 10e676ab3e richedit: Updated editor.h to reflect the contents of source files. 2008-05-01 19:36:50 +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
Alexandre Julliard dad21bbcbf makefiles: List the static libraries as normal imports instead of extra libs. 2008-04-30 14:23:55 +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