1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
32 #include <vcl/salprn.hxx>
38 typedef ImplFormInfo
* PIMPLFORMINFO
;
40 typedef ImplTrayInfo
* PIMPLTRAYINFO
;
42 // ----------------------
43 // - SalInfoPrinterData -
44 // ----------------------
46 //class SalInfoPrinterData
47 class Os2SalInfoPrinter
: public SalInfoPrinter
50 Os2SalGraphics
* mpGraphics
; // Graphics
51 HDC mhDC
; // printer hdc
52 HPS mhPS
; // printer hps
53 ByteString maPrinterName
; // pszPrinters
54 ByteString maName
; // pszName bzw. LogAdress
55 ByteString maDriverName
; // pszDriverName nach .
56 ByteString maDeviceName
; // pszDriverName bis .
57 ByteString maJobSetupDeviceName
; // DeviceName aus pDriverData
58 PIMPLFORMINFO
* mpFormArray
; // PaperForm-Names
59 USHORT mnFormCount
; // PaperForm-Count
60 PIMPLTRAYINFO
* mpTrayArray
; // PaperTray-Names
61 USHORT mnTrayCount
; // PaperTray-Count
62 BOOL mbDJPSupported
; // is driver DJP enabled
63 BOOL mbGraphics
; // is Graphics used
67 virtual ~Os2SalInfoPrinter();
69 virtual SalGraphics
* GetGraphics();
70 virtual void ReleaseGraphics( SalGraphics
* pGraphics
);
71 virtual BOOL
Setup( SalFrame
* pFrame
, ImplJobSetup
* pSetupData
);
72 virtual BOOL
SetPrinterData( ImplJobSetup
* pSetupData
);
73 virtual BOOL
SetData( ULONG nFlags
, ImplJobSetup
* pSetupData
);
74 virtual void GetPageInfo( const ImplJobSetup
* pSetupData
,
75 long& rOutWidth
, long& rOutHeight
,
76 long& rPageOffX
, long& rPageOffY
,
77 long& rPageWidth
, long& rPageHeight
);
78 virtual ULONG
GetCapabilities( const ImplJobSetup
* pSetupData
, USHORT nType
);
79 virtual ULONG
GetPaperBinCount( const ImplJobSetup
* pSetupData
);
80 virtual String
GetPaperBinName( const ImplJobSetup
* pSetupData
, ULONG nPaperBin
);
81 virtual void InitPaperFormats( const ImplJobSetup
* pSetupData
);
82 virtual int GetLandscapeAngle( const ImplJobSetup
* pSetupData
);
89 class SalPrinterData00
92 Os2SalGraphics
* mpGraphics
; // current Printer graphics
93 SalInfoPrinter
* mpInfoPrinter
; // pointer to the compatible InfoPrinter
94 HDC mhDC
; // printer hdc
95 HPS mhPS
; // printer hps
96 ULONG mnError
; // Error Code
97 BOOL mbFirstPage
; // IsFirstPage
98 BOOL mbAbort
; // JobAborted
99 BOOL mbPrintDJPSupported
; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
100 char maCommentBuf
[33]; // Comment
101 char maCopyBuf
[10]; // Kopien
108 class Os2SalPrinter
: public SalPrinter
111 Os2SalGraphics
* mpGraphics
; // current Printer graphics
112 Os2SalInfoPrinter
* mpInfoPrinter
; // pointer to the compatible InfoPrinter
113 Os2SalPrinter
* mpNextPrinter
; // next printing printer
114 HDC mhDC
; // printer hdc
115 HPS mhPS
; // printer hps
116 ULONG mnError
; // Error Code
117 BOOL mbFirstPage
; // IsFirstPage
118 BOOL mbAbort
; // JobAborted
119 BOOL mbPrintDJPSupported
; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
120 char maCommentBuf
[33]; // Comment
121 char maCopyBuf
[16]; // Kopien
122 //HDC mhDC; // printer hdc
123 //ULONG mnError; // Error Code
124 //ULONG mnCopies; // Kopien
125 //BOOL mbCollate; // Sortierte Kopien
126 //BOOL mbAbort; // Job Aborted
130 virtual ~Os2SalPrinter();
132 virtual BOOL
StartJob( const XubString
* pFileName
,
133 const XubString
& rJobName
,
134 const XubString
& rAppName
,
138 ImplJobSetup
* pSetupData
);
139 virtual BOOL
EndJob();
140 virtual BOOL
AbortJob();
141 virtual SalGraphics
* StartPage( ImplJobSetup
* pSetupData
, BOOL bNewJobData
);
142 virtual BOOL
EndPage();
143 virtual ULONG
GetErrorCode();
146 #endif // _SV_SALPRN_H