zhao
2021-07-02 23ee356c6f260ecc1a48bbb8bd60932b979e4698
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
/* ====================================================================
   Licensed to the Apache Software Foundation (ASF) Under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for Additional information regarding copyright ownership.
   The ASF licenses this file to You Under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed Under the License is distributed on an "AS Is" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations Under the License.
==================================================================== */
 
 
namespace HH.WMS.Utils.NPOI.HSSF.UserModel
{
    using System;
    using System.Text;
    using HH.WMS.Utils.NPOI.HSSF.Record;
 
    /// <summary>
    /// Used to modify the print Setup.
    /// @author Shawn Laubach (slaubach at apache dot org)
    /// </summary>
    public class HSSFPrintSetup :HH.WMS.Utils.NPOI.SS.UserModel.IPrintSetup
    {
        PrintSetupRecord printSetupRecord;
 
        /// <summary>
        /// Initializes a new instance of the <see cref="HSSFPrintSetup"/> class.
        /// </summary>
        /// <param name="printSetupRecord">Takes the low level print Setup record.</param>
        public HSSFPrintSetup(PrintSetupRecord printSetupRecord)
        {
            this.printSetupRecord = printSetupRecord;
        }
 
        /// <summary>
        /// Gets or sets the size of the paper.
        /// </summary>
        /// <value>The size of the paper.</value>
        public short PaperSize
        {
            get
            {
                return printSetupRecord.PaperSize;
            }
            set 
            {
                printSetupRecord.PaperSize = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the scale.
        /// </summary>
        /// <value>The scale.</value>
        public short Scale
        {
            get
            {
                return printSetupRecord.Scale;
            }
            set 
            {
                printSetupRecord.Scale = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the page start.
        /// </summary>
        /// <value>The page start.</value>
        public short PageStart
        {
            get
            {
                return printSetupRecord.PageStart;
            }
            set 
            {
                printSetupRecord.PageStart=value;
            }
        }
 
        /// <summary>
        /// Gets or sets the number of pages wide to fit sheet in.
        /// </summary>
        /// <value>the number of pages wide to fit sheet in</value>
        public short FitWidth
        {
            get
            {
                return printSetupRecord.FitWidth;
            }
            set 
            {
                printSetupRecord.FitWidth = value;
            }
        }
 
        /// <summary>
        /// Gets or sets number of pages high to fit the sheet in
        /// </summary>
        /// <value>number of pages high to fit the sheet in.</value>
        public short FitHeight
        {
            get
            {
                return printSetupRecord.FitHeight;
            }
            set 
            {
                printSetupRecord.FitHeight = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the bit flags for the options.
        /// </summary>
        /// <value>the bit flags for the options.</value>
        public short Options
        {
            get { return printSetupRecord.Options; }
            set { printSetupRecord.Options=(value); }
        }
 
        /// <summary>
        /// Gets or sets the left to right print order.
        /// </summary>
        /// <value>the left to right print order.</value>
        public bool LeftToRight
        {
            get
            {
                return printSetupRecord.LeftToRight;
            }
            set 
            {
                printSetupRecord.LeftToRight = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the landscape mode.
        /// </summary>
        /// <value>the landscape mode.</value>
        public bool Landscape
        {
            get
            {
                return !printSetupRecord.Landscape;
            }
            set 
            {
                printSetupRecord.Landscape = !value;
            }
        }
 
        /// <summary>
        /// Gets or sets the valid Settings.
        /// </summary>
        /// <value>the valid Settings.</value>
        public bool ValidSettings
        {
            get
            {
                return printSetupRecord.ValidSettings;
            }
            set 
            {
                printSetupRecord.ValidSettings = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the black and white Setting.
        /// </summary>
        /// <value>black and white Setting</value>
        public bool NoColor
        {
            get
            {
                return printSetupRecord.NoColor;
            }
            set 
            {
                printSetupRecord.NoColor=value;
            }
        }
 
        public bool EndNote
        {
            get { return printSetupRecord.EndNote; }
            set 
            {
                printSetupRecord.EndNote = value;
            }
        }
        public HH.WMS.Utils.NPOI.SS.UserModel.DisplayCellErrorType CellError
        {
            get { return (HH.WMS.Utils.NPOI.SS.UserModel.DisplayCellErrorType)printSetupRecord.CellError; }
            set { printSetupRecord.CellError=(short)value; }
        }
 
        /// <summary>
        /// Gets or sets the draft mode.
        /// </summary>
        /// <value>the draft mode.</value>
        public bool Draft
        {
            get
            {
                return printSetupRecord.Draft;
            }
            set 
            {
                printSetupRecord.Draft = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the print notes.
        /// </summary>
        /// <value>the print notes.</value>
        public bool Notes
        {
            get
            {
                return printSetupRecord.Notes;
            }
            set 
            {
                printSetupRecord.Notes = value;
            }
        }
 
        /// <summary>
        /// Gets or sets a value indicating whether [no orientation].
        /// </summary>
        /// <value><c>true</c> if [no orientation]; otherwise, <c>false</c>.</value>
        public bool NoOrientation
        {
            get
            {
                return printSetupRecord.NoOrientation;
            }
            set 
            {
                printSetupRecord.NoOrientation = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the use page numbers.  
        /// </summary>
        /// <value>use page numbers.  </value>
        public bool UsePage
        {
            get
            {
                return printSetupRecord.UsePage;
            }
            set 
            {
                printSetupRecord.UsePage = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the horizontal resolution.
        /// </summary>
        /// <value>the horizontal resolution.</value>
        public short HResolution
        {
            get
            {
                return printSetupRecord.HResolution;
            }
            set
            {
                printSetupRecord.HResolution = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the vertical resolution.
        /// </summary>
        /// <value>the vertical resolution.</value>
        public short VResolution
        {
            get
            {
                return printSetupRecord.VResolution;
            }
            set 
            {
                printSetupRecord.VResolution = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the header margin.
        /// </summary>
        /// <value>The header margin.</value>
        public double HeaderMargin
        {
            get
            {
                return printSetupRecord.HeaderMargin;
            }
            set
            {
                printSetupRecord.HeaderMargin=value;
            }
        }
 
        /// <summary>
        /// Gets or sets the footer margin.
        /// </summary>
        /// <value>The footer margin.</value>
        public double FooterMargin
        {
            get
            {
                return printSetupRecord.FooterMargin;
            }
            set 
            {
                printSetupRecord.FooterMargin = value;
            }
        }
 
        /// <summary>
        /// Gets or sets the number of copies.
        /// </summary>
        /// <value>the number of copies.</value>
        public short Copies
        {
            get
            {
                return printSetupRecord.Copies;
            }
            set 
            {
                printSetupRecord.Copies = value;
            }
        }
    }
}