From 16cf7928c89f5c40e1d677b0ee602231235c0a31 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Fri, 10 Feb 2006 22:49:23 +0000 Subject: [PATCH] 1) It moves the BeginDocument to a earlier place in the call change 2) Fixes the negitive page range display problem 3) Improves performance by reducing the delay on pages not in the page range, i.e. before if you printed the 30th page out of 31 you had to wait 15 secs to get to the 30th page to print it. 4) Added AbortDocument, so now when Print jobs are cancelled we call AbortDocument and remove them from the print spooler 5) Fixed a couple of minor issue with Canceling and cancelling mail printings 6) selection was not printing correctly. The problem with selection was that the clip was not being set corrctly. Bug 115227 & 123181 r=dcone,sspitzer sr=attainasi --- widget/src/mac/nsDeviceContextMac.cpp | 9 +++++++++ widget/src/mac/nsDeviceContextMac.h | 1 + widget/src/mac/nsDeviceContextSpecX.cpp | 5 +++++ widget/src/mac/nsDeviceContextSpecX.h | 2 ++ 4 files changed, 17 insertions(+) diff --git a/widget/src/mac/nsDeviceContextMac.cpp b/widget/src/mac/nsDeviceContextMac.cpp index 27c9c744607a..b9ea14eef42f 100644 --- a/widget/src/mac/nsDeviceContextMac.cpp +++ b/widget/src/mac/nsDeviceContextMac.cpp @@ -692,6 +692,15 @@ NS_IMETHODIMP nsDeviceContextMac::EndDocument(void) #endif } +/** --------------------------------------------------- + * See documentation in nsIDeviceContext.h + * @update 12/9/98 dwc + */ +NS_IMETHODIMP nsDeviceContextMac::AbortDocument(void) +{ + return EndDocument(); +} + /** --------------------------------------------------- * See documentation in nsIDeviceContext.h diff --git a/widget/src/mac/nsDeviceContextMac.h b/widget/src/mac/nsDeviceContextMac.h index f5f08e854a5c..c4db92f3e644 100644 --- a/widget/src/mac/nsDeviceContextMac.h +++ b/widget/src/mac/nsDeviceContextMac.h @@ -81,6 +81,7 @@ public: NS_IMETHOD BeginDocument(PRUnichar * aTitle); NS_IMETHOD EndDocument(void); + NS_IMETHOD AbortDocument(void); NS_IMETHOD BeginPage(void); NS_IMETHOD EndPage(void); diff --git a/widget/src/mac/nsDeviceContextSpecX.cpp b/widget/src/mac/nsDeviceContextSpecX.cpp index 57ebe43cc9d5..b763aae0cae4 100644 --- a/widget/src/mac/nsDeviceContextSpecX.cpp +++ b/widget/src/mac/nsDeviceContextSpecX.cpp @@ -169,6 +169,11 @@ NS_IMETHODIMP nsDeviceContextSpecX::EndDocument() return NS_OK; } +NS_IMETHODIMP nsDeviceContextSpecX::AbortDocument() +{ + return EndDocument(); +} + NS_IMETHODIMP nsDeviceContextSpecX::BeginPage() { // see http://devworld.apple.com/techpubs/carbon/graphics/CarbonPrintingManager/Carbon_Printing_Manager/Functions/PMSessionBeginPage.html diff --git a/widget/src/mac/nsDeviceContextSpecX.h b/widget/src/mac/nsDeviceContextSpecX.h index ea60f12a834f..762596b22b29 100644 --- a/widget/src/mac/nsDeviceContextSpecX.h +++ b/widget/src/mac/nsDeviceContextSpecX.h @@ -88,6 +88,8 @@ public: NS_IMETHOD EndDocument(); + NS_IMETHOD AbortDocument(); + NS_IMETHOD BeginPage(); NS_IMETHOD EndPage();