Huw Davies : riched20: Use a run ptr in the rtf row handler.

Alexandre Julliard julliard at winehq.org
Fri Oct 30 16:18:43 CDT 2020


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Oct 30 09:00:28 2020 +0000

riched20: Use a run ptr in the rtf row handler.

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

---

 dlls/riched20/editor.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 40282027dba..1f37258f345 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -987,7 +987,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
       /* else fall through since v4.1 treats rtfNestRow and rtfRow the same */
     case rtfRow:
     {
-      ME_DisplayItem *run;
+      ME_Run *run;
       ME_Paragraph *para;
       ME_Cell *cell;
       int i;
@@ -1042,14 +1042,14 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
           cell->nRightBoundary = tableDef->cells[i - 1].rightBoundary;
         }
 
-        run = ME_FindItemFwd( cell_get_di( cell) , diRun );
-        if (info->editor->pCursors[0].pRun != run ||
+        run = para_first_run( cell_first_para( cell ) );
+        if (&info->editor->pCursors[0].pRun->member.run != run ||
             info->editor->pCursors[0].nOffset)
         {
           int nOfs, nChars;
           /* Delete inserted cells that aren't defined. */
-          info->editor->pCursors[1].pRun = run;
-          info->editor->pCursors[1].pPara = ME_GetParagraph(run);
+          info->editor->pCursors[1].pRun = run_get_di( run );
+          info->editor->pCursors[1].pPara = para_get_di( run->para );
           info->editor->pCursors[1].nOffset = 0;
           nOfs = ME_GetCursorOfs(&info->editor->pCursors[1]);
           nChars = ME_GetCursorOfs(&info->editor->pCursors[0]) - nOfs;




More information about the wine-cvs mailing list