Module: wine Branch: master Commit: 9b02ac6d42d4aea5300e228c799b329d505088fb URL: https://gitlab.winehq.org/wine/wine/-/commit/9b02ac6d42d4aea5300e228c799b329...
Author: Brendan McGrath bmcgrath@codeweavers.com Date: Thu Jan 18 12:43:28 2024 +1100
gdi32: Ignore Datatype when StartDoc is called.
---
dlls/gdi32/dc.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 5f79150cb93..87335469b9b 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -2444,8 +2444,8 @@ INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc ) info.cbSize = sizeof(info); }
- TRACE("DocName %s, Output %s, Datatype %s, fwType %#lx\n", - debugstr_w(info.lpszDocName), debugstr_w(info.lpszOutput), + TRACE("Size: %d, DocName %s, Output %s, Datatype %s, fwType %#lx\n", + info.cbSize, debugstr_w(info.lpszDocName), debugstr_w(info.lpszOutput), debugstr_w(info.lpszDatatype), info.fwType);
if (!(dc_attr = get_dc_attr( hdc ))) return SP_ERROR; @@ -2461,22 +2461,22 @@ INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc ) output = StartDocDlgW( print->printer, &info ); if (output) info.lpszOutput = output;
- if (!info.lpszDatatype || !wcsicmp(info.lpszDatatype, L"EMF")) + if (info.lpszDatatype && wcsicmp(info.lpszDatatype, L"EMF")) + FIXME("Ignoring DataType %s and forcing EMF\n", debugstr_w(info.lpszDatatype)); + + spool_info.pDocName = (WCHAR *)info.lpszDocName; + spool_info.pOutputFile = (WCHAR *)info.lpszOutput; + spool_info.pDatatype = (WCHAR *)L"NT EMF 1.003"; + if ((ret = StartDocPrinterW( print->printer, 1, (BYTE *)&spool_info ))) { - spool_info.pDocName = (WCHAR *)info.lpszDocName; - spool_info.pOutputFile = (WCHAR *)info.lpszOutput; - spool_info.pDatatype = (WCHAR *)L"NT EMF 1.003"; - if ((ret = StartDocPrinterW( print->printer, 1, (BYTE *)&spool_info ))) + if (!spool_start_doc( dc_attr, print->printer, &info )) { - if (!spool_start_doc( dc_attr, print->printer, &info )) - { - AbortDoc( hdc ); - ret = 0; - } - HeapFree( GetProcessHeap(), 0, output ); - print->flags |= CALL_START_PAGE; - return ret; + AbortDoc( hdc ); + ret = 0; } + HeapFree( GetProcessHeap(), 0, output ); + print->flags |= CALL_START_PAGE; + return ret; } }