diff options
Diffstat (limited to 'vcl/unx/source/printergfx')
-rw-r--r-- | vcl/unx/source/printergfx/common_gfx.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/source/printergfx/printerjob.cxx | 15 |
2 files changed, 14 insertions, 9 deletions
diff --git a/vcl/unx/source/printergfx/common_gfx.cxx b/vcl/unx/source/printergfx/common_gfx.cxx index 14d3a98d69b2..fc366aab838f 100644 --- a/vcl/unx/source/printergfx/common_gfx.cxx +++ b/vcl/unx/source/printergfx/common_gfx.cxx @@ -528,9 +528,9 @@ PrinterGfx::DrawPolyPolygon (sal_uInt32 nPoly, const sal_uInt32* pSizes, const P */ void -PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BYTE* pFlgAry) +PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const sal_uInt8* pFlgAry) { - const sal_uInt32 nBezString = 1024; + const sal_uInt32 nBezString= 1024; sal_Char pString[nBezString]; if ( nPoints > 1 && maLineColor.Is() && pPath ) @@ -579,7 +579,7 @@ PrinterGfx::DrawPolyLineBezier (sal_uInt32 nPoints, const Point* pPath, const BY } void -PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYTE* pFlgAry) +PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const sal_uInt8* pFlgAry) { const sal_uInt32 nBezString = 1024; sal_Char pString[nBezString]; @@ -635,7 +635,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const BYT } void -PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, const Point* const * pPtAry, const BYTE* const* pFlgAry) +PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints, const Point* const * pPtAry, const sal_uInt8* const* pFlgAry) { const sal_uInt32 nBezString = 1024; sal_Char pString[nBezString]; 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; } |