Commit Graph

216 Commits

Author SHA1 Message Date
Jinoh Kang 10667b39aa riched20: Implement callback to IRichEditOleCallback_QueryInsertObject.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-08 19:09:50 +02:00
Jinoh Kang 05796c4e2a riched20: Add back-reference to outer ME_Run from struct re_object.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-21 14:28:09 +01:00
Eric Pouech 42d0e56643 riched20: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 18:57:17 +01:00
Eric Pouech 63a643f7f4 riched20: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-02 13:46:34 +01:00
Huw Davies 363508454d riched20: Return the nearest char pos if the coords are outside the format rect.
For the two tests that remain todo_wine, the results differ between
riched20 and msftedit, with Wine's implementation matching msftedit.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52041
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-13 17:58:22 +01:00
Jactry Zeng 8c894382dd riched20: Allow to insert OLE object at specified offset.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-14 18:32:24 +02:00
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 1cf8fea7a7 riched20: Use the multiline property rather than style.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 10:45:52 +01:00
Huw Davies cb9353bca9 riched20: Use row and para ptrs in the cursor up/down handler.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 10:45:49 +01:00
Huw Davies ab95fb31fc riched20: Use row ptrs in the page up/down handlers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 10:45:47 +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 20b4a03553 riched20: Use para and run ptrs in the table deletion function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-29 20:19:13 +01:00
Huw Davies da50829128 riched20: Pass para ptrs to the various para selection functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-28 09:53:39 +01:00
Huw Davies 1abbb78a09 riched20: Use row and para ptrs in the ensure visible function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:53 +01:00
Huw Davies 0d50e0182d riched20: Use a run helper in the delete text function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:47 +01:00
Huw Davies 245b9231c5 riched20: Use row and para helpers in the extend selection function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:44 +01:00
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