Kaydet (Commit) c57d50dc authored tarafından Thomas Arnhold's avatar Thomas Arnhold

callcatcher: remove Printer::Foo

üst 30bfcd14
...@@ -272,7 +272,6 @@ private: ...@@ -272,7 +272,6 @@ private:
static SAL_DLLPRIVATE sal_uLong ImplSalPrinterErrorCodeToVCL( sal_uLong nError ); static SAL_DLLPRIVATE sal_uLong ImplSalPrinterErrorCodeToVCL( sal_uLong nError );
private: private:
SAL_DLLPRIVATE void ImplEndPrint();
SAL_DLLPRIVATE sal_Bool EndJob(); SAL_DLLPRIVATE sal_Bool EndJob();
SAL_DLLPRIVATE Printer( const Printer& rPrinter ); SAL_DLLPRIVATE Printer( const Printer& rPrinter );
SAL_DLLPRIVATE Printer& operator =( const Printer& rPrinter ); SAL_DLLPRIVATE Printer& operator =( const Printer& rPrinter );
...@@ -281,7 +280,6 @@ public: ...@@ -281,7 +280,6 @@ public:
SAL_DLLPRIVATE void ImplEndPage(); SAL_DLLPRIVATE void ImplEndPage();
public: public:
void DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient ); void DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient );
void DrawGradientEx( OutputDevice* pOut, const PolyPolygon& rPolyPoly, const Gradient& rGradient );
protected: protected:
...@@ -290,7 +288,6 @@ protected: ...@@ -290,7 +288,6 @@ protected:
public: public:
Printer(); Printer();
Printer( const Window* pWindow );
Printer( const JobSetup& rJobSetup ); Printer( const JobSetup& rJobSetup );
Printer( const QueueInfo& rQueueInfo ); Printer( const QueueInfo& rQueueInfo );
Printer( const XubString& rPrinterName ); Printer( const XubString& rPrinterName );
...@@ -329,7 +326,6 @@ public: ...@@ -329,7 +326,6 @@ public:
sal_Bool SetOrientation( Orientation eOrient ); sal_Bool SetOrientation( Orientation eOrient );
Orientation GetOrientation() const; Orientation GetOrientation() const;
DuplexMode GetDuplexMode() const;
sal_Bool SetDuplexMode( DuplexMode ); sal_Bool SetDuplexMode( DuplexMode );
// returns the angle that a landscape page will be turned counterclockwise // returns the angle that a landscape page will be turned counterclockwise
// wrt to portrait. The return value may be only valid for // wrt to portrait. The return value may be only valid for
...@@ -363,7 +359,6 @@ public: ...@@ -363,7 +359,6 @@ public:
sal_Bool IsPrinting() const { return mbPrinting; } sal_Bool IsPrinting() const { return mbPrinting; }
sal_Bool AbortJob();
const XubString& GetCurJobName() const { return maJobName; } const XubString& GetCurJobName() const { return maJobName; }
sal_uInt16 GetCurPage() const { return mnCurPage; } sal_uInt16 GetCurPage() const { return mnCurPage; }
sal_Bool IsJobActive() const { return mbJobActive; } sal_Bool IsJobActive() const { return mbJobActive; }
......
...@@ -667,14 +667,6 @@ Printer::Printer() ...@@ -667,14 +667,6 @@ Printer::Printer()
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
Printer::Printer( const Window* pWindow )
{
ImplInitData();
ImplInitDisplay( pWindow );
}
// -----------------------------------------------------------------------
Printer::Printer( const JobSetup& rJobSetup ) : Printer::Printer( const JobSetup& rJobSetup ) :
maJobSetup( rJobSetup ) maJobSetup( rJobSetup )
{ {
...@@ -1336,13 +1328,6 @@ const PaperInfo& Printer::GetPaperInfo( int nPaper ) const ...@@ -1336,13 +1328,6 @@ const PaperInfo& Printer::GetPaperInfo( int nPaper ) const
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
DuplexMode Printer::GetDuplexMode() const
{
return maJobSetup.ImplGetConstData()->meDuplexMode;
}
// -----------------------------------------------------------------------
sal_Bool Printer::SetDuplexMode( DuplexMode eDuplex ) sal_Bool Printer::SetDuplexMode( DuplexMode eDuplex )
{ {
if ( mbInPrintPage ) if ( mbInPrintPage )
...@@ -1455,15 +1440,6 @@ sal_uLong Printer::ImplSalPrinterErrorCodeToVCL( sal_uLong nError ) ...@@ -1455,15 +1440,6 @@ sal_uLong Printer::ImplSalPrinterErrorCodeToVCL( sal_uLong nError )
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void Printer::ImplEndPrint()
{
mbPrinting = sal_False;
mnCurPrintPage = 0;
maJobName.Erase();
}
// -----------------------------------------------------------------------
IMPL_LINK( Printer, ImplDestroyPrinterAsync, void*, pSalPrinter ) IMPL_LINK( Printer, ImplDestroyPrinterAsync, void*, pSalPrinter )
{ {
SalPrinter* pPrinter = (SalPrinter*)pSalPrinter; SalPrinter* pPrinter = (SalPrinter*)pSalPrinter;
...@@ -1510,38 +1486,6 @@ sal_Bool Printer::EndJob() ...@@ -1510,38 +1486,6 @@ sal_Bool Printer::EndJob()
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
sal_Bool Printer::AbortJob()
{
// Wenn wir einen Queue-Printer haben, kann man diesen noch mit
// AbortJob() abbrechen, solange dieser noch am Drucken ist
if ( !IsJobActive() && !IsPrinting() )
return sal_False;
mbJobActive = sal_False;
mbInPrintPage = sal_False;
mpJobGraphics = NULL;
if ( mpPrinter )
{
mbPrinting = sal_False;
mnCurPage = 0;
mnCurPrintPage = 0;
maJobName.Erase();
ImplReleaseGraphics();
mbDevOutput = sal_False;
mpPrinter->AbortJob();
Application::PostUserEvent( LINK( this, Printer, ImplDestroyPrinterAsync ), mpPrinter );
mpPrinter = NULL;
return sal_True;
}
return sal_False;
}
// -----------------------------------------------------------------------
void Printer::ImplStartPage() void Printer::ImplStartPage()
{ {
if ( !IsJobActive() ) if ( !IsJobActive() )
......
...@@ -1579,47 +1579,4 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const ...@@ -1579,47 +1579,4 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const
pOut->DrawGradient( rRect, rGradient ); pOut->DrawGradient( rRect, rGradient );
} }
// -----------------------------------------------------------------------------
void Printer::DrawGradientEx( OutputDevice* pOut, const PolyPolygon& rPolyPoly, const Gradient& rGradient )
{
const PrinterOptions& rPrinterOptions = GetPrinterOptions();
if( rPrinterOptions.IsReduceGradients() )
{
if( PRINTER_GRADIENT_STRIPES == rPrinterOptions.GetReducedGradientMode() )
{
if( !rGradient.GetSteps() || ( rGradient.GetSteps() > rPrinterOptions.GetReducedGradientStepCount() ) )
{
Gradient aNewGradient( rGradient );
aNewGradient.SetSteps( rPrinterOptions.GetReducedGradientStepCount() );
pOut->DrawGradient( rPolyPoly, aNewGradient );
}
else
pOut->DrawGradient( rPolyPoly, rGradient );
}
else
{
const Color& rStartColor = rGradient.GetStartColor();
const Color& rEndColor = rGradient.GetEndColor();
const long nR = ( ( (long) rStartColor.GetRed() * rGradient.GetStartIntensity() ) / 100L +
( (long) rEndColor.GetRed() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const long nG = ( ( (long) rStartColor.GetGreen() * rGradient.GetStartIntensity() ) / 100L +
( (long) rEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const long nB = ( ( (long) rStartColor.GetBlue() * rGradient.GetStartIntensity() ) / 100L +
( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pOut->SetLineColor( aColor );
pOut->SetFillColor( aColor );
pOut->DrawPolyPolygon( rPolyPoly );
pOut->Pop();
}
}
else
pOut->DrawGradient( rPolyPoly, rGradient );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment