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
642e82ed
Commit
642e82ed
authored
Jun 17, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prntvpt: Add support for custom scaling to ticket XML writer.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
99daef62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
4 deletions
+43
-4
ticket.c
dlls/prntvpt/ticket.c
+43
-4
No files found.
dlls/prntvpt/ticket.c
View file @
642e82ed
...
...
@@ -825,6 +825,16 @@ static HRESULT create_ParameterInit(IXMLDOMElement *root, const WCHAR *name, IXM
return
add_attribute
(
*
child
,
L"name"
,
name
);
}
static
HRESULT
create_ParameterRef
(
IXMLDOMElement
*
root
,
const
WCHAR
*
name
,
IXMLDOMElement
**
child
)
{
HRESULT
hr
;
hr
=
create_element
(
root
,
L"psf:ParameterRef"
,
child
);
if
(
hr
!=
S_OK
)
return
hr
;
return
add_attribute
(
*
child
,
L"name"
,
name
);
}
static
HRESULT
create_ScoredProperty
(
IXMLDOMElement
*
root
,
const
WCHAR
*
name
,
IXMLDOMElement
**
child
)
{
HRESULT
hr
;
...
...
@@ -889,12 +899,41 @@ static HRESULT write_PageScaling(IXMLDOMElement *root, const struct ticket *tick
hr
=
create_Feature
(
root
,
L"psk:PageScaling"
,
&
feature
);
if
(
hr
!=
S_OK
)
return
hr
;
if
(
ticket
->
page
.
scaling
!=
100
)
FIXME
(
"page.scaling: %d
\n
"
,
ticket
->
page
.
scaling
);
if
(
ticket
->
page
.
scaling
==
100
)
{
hr
=
create_Option
(
feature
,
L"psk:None"
,
&
option
);
if
(
hr
==
S_OK
)
IXMLDOMElement_Release
(
option
);
}
else
{
hr
=
create_Option
(
feature
,
L"psk:CustomSquare"
,
&
option
);
if
(
hr
==
S_OK
)
{
IXMLDOMElement
*
property
,
*
parameter
;
hr
=
create_ScoredProperty
(
option
,
L"psk:Scale"
,
&
property
);
if
(
hr
==
S_OK
)
{
hr
=
create_ParameterRef
(
property
,
L"psk:PageScalingScale"
,
&
parameter
);
if
(
hr
==
S_OK
)
{
IXMLDOMElement_Release
(
parameter
);
hr
=
create_ParameterInit
(
root
,
L"psk:PageScalingScale"
,
&
parameter
);
if
(
hr
==
S_OK
)
{
hr
=
write_int_value
(
parameter
,
ticket
->
page
.
scaling
);
IXMLDOMElement_Release
(
parameter
);
}
}
IXMLDOMElement_Release
(
property
);
}
hr
=
create_Option
(
feature
,
L"psk:None"
,
&
option
);
IXMLDOMElement_Release
(
option
);
}
}
if
(
option
)
IXMLDOMElement_Release
(
option
);
IXMLDOMElement_Release
(
feature
);
return
hr
;
}
...
...
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