Huw Davies : riched20: Move the code to clear the cell bottom out of the loop.
Alexandre Julliard
julliard at winehq.org
Mon Nov 9 15:11:50 CST 2020
Module: wine
Branch: master
Commit: 3f0c4d5c72ec49a22c001752daff9a39fd0ed4c6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3f0c4d5c72ec49a22c001752daff9a39fd0ed4c6
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Nov 9 08:45:07 2020 +0000
riched20: Move the code to clear the cell bottom out of the loop.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/paint.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index ad2ffb9abb9..ffb50d5ceff 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -1015,26 +1015,24 @@ static void draw_paragraph( ME_Context *c, ME_Paragraph *para )
ME_DebugWrite(c->hDC, &pt, buf);
}
break;
- case diCell:
- /* Clear any space at the bottom of the cell after the text. */
- if (para->nFlags & (MEPF_ROWSTART|MEPF_ROWEND))
- break;
- y += height;
- rc.top = c->pt.y + para->pt.y + para->nHeight;
- rc.bottom = c->pt.y + p->member.cell.pt.y + p->member.cell.nHeight;
- if (RectVisible(c->hDC, &rc))
- PatBlt(c->hDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY);
- break;
default:
break;
}
no++;
}
- draw_table_borders( c, para );
- draw_para_number( c, para );
+ if (para_cell( para ))
+ {
+ /* Clear any space at the bottom of the cell after the text. */
+ rc.top = c->pt.y + para->pt.y + para->nHeight;
+ rc.bottom = c->pt.y + cell->pt.y + cell->nHeight;
+ PatBlt( c->hDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, PATCOPY );
+ }
+
+ draw_table_borders( c, para );
+ draw_para_number( c, para );
- SetTextAlign(c->hDC, align);
+ SetTextAlign( c->hDC, align );
}
void ME_ScrollAbs(ME_TextEditor *editor, int x, int y)
More information about the wine-cvs
mailing list