Huw Davies : riched20: Use cell ptrs in the table position to offset function.

Alexandre Julliard julliard at winehq.org
Fri Oct 23 14:27:18 CDT 2020


Module: wine
Branch: master
Commit: 2c2020ddb5fc2a222f861cf05d89a991ea03621f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2c2020ddb5fc2a222f861cf05d89a991ea03621f

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Oct 23 10:25:04 2020 +0100

riched20: Use cell ptrs in the table position to offset function.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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)
         {




More information about the wine-cvs mailing list