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