diff options
Diffstat (limited to 'vcl/unx/source/printergfx/printerjob.cxx')
-rw-r--r-- | vcl/unx/source/printergfx/printerjob.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx index d4e488eeb1ab..cab367f1693a 100644 --- a/vcl/unx/source/printergfx/printerjob.cxx +++ b/vcl/unx/source/printergfx/printerjob.cxx @@ -347,7 +347,8 @@ PrinterJob::~PrinterJob () delete mpJobTrailer; // XXX should really call osl::remove routines - removeSpoolDir (maSpoolDirName); + if( maSpoolDirName.getLength() ) + removeSpoolDir (maSpoolDirName); // osl::Directory::remove (maSpoolDirName); } @@ -415,7 +416,7 @@ PrinterJob::StartJob ( rtl::OUString aFilterWS; // Creator (this application) - aFilterWS = WhitespaceToSpace( rAppName, FALSE ); + aFilterWS = WhitespaceToSpace( rAppName, sal_False ); WritePS (mpJobHeader, "%%Creator: ("); WritePS (mpJobHeader, aFilterWS); WritePS (mpJobHeader, ")\n"); @@ -453,14 +454,14 @@ PrinterJob::StartJob ( * use the filename, if it contains only ascii * else omit %%Title */ - aFilterWS = WhitespaceToSpace( rJobName, FALSE ); + aFilterWS = WhitespaceToSpace( rJobName, sal_False ); rtl::OUString aTitle( aFilterWS ); if( ! isAscii( aTitle ) ) { sal_Int32 nIndex = 0; while( nIndex != -1 ) aTitle = rFileName.getToken( 0, '/', nIndex ); - aTitle = WhitespaceToSpace( aTitle, FALSE ); + aTitle = WhitespaceToSpace( aTitle, sal_False ); if( ! isAscii( aTitle ) ) aTitle = rtl::OUString(); } @@ -501,6 +502,10 @@ PrinterJob::StartJob ( sal_Bool PrinterJob::EndJob () { + // no pages ? that really means no print job + if( maPageList.empty() ) + return sal_False; + // write document setup (done here because it // includes the accumulated fonts if( mpJobHeader ) @@ -616,7 +621,7 @@ PrinterJob::EndJob () { PrinterInfoManager& rPrinterInfoManager = PrinterInfoManager::get(); if (0 == rPrinterInfoManager.endSpool( m_aLastJobData.m_aPrinterName, - maJobTitle, pDestFILE, m_aDocumentJobData )) + maJobTitle, pDestFILE, m_aDocumentJobData, true )) { bSuccess = sal_False; } |