LibreOffice Module vcl (master) 1
jobset.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_VCL_INC_JOBSET_H
21#define INCLUDED_VCL_INC_JOBSET_H
22
23#include <rtl/ustring.hxx>
24#include <i18nutil/paper.hxx>
25#include <vcl/dllapi.h>
26#include <vcl/prntypes.hxx>
27#include <unordered_map>
28
29// see com.sun.star.portal.client.JobSetupSystem.idl:
30#define JOBSETUP_SYSTEM_WINDOWS 1
31#define JOBSETUP_SYSTEM_UNIX 3
32#define JOBSETUP_SYSTEM_MAC 4
33
35{
36private:
37 sal_uInt16 mnSystem; //< System - JOBSETUP_SYSTEM_xxxx
38 OUString maPrinterName; //< Printer-Name
39 OUString maDriver; //< Driver-Name
40 Orientation meOrientation; //< Orientation
42 sal_uInt16 mnPaperBin; //< paper bin / in tray
43 Paper mePaperFormat; //< paper format
44 tools::Long mnPaperWidth; //< paper width (100th mm)
45 tools::Long mnPaperHeight; //< paper height (100th mm)
46 sal_uInt32 mnDriverDataLen; //< length of system specific data
47 sal_uInt8* mpDriverData; //< system specific data (will be streamed a byte block)
49 // setup mode
51 // TODO: orig paper size
52 std::unordered_map< OUString, OUString > maValueMap;
53
54public:
56 ImplJobSetup( const ImplJobSetup& rJobSetup );
58
59 bool operator==( const ImplJobSetup& rImplJobSetup ) const;
60
61 sal_uInt16 GetSystem() const { return mnSystem; }
62 void SetSystem(sal_uInt16 nSystem);
63
64 const OUString& GetPrinterName() const { return maPrinterName; }
65 void SetPrinterName(const OUString& rPrinterName);
66
67 const OUString& GetDriver() const { return maDriver; }
68 void SetDriver(const OUString& rDriver);
69
70 Orientation GetOrientation() const { return meOrientation; }
71 void SetOrientation(Orientation eOrientation);
72
73 DuplexMode GetDuplexMode() const { return meDuplexMode; }
74 void SetDuplexMode(DuplexMode eDuplexMode);
75
76 sal_uInt16 GetPaperBin() const { return mnPaperBin; }
77 void SetPaperBin(sal_uInt16 nPaperBin);
78
79 Paper GetPaperFormat() const { return mePaperFormat; }
80 void SetPaperFormat(Paper ePaperFormat);
81
82 tools::Long GetPaperWidth() const { return mnPaperWidth; }
83 void SetPaperWidth(tools::Long nWidth);
84
85 tools::Long GetPaperHeight() const { return mnPaperHeight; }
86 void SetPaperHeight(tools::Long nHeight);
87
88 sal_uInt32 GetDriverDataLen() const { return mnDriverDataLen; }
89 void SetDriverDataLen(sal_uInt32 nDriverDataLen);
90
91 const sal_uInt8* GetDriverData() const { return mpDriverData; }
92 void SetDriverData(sal_uInt8* pDriverData);
93
94 bool GetPapersizeFromSetup() const { return mbPapersizeFromSetup; }
95 void SetPapersizeFromSetup(bool bPapersizeFromSetup);
96
97 PrinterSetupMode GetPrinterSetupMode() const { return meSetupMode; }
98 void SetPrinterSetupMode(PrinterSetupMode eMode);
99
100 const std::unordered_map< OUString, OUString >& GetValueMap() const
101 { return maValueMap; }
102 void SetValueMap(const OUString& rKey, const OUString& rValue);
103};
104
105// If paper format is PAPER_USER, in the system-independent part it will
106// automatically be computed from paper width/height.
107// If paper width/height is 0, in the system-independent part it will
108// automatically be computed from paper format, if the latter is not PAPER_USER.
109
110#endif // INCLUDED_VCL_INC_JOBSET_H
111
112/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 mnPaperBin
Definition: jobset.h:42
sal_uInt16 GetSystem() const
Definition: jobset.h:61
bool GetPapersizeFromSetup() const
Definition: jobset.h:94
sal_uInt32 GetDriverDataLen() const
Definition: jobset.h:88
tools::Long GetPaperWidth() const
Definition: jobset.h:82
const sal_uInt8 * GetDriverData() const
Definition: jobset.h:91
PrinterSetupMode GetPrinterSetupMode() const
Definition: jobset.h:97
std::unordered_map< OUString, OUString > maValueMap
Definition: jobset.h:52
sal_uInt32 mnDriverDataLen
Definition: jobset.h:46
Orientation meOrientation
Definition: jobset.h:40
Orientation GetOrientation() const
Definition: jobset.h:70
tools::Long GetPaperHeight() const
Definition: jobset.h:85
tools::Long mnPaperHeight
Definition: jobset.h:45
sal_uInt16 mnSystem
Definition: jobset.h:37
const std::unordered_map< OUString, OUString > & GetValueMap() const
Definition: jobset.h:100
OUString maPrinterName
Definition: jobset.h:38
bool mbPapersizeFromSetup
Definition: jobset.h:48
PrinterSetupMode meSetupMode
Definition: jobset.h:50
sal_uInt16 GetPaperBin() const
Definition: jobset.h:76
sal_uInt8 * mpDriverData
Definition: jobset.h:47
OUString maDriver
Definition: jobset.h:39
DuplexMode GetDuplexMode() const
Definition: jobset.h:73
const OUString & GetDriver() const
Definition: jobset.h:67
const OUString & GetPrinterName() const
Definition: jobset.h:64
Paper mePaperFormat
Definition: jobset.h:43
DuplexMode meDuplexMode
Definition: jobset.h:41
tools::Long mnPaperWidth
Definition: jobset.h:44
Paper GetPaperFormat() const
Definition: jobset.h:79
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
long Long
Paper
DuplexMode
Definition: prntypes.hxx:28
PrinterSetupMode
Definition: prntypes.hxx:86
Orientation
Definition: prntypes.hxx:31
unsigned char sal_uInt8
bool operator==(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:175