Michael Stefaniuc
60b2167901
riched20: Use wide-char string literals.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-19 21:23:22 +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
3131f91940
riched20: Use cell ptrs to link the cells.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 12:01:57 +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
b692fb5e08
riched20: Use more cell helpers in some of the table functions.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-06 12:01:52 +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
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
77895ecdde
riched20: Use cell ptrs in the append table row 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
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
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
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
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
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
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
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
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
Alex Henrie
55a3dfe35e
riched20: Turn several constants and variables into static constants.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 10:49:03 +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
Fabian Maurer
6d62904497
riched20: In ME_ProtectPartialTableDeletion properly set out parameter (cppcheck).
...
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-04 10:44:00 +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
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
Frédéric Delanoy
0f2bed51bd
Assorted spelling fixes.
2014-02-10 15:47:29 +01:00
Huw Davies
872a2ad031
riched20: Pass a character ptr and length to SplitParagraph.
2013-02-05 20:15:36 +01:00
Huw Davies
86f077b163
riched20: Add an explicit run length member and use it rather than accessing the string length.
2013-01-31 16:32:12 +01:00
Dylan Smith
10d800b6b8
richedit: Invalidate a range of paragraphs without marking them.
2012-05-18 18:10:27 +02:00
Marcus Meissner
0cd53a589d
riched20: Use correct flag name (Coverity).
2011-05-06 14:23:46 +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
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
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
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
314bd5ca85
richedit: Update paragraph on saved cursor when inserting table start.
...
Since the table row start is inserted after the rest of the table is
inserted, the cursor is saved, and temporarily moved to the start of the
row to insert the table row start paragraph. Unfortunately the
paragraph in saved cursor becomes invalid during this insertion and
needs to be updated, so this code introduced a regression once
paragraphs started to be stored in cursors.
2009-08-11 12:31:18 +02:00
Dylan Smith
114a64ce5d
richedit: Added missing style releases.
...
Style objects are referenced counted in richedit controls, so I tried to
make sure styles were released properly. This can be checked using with
the all_refs global reference count to see if everything is cleaned up.
2009-08-10 17:10:34 +02:00
Dylan Smith
ecb6c2169c
richedit: Store paragraph in cursors.
...
This prevents some needless searching for the start of the paragraph
from a run stored in a cursor. Usually a pointer to the paragraph is
already available when the cursor is set anyway.
2009-02-10 12:59:09 +01:00
Dylan Smith
5d74f58382
richedit: Actually store end of line string for end paragraph runs.
...
Previously a count of the carraige returns and line feeds were stored
for end of paragraph runs, and a paragraph sign was stored as the actual
string. This was causing many special cases where the length of the
run needed to be determined differently if the run was or wasn't an
end of paragraph run.
There wasn't any use for storing the paragraph sign unless some drawing
code gets commented out to allow the end paragraphs to be shown,
therefore I changed the code to store the actual string that gets
retrieved by WM_GETTEXT.
2009-01-28 12:11:36 +01:00
Dylan Smith
05c788ac6f
richedit: Used ITextHost methods to avoid using window handle directly.
...
The methods in ITextHost are mostly thin wrappers around functions that
take a handle to a window as their first parameter. This patch just
uses the wrapper functions provided by ITextHost instead of using the
functions that require a handle to a window that the editor might now
have (for windowless richedit controls).
2009-01-21 11:54:43 +01:00
Andrew Talbot
634dfd65f8
riched20: Remove unused Wine debug channel.
2008-12-22 10:29:02 +01:00
Dylan Smith
c2bab443fa
richedit: Made sure table row gap/offset is copied on append row.
2008-10-01 11:41:01 -05:00
Dylan Smith
0843768919
richedit: Enter at the end of a table row appends a new row.
2008-09-12 11:55:14 +02:00
Dylan Smith
88a3a8a9c0
richedit: Don't put cursor in the table row start paragraph.
2008-09-12 11:55:08 +02:00
Francois Gouget
4823b2c7bf
Assorted spelling fixes.
2008-09-02 13:58:21 +02:00
Dylan Smith
f11fe1c7a9
richedit: Prevent typing text at end of table row.
2008-08-29 13:42:47 +02:00
Dylan Smith
ff1f3d76b7
richedit: Copy cell border properties when appending a row to the table.
2008-08-29 13:41:34 +02:00