Commit Graph

278 Commits

Author SHA1 Message Date
Alex Villacís Lasso 4047df0f56 richedit: Flip the big switch and encode actual CR and LF into end-of-paragraph runs.
Document remaining uses of bEmulateVersion10 and other checks for CRLF in editor.c.
Make RTF reader emit a \r or a \r\n according to emulation, not a \n, which breaks streaming tests.
Remove todo_wine from a bunch of riched32 tests that now succeed.
2008-04-29 14:55:15 +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 e8aa9dee56 richedit: Modify ME_GetTextW() to honor CR and LF encodings.
ME_GetTextLengthEx should ignore GTL_USECRLF in 1.0 emulation mode.
2008-04-29 14:54:46 +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 3968a67eb9 richedit: EM_GETLINE: honor CR and LF counters.
Add richedit 1.0 tests for EM_GETLINE.
2008-04-29 14:54:21 +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
Eric Pouech 046cfcfd22 richedit: Ensure wrapping is done all the time after inserting an RTF stream. 2008-04-25 11:44:00 +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 d10256f309 riched20: Implement ignoring of last \par for EM_STREAMIN - 1.0 emulation. 2008-04-24 22:12:09 +02:00
Alex Villacís Lasso 7148f92c4c riched20: Implement ignoring of last \par for EM_STREAMIN. 2008-04-24 22:11:58 +02:00
Andrew Talbot 0ba8677430 riched20: Remove unused variables. 2008-04-24 11:49:53 +02:00
Alex Villacís Lasso e0af297466 richedit: Accept RTF stream that does not start with {\rtf1 in 1.0 emulation. 2008-04-22 11:56:04 +02:00
Alex Villacís Lasso 46ff4a6f16 riched20: EM_SETTEXTEX supports RTF strings, with tests. 2008-04-21 20:27:17 +02:00
Eric Pouech 296a59da7e richedit: Force window update when the word wrap option has changed. 2008-04-14 23:50:12 +02:00
Eric Pouech 91d57af637 richedit: For setting word wrapping, native only uses a null vs non null value. 2008-03-24 12:12:18 +01:00
Eric Pouech 8b6eea0a63 richedit: Fixed the initialization of the word wrap mode. 2008-03-24 12:12:07 +01:00
Eric Pouech 2870f21d06 richedit: Added missing fields to be reinitialized for the RTF \pard token. 2008-03-24 11:35:53 +01:00
Eric Pouech 4a01ddca25 richedit: Allow reading an enhanced metafile from an RTF stream. 2008-03-17 14:38:57 +01:00
Eric Pouech 984e4167af richedit: Don't force cursor change when it's not needed. 2008-03-17 14:38:36 +01:00
Eric Pouech 33d7cea120 richedit: Added support for EM_SETTARGETDEVICE with a NULL DC. 2008-03-17 14:37:43 +01:00
Eric Pouech 9c6c9d63a2 richedit: Use the FW_ constants instead of the raw values. 2008-03-17 14:36:57 +01:00
Eric Pouech 6e02f5db4b richedit: In RTF reader, set both bold and weight attributes, so that we don't care about priority between the two. 2008-03-17 14:36:41 +01:00
Eric Pouech 0c2c43d39b richedit: Correctly set the pitch and family for a font when reading an RTF stream. 2008-03-17 14:36:30 +01:00
Eric Pouech a64c22c8b1 richedit: Store shift-enter (keyboard) and \line (rtf) as end of row (and emit \line while saving in RTF). 2008-03-17 14:34:44 +01:00
Eric Pouech 68ccc4aec6 richedit: When handling \pard in RTF stream, really resets all paragraph styles. 2008-03-17 14:34:00 +01:00
Eric Pouech cb4a41b806 richedit: Fix reading paragraph left & first indentation attributes. 2008-03-17 14:20:16 +01:00
Eric Pouech f628a1c245 richedit: Added support for reading DI bitmaps in RTF streams. 2008-03-17 14:20:07 +01:00
Eric Pouech 9f5fa9ea45 richedit: Properly set the border width while parsing RTF stream. 2008-03-17 14:18:41 +01:00
Andrew Talbot 612e4c2b17 riched20: Assign to structs instead of using memcpy (with typo fixes). 2008-03-14 11:21:33 +01:00
Francois Gouget 1552f22acf riched20: Fix the name of the lpUsedDefChar field of GETTEXTEX. 2008-02-06 12:43:53 +01:00
Eric Pouech bcbf9eeb2d riched20: Start implementing object reading out RTF stream. 2008-02-05 11:13:17 +01:00
Eric Pouech e5f91bab15 riched20: Added support for image reading from RTF stream. 2008-02-05 11:13:00 +01:00
Eric Pouech 1e62b0e3b0 riched20: Support a couple of paragraphs attributes out of RTF stream reading. 2008-02-05 11:12:43 +01:00
Rob Shearman 4bff248783 riched20: Always treat the nCount variable in the EM_GETTEXTEX handler as a character count.
Convert ex->cb into a character count before assigning it to nCount.

Remove some dubious minus ones that would result in different character 
counts for the Unicode and ANSI paths.
2008-01-21 12:35:18 +01:00
Rob Shearman 374f6ec616 riched20: The wParam parameter to WM_GETTEXT contains the number of characters, not the number of bytes.
Fix up some places in the WM_GETTEXT handler where it was assumed that 
it was a byte count.
2008-01-21 12:35:05 +01:00
Andrew Talbot 5a5a9bcd5d riched20: Remove unneeded casts. 2008-01-17 13:42:14 +01:00
Alexander Nicolaysen Sørnes eec14a4de6 riched20: Include selection bar size in POSFROMCHAR. 2008-01-15 11:37:30 +01:00
Eric Pouech d65daea454 richedit: Uniformly handle the bPitchAndFamily field out of CHARFORMAT. 2008-01-07 12:14:24 +01:00
Eric Pouech f33a27517b richedit: Initialize all the cursors at editor creation. 2008-01-07 12:14:01 +01:00
Eric Pouech 39aa3beaf2 richedit: Simplify first para style handling by creating a context. 2008-01-02 13:58:09 +01:00
Eric Pouech d5478118a1 richedit: Don't force repaint while the redraw flag is off. 2008-01-02 13:57:53 +01:00
Eric Pouech 0549b9009a richedit: Simplified handling of background brush while painting. 2008-01-02 13:49:57 +01:00
Eric Pouech 6b591ef23a richedit: Extend the usage of underlinetype from charformat2 in richedit. 2008-01-02 13:48:11 +01:00
Eric Pouech 71f52d54bd richedit: Added support for some message (key, mouse) filtering events. 2008-01-02 13:45:08 +01:00
Maarten Lankhorst 8e639ec392 riched20: Fix bugs in EM_SETOPTIONS.
Add SELECTIONBAR to mask, and use settings rather then lParam. 2 subtle
bugs that prevent selectionbar from working.
2007-12-18 12:32:55 +01:00
Maarten Lankhorst b81335501f riched20: Implement ECO/EM SELECTIONBAR. 2007-12-17 11:34:40 +01:00
Alex Villacís Lasso ae7b2c914b riched32: Fix regression in WM_GETTEXTLENGTH on richedit 1.0 emulation. 2007-12-12 13:48:19 +01:00
Michael Stefaniuc 4210cafc04 riched20: Rename the wrappers around HeapAlloc() &Co to use the new standard naming. 2007-12-08 19:54:58 +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 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
Alex Villacís Lasso 5d8b8cd899 riched20: EM_GETMODIFY should not report modification after WM_SETTEXT (fixes todo_wine). 2007-11-06 13:01:09 +01:00
Alex Villacís Lasso 469669e629 riched20: 2.0 and higher inserts CRCRLF as space (with tests). 2007-10-22 13:50:13 +02:00
Alex Villacís Lasso f54aa40746 riched20: Single-line control must refuse to insert carriage returns (with tests). 2007-10-19 12:26:25 +02:00
Alex Villacís Lasso 63b12f8602 riched20: Minimal fix for WM_SETTEXT without ES_MULTILINE style. 2007-09-28 10:59:59 +02:00
Alex Villacís Lasso 03f3a40a03 riched20: EM_SETCHARFORMAT must fail and return 0 with TM_PLAINTEXT and SF_SELECTION. 2007-09-27 11:58:52 +02:00
Alex Villacís Lasso be5105e894 riched20: EM_SETCHARFORMAT must return 0, not assert, on invalid struct size. 2007-09-27 11:07:54 +02:00
Alex Villacís Lasso fa5230fb54 riched20: EM_SETCHARFORMAT must return 1 on success, not 0. 2007-09-26 14:40:54 +02:00
Alex Villacís Lasso 00e562735d riched20: Fix WM_GETTEXT to change \r to \r\n. 2007-09-24 13:44:28 +02:00
Clinton Stimpson f34cb461e7 riched20: Only WM_CHAR respects text limit. 2007-09-21 12:05:39 +02:00
Lei Zhang 9210defdf7 riched20: Do not pass NULL lParam to ME_ToUnicode for EM_REPLACESEL. 2007-09-11 11:47:54 +02:00
Lei Zhang 0d4707c284 riched20: Properly calculate control display height. 2007-08-16 11:35:06 +02:00
Andrew Talbot 2e2efd448a riched20: Constify some variables. 2007-08-13 12:24:28 +02:00
Aric Stewart c03125a1be riched20: Make richedit control IME aware. 2007-06-28 12:16:12 +02:00
Francois Gouget 96c337f0a1 Assorted spelling fixes. 2007-06-07 19:24:32 +02:00
Huw Davies 94dfc0e80e riched20: Don't mess with the caret if we don't have focus. 2007-06-06 12:09:53 +02:00
Dmitry Timoshkov 3c9e7a7f33 wine: Switch to using 'long' for INT_PTR type for 64-bit compatibility. 2007-05-25 20:37:56 +02:00
Andrew Talbot 5588233957 riched20: Exclude unused headers. 2007-05-18 14:11:33 +02:00
Dmitry Timoshkov 9bde411087 riched20: Add the tests for EM_SETTEXTEX/EM_GETTEXTEX in addition to WM_SETTEXT/WM_GETTEXT, make them pass under Wine. 2007-05-02 14:58:58 +02:00
Dmitry Timoshkov 592b53d0a4 riched20: Split unicode and ansi window procs, handle messages depending on the unicode flag.
Add a hack for WM_GETTEXT in RichEdit20W class when running in win9x emulation mode.
2007-03-22 15:47:25 +01:00
Dmitry Timoshkov 11e01b17de riched20: Add a test that shows that under Win9x RichEdit20W windows are not unicode, but always expect to see unicode input. 2007-03-21 15:55:30 +01:00
Jason Green 2aa8463a94 riched20: If outside of the richedit window, return earlier.
Prevents a crash when selecting text outside of a richedit control box.
2007-02-15 11:21:45 +01:00
Matt Finnicum 7eabbec632 riched20: Create undos in StreamIn at the right times. Adds tests for when StreamIn should be undoable. 2007-01-25 11:06:36 +01:00
Matt Finnicum f12e6232a2 riched20: Use CharFromPos instead of FindPixelPos in LinkNotify so it accounts for scrolling. 2007-01-24 12:14:11 +01:00
Matt Finnicum dbcf2e391c riched20: Implement EM_LIMITTEXT and some simple tests. 2007-01-24 12:14:02 +01:00
Clinton Stimpson a065d0f68d riched20: Fix crash undoing a paste. 2007-01-12 11:25:42 +01:00
Clinton Stimpson bf86302e19 riched20: Fix modification state for several operations. 2007-01-11 12:04:46 +01:00
Lei Zhang 581321d420 riched20: Move EM_EXSETSEL fix into ME_SetSelection. 2006-12-05 11:37:46 +01:00
Lei Zhang c05bcabe9f riched20: Fixes and additional conformance tests for EM_EXSETSEL. 2006-12-04 12:23:32 +01:00
Matt Finnicum e864f2f2c3 riched20: Make EM_SETPARAFORMAT use ME_RewrapRepaint instead of ME_UpdateRepaint. 2006-11-28 12:14:43 +01:00
Matt Finnicum d7aa81bdfb riched20: Make EM_SETCHARFORMAT call ME_RewrapRepaint instead of ME_UpdateRepaint. 2006-11-28 12:14:36 +01:00
Matt Finnicum 26ba1559b0 riched20: Make WM_SETFONT call RewrapRepaint instead of UpdateRepaint. 2006-11-28 12:14:28 +01:00
Matt Finnicum 3e27436003 riched20: EM_EXLIMITTEXT: ignore wParam and properly cast lParam. 2006-11-28 12:14:21 +01:00
Matt Finnicum 807546ee59 riched20: Make ME_StreamIn create undos properly. 2006-11-28 12:14:11 +01:00
Clinton Stimpson 4b292b0cb5 riched20: Fix key handling in dialogs. 2006-11-15 12:24:54 +01:00
Mike McCormack bb1f8edcc2 riched20: Fix a memory leak. 2006-11-10 11:35:59 +01:00
Mike McCormack 0f6c58c113 riched20: Set the correct number of initialized cursors. 2006-11-10 11:35:53 +01:00
Mike McCormack 32f044c4cf riched20: Fix an uninitialized variable. 2006-11-10 11:35:48 +01:00
Mike McCormack d89c46748f riched20: Don't access memory after freeing it. 2006-11-06 12:23:42 +01:00
Mike McCormack 01e8eaefdc riched20: Fixed memory leaks. 2006-11-06 12:23:33 +01:00
Mike McCormack b5c031b160 riched20: Initialize and free the RTF lookup table in DllMain to avoid memory leaks. 2006-11-02 12:24:55 +01:00
Mike McCormack 8939587b19 riched20: Create macro functions for allocating and freeing memory. 2006-10-24 11:44:53 +02:00
Hans Leidekker 177350d087 riched20: Win64 printf format warning fixes. 2006-10-14 20:16:56 +02:00
Mike McCormack 9eda99c0bb riched20: Don't crash if a colour isn't found. 2006-10-09 20:38:11 +02:00
Matt Finnicum abecd9e393 riched20: Rewrite of scrolling and some redrawing code.
Replaces duplicated scrolling code with re-usable functions.
Removes excessive boundary checking on scroll code, since that's done
in the scrollbar control anyways.
Properly separates repaint calls based on what has changed.
Send EN_UPDATE and EN_CHANGE at the right places.
Only call EnsureVisible on changes, not all repaints.
2006-09-11 11:29:42 +02:00
Hippocrates Sendoukas 0ad5638bf1 riched20: WM_CONTEXTMENU fix for custom context menus. 2006-09-07 16:06:56 +02:00
Brian Chang 1f2eb859ac riched20: EM_EXSETSEL fixes and conformance tests. 2006-08-28 17:48:23 +02:00
Matt Finnicum 0d15a6ae15 riched20: Remove two testing fixme's that were accidentally committed. 2006-08-28 11:36:49 +02:00
Clinton Stimpson bbd05a4644 riched20: Add tests for EM_GETMODIFY. 2006-08-23 20:10:50 +02:00
Matthew Finnicum 9b47add3bf riched20: Make EM_EXLINEFROMCHAR handle special case of lParam == -1. 2006-08-22 11:57:40 +02:00