Commit Graph

1415 Commits

Author SHA1 Message Date
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 2809ac2b78 riched20: Use cell ptrs in the wrapping functions.
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 ff23a6d792 riched20: Use cell and para ptrs in the table border drawing 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 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 b2c812e3a3 riched20: Use cell ptrs in the rtf writing 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 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 103cd9f2f2 riched20: Return a paragraph ptr from the table insert helper.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-21 11:08:07 +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 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 218225548a riched20: Don't split the paragraph at the first \intbl.
The whole of the current paragraph should be included
in the table.

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 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 9098d5b300 riched20: Update both co-ords during layout.
This partially fixes 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 4a30e0601e riched20: Pass paragraph ptrs to the paragraph property writers.
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 0033253777 riched20: Pass run ptrs to the font and colour table writer function.
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 db6c554909 richedit: Use the correct ptr to the cell.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:47 +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 87c4d217ed riched20: Pass a run ptr to the run drawing function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:44 +02:00
Huw Davies 7875a77b23 riched20: Pass a paragraph ptr to a couple of the drawing helpers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:58:42 +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
Huw Davies d3fb8b29c1 riched20: Use paragraph and run ptrs in the paragraph splitting function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:47 +02:00
Huw Davies 9b3a538c35 riched20: Return a paragraph ptr from the paragraph creation function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:45 +02:00
Huw Davies 77f1894f21 riched20: Pass a paragraph ptr to the table update flags function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-16 22:00:42 +02:00
Damjan Jovanovic aa1ef09fef riched20: Implement ITextRange/ITextSelection Copy and Cut.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:40 +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 120ee0de1b riched20: Simplify the char offset from run offset function.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:33 +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 1994d21ddb riched20: Use run ptrs in GetCharFormat().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:28 +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 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 02f4a178ff riched20: Don't mark the diTextStart paragraph as requiring repainting.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 20:31:52 +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