Commit Graph

527 Commits

Author SHA1 Message Date
Alexandre Julliard a6d57b0add riched20: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 11:22:47 +02:00
Sergio Gómez Del Real 5868c664c1 riched20: Handle efficiently caret creation/destruction.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:35:34 +02:00
Sven Baars d917f0ef09 riched20: Fix IRichEditOle COM aggregation (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Zhiyi Zhang 62d80cff69 riched20: Fix a use after free.
In ME_DestroyEditor(), the item list is being freed when
calling get_total_width() in destroy_para().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46328
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-02 12:28:07 +01:00
Fabian Maurer 52c106418c riched32: Handle enter press in WM_CHAR instead of WM_KEYDOWN.
This fixes an old regression when VK_RETURN handling was implemented

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=23282
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:10:13 +01:00
Fabian Maurer 4d72bde62f riched20: Extract handling of VK_RETURN into a method.
This is basically a no-op to make the following fix simpler

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:09:52 +01:00
Alex Henrie 55a3dfe35e riched20: Turn several constants and variables into static constants.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:49:03 +01:00
Sergio Gómez Del Real a60965a156 riched20: Cache number of rows in editor.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real 195f84cfa1 riched20: Implement list of marked paragraphs.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real ad58875642 riched20: Add helper function to mark paragraphs for rewrapping.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Sergio Gómez Del Real 118908d0af riched20: Add destroy_para() helper.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:33 +01:00
Michael Stefaniuc 90aea35b9e riched20: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 11:12:08 +02:00
Jactry Zeng 0120e35a7d riched20: Initialize style_list before ME_MakeFirstParagraph().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-20 17:27:20 +02:00
Jactry Zeng 8d506cb216 riched20: Some cleanup for CHARFORMAT convertor functions.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:44 +02:00
Jactry Zeng 5c2522d713 riched20: Use ME_GetSelectionType() in ME_ShowContextMenu() for getting type of selection.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-19 12:51:21 +02:00
Jactry Zeng 915201a13f riched20: Implement EM_SELECTIONTYPE.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-19 12:51:21 +02:00
Jactry Zeng 0154b59c7e riched20: Save reobj in linked list.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 10:20:13 +02:00
Michael Stefaniuc c03b41c896 riched20: Get rid of the ALLOC_N_OBJ macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:08:42 +01:00
Michael Stefaniuc 965dc38175 riched20: Get rid of the ALLOC_OBJ macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:08:40 +01:00
Michael Stefaniuc 7153b5593e riched20: Get rid of the FREE_OBJ() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:08:38 +01:00
Rafał Harabień 585dfa1409 riched20: Protect against pasting multi-line text in single-line control.
Signed-off-by: Rafał Harabień <rafalh1992@o2.pl>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 20:20:13 +01:00
Rafał Harabień 55412553e8 riched20: Protect read-only Richedit against pasting and cutting data.
Signed-off-by: Rafał Harabień <rafalh1992@o2.pl>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-07 18:13:12 +01:00
Huw Davies adf53a9cdb riched20: Add support for pasting EMFs.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:21 +09:00
Huw Davies bbf34a4ab1 riched20: Use the implementation of EM_PASTESPECIAL for EM_CANPASTE.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:17 +09:00
Huw Davies 46fef3daa1 riched20: Use the implementation of EM_PASTESPECIAL for WM_PASTE.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:08 +09:00
Huw Davies 9bec53fbad riched20: Add support for EM_PASTESPECIAL.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:04 +09:00
Huw Davies 417c80d6fe riched20: Don't create a special richedit ole instance for the RTF parser.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:35:59 +09:00
Huw Davies 1bc48be4a7 riched20: Initialize ME_TextEditor members in ME_MakeEditor().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:35:52 +09:00
Huw Davies 5cc8c9fe83 riched20: Retrieve the default paragraph alignment from the text host.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:35:48 +09:00
Huw Davies 4cb7578d0b riched20: Move the editor initialization out of CreateTextHost().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:35:40 +09:00
Huw Davies aa57db38dd riched20: Fix the interaction between CFE_UNDERLINE and bUnderlineType.
The effect specifies whether underlining is turned on, while bUnderlineType
indicates the type of underlining.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-14 14:28:21 +02:00
Huw Davies 2019ec38db riched20: The new eop style when typing a list is a copy of the existing eop style.
Normally the new eop style is the insert style, however in a list the existing eop
style is used.  This prevents the list label style from changing when the new eop
is inserted.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-11 16:59:31 +02:00
Huw Davies 880b45ffb0 riched20: Implement parsing of the paragraph numbering destination.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:06 +02:00
Huw Davies 57446ceed3 riched20: Reset the numbering style info after a \pard .
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:02 +02:00
Huw Davies beffb6f671 riched20: Remove an unnecessary call to ME_SaveTempStyle().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-05 11:46:53 +02:00
Huw Davies e1f943863b riched20: Set the format of the final eop to be that of the last char.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-05 11:46:53 +02:00
Huw Davies 2dbcddc660 riched20: Set a temporary insert style for the new paragraph.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-05 11:43:43 +02:00
Huw Davies ac6a0d8923 riched20: Alter ME_SaveTempStyle() to accept the new style.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-05 11:43:40 +02:00
Huw Davies 58a48aa79b riched20: Allow selecting the final end-of-paragraph when using the right arrow key.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-04 14:54:38 +02:00
Huw Davies b3b5c25628 riched20: Embed PARAFORMAT2 in the paragraph struct rather than its ptr.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-29 22:40:18 +09:00
Huw Davies 8d8895bfac riched20: Don't clear the existing mask when reading a \ltrpar .
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-23 23:55:19 +09:00
Kenneth Haley fc1b2e0473 v4 resend: Riched20: allow setting background text color.
Signed-off-by: Kenneth Haley <haleykd@users.sf.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-16 22:37:05 +09:00
Huw Davies adb43b9192 riched20: Update the auto url detection after a StreamIn.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 20:18:01 +09:00
Piotr Caban 060d8c6abb riched20: Add support for ECO_NOHIDESEL flag.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-08 22:35:02 +09:00
Huw Davies 65feea4e5a riched20: Pass the correct range to the EN_LINK notification when the link is wrapped.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-04 17:32:13 +09:00
Huw Davies 3d1d65bc2c riched20: Add an option to constrain the run search to the current para.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-04 17:32:09 +09:00
Huw Davies 03fa4cfaff riched20: Add support for quoting urls with spaces within '<' '>'.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-01 22:15:46 +09:00
Huw Davies ea1e44e4f6 riched20: Fix URL auto-detection to handle 'neutral' characters.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-01 22:15:43 +09:00
Alex Henrie e60b276698 riched20: Don't call UpdateWindow after setting the background color.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-14 12:10:15 +09:00
Huw Davies ac5edd1b6b riched20: \pard resets the reading direction.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-11 20:22:31 +09:00