1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: salprn.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
35 #include <vcl/salprn.hxx>
42 #define SAL_DRIVERDATA_SYSSIGN ((ULONG)0x574E5433)
43 #define SAL_DRIVERDATA_VERSION_A 1
44 #define SAL_DRIVERDATA_VERSION_W 2
52 USHORT mnDriverOffset
;
58 // ---------------------
59 // - WinSalInfoPrinter -
60 // ---------------------
64 class WinSalInfoPrinter
: public SalInfoPrinter
67 WinSalGraphics
* mpGraphics
; // current Printer graphics
68 XubString maDriverName
; // printer driver name
69 XubString maDeviceName
; // printer device name
70 XubString maPortName
; // printer port name
71 HDC mhDC
; // printer hdc
72 BOOL mbGraphics
; // is Graphics used
75 virtual ~WinSalInfoPrinter();
77 virtual SalGraphics
* GetGraphics();
78 virtual void ReleaseGraphics( SalGraphics
* pGraphics
);
79 virtual BOOL
Setup( SalFrame
* pFrame
, ImplJobSetup
* pSetupData
);
80 virtual BOOL
SetPrinterData( ImplJobSetup
* pSetupData
);
81 virtual BOOL
SetData( ULONG nFlags
, ImplJobSetup
* pSetupData
);
82 virtual void GetPageInfo( const ImplJobSetup
* pSetupData
,
83 long& rOutWidth
, long& rOutHeight
,
84 long& rPageOffX
, long& rPageOffY
,
85 long& rPageWidth
, long& rPageHeight
);
86 virtual ULONG
GetCapabilities( const ImplJobSetup
* pSetupData
, USHORT nType
);
87 virtual ULONG
GetPaperBinCount( const ImplJobSetup
* pSetupData
);
88 virtual String
GetPaperBinName( const ImplJobSetup
* pSetupData
, ULONG nPaperBin
);
89 virtual void InitPaperFormats( const ImplJobSetup
* pSetupData
);
90 virtual int GetLandscapeAngle( const ImplJobSetup
* pSetupData
);
91 virtual DuplexMode
GetDuplexMode( const ImplJobSetup
* pSetupData
);
98 class WinSalPrinter
: public SalPrinter
101 WinSalGraphics
* mpGraphics
; // current Printer graphics
102 WinSalInfoPrinter
* mpInfoPrinter
; // pointer to the compatible InfoPrinter
103 WinSalPrinter
* mpNextPrinter
; // next printing printer
104 HDC mhDC
; // printer hdc
105 ULONG mnError
; // Error Code
106 ULONG mnCopies
; // Kopien
107 BOOL mbCollate
; // Sortierte Kopien
108 BOOL mbAbort
; // Job Aborted
114 virtual ~WinSalPrinter();
116 using SalPrinter::StartJob
;
117 virtual BOOL
StartJob( const XubString
* pFileName
,
118 const XubString
& rJobName
,
119 const XubString
& rAppName
,
120 ULONG nCopies
, BOOL bCollate
,
121 ImplJobSetup
* pSetupData
);
122 virtual BOOL
EndJob();
123 virtual BOOL
AbortJob();
124 virtual SalGraphics
* StartPage( ImplJobSetup
* pSetupData
, BOOL bNewJobData
);
125 virtual BOOL
EndPage();
126 virtual ULONG
GetErrorCode();
129 bool isValid() const { return mbValid
; }
132 #endif // _SV_SALPRN_H