Commit 99daef62 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

prntvpt: Add support for JobCopies to ticket XML writer.

parent bd5a86e5
......@@ -815,6 +815,16 @@ static HRESULT create_Option(IXMLDOMElement *root, const WCHAR *name, IXMLDOMEle
return hr;
}
static HRESULT create_ParameterInit(IXMLDOMElement *root, const WCHAR *name, IXMLDOMElement **child)
{
HRESULT hr;
hr = create_element(root, L"psf:ParameterInit", 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;
......@@ -971,6 +981,20 @@ static HRESULT write_JobInputBin(IXMLDOMElement *root, const struct ticket *tick
return hr;
}
static HRESULT write_JobCopies(IXMLDOMElement *root, const struct ticket *ticket)
{
IXMLDOMElement *parameter;
HRESULT hr;
hr = create_ParameterInit(root, L"psk:JobCopiesAllDocuments", &parameter);
if (hr != S_OK) return hr;
hr = write_int_value(parameter, ticket->job.copies);
IXMLDOMElement_Release(parameter);
return hr;
}
static HRESULT write_attributes(IXMLDOMElement *element)
{
HRESULT hr;
......@@ -1029,6 +1053,8 @@ static HRESULT write_ticket(IStream *stream, const struct ticket *ticket, EPrint
{
hr = write_JobInputBin(root, ticket);
if (hr != S_OK) goto fail;
hr = write_JobCopies(root, ticket);
if (hr != S_OK) goto fail;
}
hr = IStream_Write(stream, xmldecl, strlen(xmldecl), NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment