From 4bbe997dc38804f0b2747fdfe22a83676bbd49a2 Mon Sep 17 00:00:00 2001 From: "timeless%mac.com" Date: Wed, 19 Dec 2001 00:10:02 +0000 Subject: [PATCH] =?UTF-8?q?Bugzilla=20Bug=20107562=C3=BFImplement=20Print?= =?UTF-8?q?=20Preview=20patch=20by=20Roland.Mainz@informatik.med.uni-giess?= =?UTF-8?q?en.de=20r=3Drods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@110745 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp b/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp index 9719a3733f3..26035aaf14c 100644 --- a/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp +++ b/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp @@ -190,6 +190,13 @@ NS_IMETHODIMP nsDeviceContextXlib::CreateRenderingContext(nsIRenderingContext *& { PR_LOG(DeviceContextXlibLM, PR_LOG_DEBUG, ("nsDeviceContextXlib::CreateRenderingContext()\n")); +#ifdef NS_PRINT_PREVIEW + /* Defer to Alt when there is one */ + if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC)) { + return mAltDC->CreateRenderingContext(aContext); + } +#endif /* NS_PRINT_PREVIEW */ + nsIRenderingContext *context; nsDrawingSurfaceXlibImpl *surface = nsnull; nsresult rv; @@ -342,6 +349,13 @@ NS_IMETHODIMP nsDeviceContextXlib::CheckFontExistence(const nsString& aFontName) NS_IMETHODIMP nsDeviceContextXlib::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight) { +#ifdef NS_PRINT_PREVIEW + /* Defer to Alt when there is one */ + if (mAltDC && (mUseAltDC & kUseAltDCFor_SURFACE_DIM)) { + return mAltDC->GetDeviceSurfaceDimensions(aWidth, aHeight); + } +#endif /* NS_PRINT_PREVIEW */ + if (mWidth == -1) mWidth = NSToIntRound(mWidthFloat * mDevUnitsToAppUnits);