Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a7a977ef
Commit
a7a977ef
authored
Jun 11, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prntvpt: Add support for custom scaling to ticket XML reader.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
35babf01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
ticket.c
dlls/prntvpt/ticket.c
+21
-5
No files found.
dlls/prntvpt/ticket.c
View file @
a7a977ef
...
...
@@ -297,6 +297,7 @@ static void read_PageOutputColor(IXMLDOMDocument2 *doc, struct ticket *ticket)
static
void
read_PageScaling
(
IXMLDOMDocument2
*
doc
,
struct
ticket
*
ticket
)
{
IXMLDOMNode
*
node
,
*
option
;
int
scaling
=
0
;
HRESULT
hr
;
hr
=
IXMLDOMDocument2_selectSingleNode
(
doc
,
(
BSTR
)
L"psf:PrintTicket/psf:Feature[@name='psk:PageScaling']"
,
&
node
);
...
...
@@ -317,13 +318,11 @@ static void read_PageScaling(IXMLDOMDocument2 *doc, struct ticket *ticket)
if
(
hr
==
S_OK
&&
V_VT
(
&
var
)
==
VT_BSTR
)
{
if
(
!
wcscmp
(
V_BSTR
(
&
var
),
L"psk:None"
))
ticket
->
page
.
scaling
=
100
;
scaling
=
100
;
else
if
(
!
wcscmp
(
V_BSTR
(
&
var
),
L"psk:CustomSquare"
))
scaling
=
0
;
/* psk:PageScalingScale */
else
{
FIXME
(
"%s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
ticket
->
page
.
scaling
=
100
;
}
TRACE
(
"scaling: %s => %d
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)),
ticket
->
page
.
scaling
);
}
VariantClear
(
&
var
);
...
...
@@ -332,6 +331,23 @@ static void read_PageScaling(IXMLDOMDocument2 *doc, struct ticket *ticket)
}
IXMLDOMNode_Release
(
node
);
if
(
!
scaling
)
{
hr
=
IXMLDOMDocument2_selectSingleNode
(
doc
,
(
BSTR
)
L"psf:PrintTicket/psf:ParameterInit[@name='psk:PageScalingScale']"
,
&
node
);
if
(
hr
==
S_OK
)
{
read_int_value
(
node
,
&
scaling
);
IXMLDOMNode_Release
(
node
);
}
}
if
(
scaling
)
ticket
->
page
.
scaling
=
scaling
;
else
ticket
->
page
.
scaling
=
100
;
TRACE
(
"page.scaling: %d
\n
"
,
ticket
->
page
.
scaling
);
}
static
void
read_PageResolution
(
IXMLDOMDocument2
*
doc
,
struct
ticket
*
ticket
)
...
...
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