[PATCH v2 02/12] prntvpt: Add support for PageOutputColor to ticket XML writer.
Dmitry Timoshkov
dmitry at baikal.ru
Wed Jun 17 00:22:02 CDT 2020
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/prntvpt/ticket.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/dlls/prntvpt/ticket.c b/dlls/prntvpt/ticket.c
index 548da5977c..f31236675f 100644
--- a/dlls/prntvpt/ticket.c
+++ b/dlls/prntvpt/ticket.c
@@ -853,6 +853,24 @@ fail:
return hr;
}
+static HRESULT write_PageOutputColor(IXMLDOMElement *root, const struct ticket *ticket)
+{
+ IXMLDOMElement *feature, *option = NULL;
+ HRESULT hr;
+
+ hr = create_Feature(root, L"psk:PageOutputColor", &feature);
+ if (hr != S_OK) return hr;
+
+ if (ticket->page.color == DMCOLOR_COLOR)
+ hr = create_Option(feature, L"psk:Color", &option);
+ else /* DMCOLOR_MONOCHROME */
+ hr = create_Option(feature, L"psk:Monochrome", &option);
+
+ if (option) IXMLDOMElement_Release(option);
+ IXMLDOMElement_Release(feature);
+ return hr;
+}
+
static HRESULT write_attributes(IXMLDOMElement *element)
{
HRESULT hr;
@@ -892,6 +910,8 @@ static HRESULT write_ticket(IStream *stream, const struct ticket *ticket, EPrint
hr = write_PageMediaSize(root, ticket);
if (hr != S_OK) goto fail;
+ hr = write_PageOutputColor(root, ticket);
+ if (hr != S_OK) goto fail;
hr = IStream_Write(stream, xmldecl, strlen(xmldecl), NULL);
if (hr != S_OK) goto fail;
--
2.26.2
More information about the wine-devel
mailing list