From 2c2020ddb5fc2a222f861cf05d89a991ea03621f Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Fri, 23 Oct 2020 10:25:04 +0100 Subject: [PATCH] riched20: Use cell ptrs in the table position to offset function. Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/riched20/caret.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 5d49d11bd3b..9676636a64e 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -880,21 +880,21 @@ int ME_GetCursorOfs(const ME_Cursor *cursor) /* Helper function for ME_FindPixelPos to find paragraph within tables */ static ME_Paragraph *pixel_pos_in_table_row( int x, int y, ME_Paragraph *para ) { - ME_DisplayItem *cell, *next_cell; + ME_Cell *cell, *next_cell; assert( para->nFlags & MEPF_ROWSTART ); - cell = para_next( para )->pCell; - assert(cell); + cell = table_row_first_cell( para ); + assert( cell ); /* find the cell we are in */ - while ((next_cell = cell->member.cell.next_cell) != NULL) + while ((next_cell = cell_next( cell )) != NULL) { - if (x < next_cell->member.cell.pt.x) + if (x < next_cell->pt.x) { - para = &ME_FindItemFwd( cell, diParagraph )->member.para; + para = cell_first_para( cell ); /* Found the cell, but there might be multiple paragraphs in * the cell, so need to search down the cell for the paragraph. */ - while (cell == para->pCell) + while (cell == para_cell( para )) { if (y < para->pt.y + para->nHeight) {