prntvpt: Add support for PageOrientation 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
0b53ba31f9
commit
f81aef7243
|
@ -917,6 +917,24 @@ fail:
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT write_PageOrientation(IXMLDOMElement *root, const struct ticket *ticket)
|
||||
{
|
||||
IXMLDOMElement *feature, *option = NULL;
|
||||
HRESULT hr;
|
||||
|
||||
hr = create_Feature(root, L"psk:PageOrientation", &feature);
|
||||
if (hr != S_OK) return hr;
|
||||
|
||||
if (ticket->page.orientation == DMORIENT_PORTRAIT)
|
||||
hr = create_Option(feature, L"psk:Portrait", &option);
|
||||
else /* DMORIENT_LANDSCAPE */
|
||||
hr = create_Option(feature, L"psk:Landscape", &option);
|
||||
|
||||
if (option) IXMLDOMElement_Release(option);
|
||||
IXMLDOMElement_Release(feature);
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT write_attributes(IXMLDOMElement *element)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
@ -962,6 +980,8 @@ static HRESULT write_ticket(IStream *stream, const struct ticket *ticket, EPrint
|
|||
if (hr != S_OK) goto fail;
|
||||
hr = write_PageResolution(root, ticket);
|
||||
if (hr != S_OK) goto fail;
|
||||
hr = write_PageOrientation(root, ticket);
|
||||
if (hr != S_OK) goto fail;
|
||||
|
||||
hr = IStream_Write(stream, xmldecl, strlen(xmldecl), NULL);
|
||||
if (hr != S_OK) goto fail;
|
||||
|
|
Loading…
Reference in New Issue