Eric Pouech : winhelp: Set the borders of a paragraph in richedit.
Module: wine Branch: master Commit: 3299f1b8694074bd024cdee9691985c6fcdb587b URL: http://source.winehq.org/git/wine.git/?a=commit;h=3299f1b8694074bd024cdee969... Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:16 2008 +0200 winhelp: Set the borders of a paragraph in richedit. --- programs/winhelp/hlpfile.c | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index cbac2c3..1f5b735 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1067,7 +1067,28 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE sprintf(tmp, "\\fi%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } - if (bits & 0x0100) format += 3; + if (bits & 0x0100) + { + BYTE brdr = *format++; + short w; + + if (brdr & 0x01 && !HLPFILE_RtfAddControl(rd, "\\box")) goto done; + if (brdr & 0x02 && !HLPFILE_RtfAddControl(rd, "\\brdrt")) goto done; + if (brdr & 0x04 && !HLPFILE_RtfAddControl(rd, "\\brdrl")) goto done; + if (brdr & 0x08 && !HLPFILE_RtfAddControl(rd, "\\brdrb")) goto done; + if (brdr & 0x10 && !HLPFILE_RtfAddControl(rd, "\\brdrr")) goto done; + if (brdr & 0x20 && !HLPFILE_RtfAddControl(rd, "\\brdrth")) goto done; + if (!(brdr & 0x20) && !HLPFILE_RtfAddControl(rd, "\\brdrs")) goto done; + if (brdr & 0x40 && !HLPFILE_RtfAddControl(rd, "\\brdrdb")) goto done; + /* 0x80: unknown */ + + w = GET_SHORT(format, 0); format += 2; + if (w) + { + sprintf(tmp, "\\brdrw%d", HLPFILE_HalfPointsToTwips(w)); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + } if (bits & 0x0200) { int i, ntab = fetch_short(&format);
participants (1)
-
Alexandre Julliard