Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
523a5b3f
Commit
523a5b3f
authored
Apr 24, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Added support for richedit tabs in paragraph format.
parent
5f4f2c0b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
5 deletions
+36
-5
hlpfile.c
programs/winhelp/hlpfile.c
+30
-5
hlpfile.h
programs/winhelp/hlpfile.h
+6
-0
No files found.
programs/winhelp/hlpfile.c
View file @
523a5b3f
...
@@ -943,6 +943,18 @@ static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie,
...
@@ -943,6 +943,18 @@ static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie,
return
link
;
return
link
;
}
}
unsigned
HLPFILE_HalfPointsToTwips
(
unsigned
pts
)
{
static
unsigned
logPxY
;
if
(
!
logPxY
)
{
HDC
hdc
=
GetDC
(
NULL
);
logPxY
=
GetDeviceCaps
(
hdc
,
LOGPIXELSY
);
ReleaseDC
(
NULL
,
hdc
);
}
return
MulDiv
(
pts
,
72
*
10
,
logPxY
);
}
/***********************************************************************
/***********************************************************************
*
*
* HLPFILE_BrowseParagraph
* HLPFILE_BrowseParagraph
...
@@ -1034,13 +1046,26 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE
...
@@ -1034,13 +1046,26 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE
if
(
bits
&
0x0100
)
format
+=
3
;
if
(
bits
&
0x0100
)
format
+=
3
;
if
(
bits
&
0x0200
)
if
(
bits
&
0x0200
)
{
{
int
ntab
=
fetch_short
(
&
format
);
int
i
,
ntab
=
fetch_short
(
&
format
);
unsigned
short
ts
;
unsigned
tab
,
ts
;
const
char
*
kind
;
while
(
ntab
--
>
0
)
for
(
i
=
0
;
i
<
ntab
;
i
++
)
{
{
ts
=
fetch_ushort
(
&
format
);
tab
=
fetch_ushort
(
&
format
);
if
(
ts
&
0x4000
)
fetch_ushort
(
&
format
);
ts
=
(
tab
&
0x4000
)
?
fetch_ushort
(
&
format
)
:
0
/* left */
;
switch
(
ts
)
{
default:
WINE_FIXME
(
"Unknown tab style %x
\n
"
,
ts
);
/* fall through */
case
0
:
kind
=
""
;
break
;
case
1
:
kind
=
"
\\
tqr"
;
break
;
case
2
:
kind
=
"
\\
tqc"
;
break
;
}
/* FIXME: do kind */
sprintf
(
tmp
,
"%s
\\
tx%d"
,
kind
,
HLPFILE_HalfPointsToTwips
(
tab
&
0x3FFF
));
if
(
!
HLPFILE_RtfAddControl
(
rd
,
tmp
))
goto
done
;
}
}
}
}
/* 0x0400, 0x0800 and 0x1000 don't need space */
/* 0x0400, 0x0800 and 0x1000 don't need space */
...
...
programs/winhelp/hlpfile.h
View file @
523a5b3f
...
@@ -201,6 +201,12 @@ HLPFILE_PAGE* HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset, ULONG* relativ
...
@@ -201,6 +201,12 @@ HLPFILE_PAGE* HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset, ULONG* relativ
LONG
HLPFILE_Hash
(
LPCSTR
lpszContext
);
LONG
HLPFILE_Hash
(
LPCSTR
lpszContext
);
void
HLPFILE_FreeLink
(
HLPFILE_LINK
*
link
);
void
HLPFILE_FreeLink
(
HLPFILE_LINK
*
link
);
void
HLPFILE_FreeHlpFile
(
HLPFILE
*
);
void
HLPFILE_FreeHlpFile
(
HLPFILE
*
);
unsigned
HLPFILE_HalfPointsToTwips
(
unsigned
pts
);
static
inline
unsigned
HLPFILE_PointsToTwips
(
unsigned
pts
)
{
return
HLPFILE_HalfPointsToTwips
(
2
*
pts
);
}
void
*
HLPFILE_BPTreeSearch
(
BYTE
*
,
const
void
*
,
HLPFILE_BPTreeCompare
);
void
*
HLPFILE_BPTreeSearch
(
BYTE
*
,
const
void
*
,
HLPFILE_BPTreeCompare
);
void
HLPFILE_BPTreeEnum
(
BYTE
*
,
HLPFILE_BPTreeCallback
cb
,
void
*
cookie
);
void
HLPFILE_BPTreeEnum
(
BYTE
*
,
HLPFILE_BPTreeCallback
cb
,
void
*
cookie
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment