No bug - Os/2 support for print preview

This commit is contained in:
mkaply%us.ibm.com 2001-11-26 21:04:19 +00:00
Родитель a7c5ba2a04
Коммит 4620e7e967
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -295,6 +295,12 @@ nsDeviceContextOS2 :: FindScreen ( nsIScreen** outScreen )
// Create a rendering context against our hdc for a printer // Create a rendering context against our hdc for a printer
nsresult nsDeviceContextOS2::CreateRenderingContext( nsIRenderingContext *&aContext) nsresult nsDeviceContextOS2::CreateRenderingContext( nsIRenderingContext *&aContext)
{ {
#ifdef NS_PRINT_PREVIEW
// Defer to Alt when there is one
if (mAltDC && (mUseAltDC & kUseAltDCFor_CREATE_RC))
return mAltDC->CreateRenderingContext(aContext);
#endif
NS_ASSERTION( mPrintDC, "CreateRenderingContext for non-print DC"); NS_ASSERTION( mPrintDC, "CreateRenderingContext for non-print DC");
nsIRenderingContext *pContext = new nsRenderingContextOS2; nsIRenderingContext *pContext = new nsRenderingContextOS2;
@ -757,6 +763,12 @@ NS_IMETHODIMP nsDeviceContextOS2 :: ConvertPixel(nscolor aColor, PRUint32 & aPix
NS_IMETHODIMP nsDeviceContextOS2 :: GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight) NS_IMETHODIMP nsDeviceContextOS2 :: 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
if ( mSpec ) if ( mSpec )
{ {
// we have a printer device // we have a printer device