LibreOffice Module vcl (master)  1
genprn.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_INC_GENERIC_GENPRN_H
21 #define INCLUDED_VCL_INC_GENERIC_GENPRN_H
22 
23 #include <vcl/jobdata.hxx>
24 #include <unx/printergfx.hxx>
25 #include <unx/printerjob.hxx>
26 #include <salprn.hxx>
27 
28 class GenPspGraphics;
30 {
31 public:
32  std::unique_ptr<GenPspGraphics> m_pGraphics;
35 
37  virtual ~PspSalInfoPrinter() override;
38 
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  long& rOutWidth, 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;
54 };
55 
57 {
58 public:
59  OUString m_aFileName;
60  OUString m_aTmpFile;
62  std::unique_ptr<GenPspGraphics> m_xGraphics;
66  sal_uInt32 m_nCopies;
67  bool m_bCollate;
68  bool m_bPdf;
70 
71  PspSalPrinter( SalInfoPrinter *pPrinter );
72  virtual ~PspSalPrinter() override;
73 
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;
90 };
91 
92 #endif // INCLUDED_VCL_INC_GENERIC_GENPRN_H
93 
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString m_aFileName
Definition: genprn.h:59
virtual SalGraphics * AcquireGraphics()=0
sal_uInt32 m_nCopies
Definition: genprn.h:66
virtual bool EndJob()=0
virtual int GetLandscapeAngle(const ImplJobSetup *pSetupData)=0
bool m_bPdf
Definition: genprn.h:68
std::unique_ptr< GenPspGraphics > m_xGraphics
Definition: genprn.h:62
PrinterCapType
Definition: prntypes.hxx:71
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
virtual bool StartJob(const OUString *pFileName, const OUString &rJobName, const OUString &rAppName, sal_uInt32 nCopies, bool bCollate, bool bDirect, ImplJobSetup *pSetupData)=0
psp::JobData m_aJobData
Definition: genprn.h:33
virtual bool Setup(weld::Window *pFrame, ImplJobSetup *pSetupData)=0
virtual void EndPage()=0
virtual SalGraphics * StartPage(ImplJobSetup *pSetupData, bool bNewJobData)=0
psp::PrinterGfx m_aPrinterGfx
Definition: genprn.h:65
virtual void ReleaseGraphics(SalGraphics *pGraphics)=0
psp::JobData m_aJobData
Definition: genprn.h:64
bool m_bIsPDFWriterJob
Definition: genprn.h:69
virtual OUString GetPaperBinName(const ImplJobSetup *pSetupData, sal_uInt16 nPaperBin)=0
bool m_bCollate
Definition: genprn.h:67
virtual bool SetPrinterData(ImplJobSetup *pSetupData)=0
JobSetFlags
Definition: salptype.hxx:27
psp::PrinterJob m_aPrintJob
Definition: genprn.h:63
psp::PrinterGfx m_aPrinterGfx
Definition: genprn.h:34
std::unique_ptr< GenPspGraphics > m_pGraphics
Definition: genprn.h:32
virtual void GetPageInfo(const ImplJobSetup *pSetupData, long &rOutWidth, long &rOutHeight, Point &rPageOffset, Size &rPaperSize)=0
virtual void InitPaperFormats(const ImplJobSetup *pSetupData)=0
virtual sal_uInt16 GetPaperBinCount(const ImplJobSetup *pSetupData)=0
virtual bool SetData(JobSetFlags nFlags, ImplJobSetup *pSetupData)=0
OUString m_aTmpFile
Definition: genprn.h:60
SalInfoPrinter * m_pInfoPrinter
Definition: genprn.h:61
virtual sal_uInt32 GetCapabilities(const ImplJobSetup *pSetupData, PrinterCapType nType)=0