bump product version to 7.2.5.1
[LibreOffice.git] / vcl / inc / win / salprn.h
blobc2a47ebb941feb1b262b64baefe2b28d36c6deb7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_WIN_SALPRN_H
21 #define INCLUDED_VCL_INC_WIN_SALPRN_H
23 #include <salprn.hxx>
26 // WNT3
27 #define SAL_DRIVERDATA_SYSSIGN ((sal_uIntPtr)0x574E5433)
29 #pragma pack( 1 )
31 struct SalDriverData
33 sal_uIntPtr mnSysSignature;
34 sal_uInt16 mnDriverOffset;
35 BYTE maDriverData[1];
38 #pragma pack()
41 class WinSalGraphics;
43 class WinSalInfoPrinter : public SalInfoPrinter
45 public:
46 WinSalGraphics* mpGraphics; // current Printer graphics
47 OUString maDriverName; // printer driver name
48 OUString maDeviceName; // printer device name
49 OUString maPortName; // printer port name
50 HDC mhDC; // printer hdc
51 bool mbGraphics; // is Graphics used
52 public:
53 WinSalInfoPrinter();
54 virtual ~WinSalInfoPrinter() override;
56 virtual SalGraphics* AcquireGraphics() override;
57 virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
58 virtual bool Setup( weld::Window* pFrame, ImplJobSetup* pSetupData ) override;
59 virtual bool SetPrinterData( ImplJobSetup* pSetupData ) override;
60 virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override;
61 virtual void GetPageInfo( const ImplJobSetup* pSetupData,
62 tools::Long& rOutWidth, tools::Long& rOutHeight,
63 Point& rPageOffset,
64 Size& rPaperSize ) override;
65 virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
66 virtual sal_uInt16 GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
67 virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) override;
68 virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) override;
69 virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) override;
73 class WinSalPrinter : public SalPrinter
75 public:
76 WinSalGraphics* mpGraphics; // current Printer graphics
77 WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
78 WinSalPrinter* mpNextPrinter; // next printing printer
79 HDC mhDC; // printer hdc
80 SalPrinterError mnError; // error code
81 sal_uInt32 mnCopies; // copies
82 bool mbCollate; // collated copies
83 bool mbAbort; // Job Aborted
85 bool mbValid;
87 protected:
88 void DoEndDoc(HDC hDC);
90 public:
91 WinSalPrinter();
92 virtual ~WinSalPrinter() override;
94 using SalPrinter::StartJob;
95 virtual bool StartJob( const OUString* pFileName,
96 const OUString& rJobName,
97 const OUString& rAppName,
98 sal_uInt32 nCopies,
99 bool bCollate,
100 bool bDirect,
101 ImplJobSetup* pSetupData ) override;
102 virtual bool EndJob() override;
103 virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) override;
104 virtual void EndPage() override;
105 virtual SalPrinterError GetErrorCode() override;
107 void markInvalid();
108 bool isValid() const { return mbValid; }
111 #endif // INCLUDED_VCL_INC_WIN_SALPRN_H
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */