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
Huw Davies
c17af77b5c
riched20: Add a helper to debug the run text.
2013-01-30 17:19:28 +01:00
Huw Davies
95938b7a10
riched20: Add a paragraph ptr to each run.
2013-01-30 17:19:22 +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
Thomas Faber
5e0050d001
riched20: Do not return incorrect values from ME_CharFromPoint[Cursor].
2011-10-24 20:27:30 +02:00
Andrew Talbot
faa05713ad
riched20: Declare some variables unsigned.
2011-08-01 11:16:56 +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
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
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
326f9b3f3f
richedit: Fixed regression in ME_SetCharFormat.
...
Missed an assignment for end_run when the end cursor is provided and the
end position doesn't cause a split.
2009-08-13 11:45:13 +02:00
Dylan Smith
2da0d8e933
richedit: Use ME_Cursor instead of offsets for ME_SetCharFormat.
...
The test that succeeded from this change was as a result of allowing the
end of the character format change be specified using NULL as the rest
of the text. Before, the end paragraph run at the end of the text was
not being set for this case, when all the text was supposed to have its
character format changed.
2009-08-12 17:35:50 +02:00