Commit Graph

569 Commits

Author SHA1 Message Date
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
Huw Davies 372a16af63 riched20: Don't apply paragraph formatting until the end of paragraph.
Specifically this means that if the final paragraph does not end in
a trailing \par, then new formatting is not applied to that paragraph.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:13 +09:00
Nikolay Sivov 0db7cb6002 riched20: Preserve higher bits of tabstop values (Coverity).
Bits 24-31 are reserved for tab alignment and tab leader style,
writer supports thatl.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-30 08:07:05 +01:00
Nikolay Sivov c5b68d1db2 riched20: Initialize wEffects field before setting bits in it (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-30 08:06:56 +01:00
Nikolay Sivov 91ed2a81c1 riched20: Fix a memory leak on error path (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-11 19:39:16 +09:00
Huw Davies b241276f50 riched20: Maintain a list of styles and reuse them if possible.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-10 11:50:08 +09:00
Jactry Zeng 6401ab45c0 riched20: Implement alignment styles support.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-06 21:59:07 +09:00
Huw Davies 2d23a95c96 riched20: Add support for the \shppict destination.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-28 22:31:27 +09:00
Huw Davies cfc8914200 riched20: Rewrite the picture destination parser to handle embedded groups.
Since almost every line of ME_RTFReadPictGroup() changed, I took the
opportunity to re-format it.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-28 22:31:27 +09:00
Nikolay Sivov 20f4a9ff7b riched20: Handle invalid HFONT values passed to WM_SETFONT.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2015-10-05 22:27:12 +09:00
Jactry Zeng d62dd46516 riched20: Implement EM_SETFONTSIZE. 2015-08-27 21:43:46 +09:00
Alex Henrie af19e64017 riched20: Fix link notification conditions and add tests. 2015-06-18 17:11:05 +09:00
Huw Davies 17f273360a riched20: Append a final \par when writing the whole buffer. 2015-06-09 14:47:30 +09:00
Nikolay Sivov 0b94369bb7 riched20: Reduce code duplication in WM_SETTEXT/WM_CREATE handler. 2015-06-02 20:53:44 +09:00
Nikolay Sivov 251e168590 riched20: Implement SetText() for selection range. 2015-05-27 14:31:40 +09:00
Nikolay Sivov 81fc69d7e6 riched20: Added IDispatch support. 2015-05-25 21:43:17 +09:00
Alexandre Julliard 50009c4a95 riched20: Update rectangle on WM_WINDOWPOSCHANGED instead of WM_SIZE.
Some applications don't forward WM_SIZE to the window proc.
2015-04-28 19:57:37 +09:00
Christoph von Wittich ca2b70b285 riched20: Handle SCF_WORD. 2015-04-01 22:34:20 +09:00
Christoph von Wittich c0c36fba70 riched20: EM_SETSEL should not return 0. 2015-03-31 14:46:06 +09:00
Francois Gouget cd0200113c riched20: Remove unneeded NONAMELESSXXX directives. 2015-03-19 14:05:48 +09:00
Michael Stefaniuc f40b4291d4 riched20: Remove no-op addition with 0 (PVS-Studio). 2015-02-25 21:27:42 +09:00
Michael Stefaniuc 54d3816eb8 riched20: IDC_IBEAM is already an int resource (PVS-Studio). 2015-02-18 16:09:00 +09:00
Guillaume Charifi 27ac8d265e riched20: Do not destroy IRichEditOle if still referenced. 2014-11-17 17:27:43 +09:00
Michael Stefaniuc 7f295effbd riched20: SUCCEEDED() is already a BOOL (PVS-Studio). 2014-10-31 10:49:34 +09:00
Jactry Zeng a9491ec5d9 riched20: Add IID_IRichEditOle and IID_ITextDocument support for ITextServices::QueryInterface. 2014-10-30 12:02:52 +09:00
Jactry Zeng 234310e752 riched20: Add COM aggregation support for IRichEditOle. 2014-10-30 12:02:17 +09:00
Jactry Zeng ffb706ceb0 riched20: Fix a leak. 2014-10-30 12:00:57 +09:00
Jactry Zeng 1f6073c861 riched20: Implement ITextSelection::GetText. 2014-07-21 18:45:38 +02:00
Jactry Zeng 455eca6d22 riched20: Return nonzero value instead of zero when EM_SETREADONLY succeeds. 2014-07-04 19:30:25 +02:00
Jactry Zeng 10e6a665fd riched20: Initialize ed->reOle in ME_MakeEditor(). 2014-07-03 18:17:59 +02:00
Jactry Zeng 6ea4da4038 riched20: Don't create too many IRichEditOle interface for a RichEdit. 2014-07-01 12:53:47 +02:00
Alex Henrie 6b947701a7 riched20: Consider adjacent runs when computing EN_LINK range. 2014-06-17 10:36:53 +02:00
Huw Davies b89c7c8fc2 riched20: Don't skip the final carriage return in SFF_SELECTION mode. 2014-06-11 13:06:23 +02:00
Nikolay Sivov 601738dfb5 riched20: GetClientSite() is implemented for IRichEditOle so uncomment related code (Coverity). 2014-04-15 21:03:54 +02:00
Huw Davies fa50baf31f riched20: Keep track of fractions of WHEEL_DELTA when scrolling. 2014-03-31 15:29:02 +02:00
Huw Davies 2f07df59f9 riched20: Add a helper to return the default line height and use that in EM_LINESCROLL. 2014-03-31 15:29:00 +02:00
Hans Leidekker db094db851 riched20: Don't return DLGC_HASSETSEL from WM_GETDLGCODE if the control style includes ES_SAVESEL. 2014-03-28 17:57:19 +01:00
Frédéric Delanoy 5f88ba5b61 riched20: Use BOOL type where appropriate. 2014-03-19 11:33:22 +01:00
Jactry Zeng 88214a5874 riched20: Add UTF8 support for EM_SETTEXTEX. 2014-01-27 16:59:15 +01:00
Jactry Zeng eb8f47518e riched20: Use codepage in ME_ToUnicode. 2014-01-27 16:59:08 +01:00
Jactry Zeng 51936be04d riched20: Use CP_UNICODE instead of 1200. 2014-01-06 20:52:40 +01:00
Huw Davies 160f65f24a riched20: Move the various selection setting methods to a common function. 2013-12-06 13:14:58 +01:00
Frédéric Delanoy e81412a4db riched20: Use BOOL type where appropriate. 2013-11-20 11:26:07 +01:00
Piotr Caban d31048f0ae riched20: Fix loop condition while processing control content in WM_CREATE. 2013-10-08 15:39:01 +02:00
Frédéric Delanoy f03d251ef2 riched20: Use BOOL type where appropriate. 2013-10-08 09:09:22 +02:00
Piotr Caban e660bf676c riched20: Set control content in WM_CREATE message. 2013-10-07 19:52:44 +02:00
Andrew Eikum 360afb93b5 riched20: Continue interpreting data as UTF-8 after the first chunk boundary. 2013-10-02 11:01:33 +02:00
Jactry Zeng 1cbdb2aff7 riched20: Add a length return parameter to ME_ToUnicode. 2013-09-10 12:27:37 +02:00
Alexandre Julliard 85f8828560 riched20: Don't bother to unregister classes at process exit. 2013-05-14 11:33:19 +02:00
Huw Davies 5ddfc36cc0 riched20: Add a visual vs logical order flag to the character to position mapping routines. 2013-04-17 14:26:09 +02:00
Huw Davies c409fc13fd riched20: Set the bidi base embedding level. 2013-03-25 14:09:38 +01:00
Andrew Eikum 3f02c24163 riched20: EM_FINDTEXT implementation should match richedit character type. 2013-03-25 14:07:19 +01:00
Huw Davies 7a59014fa2 riched20: Send WM_CHAR notifications. 2013-02-28 21:02:06 +01:00
Huw Davies 86f077b163 riched20: Add an explicit run length member and use it rather than accessing the string length. 2013-01-31 16:32:12 +01:00
Huw Davies 27578f8bb6 riched20: Add a helper to retrieve the run text. 2013-01-30 17:19:31 +01:00
Huw Davies dee40e90ce riched20: Move undo handling to a different set of structs as the display item structs are not a good fit. 2013-01-29 17:50:17 +01:00
Marcus Meissner 3a2de10a9c riched20: Fixed pointer to value out of scope (Coverity). 2012-08-20 10:57:08 +02:00
Qian Hong cb8c500ee6 riched20: Added support for UTF8 BOM stream. 2012-08-17 13:58:11 +02:00
Nikolay Sivov e3f0d40840 riched20: Use proper interface methods macros. 2012-08-13 11:48:23 +02:00