[PATCH 28/45] [WinHelp]: added support for paragraph information
Eric Pouech
eric.pouech at orange.fr
Sun Mar 23 04:20:09 CDT 2008
A+
---
programs/winhelp/hlpfile.c | 36 ++++++++++++++++++++++++++++++------
1 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c
index 4f02f9a..4c7943d 100644
--- a/programs/winhelp/hlpfile.c
+++ b/programs/winhelp/hlpfile.c
@@ -992,12 +992,36 @@ BOOL HLPFILE_BrowseParagraph(HLPFILE *hlpfile, struct RtfData* rd, BYTE *buf, BY
format += 4;
bits = GET_USHORT(format, 0); format += 2;
if (bits & 0x0001) fetch_long(&format);
- if (bits & 0x0002) fetch_short(&format);
- if (bits & 0x0004) fetch_short(&format);
- if (bits & 0x0008) fetch_short(&format);
- if (bits & 0x0010) fetch_short(&format);
- if (bits & 0x0020) fetch_short(&format);
- if (bits & 0x0040) fetch_short(&format);
+ if (bits & 0x0002)
+ {
+ sprintf(tmp, "\\sb%d", HLPFILE_HalfPointsToTwips(fetch_short(&format)));
+ if (!HLPFILE_RtfAddControl(rd, tmp)) goto done;
+ }
+ if (bits & 0x0004)
+ {
+ sprintf(tmp, "\\sa%d", HLPFILE_HalfPointsToTwips(fetch_short(&format)));
+ if (!HLPFILE_RtfAddControl(rd, tmp)) goto done;
+ }
+ if (bits & 0x0008)
+ {
+ sprintf(tmp, "\\sl%d", HLPFILE_HalfPointsToTwips(fetch_short(&format)));
+ if (!HLPFILE_RtfAddControl(rd, tmp)) goto done;
+ }
+ if (bits & 0x0010)
+ {
+ sprintf(tmp, "\\li%d", HLPFILE_HalfPointsToTwips(fetch_short(&format)));
+ if (!HLPFILE_RtfAddControl(rd, tmp)) goto done;
+ }
+ if (bits & 0x0020)
+ {
+ sprintf(tmp, "\\ri%d", HLPFILE_HalfPointsToTwips(fetch_short(&format)));
+ if (!HLPFILE_RtfAddControl(rd, tmp)) goto done;
+ }
+ if (bits & 0x0040)
+ {
+ sprintf(tmp, "\\fi%d", HLPFILE_HalfPointsToTwips(fetch_short(&format)));
+ if (!HLPFILE_RtfAddControl(rd, tmp)) goto done;
+ }
if (bits & 0x0100) format += 3;
if (bits & 0x0200)
{
More information about the wine-patches
mailing list