Module: wine Branch: master Commit: 99daef624f59947537e5222c5ff47806c43f02be URL: https://source.winehq.org/git/wine.git/?a=commit;h=99daef624f59947537e5222c5...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Wed Jun 17 13:22:27 2020 +0800
prntvpt: Add support for JobCopies to ticket XML writer.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/prntvpt/ticket.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/dlls/prntvpt/ticket.c b/dlls/prntvpt/ticket.c index 591d61cb6e..f012a16f7a 100644 --- a/dlls/prntvpt/ticket.c +++ b/dlls/prntvpt/ticket.c @@ -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", ¶meter); + 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);