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
34d4ade1
Commit
34d4ade1
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 PageOrientation to ticket XML reader.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
babcbe89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
ticket.c
dlls/prntvpt/ticket.c
+43
-0
No files found.
dlls/prntvpt/ticket.c
View file @
34d4ade1
...
@@ -367,6 +367,48 @@ static void read_PageResolution(IXMLDOMDocument2 *doc, struct ticket *ticket)
...
@@ -367,6 +367,48 @@ static void read_PageResolution(IXMLDOMDocument2 *doc, struct ticket *ticket)
IXMLDOMNode_Release
(
node
);
IXMLDOMNode_Release
(
node
);
}
}
static
void
read_PageOrientation
(
IXMLDOMDocument2
*
doc
,
struct
ticket
*
ticket
)
{
IXMLDOMNode
*
node
,
*
option
;
HRESULT
hr
;
hr
=
IXMLDOMDocument2_selectSingleNode
(
doc
,
(
BSTR
)
L"psf:PrintTicket/psf:Feature[@name='psk:PageOrientation']"
,
&
node
);
if
(
hr
!=
S_OK
)
return
;
hr
=
IXMLDOMNode_selectSingleNode
(
node
,
(
BSTR
)
L"./psf:Option"
,
&
option
);
if
(
hr
==
S_OK
)
{
IXMLDOMElement
*
element
;
hr
=
IXMLDOMNode_QueryInterface
(
option
,
&
IID_IXMLDOMElement
,
(
void
**
)
&
element
);
if
(
hr
==
S_OK
)
{
VARIANT
var
;
VariantInit
(
&
var
);
hr
=
IXMLDOMElement_getAttribute
(
element
,
(
BSTR
)
L"name"
,
&
var
);
if
(
hr
==
S_OK
&&
V_VT
(
&
var
)
==
VT_BSTR
)
{
if
(
!
wcscmp
(
V_BSTR
(
&
var
),
L"psk:Portrait"
))
ticket
->
page
.
orientation
=
DMORIENT_PORTRAIT
;
else
if
(
!
wcscmp
(
V_BSTR
(
&
var
),
L"psk:Landscape"
))
ticket
->
page
.
orientation
=
DMORIENT_LANDSCAPE
;
else
{
FIXME
(
"%s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
ticket
->
page
.
orientation
=
DMORIENT_PORTRAIT
;
}
TRACE
(
"orientation: %s => %d
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)),
ticket
->
page
.
orientation
);
}
VariantClear
(
&
var
);
IXMLDOMElement_Release
(
element
);
}
}
IXMLDOMNode_Release
(
node
);
}
static
void
set_SelectionNamespaces
(
IXMLDOMDocument2
*
doc
)
static
void
set_SelectionNamespaces
(
IXMLDOMDocument2
*
doc
)
{
{
IStream
*
stream
;
IStream
*
stream
;
...
@@ -464,6 +506,7 @@ static HRESULT parse_ticket(IStream *stream, EPrintTicketScope scope, struct tic
...
@@ -464,6 +506,7 @@ static HRESULT parse_ticket(IStream *stream, EPrintTicketScope scope, struct tic
read_PageOutputColor
(
doc
,
ticket
);
read_PageOutputColor
(
doc
,
ticket
);
read_PageScaling
(
doc
,
ticket
);
read_PageScaling
(
doc
,
ticket
);
read_PageResolution
(
doc
,
ticket
);
read_PageResolution
(
doc
,
ticket
);
read_PageOrientation
(
doc
,
ticket
);
fail:
fail:
IXMLDOMDocument2_Release
(
doc
);
IXMLDOMDocument2_Release
(
doc
);
...
...
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