Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / vcl / inc / unx / genprn.h
bloba8ad4fb062c13195c7f7de2ad6a69e1b7b294880
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 <unx/printergfx.hxx>
25 #include <unx/printerjob.hxx>
26 #include <salprn.hxx>
27 #include <vclpluginapi.h>
29 class GenPspGraphics;
30 class VCL_DLLPUBLIC PspSalInfoPrinter : public SalInfoPrinter
32 public:
33 std::unique_ptr<GenPspGraphics> m_pGraphics;
34 psp::JobData m_aJobData;
35 psp::PrinterGfx m_aPrinterGfx;
37 PspSalInfoPrinter();
38 virtual ~PspSalInfoPrinter() override;
40 // override all pure virtual methods
41 virtual SalGraphics* AcquireGraphics() override;
42 virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
43 virtual bool Setup( weld::Window* pFrame, ImplJobSetup* pSetupData ) override;
44 virtual bool SetPrinterData( ImplJobSetup* pSetupData ) override;
45 virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override;
46 virtual void GetPageInfo( const ImplJobSetup* pSetupData,
47 long& rOutWidth, long& rOutHeight,
48 Point& rPageOffset,
49 Size& rPaperSize ) override;
50 virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
51 virtual sal_uInt16 GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
52 virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) override;
53 virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) override;
54 virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) override;
57 class VCL_DLLPUBLIC PspSalPrinter : public SalPrinter
59 public:
60 OUString m_aFileName;
61 OUString m_aTmpFile;
62 SalInfoPrinter* m_pInfoPrinter;
63 GenPspGraphics* m_pGraphics;
64 psp::PrinterJob m_aPrintJob;
65 psp::JobData m_aJobData;
66 psp::PrinterGfx m_aPrinterGfx;
67 sal_uInt32 m_nCopies;
68 bool m_bCollate;
69 bool m_bPdf;
70 bool m_bIsPDFWriterJob;
72 PspSalPrinter( SalInfoPrinter *pPrinter );
73 virtual ~PspSalPrinter() override;
75 // override all pure virtual methods
76 virtual bool StartJob( const OUString* pFileName,
77 const OUString& rJobName,
78 const OUString& rAppName,
79 sal_uInt32 nCopies,
80 bool bCollate,
81 bool bDirect,
82 ImplJobSetup* pSetupData ) override;
83 virtual bool StartJob( const OUString*,
84 const OUString&,
85 const OUString&,
86 ImplJobSetup*,
87 vcl::PrinterController& i_rController ) override;
88 virtual bool EndJob() override;
89 virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) override;
90 virtual void EndPage() override;
93 #endif // INCLUDED_VCL_INC_GENERIC_GENPRN_H
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */