Branch libreoffice-5-0-4
[LibreOffice.git] / vcl / inc / generic / genprn.h
blob4a55f340a62b95ec31d88282d78cccd58cfe24ab
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_INC_GENERIC_GENPRN_H
21 #define INCLUDED_VCL_INC_GENERIC_GENPRN_H
23 #include "vcl/jobdata.hxx"
24 #include "generic/printergfx.hxx"
25 #include "generic/printerjob.hxx"
26 #include "salprn.hxx"
27 #include "vclpluginapi.h"
29 class GenPspGraphics;
30 class VCL_DLLPUBLIC PspSalInfoPrinter : public SalInfoPrinter
32 public:
33 GenPspGraphics* m_pGraphics;
34 psp::JobData m_aJobData;
35 psp::PrinterGfx m_aPrinterGfx;
37 PspSalInfoPrinter();
38 virtual ~PspSalInfoPrinter();
40 // override all pure virtual methods
41 virtual SalGraphics* AcquireGraphics() SAL_OVERRIDE;
42 virtual void ReleaseGraphics( SalGraphics* pGraphics ) SAL_OVERRIDE;
43 virtual bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) SAL_OVERRIDE;
44 virtual bool SetPrinterData( ImplJobSetup* pSetupData ) SAL_OVERRIDE;
45 virtual bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData ) SAL_OVERRIDE;
46 virtual void GetPageInfo( const ImplJobSetup* pSetupData,
47 long& rOutWidth, long& rOutHeight,
48 long& rPageOffX, long& rPageOffY,
49 long& rPageWidth, long& rPageHeight ) SAL_OVERRIDE;
50 virtual sal_uIntPtr GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ) SAL_OVERRIDE;
51 virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData ) SAL_OVERRIDE;
52 virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin ) SAL_OVERRIDE;
53 virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) SAL_OVERRIDE;
54 virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) SAL_OVERRIDE;
57 class VCL_DLLPUBLIC PspSalPrinter : public SalPrinter
59 public:
60 OUString m_aFileName;
61 OUString m_aTmpFile;
62 bool m_bPdf:1;
63 bool m_bIsPDFWriterJob:1;
64 GenPspGraphics* m_pGraphics;
65 psp::PrinterJob m_aPrintJob;
66 psp::JobData m_aJobData;
67 psp::PrinterGfx m_aPrinterGfx;
68 sal_uIntPtr m_nCopies;
69 bool m_bCollate;
70 SalInfoPrinter* m_pInfoPrinter;
72 PspSalPrinter( SalInfoPrinter *pPrinter );
73 virtual ~PspSalPrinter();
75 // override all pure virtual methods
76 virtual bool StartJob( const OUString* pFileName,
77 const OUString& rJobName,
78 const OUString& rAppName,
79 sal_uIntPtr nCopies,
80 bool bCollate,
81 bool bDirect,
82 ImplJobSetup* pSetupData ) SAL_OVERRIDE;
83 virtual bool StartJob( const OUString*,
84 const OUString&,
85 const OUString&,
86 ImplJobSetup*,
87 vcl::PrinterController& i_rController ) SAL_OVERRIDE;
88 virtual bool EndJob() SAL_OVERRIDE;
89 virtual bool AbortJob() SAL_OVERRIDE;
90 virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) SAL_OVERRIDE;
91 virtual bool EndPage() SAL_OVERRIDE;
92 virtual sal_uIntPtr GetErrorCode() SAL_OVERRIDE;
95 #endif // INCLUDED_VCL_INC_GENERIC_GENPRN_H
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */