mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=493963; don't call win32 printing functions with --disable-printing; r=stuart
This commit is contained in:
parent
f9840dba79
commit
e7c111742e
@ -169,9 +169,11 @@ gfxWindowsSurface::OptimizeToDDB(HDC dc, const gfxIntSize& size, gfxImageFormat
|
||||
return raw;
|
||||
}
|
||||
|
||||
nsresult gfxWindowsSurface::BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName)
|
||||
nsresult
|
||||
gfxWindowsSurface::BeginPrinting(const nsAString& aTitle,
|
||||
const nsAString& aPrintToFileName)
|
||||
{
|
||||
#ifdef NS_PRINTING
|
||||
#define DOC_TITLE_LENGTH 30
|
||||
DOCINFOW docinfo;
|
||||
|
||||
@ -191,44 +193,68 @@ nsresult gfxWindowsSurface::BeginPrinting(const nsAString& aTitle,
|
||||
::StartDocW(mDC, &docinfo);
|
||||
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsresult gfxWindowsSurface::EndPrinting()
|
||||
nsresult
|
||||
gfxWindowsSurface::EndPrinting()
|
||||
{
|
||||
#ifdef NS_PRINTING
|
||||
int result = ::EndDoc(mDC);
|
||||
if (result <= 0)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsresult gfxWindowsSurface::AbortPrinting()
|
||||
nsresult
|
||||
gfxWindowsSurface::AbortPrinting()
|
||||
{
|
||||
#ifdef NS_PRINTING
|
||||
int result = ::AbortDoc(mDC);
|
||||
if (result <= 0)
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsresult gfxWindowsSurface::BeginPage()
|
||||
nsresult
|
||||
gfxWindowsSurface::BeginPage()
|
||||
{
|
||||
#ifdef NS_PRINTING
|
||||
int result = ::StartPage(mDC);
|
||||
if (result <= 0)
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsresult gfxWindowsSurface::EndPage()
|
||||
nsresult
|
||||
gfxWindowsSurface::EndPage()
|
||||
{
|
||||
#ifdef NS_PRINTING
|
||||
if (mForPrinting)
|
||||
cairo_surface_show_page(CairoSurface());
|
||||
int result = ::EndPage(mDC);
|
||||
if (result <= 0)
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
PRInt32 gfxWindowsSurface::GetDefaultContextFlags() const
|
||||
PRInt32
|
||||
gfxWindowsSurface::GetDefaultContextFlags() const
|
||||
{
|
||||
if (mForPrinting)
|
||||
return gfxContext::FLAG_SIMPLIFY_OPERATORS |
|
||||
|
Loading…
Reference in New Issue
Block a user