Bugzilla Bug 107562ÿImplement Print Preview

patch by Roland.Mainz@informatik.med.uni-giessen.de r=rods


git-svn-id: svn://10.0.0.236/trunk@110745 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mac.com
2001-12-19 00:10:02 +00:00
parent 8365ecd5f2
commit 4bbe997dc3

View File

@@ -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);