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
30aa997b
Commit
30aa997b
authored
Jan 22, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Jan 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Add a helper function to access the PAGESETUPDLG's ptPaperSize element.
parent
de7be588
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
printdlg.c
dlls/comdlg32/printdlg.c
+20
-11
No files found.
dlls/comdlg32/printdlg.c
View file @
30aa997b
...
...
@@ -2784,6 +2784,18 @@ static void pagesetup_set_devmode(pagesetup_data *data, DEVMODEW *dm)
HeapFree
(
GetProcessHeap
(),
0
,
tmp_dm
);
}
static
inline
POINT
*
pagesetup_get_papersize_pt
(
const
pagesetup_data
*
data
)
{
return
&
data
->
dlga
->
ptPaperSize
;
}
static
inline
void
swap_point
(
POINT
*
pt
)
{
LONG
tmp
=
pt
->
x
;
pt
->
x
=
pt
->
y
;
pt
->
y
=
tmp
;
}
static
BOOL
pagesetup_update_papersize
(
pagesetup_data
*
data
)
{
DEVMODEW
*
dm
;
...
...
@@ -2832,15 +2844,12 @@ static BOOL pagesetup_update_papersize(pagesetup_data *data)
}
/* this is _10ths_ of a millimeter */
data
->
dlga
->
ptPaperSize
.
x
=
tenths_mm_to_size
(
data
,
points
[
i
].
x
);
data
->
dlga
->
ptPaperSize
.
y
=
tenths_mm_to_size
(
data
,
points
[
i
].
y
);
pagesetup_get_papersize_pt
(
data
)
->
x
=
tenths_mm_to_size
(
data
,
points
[
i
].
x
);
pagesetup_get_papersize_pt
(
data
)
->
y
=
tenths_mm_to_size
(
data
,
points
[
i
].
y
);
if
(
pagesetup_get_orientation
(
data
)
==
DMORIENT_LANDSCAPE
)
{
LONG
tmp
=
data
->
dlga
->
ptPaperSize
.
x
;
data
->
dlga
->
ptPaperSize
.
x
=
data
->
dlga
->
ptPaperSize
.
y
;
data
->
dlga
->
ptPaperSize
.
y
=
tmp
;
}
swap_point
(
pagesetup_get_papersize_pt
(
data
));
retval
=
TRUE
;
end:
...
...
@@ -3117,12 +3126,12 @@ static void pagesetup_change_preview(const pagesetup_data *data)
if
(
pagesetup_get_orientation
(
data
)
==
DMORIENT_LANDSCAPE
)
{
width
=
data
->
rtDrawRect
.
right
-
data
->
rtDrawRect
.
left
;
height
=
data
->
dlga
->
ptPaperSize
.
y
*
width
/
data
->
dlga
->
ptPaperSize
.
x
;
height
=
pagesetup_get_papersize_pt
(
data
)
->
y
*
width
/
pagesetup_get_papersize_pt
(
data
)
->
x
;
}
else
{
height
=
data
->
rtDrawRect
.
bottom
-
data
->
rtDrawRect
.
top
;
width
=
data
->
dlga
->
ptPaperSize
.
x
*
height
/
data
->
dlga
->
ptPaperSize
.
y
;
width
=
pagesetup_get_papersize_pt
(
data
)
->
x
*
height
/
pagesetup_get_papersize_pt
(
data
)
->
y
;
}
x
=
(
data
->
rtDrawRect
.
right
+
data
->
rtDrawRect
.
left
-
width
)
/
2
;
y
=
(
data
->
rtDrawRect
.
bottom
+
data
->
rtDrawRect
.
top
-
height
)
/
2
;
...
...
@@ -3553,8 +3562,8 @@ PRINTDLG_PagePaintProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
hdc
=
BeginPaint
(
hWnd
,
&
ps
);
GetClientRect
(
hWnd
,
&
rcClient
);
scalx
=
rcClient
.
right
/
(
double
)
data
->
dlga
->
ptPaperSize
.
x
;
scaly
=
rcClient
.
bottom
/
(
double
)
data
->
dlga
->
ptPaperSize
.
y
;
scalx
=
rcClient
.
right
/
(
double
)
pagesetup_get_papersize_pt
(
data
)
->
x
;
scaly
=
rcClient
.
bottom
/
(
double
)
pagesetup_get_papersize_pt
(
data
)
->
y
;
rcMargin
=
rcClient
;
rcMargin
.
left
+=
data
->
dlga
->
rtMargin
.
left
*
scalx
;
...
...
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