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
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
4366c81f49
riched20: Use paragraph ptrs in FindPixelPos().
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:33 +02:00
Huw Davies
468609ae7b
riched20: Use paragraph and run ptrs in InsertTextFromCursor().
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:29 +02:00
Huw Davies
88cfc04be0
riched20: Use ME_Paragraph ptrs for the update range.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:28 +02:00
Huw Davies
1bda5913fc
riched20: Use ME_Paragraph ptrs in a few of the table 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
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
7ef2c6c8d5
riched20: Pass a ME_Paragraph ptr to itemize_para().
...
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
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
Jacek Caban
650aebadb7
riched20: Use __ASM_USE_THISCALL_WRAPPER macro.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:51:05 +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
Huw Davies
5419a9804a
riched20: Clearly separate the selection setting functions.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 14:11:38 +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
Alexandre Julliard
0a79eb3608
include: Use the __thiscall attribute directly for the Mingw build.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 19:00:10 +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
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
3c0b519bba
riched20: Add get_total_width() to get widest paragraph number.
...
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
Jactry Zeng
e20142aea6
riched20: Add stub for ITextDocument2Old interface.
...
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-09-28 11:05: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
7409454345
riched20: Implement IRichEditOle::GetObject.
...
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:36 +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
Michael Stefaniuc
f9016830a6
riched20: Use the global HeapAlloc() wrappers.
...
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:36 +01:00
Huw Davies
3cc1ef6bca
riched20: Remove an unused parameter.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-14 17:32:49 +02: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
db783986dc
riched20: Add support for arabic number labelled lists.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-10 21:11:03 +02:00
Huw Davies
8a428d52a7
riched20: Add support for displaying bulleted lists.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:13 +02:00
Huw Davies
1abe4cc738
riched20: Add the ability to create ME_Strings from constants.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-07 13:12:09 +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
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
Adam Buchbinder
20323e3f11
riched20: Implement ITextRange::ScrollIntoView.
...
This only implements bStart = tomStart, but that seems like the most
common use case.
Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 19:31:35 +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
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
Christoph von Wittich
ca2b70b285
riched20: Handle SCF_WORD.
2015-04-01 22:34:20 +09:00
Francois Gouget
c9c2692d8e
riched20: Move DestroyIRichEditOle() into IRichEditOle:Release().
2015-01-05 20:19:33 +01: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
eb8f47518e
riched20: Use codepage in ME_ToUnicode.
2014-01-27 16:59:08 +01:00
Francois Gouget
25e0f11ced
riched20: Make ME_GetDITypeName() static.
2014-01-13 17:37:27 +01:00
Jactry Zeng
51936be04d
riched20: Use CP_UNICODE instead of 1200.
2014-01-06 20:52:40 +01:00
Frédéric Delanoy
e81412a4db
riched20: Use BOOL type where appropriate.
2013-11-20 11:26:07 +01:00
Jactry Zeng
1cbdb2aff7
riched20: Add a length return parameter to ME_ToUnicode.
2013-09-10 12:27:37 +02: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
Francois Gouget
8e304065c1
riched20: ME_StrDup() is not used anymore so remove it.
2013-04-03 17:54:35 +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
872a2ad031
riched20: Pass a character ptr and length to SplitParagraph.
2013-02-05 20:15:36 +01:00
Huw Davies
48b9ab37ac
riched20: Pass the character ptr and string length directly to the break proc helper.
2013-02-05 10:51:26 +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
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
Dylan Smith
10d800b6b8
richedit: Invalidate a range of paragraphs without marking them.
2012-05-18 18:10:27 +02:00
Dylan Smith
1f8cbe1645
richedit: Avoid scanning all text for paragraphs to invalidate.
2012-05-09 11:55:58 +02:00
Dylan Smith
18fa3287f6
richedit: Remove always FALSE parameter from ME_PaintContent.
2012-05-08 09:42:16 +02:00
Thomas Faber
28cb0b683e
riched20: Constify some ME_Context pointer parameters.
2011-10-24 19:37:08 +02:00
Marcus Meissner
598a7f6edf
riched20: Mark internal symbols with hidden visibility.
2011-05-24 11:55:55 +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
dfa80b35b0
richedit: Invalidate without calling UpdateWindow in many cases.
2010-07-29 10:28:00 +02: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
535afbd3aa
richedit: Move function ME_GetParaLineSpace to make it static.
2010-02-10 11:32:31 +01:00
Dylan Smith
3fe20bdc7e
richedit: Handle to parent window is cached.
...
The parent window for the richedit control on creation is the one that
receives notify messages, even after the parent has been changed using
SetParent.
2009-09-30 17:41:06 +02:00
Francois Gouget
6e80d875d4
riched20: Make ME_SetCursorToEnd() static.
2009-08-26 13:09:27 +02:00
Dylan Smith
54b53b6018
richedit: Use ME_Cursor instead of offsets for stream out functions.
2009-08-13 15:35:28 +02:00
Dylan Smith
bd4704280d
richedit: Replace offsets arg with ME_Cursor for ME_InternalDeleteText.
...
Offsets are still used within the function, but this patch reduces the
use of it at the entry to the function.
2009-08-13 15:35:17 +02: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
02228ee176
richedit: Use ME_Cursor instead of offsets for ME_CharFromPos.
2009-08-13 15:35:01 +02:00
Dylan Smith
a69ef26599
richedit: Use ME_Cursor instead of offsets for copying text.
2009-08-13 15:34:54 +02:00
Dylan Smith
27c28ab292
richedit: Modified ME_MoveCursorsChars to move multiple chars.
...
Previously the function was only used to move a single character in
either direction, so I made the function more general so that it could
be used in more places.
2009-08-13 15:34:39 +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
Dylan Smith
ade37203a5
richedit: Use ME_Cursor instead of offsets for ME_GetCharFormat.
...
Prevent extra conversions from character offset to ME_Cursor.
2009-08-12 17:35:42 +02:00
Dylan Smith
2bc726930f
richedit: Add helpers for setting cursor to start/end of text.
2009-08-12 17:35:30 +02:00
Dylan Smith
32dcd3bbe1
richedit: Created functions to move between runs and track paragraphs.
...
Plenty of places in the code find following or preceding runs, then
afterwards find the paragraph from the run. This is inefficient because
the same linked list is used for both runs and paragraphs, so changes in
paragraphs can be detected while returning the next or previous run.
2009-08-12 17:35:24 +02:00
Dylan Smith
82e102107c
richedit: ME_GetTextW must use source and destination lengths.
...
Before a single length was used for the number of characters to retrieve
from the text, and to keep track of the size of the buffer. These are
not equivalent, since there is a possible end of line conversion.
2009-08-12 17:32:16 +02:00
Dylan Smith
46b84aed4a
richedit: Added function to get selection cursors in order.
...
Previously the only convenient way to get the start and end of the
selection was through offsets, which eventually need to get converted
back into items in the linked list storing the text. The new function
will help with eliminating these inefficiencies.
2009-08-12 17:29:30 +02:00
Dylan Smith
be0fb1ef5d
richedit: Make the ME_GetCursorOfs function more flexible.
...
This function will make it easier to work with ME_Cursor objects, which
should be used in a lot of places instead of character offsets (which
often require seeking through the linked lists to perform operations
with).
2009-08-12 17:29:20 +02:00
Dylan Smith
832ffe108c
richedit: Remove header function declarations with no definition.
2009-08-10 17:09:53 +02:00
Francois Gouget
3d6c53b972
riched20: Make ME_GetCursorCoordinates() static and remove ME_MustBeWrapped() as it is unused.
2009-05-26 14:10:32 +02:00
Francois Gouget
61a8b94634
riched20: ME_MakeString() is unused so remove it.
2009-05-15 10:28:20 +02:00