prntvpt: Add support for JobCopies to ticket XML reader.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2020-06-11 13:59:48 +08:00 committed by Alexandre Julliard
parent 365cfcd482
commit 35babf015f
1 changed files with 15 additions and 0 deletions

View File

@ -491,6 +491,20 @@ static void read_JobInputBin(IXMLDOMDocument2 *doc, struct ticket *ticket)
IXMLDOMNode_Release(node); IXMLDOMNode_Release(node);
} }
static void read_JobCopies(IXMLDOMDocument2 *doc, struct ticket *ticket)
{
IXMLDOMNode *node;
HRESULT hr;
hr = IXMLDOMDocument2_selectSingleNode(doc, (BSTR)L"psf:PrintTicket/psf:ParameterInit[@name='psk:JobCopiesAllDocuments']", &node);
if (hr != S_OK) return;
if (read_int_value(node, &ticket->job.copies) == S_OK)
TRACE("job.copies: %d\n", ticket->job.copies);
IXMLDOMNode_Release(node);
}
static void set_SelectionNamespaces(IXMLDOMDocument2 *doc) static void set_SelectionNamespaces(IXMLDOMDocument2 *doc)
{ {
IStream *stream; IStream *stream;
@ -596,6 +610,7 @@ static HRESULT parse_ticket(IStream *stream, EPrintTicketScope scope, struct tic
if (scope > kPTDocumentScope) if (scope > kPTDocumentScope)
{ {
read_JobInputBin(doc, ticket); read_JobInputBin(doc, ticket);
read_JobCopies(doc, ticket);
} }
fail: fail: