diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-08-25 15:14:51 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-08-25 15:14:51 +0000 |
commit | 701a4883d0036aefadb292747a1f0bc7ff4a052a (patch) | |
tree | 25bbf86064d3da738af5cd78ec6172ed096326df /vcl | |
parent | ac9336fdbc79c577bb4910c363640e59051bec0c (diff) |
INTEGRATION: CWS gslpatches4 (1.49.6); FILE MERGED
2005/07/11 14:47:53 pl 1.49.6.2: #i51673# catch some errors in printer error handling
2005/07/11 12:15:03 pl 1.49.6.1: #i51673# report error in EndJob
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/print.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index dc8f39ba3050..9dc6ac0fb18b 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -2,9 +2,9 @@ * * $RCSfile: print.cxx,v $ * - * $Revision: 1.49 $ + * $Revision: 1.50 $ * - * last change: $Author: obo $ $Date: 2005-07-06 09:21:01 $ + * last change: $Author: kz $ $Date: 2005-08-25 16:14:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1394,8 +1394,11 @@ void Printer::ImplEndPrint() mbPrinting = FALSE; mnCurPrintPage = 0; maJobName.Erase(); - mpQPrinter->Destroy(); - mpQPrinter = NULL; + if( mpQPrinter ) // not necessarily filled e.g. after AbortJob + { + mpQPrinter->Destroy(); + mpQPrinter = NULL; + } EndPrint(); } @@ -1526,8 +1529,9 @@ BOOL Printer::StartJob( const XubString& rJobName ) BOOL Printer::EndJob() { + BOOL bRet = FALSE; if ( !IsJobActive() ) - return FALSE; + return bRet; DBG_ASSERT( !mbInPrintPage, "Printer::EndJob() - StartPage() without EndPage() called" ); @@ -1539,6 +1543,8 @@ BOOL Printer::EndJob() mnCurPage = 0; + bRet = TRUE; + if ( mpPrinter ) { mbPrinting = FALSE; @@ -1546,7 +1552,7 @@ BOOL Printer::EndJob() maJobName.Erase(); mbDevOutput = FALSE; - mpPrinter->EndJob(); + bRet = mpPrinter->EndJob(); // Hier den Drucker nicht asyncron zerstoeren, da es // W95 nicht verkraftet, wenn gleichzeitig gedruckt wird // und ein Druckerobjekt zerstoert wird @@ -1556,11 +1562,9 @@ BOOL Printer::EndJob() } else mpQPrinter->EndQueuePrint(); - - return TRUE; } - return FALSE; + return bRet; } // ----------------------------------------------------------------------- |