summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx1
-rw-r--r--vcl/inc/vcl/impprn.hxx3
-rw-r--r--vcl/inc/vcl/print.h12
-rw-r--r--vcl/inc/vcl/print.hxx48
-rw-r--r--vcl/source/gdi/makefile.mk2
-rw-r--r--vcl/source/gdi/print.cxx362
-rw-r--r--vcl/source/gdi/print2.cxx2
-rw-r--r--vcl/source/gdi/print3.cxx11
8 files changed, 86 insertions, 355 deletions
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index f58c63b19079..8e22a83e1403 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -38,7 +38,6 @@
#include "saldata.hxx"
#include "vcl/jobset.h"
#include "vcl/salptype.hxx"
-#include "vcl/impprn.hxx"
#include "vcl/print.hxx"
#include "vcl/unohelp.hxx"
diff --git a/vcl/inc/vcl/impprn.hxx b/vcl/inc/vcl/impprn.hxx
index c86090e8b49f..0cd6e9688201 100644
--- a/vcl/inc/vcl/impprn.hxx
+++ b/vcl/inc/vcl/impprn.hxx
@@ -28,7 +28,7 @@
*
************************************************************************/
-#ifndef _SV_IMPPRN_HXX
+#if 0
#define _SV_IMPPRN_HXX
#include <vcl/print.hxx>
@@ -107,7 +107,6 @@ public:
/**
used by pull implementation to emit the next page
*/
- using Printer::PrintPage;
void PrintPage( unsigned int nPage );
/**
used by pull implementation to get the number of physical pages
diff --git a/vcl/inc/vcl/print.h b/vcl/inc/vcl/print.h
index bc74b6441f28..12c7439aa5b3 100644
--- a/vcl/inc/vcl/print.h
+++ b/vcl/inc/vcl/print.h
@@ -44,18 +44,6 @@ class JobSetup;
namespace vcl
{ class PrinterListener; }
-// ------------------------
-// - private printer data -
-// ------------------------
-struct ImplPrivatePrinterData
-{
- bool mbNextJobIsQuick;
-
- ImplPrivatePrinterData() :
- mbNextJobIsQuick( false )
- {}
-};
-
// --------------------
// - ImplPrnQueueData -
// --------------------
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index 104e51cb4f24..18529c07b432 100644
--- a/vcl/inc/vcl/print.hxx
+++ b/vcl/inc/vcl/print.hxx
@@ -53,8 +53,6 @@ struct SalPrinterQueueInfo;
class SalPrinter;
class VirtualDevice;
class Window;
-class ImplQPrinter;
-struct ImplPrivatePrinterData;
namespace vcl {
class PrinterListener;
@@ -224,16 +222,12 @@ class VCL_DLLPUBLIC Printer : public OutputDevice
friend class ImplQPrinter;
private:
- ImplPrivatePrinterData* mpPrinterData;
SalInfoPrinter* mpInfoPrinter;
SalPrinter* mpPrinter;
- Printer* mpJobPrinter;
SalGraphics* mpJobGraphics;
Printer* mpPrev;
Printer* mpNext;
VirtualDevice* mpDisplayDev;
- ImplQPrinter* mpQPrinter;
- GDIMetaFile* mpQMtf;
PrinterOptions* mpPrinterOptions;
XubString maPrinterName;
XubString maDriver;
@@ -258,9 +252,6 @@ private:
BOOL mbUserSetupCompleted;
BOOL mbUserSetupResult;
Link maErrorHdl;
- Link maStartPrintHdl;
- Link maEndPrintHdl;
- Link maPrintPageHdl;
SAL_DLLPRIVATE void ImplInitData();
SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
@@ -276,24 +267,19 @@ private:
static SAL_DLLPRIVATE ULONG ImplSalPrinterErrorCodeToVCL( ULONG nError );
-public:
+private:
SAL_DLLPRIVATE void ImplEndPrint();
- SAL_DLLPRIVATE void ImplUpdateQuickStatus();
SAL_DLLPRIVATE BOOL StartJob( const XubString& rJobName );
SAL_DLLPRIVATE BOOL EndJob();
- SAL_DLLPRIVATE BOOL StartPage();
- SAL_DLLPRIVATE BOOL EndPage();
-private:
SAL_DLLPRIVATE Printer( const Printer& rPrinter );
SAL_DLLPRIVATE Printer& operator =( const Printer& rPrinter );
-
-#ifdef _SPOOLPRINTER_EXT
+public:
+ SAL_DLLPRIVATE void ImplStartPage();
+ SAL_DLLPRIVATE void ImplEndPage();
public:
void DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient );
void DrawGradientEx( OutputDevice* pOut, const PolyPolygon& rPolyPoly, const Gradient& rGradient );
-#endif // _SPOOLPRINTER_EXT
-
protected:
void SetSelfAsQueuePrinter( BOOL bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; }
@@ -312,9 +298,6 @@ public:
static XubString GetDefaultPrinterName();
virtual void Error();
- virtual void StartPrint();
- virtual void EndPrint();
- virtual void PrintPage();
const XubString& GetName() const { return maPrinterName; }
const XubString& GetDriverName() const { return maDriver; }
@@ -371,7 +354,6 @@ public:
USHORT GetCopyCount() const { return mnCopyCount; }
BOOL IsCollateCopy() const { return mbCollateCopy; }
- USHORT GetCurPrintPage() const { return mnCurPrintPage; }
BOOL IsPrinting() const { return mbPrinting; }
void SetPrintFile( const XubString& rFileName ) { maPrintFile = rFileName; }
@@ -383,36 +365,14 @@ public:
USHORT GetCurPage() const { return mnCurPage; }
BOOL IsJobActive() const { return mbJobActive; }
- void SetPageQueueSize( USHORT nPages ) { mnPageQueueSize = nPages; }
- USHORT GetPageQueueSize() const { return mnPageQueueSize; }
-
ULONG GetError() const { return ERRCODE_TOERROR(mnError); }
ULONG GetErrorCode() const { return mnError; }
void SetErrorHdl( const Link& rLink ) { maErrorHdl = rLink; }
const Link& GetErrorHdl() const { return maErrorHdl; }
- void SetStartPrintHdl( const Link& rLink ) { maStartPrintHdl = rLink; }
- const Link& GetStartPrintHdl() const { return maStartPrintHdl; }
- void SetEndPrintHdl( const Link& rLink ) { maEndPrintHdl = rLink; }
- const Link& GetEndPrintHdl() const { return maEndPrintHdl; }
- void SetPrintPageHdl( const Link& rLink ) { maPrintPageHdl = rLink; }
- const Link& GetPrintPageHdl() const { return maPrintPageHdl; }
void Compat_OldPrinterMetrics( bool bSet );
- /** Notify that the next StartJob belongs to a UI less "direct print" job
- *
- * deprecated: the canonical way to notify a UI less job is to set the
- * JobSetup value "IsQuickJob" to "true". If set at all, the "IsQuickJob" value
- * on JobSetup will be preferred. However if no "IsQuickJob" value is set,
- * setting SetNextJobIsQuick will cause the following StartJob to set this value
- * to "true" in the current JobSetup.
- *
- * the paramter can be set to "false" again in case a job was not started and the
- * printer is to be reused.
- */
- void SetNextJobIsQuick( bool bQuick = true );
-
/** checks the printer list and updates it necessary
*
* sends a DataChanged event of type DATACHANGED_PRINTER
diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk
index 57d5804a8afa..05dc998d6651 100644
--- a/vcl/source/gdi/makefile.mk
+++ b/vcl/source/gdi/makefile.mk
@@ -76,7 +76,6 @@ SLOFILES= $(SLO)$/salmisc.obj \
$(SLO)$/impgraph.obj \
$(SLO)$/impimagetree.obj \
$(SLO)$/imagerepository.obj \
- $(SLO)$/impprn.obj \
$(SLO)$/impvect.obj \
$(SLO)$/implncvt.obj \
$(SLO)$/jobset.obj \
@@ -138,7 +137,6 @@ EXCEPTIONSFILES= $(SLO)$/salmisc.obj \
$(SLO)$/pngread.obj \
$(SLO)$/pngwrite.obj \
$(SLO)$/virdev.obj \
- $(SLO)$/impprn.obj \
$(SLO)$/graphictools.obj
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index a74038c4eaaa..a3e33f236166 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -31,8 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#define _SPOOLPRINTER_EXT
-#define _RMPRINTER_EXT
#define ENABLE_BYTESTRING_STREAM_OPERATORS
#include <list>
@@ -58,7 +56,6 @@
#include <vcl/print.h>
#include <vcl/gdimtf.hxx>
#include <vcl/metaact.hxx>
-#include <vcl/impprn.hxx>
#include <vcl/print.hxx>
#include <comphelper/processfactory.hxx>
@@ -369,7 +366,6 @@ XubString Printer::GetDefaultPrinterName()
void Printer::ImplInitData()
{
- mpPrinterData = new ImplPrivatePrinterData();
mbDevOutput = FALSE;
meOutDevType = OUTDEV_PRINTER;
mbDefPrinter = FALSE;
@@ -387,8 +383,6 @@ void Printer::ImplInitData()
mpInfoPrinter = NULL;
mpPrinter = NULL;
mpDisplayDev = NULL;
- mpQPrinter = NULL;
- mpQMtf = NULL;
mbIsQueuePrinter = FALSE;
mpPrinterOptions = new PrinterOptions;
@@ -435,7 +429,6 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup );
mpPrinter = NULL;
- mpJobPrinter = NULL;
mpJobGraphics = NULL;
ImplUpdateJobSetupPaper( maJobSetup );
@@ -467,7 +460,6 @@ void Printer::ImplInitDisplay( const Window* pWindow )
mpInfoPrinter = NULL;
mpPrinter = NULL;
- mpJobPrinter = NULL;
mpJobGraphics = NULL;
if ( pWindow )
@@ -623,11 +615,6 @@ Printer::~Printer()
{
DBG_ASSERT( !IsPrinting(), "Printer::~Printer() - Job is printing" );
DBG_ASSERT( !IsJobActive(), "Printer::~Printer() - Job is active" );
- DBG_ASSERT( !mpQPrinter, "Printer::~Printer() - QueuePrinter not destroyed" );
- DBG_ASSERT( !mpQMtf, "Printer::~Printer() - QueueMetafile not destroyed" );
-
- delete mpPrinterData;
- mpPrinterData = NULL;
delete mpPrinterOptions;
@@ -674,21 +661,11 @@ Printer::~Printer()
}
// -----------------------------------------------------------------------
-void Printer::SetNextJobIsQuick( bool bQuick )
-{
- mpPrinterData->mbNextJobIsQuick = bQuick;
- if( mpQPrinter )
- mpQPrinter->SetNextJobIsQuick( bQuick );
-}
-
-// -----------------------------------------------------------------------
void Printer::Compat_OldPrinterMetrics( bool bSet )
{
// propagate flag
if( mpInfoPrinter )
mpInfoPrinter->m_bCompatMetrics = bSet;
- if( mpQPrinter )
- mpQPrinter->Compat_OldPrinterMetrics( bSet );
// get new font data
ImplUpdateFontData( TRUE );
@@ -1326,27 +1303,6 @@ void Printer::Error()
// -----------------------------------------------------------------------
-void Printer::StartPrint()
-{
- maStartPrintHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
-void Printer::EndPrint()
-{
- maEndPrintHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
-void Printer::PrintPage()
-{
- maPrintPageHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
{
@@ -1374,12 +1330,6 @@ void Printer::ImplEndPrint()
mbPrinting = FALSE;
mnCurPrintPage = 0;
maJobName.Erase();
- if( mpQPrinter ) // not necessarily filled e.g. after AbortJob
- {
- mpQPrinter->Destroy();
- mpQPrinter = NULL;
- }
- EndPrint();
}
// -----------------------------------------------------------------------
@@ -1394,31 +1344,6 @@ IMPL_LINK( Printer, ImplDestroyPrinterAsync, void*, pSalPrinter )
// -----------------------------------------------------------------------
-void Printer::ImplUpdateQuickStatus()
-{
- // remove possibly added "IsQuickJob"
- if( mpPrinterData->mbNextJobIsQuick )
- {
- rtl::OUString aKey( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) );
- // const data means not really const, but change all references
- // to refcounted job setup
- ImplJobSetup* pImpSetup = maJobSetup.ImplGetConstData();
- pImpSetup->maValueMap.erase( aKey );
- mpPrinterData->mbNextJobIsQuick = false;
- }
-}
-
-class QuickGuard
-{
- Printer* mpPrinter;
- public:
- QuickGuard( Printer* pPrn ) : mpPrinter( pPrn ) {}
- ~QuickGuard()
- {
- mpPrinter->ImplUpdateQuickStatus();
- }
-};
-
BOOL Printer::StartJob( const XubString& rJobName )
{
mnError = PRINTER_OK;
@@ -1429,139 +1354,72 @@ BOOL Printer::StartJob( const XubString& rJobName )
if ( IsJobActive() || IsPrinting() )
return FALSE;
- if( mpPrinterData->mbNextJobIsQuick )
- {
- String aKey( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) );
- if( maJobSetup.GetValue( aKey ).Len() == 0 )
- maJobSetup.SetValue( aKey, String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
- }
-
- QuickGuard aQGuard( this );
-
ULONG nCopies = mnCopyCount;
BOOL bCollateCopy = mbCollateCopy;
BOOL bUserCopy = FALSE;
- if ( IsQueuePrinter() )
+ if ( nCopies > 1 )
{
- if ( ((ImplQPrinter*)this)->IsUserCopy() )
+ ULONG nDevCopy;
+
+ if ( bCollateCopy )
+ nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES );
+ else
+ nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COPIES );
+
+ // Muessen Kopien selber gemacht werden?
+ if ( nCopies > nDevCopy )
{
+ bUserCopy = TRUE;
nCopies = 1;
bCollateCopy = FALSE;
}
}
else
- {
- if ( nCopies > 1 )
- {
- ULONG nDevCopy;
-
- if ( bCollateCopy )
- nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES );
- else
- nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COPIES );
+ bCollateCopy = FALSE;
- // Muessen Kopien selber gemacht werden?
- if ( nCopies > nDevCopy )
- {
- bUserCopy = TRUE;
- nCopies = 1;
- bCollateCopy = FALSE;
- }
- }
- else
- bCollateCopy = FALSE;
-
- // we need queue printing
- if( !mnPageQueueSize )
- mnPageQueueSize = 1;
- }
-
- if ( !mnPageQueueSize )
- {
- ImplSVData* pSVData = ImplGetSVData();
- mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter );
-
- if ( !mpPrinter )
- return FALSE;
+ ImplSVData* pSVData = ImplGetSVData();
+ mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter );
- XubString* pPrintFile;
- if ( mbPrintFile )
- pPrintFile = &maPrintFile;
- else
- pPrintFile = NULL;
-
- // #125075# StartJob can Reschedule on Windows, sfx
- // depends on IsPrinting() in case of closing a document
- BOOL bSaveNewJobSetup = mbNewJobSetup;
- mbNewJobSetup = FALSE;
- String aSaveJobName = maJobName;
- maJobName = rJobName;
- mnCurPage = 1;
- mnCurPrintPage = 1;
- mbPrinting = TRUE;
-
- if( ! ImplGetSVData()->maGDIData.mbPrinterPullModel )
- {
- // in the pull model the job can only be started when
- // we have collected all pages to be printed
- if ( !mpPrinter->StartJob( pPrintFile, rJobName, Application::GetDisplayName(),
- nCopies, bCollateCopy,
- maJobSetup.ImplGetConstData() ) )
- {
- mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter->GetErrorCode() );
- if ( !mnError )
- mnError = PRINTER_GENERALERROR;
- pSVData->mpDefInst->DestroyPrinter( mpPrinter );
- mbNewJobSetup = bSaveNewJobSetup;
- maJobName = aSaveJobName;
- mnCurPage = 0;
- mnCurPrintPage = 0;
- mbPrinting = FALSE;
- mpPrinter = NULL;
- return FALSE;
- }
- }
+ if ( !mpPrinter )
+ return FALSE;
- mbJobActive = TRUE;
- StartPrint();
- }
+ XubString* pPrintFile;
+ if ( mbPrintFile )
+ pPrintFile = &maPrintFile;
else
+ pPrintFile = NULL;
+
+ // #125075# StartJob can Reschedule on Windows, sfx
+ // depends on IsPrinting() in case of closing a document
+ BOOL bSaveNewJobSetup = mbNewJobSetup;
+ mbNewJobSetup = FALSE;
+ String aSaveJobName = maJobName;
+ maJobName = rJobName;
+ mnCurPage = 1;
+ mnCurPrintPage = 1;
+ mbPrinting = TRUE;
+
+ if( ! ImplGetSVData()->maGDIData.mbPrinterPullModel )
{
- mpQPrinter = new ImplQPrinter( this );
- if( mpInfoPrinter )
- mpQPrinter->Compat_OldPrinterMetrics( mpInfoPrinter->m_bCompatMetrics );
- mpQPrinter->SetDigitLanguage( GetDigitLanguage() );
- mpQPrinter->SetUserCopy( bUserCopy );
- mpQPrinter->SetPrinterOptions( *mpPrinterOptions );
-
- // #125075# StartJob can Reschedule on Windows, sfx
- // depends on IsPrinting() in case of closing a document
- BOOL bSaveNewJobSetup = mbNewJobSetup;
- mbNewJobSetup = FALSE;
- String aSaveJobName = maJobName;
- maJobName = rJobName;
- mnCurPage = 1;
- mbPrinting = TRUE;
-
- if ( mpQPrinter->StartJob( rJobName ) )
- {
- mbJobActive = TRUE;
- StartPrint();
- mpQPrinter->StartQueuePrint();
- }
- else
+ if ( !mpPrinter->StartJob( pPrintFile, rJobName, Application::GetDisplayName(),
+ nCopies, bCollateCopy,
+ maJobSetup.ImplGetConstData() ) )
{
- mbNewJobSetup = bSaveNewJobSetup;
- maJobName = aSaveJobName;
- mnCurPage = 0;
- mbPrinting = FALSE;
- mnError = mpQPrinter->GetErrorCode();
- mpQPrinter->Destroy();
- mpQPrinter = NULL;
+ mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter->GetErrorCode() );
+ if ( !mnError )
+ mnError = PRINTER_GENERALERROR;
+ pSVData->mpDefInst->DestroyPrinter( mpPrinter );
+ mbNewJobSetup = bSaveNewJobSetup;
+ maJobName = aSaveJobName;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mpPrinter = NULL;
return FALSE;
}
}
+ mbJobActive = TRUE;
return TRUE;
}
@@ -1578,7 +1436,7 @@ BOOL Printer::EndJob()
mbJobActive = FALSE;
- if ( mpPrinter || mpQPrinter )
+ if ( mpPrinter )
{
ImplReleaseGraphics();
@@ -1586,23 +1444,17 @@ BOOL Printer::EndJob()
bRet = TRUE;
- if ( mpPrinter )
- {
- mbPrinting = FALSE;
- mnCurPrintPage = 0;
- maJobName.Erase();
-
- mbDevOutput = FALSE;
- bRet = mpPrinter->EndJob();
- // Hier den Drucker nicht asyncron zerstoeren, da es
- // W95 nicht verkraftet, wenn gleichzeitig gedruckt wird
- // und ein Druckerobjekt zerstoert wird
- ImplGetSVData()->mpDefInst->DestroyPrinter( mpPrinter );
- mpPrinter = NULL;
- EndPrint();
- }
- else
- mpQPrinter->EndQueuePrint();
+ mbPrinting = FALSE;
+ mnCurPrintPage = 0;
+ maJobName.Erase();
+
+ mbDevOutput = FALSE;
+ bRet = mpPrinter->EndJob();
+ // Hier den Drucker nicht asyncron zerstoeren, da es
+ // W95 nicht verkraftet, wenn gleichzeitig gedruckt wird
+ // und ein Druckerobjekt zerstoert wird
+ ImplGetSVData()->mpDefInst->DestroyPrinter( mpPrinter );
+ mpPrinter = NULL;
}
return bRet;
@@ -1621,35 +1473,18 @@ BOOL Printer::AbortJob()
mbInPrintPage = FALSE;
mpJobGraphics = NULL;
- if ( mpPrinter || mpQPrinter )
+ if ( mpPrinter )
{
mbPrinting = FALSE;
mnCurPage = 0;
mnCurPrintPage = 0;
maJobName.Erase();
- if ( mpPrinter )
- {
- ImplReleaseGraphics();
- mbDevOutput = FALSE;
- mpPrinter->AbortJob();
- Application::PostUserEvent( LINK( this, Printer, ImplDestroyPrinterAsync ), mpPrinter );
- mpPrinter = NULL;
- EndPrint();
- }
- else
- {
- mpQPrinter->AbortQueuePrint();
- mpQPrinter->Destroy();
- mpQPrinter = NULL;
- if ( mpQMtf )
- {
- mpQMtf->Clear();
- delete mpQMtf;
- mpQMtf = NULL;
- }
- EndPrint();
- }
+ ImplReleaseGraphics();
+ mbDevOutput = FALSE;
+ mpPrinter->AbortJob();
+ Application::PostUserEvent( LINK( this, Printer, ImplDestroyPrinterAsync ), mpPrinter );
+ mpPrinter = NULL;
return TRUE;
}
@@ -1659,88 +1494,49 @@ BOOL Printer::AbortJob()
// -----------------------------------------------------------------------
-BOOL Printer::StartPage()
+void Printer::ImplStartPage()
{
if ( !IsJobActive() )
- return FALSE;
+ return;
- if ( mpPrinter || mpQPrinter )
+ if ( mpPrinter )
{
- if ( mpPrinter )
+ SalGraphics* pGraphics = mpPrinter->StartPage( maJobSetup.ImplGetConstData(), mbNewJobSetup );
+ if ( pGraphics )
{
- SalGraphics* pGraphics = mpPrinter->StartPage( maJobSetup.ImplGetConstData(), mbNewJobSetup );
- if ( pGraphics )
- {
- ImplReleaseGraphics();
- mpJobGraphics = pGraphics;
- }
- mbDevOutput = TRUE;
- }
- else
- {
- ImplGetGraphics();
- mpJobGraphics = mpGraphics;
+ ImplReleaseGraphics();
+ mpJobGraphics = pGraphics;
}
+ mbDevOutput = TRUE;
// PrintJob not aborted ???
if ( IsJobActive() )
{
mbInPrintPage = TRUE;
mnCurPage++;
- if ( mpQPrinter )
- {
- mpQPrinter->SetPrinterOptions( *mpPrinterOptions );
- mpQMtf = new GDIMetaFile;
- mpQMtf->Record( this );
- mpQMtf->SaveStatus();
- }
- else
- {
- mnCurPrintPage++;
- PrintPage();
- }
+ mnCurPrintPage++;
}
-
- return TRUE;
}
-
- return FALSE;
}
// -----------------------------------------------------------------------
-BOOL Printer::EndPage()
+void Printer::ImplEndPage()
{
if ( !IsJobActive() )
- return FALSE;
+ return;
mbInPrintPage = FALSE;
- if ( mpPrinter || mpQPrinter )
+ if ( mpPrinter )
{
- if ( mpPrinter )
- {
- mpPrinter->EndPage();
- ImplReleaseGraphics();
- mbDevOutput = FALSE;
- }
- else if ( mpQPrinter )
- {
- // Eigentuemeruebergang an QPrinter
- mpQMtf->Stop();
- mpQMtf->WindStart();
- GDIMetaFile* pPage = mpQMtf;
- mpQMtf = NULL;
- mpQPrinter->AddQueuePage( pPage, mnCurPage, mbNewJobSetup );
- }
+ mpPrinter->EndPage();
+ ImplReleaseGraphics();
+ mbDevOutput = FALSE;
mpJobGraphics = NULL;
mbNewJobSetup = FALSE;
-
- return TRUE;
}
-
- return FALSE;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 685f68fe7af3..21c6b59f53a4 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -31,8 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#define _SPOOLPRINTER_EXT
-
#include <functional>
#include <algorithm>
#include <utility>
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 1ef2e18b996a..b7344d073386 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -330,13 +330,6 @@ bool Printer::StartJob( const XubString& i_rJobName, boost::shared_ptr<vcl::Prin
if ( IsJobActive() || IsPrinting() )
return FALSE;
- if( mpPrinterData->mbNextJobIsQuick )
- {
- String aKey( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) );
- if( maJobSetup.GetValue( aKey ).Len() == 0 )
- maJobSetup.SetValue( aKey, String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
- }
-
ULONG nCopies = mnCopyCount;
BOOL bCollateCopy = mbCollateCopy;
BOOL bUserCopy = FALSE;
@@ -722,14 +715,14 @@ void PrinterListener::printFilteredPage( int i_nPage )
mpImplData->mpPrinter->SetPaperSizeUser( aPageSize = mpImplData->maMultiPage.aPaperSize );
// actually print the page
- mpImplData->mpPrinter->StartPage();
+ mpImplData->mpPrinter->ImplStartPage();
mpImplData->mpPrinter->Push();
aCleanedFile.WindStart();
aCleanedFile.Play( mpImplData->mpPrinter.get() );
mpImplData->mpPrinter->Pop();
- mpImplData->mpPrinter->EndPage();
+ mpImplData->mpPrinter->ImplEndPage();
mpImplData->mpPrinter->SetDrawMode( nRestoreDrawMode );
}