1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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"
27 #include "vclpluginapi.h"
30 class VCL_DLLPUBLIC PspSalInfoPrinter
: public SalInfoPrinter
33 GenPspGraphics
* m_pGraphics
;
34 psp::JobData m_aJobData
;
35 psp::PrinterGfx m_aPrinterGfx
;
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( SalFrame
* 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 long& rPageOffX
, long& rPageOffY
,
49 long& rPageWidth
, long& rPageHeight
) 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
62 SalInfoPrinter
* m_pInfoPrinter
;
63 GenPspGraphics
* m_pGraphics
;
64 psp::PrinterJob m_aPrintJob
;
65 psp::JobData m_aJobData
;
66 psp::PrinterGfx m_aPrinterGfx
;
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
,
82 ImplJobSetup
* pSetupData
) override
;
83 virtual bool StartJob( const OUString
*,
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
;
91 virtual sal_uIntPtr
GetErrorCode() override
;
94 #endif // INCLUDED_VCL_INC_GENERIC_GENPRN_H
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */