Commit Graph

260 Commits

Author SHA1 Message Date
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
Dmitry Timoshkov 8bff437e9d riched20: Don't create custom heap.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 10:41:16 +02: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 43d377c260 riched20: Merge the richole object with the text services object.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Huw Davies 03c2fca74a riched20: Remove SendOldNotify() helper.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Huw Davies 08c4de06a1 riched20: Add support for EN_[HV]SCROLL notifications.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Huw Davies cc3a86d86b riched20: Remove the windows from the editor structure.
This in turn allows removal of the editor from the host.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:48:30 +01:00
Huw Davies 8e17457fca riched20: Add ITextHost2 support and use it to get the window for WM_CONTEXTMENU.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:48:30 +01:00
Huw Davies aae4fa9b1c riched20: Don't invalidate while inside TxDraw().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 12:48:48 +01:00
Huw Davies 7ebe1aec24 riched20: Use TxDraw() to implement the host's WM_PAINT handler.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Huw Davies 02f083641e riched20: Implement TxDraw().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:53:44 +01:00
Huw Davies 61ce905bc4 include: Fix spelling of the InPlace methods.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 11:06:30 +01:00
Huw Davies 887ffec967 riched20: Handle WM_SETCURSOR 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
Huw Davies 8724c37c7b riched20: Set the window title in the host.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 10:13:00 +01:00
Huw Davies 7ea3993284 riched20: Add ITextServices stdcall wrappers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 13:13:35 +01:00
Huw Davies 9b7261d995 riched20: The text host should create the text services object.
For now, we hold on to the editor too; this will eventually go away.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +01:00
Huw Davies 732aec2af2 riched20: Move the window procs to txthost.c .
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +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 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 b7084cd7e3 riched20: Use cell ptrs in the paragraph splitting and joining functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 12:01:55 +01:00
Huw Davies eb6b188a94 riched20: Pass paragraph ptrs to the para marking function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 09:06:43 +01:00
Huw Davies c8fef26884 riched20: Use para_in_table() instead of IsInTable().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 09:06:41 +01:00
Huw Davies b132d8bf05 riched20: Use para and row ptrs in the row number from offset function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 11:21:26 +01:00
Huw Davies 410dceb939 riched20: Remove unused ME_RowStart().
Its functionality has been replaced with row_from_cursor().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 11:21:24 +01:00
Huw Davies fe2fd44e0a riched20: Return a row ptr from the row from row number function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 16:01:23 +01:00
Huw Davies f2d770d491 riched20: Remove the table corruption check 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 3ba419081a riched20: Use paragraph ptrs in the table move from row start 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 963075706d riched20: Use cell ptrs in the table tab handler.
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 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 30ad0b936a riched20: Use a row ptr in the run drawing function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:50 +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 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 6488613a3a riched20: Simplify some of the drawing code using a few helpers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Huw Davies 431ee50875 riched20: Use cell ptrs in the rtf parsing code.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Huw Davies 670dadf719 riched20: Return paragraph ptrs from the remaining table insert functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:02 +02:00
Huw Davies caa1d4a480 riched20: Return a para ptr from the insert start table row functions.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:02 +02:00
Huw Davies f0783863f9 riched20: Pass and return paragraph ptrs in the table append row function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:08:06 +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 2b817872cb riched20: Start re-wrap loop at the beginning of any table.
This ensures that cell heights of cells before the first marked
cell are correctly adjusted.

Fixes last part of a regression caused by commit
195f84cfa1

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:02 +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 00824a032f riched20: Pass a paragraph ptr to the paragraph destruction function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:40 +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