Commit Graph

199 Commits

Author SHA1 Message Date
Huw Davies 6b3fd7869a riched20: Use row ptrs in the cursor to co-ordinates function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 10:24:26 +01:00
Huw Davies f45408b24a riched20: Use row helpers for Home/End key handling.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 10:24:24 +01:00
Huw Davies aaf29c7991 riched20: Use row and para helpers for the selection function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 10:24:22 +01:00
Huw Davies 0fda889f35 riched20: Use row ptrs in the cursor from virtual co-ords function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 10:24:20 +01:00
Huw Davies b47e5d0d23 riched20: Pass a row ptr to the cursor from row function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 10:24:18 +01:00
Huw Davies dd134546f4 riched20: Remove the caret at end hack.
The end of one run already has a different cursor
to the beginning of the next run.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 19:56:20 +02:00
Huw Davies c8862864fe riched20: Use run and para ptrs in the cursor move lines function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 19:56:20 +02:00
Huw Davies 2c2020ddb5 riched20: Use cell ptrs in the table position to offset function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 19:56:20 +02: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 e69bb46c06 riched20: Remove a redundant condition.
If the cursor offset is zero, then it is by definition
at the beginning of a run.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:08:01 +02:00
Huw Davies 887d7e686d riched20: Use the paragraph and run helpers in the delete text function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:07:59 +02:00
Huw Davies 53959eb7d4 riched20: Use helpers in the cursor to start/end functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:45 +02:00
Huw Davies 434feab6a2 riched20: Pass and return a paragraph ptr in the paragraph joining function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:53 +02:00
Huw Davies f758d1effd riched20: Pass a run ptr to, and return a para ptr from, the para splitting function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:50 +02:00
Huw Davies a9a2a68be9 riched20: Use a run ptr in GetXForArrow().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:37 +02:00
Huw Davies fe0a7a78db riched20: Remove InternalInsertTextFromCursor().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:35 +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 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 bfac43798b riched20: Don't return the diTextStart paragraph from para_prev().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:31:56 +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 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 586e31a1e6 riched20: Use the run and para helpers in the cursor movement functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:18:31 +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 a6d41a0391 riched20: Use ME_Paragraph ptrs in InternalDeleteText().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:34 +02:00
Huw Davies f648eff162 riched20: Use ME_Paragraph and ME_Run ptrs in GetCursorCoordinates().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:32 +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 5dc422d4e5 riched20: Simplify FindPixelPos().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-07 18:40:07 +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
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
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 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 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
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
Huw Davies 4989c858a0 riched20: Use the provided style for the end-of-paragraph run.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-05 11:43:37 +02:00
Huw Davies df1b51dfa4 riched20: Clearing the insert style should not depend on the event mask.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-04 14:54:39 +02:00
Huw Davies 304c8320c9 riched20: Allow selecting the final end-of-paragraph when using the mouse.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-04 14:54:39 +02:00
Huw Davies 7eb6837729 riched20: Allow selecting to the start / end when using the up / down arrow keys.
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 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 c005b98d91 riched20: Add an option to move the cursor to after the final end-of-paragraph.
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
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
Andrey Gusev 33c1a16a18 riched20: Fix a typo in TRACE() message.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-17 18:18:06 +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
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
Christoph von Wittich ca2b70b285 riched20: Handle SCF_WORD. 2015-04-01 22:34:20 +09:00
Jactry Zeng 68b9018d50 riched20: Fix ME_SetSelection when cpMax > strlen(). 2014-07-21 18:45:34 +02:00
Frédéric Delanoy 5f88ba5b61 riched20: Use BOOL type where appropriate. 2014-03-19 11:33:22 +01:00
Huw Davies a53179dadd riched20: Ensure the cursors are equal after deleting the selection. 2014-01-07 15:21:33 +01:00