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 _SV_GENERIC_PRN_H
21 #define _SV_GENERIC_PRN_H
23 #include "vcl/jobdata.hxx"
24 #include "generic/printergfx.hxx"
25 #include "generic/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();
40 // overload all pure virtual methods
41 virtual SalGraphics
* GetGraphics();
42 virtual void ReleaseGraphics( SalGraphics
* pGraphics
);
43 virtual sal_Bool
Setup( SalFrame
* pFrame
, ImplJobSetup
* pSetupData
);
44 virtual sal_Bool
SetPrinterData( ImplJobSetup
* pSetupData
);
45 virtual sal_Bool
SetData( sal_uIntPtr nFlags
, ImplJobSetup
* pSetupData
);
46 virtual void GetPageInfo( const ImplJobSetup
* pSetupData
,
47 long& rOutWidth
, long& rOutHeight
,
48 long& rPageOffX
, long& rPageOffY
,
49 long& rPageWidth
, long& rPageHeight
);
50 virtual sal_uIntPtr
GetCapabilities( const ImplJobSetup
* pSetupData
, sal_uInt16 nType
);
51 virtual sal_uIntPtr
GetPaperBinCount( const ImplJobSetup
* pSetupData
);
52 virtual rtl::OUString
GetPaperBinName( const ImplJobSetup
* pSetupData
, sal_uIntPtr nPaperBin
);
53 virtual void InitPaperFormats( const ImplJobSetup
* pSetupData
);
54 virtual int GetLandscapeAngle( const ImplJobSetup
* pSetupData
);
57 class VCL_DLLPUBLIC PspSalPrinter
: public SalPrinter
60 rtl::OUString m_aFileName
;
61 rtl::OUString m_aTmpFile
;
62 rtl::OUString m_aFaxNr
;
65 bool m_bSwallowFaxNo
:1;
66 bool m_bIsPDFWriterJob
:1;
67 GenPspGraphics
* m_pGraphics
;
68 psp::PrinterJob m_aPrintJob
;
69 psp::JobData m_aJobData
;
70 psp::PrinterGfx m_aPrinterGfx
;
71 sal_uIntPtr m_nCopies
;
73 SalInfoPrinter
* m_pInfoPrinter
;
75 PspSalPrinter( SalInfoPrinter
*pPrinter
);
76 virtual ~PspSalPrinter();
78 // overload all pure virtual methods
79 virtual sal_Bool
StartJob( const rtl::OUString
* pFileName
,
80 const rtl::OUString
& rJobName
,
81 const rtl::OUString
& rAppName
,
85 ImplJobSetup
* pSetupData
);
86 virtual sal_Bool
StartJob( const rtl::OUString
*,
90 vcl::PrinterController
& i_rController
);
91 virtual sal_Bool
EndJob();
92 virtual sal_Bool
AbortJob();
93 virtual SalGraphics
* StartPage( ImplJobSetup
* pSetupData
, sal_Bool bNewJobData
);
94 virtual sal_Bool
EndPage();
95 virtual sal_uIntPtr
GetErrorCode();
98 #endif // _SV_SALPRN_H
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */