Commit Graph

833 Commits

Author SHA1 Message Date
Dylan Smith dcbc22b985 richedit: Send EN_SELCHANGE after wrapping but before EN_CHANGE.
The call to ME_SendSelChange cannot be done in ME_CommitUndo like it was
before, because it must be done after wrapping.  Native richedit controls
send EN_CHANGE first, which is sent in ME_UpdateRepaint, so
ME_SendSelChange must be before this notification in ME_UpdateRepaint.
2010-05-19 11:17:55 +02:00
Dylan Smith d312d4e33c richedit: Revert commit that caused a regression. (Bug 22758).
Revert commit 049cf5aca0
richedit: Avoid notifying parent window in improper state.

The commit was meant to fix a problem caused by ME_SendSelChange being
called in ME_SendSelChange, but moving the calls to ME_CommitUndo caused
a regression. So this patch reverts the previous commit, and my
following patch will instead fix the bug by moving the call to
ME_SendSelChange out of ME_CommitUndo.
2010-05-19 11:17:55 +02:00
Michael Stefaniuc cf13e8a390 riched20: Avoid using long. 2010-05-17 12:42:33 +02:00
Gerald Pfeifer f772c799ae riched20: Remove variables yprev and ys which are not really used from ME_ArrowPageUp. 2010-05-17 12:42:31 +02:00
Dylan Smith 049cf5aca0 richedit: Avoid notifying parent window in improper state.
ME_CommitUndo and ME_CommitCoalescingUndo call ME_SendSelChange, which
may notify the parent window that the selection has changed, therefore
should generally be called after wrapping the text. Otherwise, the parent
window may send a message to the editor and cause an assertion failure.
2010-05-17 12:42:31 +02:00
Gerald Pfeifer 6dd4b071cc riched20: Remove variable pCell which is not really used from ME_StreamIn. 2010-05-10 10:11:34 +02:00
Gerald Pfeifer 2d462ad088 riched20: Remove variable ys which is not really used from ME_ArrowPageDown. 2010-05-10 10:11:29 +02:00
Gerald Pfeifer f29514fbec riched20: Remove variable di which is not really used from ME_InsertEndRowFromCursor. 2010-05-03 15:42:18 +02:00
Gerald Pfeifer 14ef0fed9c riched20: Remove variable changed which is not really used from ME_PrepareParagraphForWrapping. 2010-05-03 15:40:04 +02:00
Gerald Pfeifer 01777ac5ce riched20: Remove variable yprev which is not really used from ME_ArrowPageDown. 2010-05-03 15:37:31 +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 7ed13120ab richedit: Make zooming affect all pictures. 2010-03-01 11:32:33 +01:00
Dylan Smith 1f2575ba7c richedit: Documented paragraph border widths are in points not pixels.
The border widths documented by msdn are in points which are 72 dpi, which
is not equivalent to pixels (normally 96 dpi). I pre-converted all the
border widths to 96 dpi resolution since this avoids needed to store
fractions, and often avoids the need for convertion to the displays
resolution.
2010-03-01 11:32:18 +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
Dylan Smith 9106860c85 richedit: Prevent crash on word selection at end of paragraph. 2010-02-18 12:18:17 +01:00
Dylan Smith 535afbd3aa richedit: Move function ME_GetParaLineSpace to make it static. 2010-02-10 11:32:31 +01:00
Dylan Smith e9693d6272 richedit: Removed unused local variable yStart. 2010-02-05 10:06:30 +01:00
Michael Stefaniuc fc3e2ba954 riched20: Don't print the function name twice in ERR/WARN.
The ERR/WARN macros already print the function name.
2010-02-04 13:39:28 +01:00
Dylan Smith 0539d5e497 richedit: Initialize fields for windowless richedit controls.
Caught by valgrind.
2010-01-25 13:01:17 +01:00
Dylan Smith 530a6c4598 richedit: Prevent uninitialized value from being used.
NULL may be returned by ITextHost::TxGetDC. Caught by valgrind.
2010-01-25 13:01:05 +01:00
Michael Stefaniuc d3bc43b5ed Grammar fixes "is doesn't" => "doesn't". 2010-01-11 11:33:59 -06:00
Michael Stefaniuc 3b45ababfb riched20: Remove some explicit LPARAM/WPARAM casts. 2009-12-28 12:27:13 +01:00
Huw Davies 8808fccd57 riched20: Initialise window size.
Found by Valgrind.
2009-12-16 12:42:40 +01:00
Huw Davies d4383b4498 riched20: Initialise the style flags.
Found by Valgrind.
2009-12-15 16:09:12 +01:00
Huw Davies d88c47fccb riched20: Fix a memory leak.
Found by Valgrind.
2009-12-14 12:04:05 +01:00
Marcus Meissner c848e4ee86 riched20: Check for NULL in rtf reader (Coverity). 2009-12-03 10:21:44 +01:00
Nikolay Sivov c6ff530ad6 riched20/tests: Don't leak string in test. 2009-11-30 12:56:58 +01:00
Eric Pouech 38df8cfb04 richedit: When inserting an OLE object from an RTF stream, don't force update as the stream is not fully read. 2009-11-09 20:02:03 +01:00
Eric Pouech ab9c51dd6a richedit: Only increment objects' reference by one when inserting an OLE object. 2009-11-09 20:01:56 +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
Sergey Khodych 851c33ddd9 riched20: Enable the dialog mode after receiving WM_GETDLGCODE message. 2009-10-13 12:38:44 +02:00
Sergey Khodych 205df00c64 riched20: Cache ES_WANTRETURN style. 2009-10-13 12:38:40 +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 0342ab0df1 richedit: Use ITextHost interface in ME_LinkNotify.
Using the ITextHost interface allows this notification to be received
for windowless richedit controls.  Windowed richedit conrols have an
ITextHost implementation that will fill in hwndFrom and idFrom, but
these should probably be initialized to 0 for windowless richedit
controls.
2009-09-28 12:54:16 +02:00
Dylan Smith 99b37b2376 richedit: Silence fixme for WM_STYLECHANGING & WM_STYLECHANGED. 2009-09-24 15:15:09 +02:00
Dmitry Timoshkov 8d524700d3 riched20: Make vtables const. 2009-09-08 13:06:49 +02:00
Alexandre Julliard c1a1f0cfb4 riched20: Make sure we have a valid ITextHost vtable for all platforms. 2009-08-26 21:23:52 +02:00
Francois Gouget 6e80d875d4 riched20: Make ME_SetCursorToEnd() static. 2009-08-26 13:09:27 +02:00
Dylan Smith a8e58307f9 richedit: Fixed check for nOffset at the end of the cursor's run.
For some reason the code previously mixed up a selection cursor with the
result cursor.  The problem seemed to have corrected itself before as a
result of conversion between offsets and cursors, but my recent changes
made this bug more severe.
2009-08-17 13:57:50 +02:00
Dylan Smith 989bdd1579 richedit: Use ME_MoveCursorChars in ME_FindText to find relative offset.
When a previous character needed to be found, it is simpler to move
existing cursor rather than retravese the linked list to find the offset
again.
2009-08-13 15:35:37 +02:00
Dylan Smith 54b53b6018 richedit: Use ME_Cursor instead of offsets for stream out functions. 2009-08-13 15:35:28 +02:00
Dylan Smith bd4704280d richedit: Replace offsets arg with ME_Cursor for ME_InternalDeleteText.
Offsets are still used within the function, but this patch reduces the
use of it at the entry to the function.
2009-08-13 15:35:17 +02:00
Dylan Smith 8f0dfaba30 richedit: Removed ME_InsertRun since it uses character offsets.
The function was used in one place, and was simply a wrapper around a
call to ME_InsertRunAtCursor, so I removed it to avoids it use in other
parts of the code.
2009-08-13 15:35:07 +02:00
Dylan Smith 02228ee176 richedit: Use ME_Cursor instead of offsets for ME_CharFromPos. 2009-08-13 15:35:01 +02:00
Dylan Smith a69ef26599 richedit: Use ME_Cursor instead of offsets for copying text. 2009-08-13 15:34:54 +02:00