prntvpt: Add support for DocumentCollate to ticket XML writer.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f81aef7243
commit
10e37819aa
|
@ -935,6 +935,24 @@ static HRESULT write_PageOrientation(IXMLDOMElement *root, const struct ticket *
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static HRESULT write_DocumentCollate(IXMLDOMElement *root, const struct ticket *ticket)
|
||||||
|
{
|
||||||
|
IXMLDOMElement *feature, *option = NULL;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
hr = create_Feature(root, L"psk:DocumentCollate", &feature);
|
||||||
|
if (hr != S_OK) return hr;
|
||||||
|
|
||||||
|
if (ticket->document.collate == DMCOLLATE_TRUE)
|
||||||
|
hr = create_Option(feature, L"psk:Collated", &option);
|
||||||
|
else /* DMCOLLATE_FALSE */
|
||||||
|
hr = create_Option(feature, L"psk:Uncollated", &option);
|
||||||
|
|
||||||
|
if (option) IXMLDOMElement_Release(option);
|
||||||
|
IXMLDOMElement_Release(feature);
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT write_attributes(IXMLDOMElement *element)
|
static HRESULT write_attributes(IXMLDOMElement *element)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -983,6 +1001,12 @@ static HRESULT write_ticket(IStream *stream, const struct ticket *ticket, EPrint
|
||||||
hr = write_PageOrientation(root, ticket);
|
hr = write_PageOrientation(root, ticket);
|
||||||
if (hr != S_OK) goto fail;
|
if (hr != S_OK) goto fail;
|
||||||
|
|
||||||
|
if (scope >= kPTDocumentScope)
|
||||||
|
{
|
||||||
|
hr = write_DocumentCollate(root, ticket);
|
||||||
|
if (hr != S_OK) goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
hr = IStream_Write(stream, xmldecl, strlen(xmldecl), NULL);
|
hr = IStream_Write(stream, xmldecl, strlen(xmldecl), NULL);
|
||||||
if (hr != S_OK) goto fail;
|
if (hr != S_OK) goto fail;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue