summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/print/genprnpsp.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index fca730d4ad4a..1b8d0bd45f3e 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -1218,6 +1218,8 @@ sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i
}
}
+ bool bSuccess(true);
+
// spool files
if( ! i_pFileName && ! bAborted )
{
@@ -1260,6 +1262,7 @@ sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i
aBuf.append( ' ' );
aBuf.append( sal_Int32( i + nCurJob * aPDFFiles.size() ) );
}
+ bSuccess &=
PrinterInfoManager::get().endSpool( pPrinter->GetName(), aBuf.makeStringAndClear(), fp, m_aJobData, bFirstJob );
bFirstJob = false;
}
@@ -1270,7 +1273,10 @@ sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i
}
// job has been spooled
- i_rController.setJobState( bAborted ? view::PrintableState_JOB_ABORTED : view::PrintableState_JOB_SPOOLED );
+ i_rController.setJobState( (bAborted)
+ ? view::PrintableState_JOB_ABORTED
+ : ((bSuccess) ? view::PrintableState_JOB_SPOOLED
+ : view::PrintableState_JOB_SPOOLING_FAILED));
// clean up the temporary PDF files
if( ! i_pFileName || bAborted )