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