prntvpt: Add support for JobInputBin to ticket XML writer.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Dmitry Timoshkov 2020-06-17 13:22:19 +08:00 committed by Alexandre Julliard
parent 10e37819aa
commit bd5a86e564
1 changed files with 24 additions and 0 deletions

View File

@ -953,6 +953,24 @@ static HRESULT write_DocumentCollate(IXMLDOMElement *root, const struct ticket *
return hr;
}
static HRESULT write_JobInputBin(IXMLDOMElement *root, const struct ticket *ticket)
{
IXMLDOMElement *feature, *option = NULL;
HRESULT hr;
hr = create_Feature(root, L"psk:JobInputBin", &feature);
if (hr != S_OK) return hr;
if (ticket->job.input_bin != DMBIN_AUTO)
FIXME("job.input_bin: %d\n", ticket->job.input_bin);
hr = create_Option(feature, L"psk:AutoSelect", &option);
if (option) IXMLDOMElement_Release(option);
IXMLDOMElement_Release(feature);
return hr;
}
static HRESULT write_attributes(IXMLDOMElement *element)
{
HRESULT hr;
@ -1007,6 +1025,12 @@ static HRESULT write_ticket(IStream *stream, const struct ticket *ticket, EPrint
if (hr != S_OK) goto fail;
}
if (scope >= kPTJobScope)
{
hr = write_JobInputBin(root, ticket);
if (hr != S_OK) goto fail;
}
hr = IStream_Write(stream, xmldecl, strlen(xmldecl), NULL);
if (hr != S_OK) goto fail;