[PATCH 3/8] [RichEdit]: correctly handle the wrapping when graphics are used
Eric Pouech
eric.pouech at orange.fr
Sun Jan 27 12:01:58 CST 2008
- get rid of infinite loops when run's width was larger than the global
available width
A+
---
dlls/riched20/wrap.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c
index 4daf58e..1037cec 100644
--- a/dlls/riched20/wrap.c
+++ b/dlls/riched20/wrap.c
@@ -293,8 +293,13 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
wc->bOverflown = TRUE;
return p;
}
- /* graphics or TAB - we can split before */
- if (run->nFlags & (MERF_GRAPHICS|MERF_TAB)) {
+ /* TAB: we can split before */
+ if (run->nFlags & MERF_TAB) {
+ wc->bOverflown = TRUE;
+ return p;
+ }
+ /* graphics: we can split before, if run's width is smaller than row's width */
+ if ((run->nFlags & MERF_GRAPHICS) && run->nWidth <= wc->nAvailWidth) {
wc->bOverflown = TRUE;
return p;
}
More information about the wine-patches
mailing list