Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
048b57d1
Commit
048b57d1
authored
16 years ago
by
Huw Davies
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
comdlg32: Rewrite the 1000ths inch conversion function to use the is_metric helper.
parent
53149c54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/comdlg32/printdlg.c
+12
-4
12 additions, 4 deletions
dlls/comdlg32/printdlg.c
with
12 additions
and
4 deletions
dlls/comdlg32/printdlg.c
+
12
−
4
View file @
048b57d1
...
...
@@ -2450,6 +2450,14 @@ static inline LONG tenths_mm_to_size(PageSetupDataA *data, LONG size)
return
10
*
size
*
100
/
254
;
}
static
inline
LONG
thousandths_inch_to_size
(
PageSetupDataA
*
data
,
LONG
size
)
{
if
(
is_metric
(
data
))
return
size
*
254
/
100
;
else
return
size
;
}
static
DWORD
_c_10mm2size
(
PAGESETUPDLGW
*
dlga
,
DWORD
size
)
{
if
(
dlga
->
Flags
&
PSD_INTHOUSANDTHSOFINCHES
)
...
...
@@ -2459,7 +2467,7 @@ _c_10mm2size(PAGESETUPDLGW *dlga,DWORD size) {
static
DWORD
_c_inch2size
(
PAGESETUPDLG
A
*
dlga
,
DWORD
size
)
{
_c_inch2size
(
PAGESETUPDLG
W
*
dlga
,
DWORD
size
)
{
if
(
dlga
->
Flags
&
PSD_INTHOUSANDTHSOFINCHES
)
return
size
;
else
...
...
@@ -3700,8 +3708,8 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* We fill them out enabled or not */
if
(
!
(
pda
->
dlga
->
Flags
&
PSD_MARGINS
))
{
/* default is 1 inch */
DWORD
size
=
_c
_inch
2
size
(
pda
->
dlga
,
1000
);
/* default is 1 inch */
LONG
size
=
thousandths
_inch
_to_
size
(
pda
,
1000
);
pda
->
dlga
->
rtMargin
.
left
=
size
;
pda
->
dlga
->
rtMargin
.
top
=
size
;
pda
->
dlga
->
rtMargin
.
right
=
size
;
...
...
@@ -3793,7 +3801,7 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
SetDlgItemTextW
(
hDlg
,
edt7
,
str
);
}
else
{
/* default is 1 inch */
DWORD
size
=
_c_inch2size
(
(
LPPAGESETUPDLGA
)
pdw
->
dlgw
,
1000
);
DWORD
size
=
_c_inch2size
(
pdw
->
dlgw
,
1000
);
WCHAR
str
[
20
];
_c_size2strW
(
pdw
,
size
,
str
);
SetDlgItemTextW
(
hDlg
,
edt4
,
str
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment