Commit Graph

122 Commits

Author SHA1 Message Date
Huw Davies 132a35b822 riched20: Don't release the dc when destroying the context.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:53:35 +01:00
Huw Davies 06fb9c7f4c riched20: Handle EM_SETPASSWORDCHAR in the host.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Michael Stefaniuc 60b2167901 riched20: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-19 21:23:22 +01:00
Huw Davies 47228b7db4 riched20: Pass a para or run ptr to the char ofs propagation function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 10:45:45 +01:00
Huw Davies 00fa9a9546 riched20: Use paragraph and run ptrs in the cursor structure.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 12:02:01 +01:00
Huw Davies 12dd2d5d78 riched20: Add next / prev run from cursor helpers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 12:01:59 +01:00
Huw Davies 75433bc39b riched20: Pass a cursor ptr to the insert style retrieval function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:08:04 +02:00
Huw Davies 120ee0de1b riched20: Simplify the char offset from run offset function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:33 +02:00
Huw Davies 57c2580a73 riched20: Simplify the cursor from char offset function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:30 +02:00
Huw Davies 1994d21ddb riched20: Use run ptrs in GetCharFormat().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:28 +02:00
Huw Davies 579618c0d7 riched20: Return a run ptr from the run insert function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:32:03 +02:00
Huw Davies 1797d2124a riched20: Use run ptrs in SetCharFormat().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:31:59 +02:00
Huw Davies 0b01b40a7c riched20: Return a run ptr from the run splitting function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:31:49 +02:00
Huw Davies a37147c083 riched20: Return a run ptr from the run creation function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:37 +02:00
Huw Davies 3cade70f14 riched20: Pass a run ptr to the run joining function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:35 +02:00
Huw Davies 02cf14cf43 riched20: Pass a ME_Paragraph ptr to the marking functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Huw Davies 94e34fa8ee riched20: Store a ME_Paragraph ptr in the wrap context.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 19:45:35 +02:00
Huw Davies 7291506667 riched20: Move several of the wrapping functions to use ME_Run directly.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 19:45:35 +02:00
Huw Davies 6f1cc1f3b5 riched20: Allow the style to remain selected in the context.
This avoids swapping out the font if the next run uses the same style.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:12:05 +02:00
Alexandre Julliard a6d57b0add riched20: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 11:22:47 +02: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 14984a169a riched20: ME_CheckCharOffsets() calls should only be done when tracing.
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
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
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 123b0c699a riched20: Update the paragraph numbering style if the end-of-paragraph style changes.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:15 +02:00
Huw Davies 4c322698da riched20: Set the end-of-paragraph run width to that of a space.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-04 14:51:52 +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
Jactry Zeng 684965b866 riched20: Print boundary for ME_CheckCharOffsets only when richedit_check channel was opened.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-08 00:47:13 +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
Huw Davies f47aab6167 riched20: Release the font cache when changing the default style.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-10 11:50:05 +09:00
Huw Davies 7a3c9889e3 riched20: Free the script cache when updating the default style. 2015-07-01 22:56:40 +09:00
Huw Davies 7a0a4ce7ab riched20: Add uniscribe support. 2014-01-15 15:20:52 +01:00
Huw Davies 86ea91f424 riched20: Correctly handle the cursor at the end of a run case. 2014-01-07 15:21:27 +01:00
Huw Davies 2429e8b10b riched20: Don't split a run if the cursor is at the end of it. 2014-01-07 15:21:23 +01:00
Huw Davies 7e7a8f1a4e riched20: Simplify the code by accessing paragraphs directly from runs. 2014-01-07 15:21:13 +01:00
Frédéric Delanoy e81412a4db riched20: Use BOOL type where appropriate. 2013-11-20 11:26:07 +01:00
Huw Davies eb773e0dea riched20: Use PointFromCharContext now that we can specify logical ordering. 2013-04-17 14:26:14 +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 acaad0a842 riched20: Add the ability to CharFromPoint to either pick the closest leading edge or the leading edge of the selected character. 2013-02-18 16:34:10 +01:00
Huw Davies 42b0c6ea33 riched20: Make it possible to perform point -> char conversion while holding a context. 2013-02-14 17:35:03 +01:00
Huw Davies c07212b3d0 riched20: Move run extent calculation to wrap.c. 2013-02-12 19:56:41 +01:00
Huw Davies 9e8a9f4f65 riched20: Move the split point calculation to wrap.c. 2013-02-08 19:31:09 +01:00
Huw Davies 68d72f4792 riched20: Move SplitRun to wrap.c and make it static. 2013-02-07 15:51:11 +01:00
Huw Davies 5168d66be7 riched20: Move the text to the paragraph level. 2013-02-05 20:15:37 +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 f24ba125f6 riched20: Use the get_text helper in a few more places. 2013-01-31 16:32:07 +01:00
Huw Davies 76cfe7dc50 riched20: Rewrite the run whitespace test to take a run parameter. 2013-01-31 16:32:01 +01:00
Huw Davies 29e54f07f7 riched20: Rewrite the run splittable test to take a run parameter. 2013-01-31 16:31:52 +01:00
Huw Davies 27578f8bb6 riched20: Add a helper to retrieve the run text. 2013-01-30 17:19:31 +01:00