Eric Pouech : riched20: Correctly handle the wrapping when graphics are used.
Alexandre Julliard
julliard at winehq.org
Tue Feb 5 06:33:08 CST 2008
Module: wine
Branch: master
Commit: d014db68d4948b786a520c828308077c07632f1d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d014db68d4948b786a520c828308077c07632f1d
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Sun Jan 27 19:01:58 2008 +0100
riched20: Correctly handle the wrapping when graphics are used.
Get rid of infinite loops when run's width was larger than the global
available width.
---
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-cvs
mailing list