Huw Davies : riched20: Simplify search for the cell to delete.
Alexandre Julliard
julliard at winehq.org
Mon Nov 9 15:11:50 CST 2020
Module: wine
Branch: master
Commit: 378a86b8b62c5c586ab4044d91d5e2ddb8c5dc7f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=378a86b8b62c5c586ab4044d91d5e2ddb8c5dc7f
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Nov 9 08:45:06 2020 +0000
riched20: Simplify search for the cell to delete.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/para.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index c0f2a7b5471..cb98218aeab 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -684,7 +684,6 @@ ME_Paragraph *para_split( ME_TextEditor *editor, ME_Run *run, ME_Style *style,
specified in use_first_fmt */
ME_Paragraph *para_join( ME_TextEditor *editor, ME_Paragraph *para, BOOL use_first_fmt )
{
- ME_DisplayItem *tmp;
ME_Paragraph *next = para_next( para );
ME_Run *end_run, *next_first_run, *tmp_run;
ME_Cell *cell = NULL;
@@ -717,20 +716,13 @@ ME_Paragraph *para_join( ME_TextEditor *editor, ME_Paragraph *para, BOOL use_fir
if (!editor->bEmulateVersion10) /* v4.1 */
{
+ /* Remove cell boundary if it is between the end paragraph run and the next
+ * paragraph display item. */
+ if (para->cell != next->cell) cell = next->cell;
+
/* Table cell/row properties are always moved over from the removed para. */
para->nFlags = next->nFlags;
para->cell = next->cell;
-
- /* Remove cell boundary if it is between the end paragraph run and the next
- * paragraph display item. */
- for (tmp = run_get_di( end_run ); tmp != para_get_di( next ); tmp = tmp->next)
- {
- if (tmp->type == diCell)
- {
- cell = &tmp->member.cell;
- break;
- }
- }
}
add_undo_split_para( editor, next, eol_str, cell );
More information about the wine-cvs
mailing list