Commit Graph

855 Commits

Author SHA1 Message Date
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 c0ee555e8f richedit: Avoid redundant calls to ME_CalcRunExtent.
ME_SplitRun is only called by wrapping code. In all but one call the
returned second half of the split run will be returned, get passed back
to ME_WrapHandleRun, then ME_CalcRunExtent will be called at the start of
ME_WrapHandleRun through ME_WrapSizeRun.
2010-07-30 11:36:02 +02:00
Dylan Smith 8b8e4f89b2 richedit: Use ME_Cursor as parameter to ME_SplitRunSimple.
The paragraph needed to be included in the parameters to avoid needing
traverse the linked list of display items to find the paragraph.
2010-07-30 11:36:02 +02:00
Dylan Smith 68b44f740c richedit: Remove checks for converting internal CHARFORMAT structs.
Prevents extra copying from having to be done for converting between
unicode/ascii or between the normal or extended version of the structure.
2010-07-30 11:36:02 +02:00
Dylan Smith ad056fe7d7 richedit: Check for bits instead of equality in EM_SETCHARFORMAT.
There are unsupported flags documented on MSDN which would cause problems
for the equality checks used in EM_SETCHARFORMAT.  Also, to handle a
combined set of flags they must be checked for in the right order.
2010-07-30 11:36:01 +02:00
Dylan Smith 16d7890426 richedit: Don't change text mode with undo or redo stack. 2010-07-30 11:36:01 +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
Dylan Smith 4c174fc845 richedit: Removed unused run flags values.
The only place MERF_SKIPPED was in debug code, and MERF_CALCBYWRAP was only
used to clear this unused flag value, so I got rid of both of them.
2010-07-29 10:28:29 +02:00
Dylan Smith 15251ad84b richedit: Removed redundant variable ptLastSplittableRun. 2010-07-29 10:28:06 +02:00
Dylan Smith dfa80b35b0 richedit: Invalidate without calling UpdateWindow in many cases. 2010-07-29 10:28:00 +02:00
Dylan Smith 1964e603fd richedit: Remove redundant commit and repaint in ME_StreamInText.
ME_StreamInText is only used in one function, ME_StreamIn, which always
calls ME_CommitUndo and ME_UpdateRepaint after calling this function.
2010-07-29 10:27:38 +02:00
Dylan Smith 328a3f1d8c richedit: EN_UPDATE notification is sent on WM_PAINT. 2010-07-29 10:27:30 +02:00
Alexandre Julliard b86d515ed6 dlls: Remove explicit imports of kernel32 and ntdll. 2010-07-21 17:38:36 +02:00
Dylan Smith be3073fce1 richedit: Fix streaming rtf with table at the start of the text.
The first paragraph was being handled just by ME_StreamOutParaProps,
but subsequent paragraphs would check if the paragraph was starting or
ending a table. So I moved the code to check for tables into
ME_StreamOutParaProps.
2010-07-19 14:38:16 +02:00
Dylan Smith e2f6b1d83d richedit: Don't break when streaming out a table, just continue.
This is a regression caused by commit
54b53b6018 which change the code to use
if statements instead of a switch, so the break statement should have
been changed to a continue statement.
2010-07-19 14:38:16 +02:00
Austin Lund 61e5fec020 riched20: Process messages which arrive before WM_NCCREATE. 2010-07-08 17:33:25 +02:00
Dylan Smith 6072a69d38 richedit: Keep default char format on WM_SETFONT in plain text mode. 2010-06-07 15:27:52 +02:00
Dylan Smith b88b007d95 richedit: Fix assignment to wrong variable (LLVM/Clang). 2010-05-25 12:02:28 +02:00
Dylan Smith 3f1d3e0ea1 richedit: Simplify redundant code in WM_IME_COMPOSITION. 2010-05-24 11:30:23 +02:00
Dylan Smith e809bc887d richedit: Commit undo items after modifications in WM_IME_COMPOSITION.
ME_InsertTextFromCursor could previously follow the ME_CommitUndo call
leaving uncommitted changes which would cause improper grouping of commits,
or an assertion failure.
2010-05-24 11:30:12 +02:00
Dylan Smith fb7d6b783e richedit: Missing HeapFree in WM_IME_COMPOSITION. (Smatch).
ME_InsertTextFromCursor copies the string passed into it rather than making
taking ownership of it.
2010-05-24 11:30:06 +02:00
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